blob: c8d31cf70da264a55c0cd566705fd6240e114957 [file] [log] [blame]
Andrew Geissler1fe918a2020-05-15 14:16:47 -05001SUMARRY = "The ethernet monitor program; for keeping track of ethernet/ip address pairings"
2LICENSE = "BSD-4-Clause"
3HOME_PAGE = "http://ee.lbl.gov/"
Andrew Geissler8b139282021-03-05 15:22:30 -06004LIC_FILES_CHKSUM = "file://configure;md5=74ca964ed34fda7b46c6fe3e50bded9d"
Andrew Geissler1fe918a2020-05-15 14:16:47 -05005
Andrew Geisslerd5838332022-05-27 11:33:10 -05006DEPENDS += "libpcap"
Andrew Geissler1fe918a2020-05-15 14:16:47 -05007
8SRC_URI = "https://ee.lbl.gov/downloads/arpwatch/${BP}.tar.gz \
9 file://arpwatch.conf \
10 file://arpwatch.default \
11 file://arpwatch_init \
12 file://postfix_workaround.patch \
13 file://host_contam_fix.patch "
14
Andrew Geissler8b139282021-03-05 15:22:30 -060015SRC_URI[sha256sum] = "ee1d15d9a07952c0c017908b9dbfd5ac988fed0058c3cc4fa6c13e0be36f3a9f"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050016
17inherit autotools-brokensep update-rc.d useradd
18
19ARPWATCH_UID ?= "arpwatch"
20ARPWATCH_GID ?= "arpwatch"
21APRWATCH_FROM ?= "root "
22ARPWATH_REPLY ?= "${ARPWATCH_UID}"
23
Andrew Geisslerd5838332022-05-27 11:33:10 -050024PACKAGECONFIG ??= ""
25
26PACKACONFIG[email] = "-with-watcher=email=${APRWATCH_FROM} --with-watchee=email=${ARPWATH_REPLY}, , postfix, postfix postfix-cfg"
27
28EXTRA_OECONF:append = " --srcdir=${S}"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050029
30CONFIGUREOPTS = " --build=${BUILD_SYS} \
31 --host=${HOST_SYS} \
32 --target=${TARGET_SYS} \
33 --prefix=${prefix} \
34 --exec_prefix=${exec_prefix} \
35 --bindir=${bindir} \
36 --sbindir=${sbindir} \
37 --libexecdir=${libexecdir} \
38 --datadir=${datadir} \
39 --sysconfdir=${sysconfdir} \
40 --sharedstatedir=${sharedstatedir} \
41 --localstatedir=${localstatedir} \
42 --libdir=${libdir} \
43 --includedir=${includedir} \
44 --oldincludedir=${oldincludedir} \
45 --infodir=${infodir} \
46 --mandir=${mandir} \
47 "
48
49do_configure () {
50 ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
51}
52
53do_install () {
54 install -d ${D}${bindir}
55 install -d ${D}${sbindir}
56 install -d ${D}${mandir}
57 install -d ${D}${sysconfdir}
58 install -d ${D}${sysconfdir}/default
59 install -d ${D}${sysconfdir}/init.d
60 install -d ${D}${prefix}/etc/rc.d
61 install -d ${D}/var/lib/arpwatch
62
63 oe_runmake install DESTDIR=${D}
64 install -m 644 ${WORKDIR}/arpwatch.conf ${D}${sysconfdir}
65 install -m 655 ${WORKDIR}/arpwatch_init ${D}${sysconfdir}/init.d/arpwatch
66 install -m 644 ${WORKDIR}/arpwatch.default ${D}${sysconfdir}/default
67}
68
69INITSCRIPT_NAME = "arpwatch"
70INITSCRIPT_PARAMS = "start 02 2 3 4 5 . stop 20 0 1 6 ."
71
72USERADD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -050073GROUPADD_PARAM:${PN} = "--system ${ARPWATCH_UID}"
74USERADD_PARAM:${PN} = "--system -g ${ARPWATCH_GID} --home-dir \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050075 ${localstatedir}/spool/${BPN} \
76 --no-create-home --shell /bin/false ${BPN}"
77
78CONFFILE_FILES = "${sysconfdir}/${PN}.conf"
79
Patrick Williams213cb262021-08-07 19:21:33 -050080FILES:${PN} = "${bindir} ${sbindir} ${prefix}/etc/rc.d \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050081 ${sysconfdir} /var/lib/arpwatch"
82
Andrew Geisslerd5838332022-05-27 11:33:10 -050083RDEPENDS:${PN} = "libpcap"