File oidentd.spec of Package oidentd

#
# spec file for package oidentd
#
# 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:           oidentd
Version:        2.0.8
Release:        0
License:        GPL-2.0+
Group:          Productivity/Networking/System
Url:            http://dev.ojnk.net/
Summary:        Configurable IDENT Server That Supports NAT/IP Masquerading
Source:         http://prdownloads.sourceforge.net/ojnk/oidentd-%{version}.tar.bz2
Source1:        sysconfig.oidentd
Source2:        rc.oidentd
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  automake
PreReq:         %insserv_prereq %fillup_prereq

%description
Oidentd is an ident (rfc1413 compliant) daemon that runs on Linux,
Darwin, FreeBSD, OpenBSD, NetBSD, and Solaris.	oidentd can handle IP
masqueraded/NAT connections on Linux, Darwin, FreeBSD (ipf only),
OpenBSD, and  NetBSD.  Oidentd has a flexible mechanism for specifying
ident responses.  Users can be granted permission to specify their own
ident responses.  Responses can be specified according to host and port
pairs.

%prep
%setup

%build
%{?suse_update_config:%{suse_update_config -f}}
autoreconf --install --force
export CFLAGS="$RPM_OPT_FLAGS"
./configure \
	--prefix=%{_prefix} \
	--mandir=%{_mandir} \
	--sysconfdir=%{_sysconfdir}
%{__make} all

%install
[ "${RPM_BUILD_ROOT}" != "/" -a -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT}
%{__make} DESTDIR=${RPM_BUILD_ROOT} install
mkdir -p \
	${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d \
	${RPM_BUILD_ROOT}/%{_var}/adm/fillup-templates
touch ${RPM_BUILD_ROOT}/%{_sysconfdir}/oidentd.conf
touch ${RPM_BUILD_ROOT}/%{_sysconfdir}/oidentd_masq.conf
install -p -m 0755 ${RPM_SOURCE_DIR}/rc.oidentd ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d/oidentd
ln -fs %{_sysconfdir}/init.d/oidentd ${RPM_BUILD_ROOT}/%{_sbindir}/rcoidentd
cp -p ${RPM_SOURCE_DIR}/sysconfig.oidentd ${RPM_BUILD_ROOT}/%{_var}/adm/fillup-templates

%clean
[ "${RPM_BUILD_ROOT}" != "/" -a -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT}

%post
%{fillup_and_insserv}

%postun
%{restart_on_update}
%{insserv_cleanup}

%files
%defattr(-,root,root)
%config(noreplace) %ghost %{_sysconfdir}/oidentd.conf
%config(noreplace) %ghost %{_sysconfdir}/oidentd_masq.conf
%config %{_sysconfdir}/init.d/oidentd
%{_sbindir}/oidentd
%{_sbindir}/rcoidentd
%{_mandir}/man5/oidentd.conf.5.gz
%{_mandir}/man5/oidentd_masq.conf.5.gz
%{_mandir}/man8/oidentd.8.gz
%{_var}/adm/fillup-templates/sysconfig.oidentd
%doc AUTHORS COPYING* ChangeLog* INSTALL NEWS README TODO

%changelog
openSUSE Build Service is sponsored by