blob: c152b8c5c59fe545ace385fbb051e7034172a599 [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
6DEPENDS += "libpcap postfix"
7
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
24EXTRA_OECONF = " --srcdir=${S} --with-watcher=email=${APRWATCH_FROM} --with-watchee=email=${ARPWATH_REPLY}"
25
26CONFIGUREOPTS = " --build=${BUILD_SYS} \
27 --host=${HOST_SYS} \
28 --target=${TARGET_SYS} \
29 --prefix=${prefix} \
30 --exec_prefix=${exec_prefix} \
31 --bindir=${bindir} \
32 --sbindir=${sbindir} \
33 --libexecdir=${libexecdir} \
34 --datadir=${datadir} \
35 --sysconfdir=${sysconfdir} \
36 --sharedstatedir=${sharedstatedir} \
37 --localstatedir=${localstatedir} \
38 --libdir=${libdir} \
39 --includedir=${includedir} \
40 --oldincludedir=${oldincludedir} \
41 --infodir=${infodir} \
42 --mandir=${mandir} \
43 "
44
45do_configure () {
46 ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
47}
48
49do_install () {
50 install -d ${D}${bindir}
51 install -d ${D}${sbindir}
52 install -d ${D}${mandir}
53 install -d ${D}${sysconfdir}
54 install -d ${D}${sysconfdir}/default
55 install -d ${D}${sysconfdir}/init.d
56 install -d ${D}${prefix}/etc/rc.d
57 install -d ${D}/var/lib/arpwatch
58
59 oe_runmake install DESTDIR=${D}
60 install -m 644 ${WORKDIR}/arpwatch.conf ${D}${sysconfdir}
61 install -m 655 ${WORKDIR}/arpwatch_init ${D}${sysconfdir}/init.d/arpwatch
62 install -m 644 ${WORKDIR}/arpwatch.default ${D}${sysconfdir}/default
63}
64
65INITSCRIPT_NAME = "arpwatch"
66INITSCRIPT_PARAMS = "start 02 2 3 4 5 . stop 20 0 1 6 ."
67
68USERADD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -050069GROUPADD_PARAM:${PN} = "--system ${ARPWATCH_UID}"
70USERADD_PARAM:${PN} = "--system -g ${ARPWATCH_GID} --home-dir \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050071 ${localstatedir}/spool/${BPN} \
72 --no-create-home --shell /bin/false ${BPN}"
73
74CONFFILE_FILES = "${sysconfdir}/${PN}.conf"
75
Patrick Williams213cb262021-08-07 19:21:33 -050076FILES:${PN} = "${bindir} ${sbindir} ${prefix}/etc/rc.d \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050077 ${sysconfdir} /var/lib/arpwatch"
78
Patrick Williams213cb262021-08-07 19:21:33 -050079RDEPENDS:${PN} = "libpcap postfix postfix-cfg"