Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Security tool that is a wrapper for TCP daemons" |
| 2 | DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \ |
| 3 | services." |
| 4 | SECTION = "console/network" |
| 5 | |
| 6 | LICENSE = "BSD" |
| 7 | LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa" |
| 8 | PR ="r10" |
| 9 | |
| 10 | |
| 11 | PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc" |
| 12 | FILES_libwrap = "${base_libdir}/lib*${SOLIBS}" |
| 13 | FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5" |
| 14 | FILES_libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}" |
| 15 | FILES_libwrap-staticdev = "${libdir}/lib*.a" |
| 16 | FILES_${PN} = "${sbindir}" |
| 17 | FILES_${PN}-doc = "${mandir}/man8" |
| 18 | |
| 19 | SRC_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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 46 | file://musl-decls.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | " |
| 48 | |
| 49 | SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a" |
| 50 | SRC_URI[sha256sum] = "9543d7adedf78a6de0b221ccbbd1952e08b5138717f4ade814039bb489a4315d" |
| 51 | |
| 52 | S = "${WORKDIR}/tcp_wrappers_${PV}" |
| 53 | |
| 54 | EXTRA_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 | |
| 75 | EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN" |
| 76 | EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 77 | EXTRA_OEMAKE_NETGROUP_libc-musl = "-DUSE_GETDOMAIN" |
| 78 | |
| 79 | EXTRA_OEMAKE_append_libc-musl = " 'LIBS='" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 80 | |
| 81 | do_compile () { |
| 82 | oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \ |
| 83 | all |
| 84 | } |
| 85 | |
| 86 | BINS = "safe_finger tcpd tcpdchk try-from tcpdmatch" |
| 87 | MANS3 = "hosts_access" |
| 88 | MANS5 = "hosts_options" |
| 89 | MANS8 = "tcpd tcpdchk tcpdmatch" |
| 90 | do_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 | |
| 132 | FILES_${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny" |