File pidentd.spec of Package pidentd

#
# spec file for package pidentd
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


Name:           pidentd
PreReq:         %insserv_prereq %fillup_prereq
Provides:       nkitb:/usr/sbin/in.identd
Version:        3.1a25
Release:        0
Summary:        An Implementation of the RFC1413 Identification Server
License:        GPL-2.0+
Group:          Productivity/Networking/System
Url:            http://sf.www.lysator.liu.se/~pen/pidentd/
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}-SuSE.tar.bz2
Source2:        %{name}.xinetd
Patch0:         %{name}-%{version}-config.diff
Patch1:         %{name}-%{version}-allocfix.diff
Patch2:         %{name}-%{version}-buffer-overflow.diff
Patch3:         %{name}-%{version}-fmt.diff
Patch4:         %{name}-%{version}-prototypes.diff
Patch5:         %{name}-%{version}-autoconf.diff
Patch6:         %{name}-%{version}-warnings-fix.diff
Patch7:         %{name}-%{version}-send.diff
Patch8:         %{name}-%{version}-ipv6.diff
Patch9:         %{name}-%{version}-autoheader.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  libtool
Requires:       inet-daemon

%description
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.



Authors:
--------
    Peter Eriksson <pen@lysator.liu.se>

%define prefix   /usr

%prep
%setup -q -a 1
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9 -p1

%build
# files are not copied by autoreconf since package doesn't use automake
cp -v /usr/share/automake-*/config.* aux/
cp -v /usr/share/automake-*/config.* plib/aux/
aclocal --force
autoreconf --force --install
(cd plib
    libtoolize --force
    aclocal --force
    autoconf --force
)
CFLAGS="$RPM_OPT_FLAGS -Wall" \
	./configure \
	--prefix=%{prefix} \
	--sysconfdir=%{_sysconfdir} \
	--mandir=%{_mandir} \
	--infodir=%{_infodir} \
	--with-threads=yes
make

%install
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man8
install -d -m 755 $RPM_BUILD_ROOT/etc/xinetd.d
cp -a SuSE/* $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT/ install
install -m 0644 etc/identd.conf $RPM_BUILD_ROOT/etc/identd.conf
mv $RPM_BUILD_ROOT%{_sbindir}/identd $RPM_BUILD_ROOT%{_sbindir}/in.identd
echo ".so man8/identd.8" > $RPM_BUILD_ROOT%{_mandir}/man8/in.identd.8
install -m 644 %{S:2} $RPM_BUILD_ROOT/etc/xinetd.d/pidentd

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{fillup_and_insserv -n identd identd}

%preun
%stop_on_removal identd

%postun
%restart_on_update identd
%{insserv_cleanup}

%files
%defattr(-,root,root)
%config(noreplace) /etc/xinetd.d/pidentd
%config /etc/init.d/identd
%config /etc/identd.conf
%doc ChangeLog* FAQ README TODO Y2K doc/
%doc %{_mandir}/man?/*
%{_sbindir}/*

%changelog
openSUSE Build Service is sponsored by