File xinetd.spec of Package xinetd

#
# spec file for package xinetd
#
# Copyright (c) 2011 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:           xinetd
BuildRequires:  autoconf
BuildRequires:  tcpd-devel
PreReq:         %insserv_prereq %fillup_prereq
Provides:       inet-daemon
Requires:       logrotate
Version:        2.3.14
Release:        0
Url:            http://www.xinetd.org/
Summary:        An 'inetd' with Expanded Functionality
License:        SUSE-xinedt
Group:          Productivity/Networking/System
Source0:        %{name}-%{version}.tar.bz2
Source2:        rc.xinetd
Source3:        xinetd.conf
Source4:        FAQ
Source5:        README.SuSE
Source6:        %{name}-service_files.tar.bz2
Source7:        logrotate
Patch:          %{name}-%{version}-man.dif
Patch4:         %{name}-%{version}-server_args-fix.diff
Patch5:         %{name}-%{version}-strict-aliasing-fix.diff
Patch6:         %{name}-%{version}-nodeadlock.diff
Patch8:         %{name}-%{version}-pie.patch
Patch9:         %{name}-%{version}-ipv6-ipv4-fallback.patch
Patch10:        %{name}-%{version}-honour_disable.patch
Patch11:        %{name}-%{version}-ident-bind.patch
Patch12:        %{name}-%{version}-nodeadlock-revisited.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
xinetd takes the abilities of inetd and appends additional
functionality:

- Access Control

- Prevention of 'denial of access' attacks

- Extensive logging abilities

- Clear configuration file



Authors:
--------
    Panagiotis Tsirigotis <panos@cs.colorado.edu>
    Rob Braun <bbraun@synack.net>

%prep
%setup -b 0 -T -D -a 6 
%patch
cp %{S:4} .
cp %{S:5} .
%patch4
%patch5
%patch6
%patch8
%patch9
%patch10
%patch11 -p1
%patch12 -p1

%build
autoconf
CFLAGS="$RPM_OPT_FLAGS -Wformat=2" ./configure --prefix=/usr \
                                  --sysconfdir=/etc \
                                  --mandir=%{_mandir}\
                                  --with-loadavg \
                                  --with-libwrap
make %{?_smp_mflags}

%install
install -d -m 755 $RPM_BUILD_ROOT/etc/{init.d,logrotate.d}
install -d -m 755 $RPM_BUILD_ROOT/%{_mandir}
make install DAEMONDIR=$RPM_BUILD_ROOT/usr/sbin MANDIR=${RPM_BUILD_ROOT}/%{_mandir}
install -m 644 %{S:3} $RPM_BUILD_ROOT/etc/xinetd.conf
cp -a etc $RPM_BUILD_ROOT
install -m 755 %{S:2} $RPM_BUILD_ROOT/etc/init.d/xinetd
ln -sf ../../etc/init.d/xinetd $RPM_BUILD_ROOT/usr/sbin/rcxinetd
install -m 644 %{S:7} $RPM_BUILD_ROOT/etc/logrotate.d/xinetd

%post
%{fillup_and_insserv xinetd}

%preun
%stop_on_removal xinetd

%postun
%restart_on_update xinetd
%{insserv_cleanup}

%clean
[ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf  %{buildroot}

%files
%defattr(-,root,root)
%doc README CHANGELOG COPYRIGHT FAQ README.SuSE
%doc %{_mandir}/*/*
%config(noreplace) /etc/logrotate.d/xinetd
/etc/xinetd.d/*
/usr/sbin/*
/etc/init.d/xinetd
%config(noreplace) /etc/xinetd.conf

%changelog
openSUSE Build Service is sponsored by