File pidentd.spec of Package pidentd

# spec file for package pidentd
# Copyright (c) 2023 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           pidentd
Version:        3.0.19
Release:        0
Summary:        An Implementation of the RFC1413 Identification Server
License:        SUSE-Public-Domain
Group:          Productivity/Networking/System
Source1:        pidentd.service
Patch0:         pidentd-destdir.patch
Patch1:         01-legacy.patch
Patch2:         pidentd-rpmlint-gcc-checks.patch
Patch3:         pidentd-no-date.patch
Patch4:         reproducible.patch
Patch5:         pidentd-ipv6.patch
BuildRequires:  autoconf
BuildRequires:  libtool

This package contains identd, which implements a RFC1413 identification
server.  Identd looks up specific TCP/IP connections and returns the
user name and other information about the connection.

%setup -q
%patch -P 0 -p1
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
%patch -P 4 -p1
%patch -P 5

export CFLAGS="%{optflags} -DHAVE_IPV6"

install -D -m 0644 etc/identd.conf %{buildroot}%{_sysconfdir}/identd.conf
ln -s identd %{buildroot}%{_sbindir}/in.identd
echo ".so man8/identd.8" > %{buildroot}%{_mandir}/man8/in.identd.8

ln -s service %{buildroot}%{_sbindir}/rcidentd
install -D -m 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/identd.service

mkdir -p %{buildroot}%{_tmpfilesdir}
cat > %{buildroot}%{_tmpfilesdir}/pidentd.conf <<EOF
d /run/identd 0755 root root - -

%service_add_pre identd.service

%tmpfiles_create %{_tmpfilesdir}/pidentd.conf
%service_add_post identd.service

%service_del_preun identd.service

%service_del_postun identd.service

%config %{_sysconfdir}/identd.conf
%doc ChangeLog* FAQ README

openSUSE Build Service is sponsored by