tcp_wrappers/tcp_wrappers.spec
2019-09-30 11:18:14 -04:00

125 lines
4.0 KiB
RPMSpec

Name: tcp_wrappers
Version: 7.6
Release: 96
Summary: a host-based networking ACL system
License: BSD
URL: http://ftp.porcupine.org/pub/security/index.html
Source0: http://ftp.porcupine.org/pub/security/%{name}_%{version}-ipv6.4.tar.gz
BuildRequires: glibc-devel >= 2.2 libnsl2-devel
Provides: tcp_wrappers-libs
Obsoletes: tcp_wrappers-libs
# backport from fedora
Patch0000: tcpw7.2-config.patch
Patch0001: tcpw7.2-setenv.patch
Patch0002: tcpw7.6-netgroup.patch
Patch0003: tcp_wrappers-7.6-bug11881.patch
Patch0004: tcp_wrappers-7.6-bug17795.patch
Patch0005: tcp_wrappers-7.6-bug17847.patch
Patch0006: tcp_wrappers-7.6-fixgethostbyname.patch
Patch0007: tcp_wrappers-7.6-docu.patch
Patch0008: tcp_wrappers-7.6-man.patch
Patch0009: tcp_wrappers.usagi-ipv6.patch
Patch0011: tcp_wrappers-7.6-shared.patch
Patch0012: tcp_wrappers-7.6-sig.patch
Patch0014: tcp_wrappers-7.6-ldflags.patch
Patch0015: tcp_wrappers-7.6-fix_sig-bug141110.patch
Patch0016: tcp_wrappers-7.6-162412.patch
Patch0017: tcp_wrappers-7.6-220015.patch
Patch0019: tcp_wrappers-7.6-siglongjmp.patch
Patch0020: tcp_wrappers-7.6-sigchld.patch
Patch0021: tcp_wrappers-7.6-196326.patch
Patch0022: tcp_wrappers_7.6-249430.patch
Patch0023: tcp_wrappers-7.6-inetdconf.patch
Patch0024: tcp_wrappers-7.6-bug698464.patch
Patch0026: tcp_wrappers-7.6-xgets.patch
Patch0027: tcp_wrappers-7.6-initgroups.patch
Patch0028: tcp_wrappers-7.6-warnings.patch
Patch0029: tcp_wrappers-7.6-uchart_fix.patch
Patch0030: tcp_wrappers-7.6-altformat.patch
Patch0031: tcp_wrappers-7.6-aclexec.patch
Patch6000: 15_match_clarify.patch
Patch6001: man_fromhost.patch
Patch6002: tcpdchk_libwrapped.patch
%description
The tcp_wrappers is a host-based networking ACL system, used to filter network access to Internet Protocol servers on (Unix-like) operating systems such as Linux or BSD. It allows host or subnetwork IP addresses, names and/or ident query replies, to be used as tokens on which to filter for access control purposes.
%package devel
Summary: development header files for tcp_wrappers
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
%description devel
development header files for tcp_wrappers.
%package help
Summary: help document for tcp_wrappers
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
%description help
help document for tcp_wrappers.
%prep
%autosetup -n %{name}_%{version}-ipv6.4 -p1
%build
%make_build RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC -DPIC -D_REENTRANT -DHAVE_STRERROR -DACLEXEC"\
LDFLAGS="$RPM_LD_FLAGS" MAJOR="0" MINOR="7" REL="6" linux
%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
mkdir -p ${RPM_BUILD_ROOT}%{_includedir}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{3,5,8}
cp -a libwrap.so* ${RPM_BUILD_ROOT}%{_libdir}
install -p -m 755 tcpd ${RPM_BUILD_ROOT}%{_sbindir}
install -p -m 755 try-from ${RPM_BUILD_ROOT}%{_sbindir}
install -p -m 755 tcpdmatch ${RPM_BUILD_ROOT}%{_sbindir}
install -p -m 755 safe_finger ${RPM_BUILD_ROOT}%{_sbindir}
install -p -m 755 tcpdchk ${RPM_BUILD_ROOT}%{_sbindir}
install -p -m 644 tcpd.h ${RPM_BUILD_ROOT}%{_includedir}
install -p -m 644 *.3 ${RPM_BUILD_ROOT}%{_mandir}/man3
install -p -m 644 *.5 ${RPM_BUILD_ROOT}%{_mandir}/man5
install -p -m 644 *.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
ln -sf hosts_access.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/hosts.allow.5
ln -sf hosts_access.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/hosts.deny.5
%check
%pre
%preun
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%defattr(-,root,root)
%doc BLURB CHANGES README* Banners.Makefile
%license DISCLAIMER
%{_sbindir}/*
%{_libdir}/libwrap.so*
%files devel
%{_includedir}/*
%files help
%{_mandir}/man3/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%changelog
* Wed Sep 04 2019 Huiming Xie <xiehuiming@huawei.com> - 7.6-96
- Package init