blob: 5fdbbced720f590d59cc4c40af806c6f757121b8 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Security tool that is a wrapper for TCP daemons"
2DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \
3 services."
4SECTION = "console/network"
5
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa"
8PR ="r10"
9
10
11PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc"
12FILES_libwrap = "${base_libdir}/lib*${SOLIBS}"
13FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5"
14FILES_libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}"
15FILES_libwrap-staticdev = "${libdir}/lib*.a"
16FILES_${PN} = "${sbindir}"
17FILES_${PN}-doc = "${mandir}/man8"
18
19SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
20 file://00_man_quoting.diff \
21 file://01_man_portability.patch \
22 file://05_wildcard_matching.patch \
23 file://06_fix_gethostbyname.patch \
24 file://10_usagi-ipv6.patch \
25 file://11_tcpd_blacklist.patch \
26 file://11_usagi_fix.patch \
27 file://12_makefile_config.patch \
28 file://13_shlib_weaksym.patch \
29 file://14_cidr_support.patch \
30 file://15_match_clarify.patch \
31 file://expand_remote_port.patch \
32 file://have_strerror.patch \
33 file://man_fromhost.patch \
34 file://restore_sigalarm.patch \
35 file://rfc931.diff \
36 file://safe_finger.patch \
37 file://sig_fix.patch \
38 file://siglongjmp.patch \
39 file://socklen_t.patch \
40 file://tcpdchk_libwrapped.patch \
41 file://ldflags.patch \
42 file://rename_strings_variable.patch \
43 file://try-from.8 \
44 file://safe_finger.8 \
45 file://makefile-fix-parallel.patch \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050046 file://musl-decls.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050047 "
48
49SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"
50SRC_URI[sha256sum] = "9543d7adedf78a6de0b221ccbbd1952e08b5138717f4ade814039bb489a4315d"
51
52S = "${WORKDIR}/tcp_wrappers_${PV}"
53
54EXTRA_OEMAKE = "'CC=${CC}' \
55 'AR=${AR}' \
56 'RANLIB=${RANLIB}' \
57 'REAL_DAEMON_DIR=${sbindir}' \
58 'STYLE=-DPROCESS_OPTIONS' \
59 'FACILITY=LOG_DAEMON' \
60 'SEVERITY=LOG_INFO' \
61 'BUGS=' \
62 'VSYSLOG=' \
63 'RFC931_TIMEOUT=10' \
64 'ACCESS=-DHOSTS_ACCESS' \
65 'KILL_OPT=-DKILL_IP_OPTIONS' \
66 'UMASK=-DDAEMON_UMASK=022' \
67 'NETGROUP=${EXTRA_OEMAKE_NETGROUP}' \
68 'LIBS=-lnsl' \
69 'ARFLAGS=rv' \
70 'AUX_OBJ=weak_symbols.o' \
71 'TLI=' \
72 'COPTS=' \
73 'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'"
74
75EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN"
76EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050077EXTRA_OEMAKE_NETGROUP_libc-musl = "-DUSE_GETDOMAIN"
78
79EXTRA_OEMAKE_append_libc-musl = " 'LIBS='"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050080
81do_compile () {
82 oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \
83 all
84}
85
86BINS = "safe_finger tcpd tcpdchk try-from tcpdmatch"
87MANS3 = "hosts_access"
88MANS5 = "hosts_options"
89MANS8 = "tcpd tcpdchk tcpdmatch"
90do_install () {
91 oe_libinstall -a libwrap ${D}${libdir}
92 oe_libinstall -C shared -so libwrap ${D}${base_libdir}
93
94 if [ "${libdir}" != "${base_libdir}" ] ; then
95 rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
96 libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename`
97 ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so
98 rm -f ${D}${base_libdir}/libwrap.so
99 fi
100
101 install -d ${D}${sbindir}
102 for b in ${BINS}; do
103 install -m 0755 $b ${D}${sbindir}/ || exit 1
104 done
105
106 install -d ${D}${mandir}/man3
107 for m in ${MANS3}; do
108 install -m 0644 $m.3 ${D}${mandir}/man3/ || exit 1
109 done
110
111 install -d ${D}${mandir}/man5
112 for m in ${MANS5}; do
113 install -m 0644 $m.5 ${D}${mandir}/man5/ || exit 1
114 done
115
116 install -d ${D}${mandir}/man8
117 for m in ${MANS8}; do
118 install -m 0644 $m.8 ${D}${mandir}/man8/ || exit 1
119 done
120
121 install -m 0644 ${WORKDIR}/try-from.8 ${D}${mandir}/man8/
122 install -m 0644 ${WORKDIR}/safe_finger.8 ${D}${mandir}/man8/
123
124 install -d ${D}${includedir}
125 install -m 0644 tcpd.h ${D}${includedir}/
126
127 install -d ${D}${sysconfdir}
128 touch ${D}${sysconfdir}/hosts.allow
129 touch ${D}${sysconfdir}/hosts.deny
130}
131
132FILES_${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny"