William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 1 | SUMMARY = "Advanced Intrusion Detection Environment" |
| 2 | HOMEPAGE = "https://aide.github.io" |
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 4 | LICENSE = "GPL-2.0-only" |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 5 | |
| 6 | DEPENDS = "bison-native libpcre" |
| 7 | |
| 8 | SRC_URI = "https://github.com/aide/aide/releases/download/v${PV}/${BPN}-${PV}.tar.gz \ |
| 9 | file://aide.conf" |
| 10 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 11 | SRC_URI[sha256sum] = "c81505246f3ffc2e76036d43a77212ae82895b5881d9b9e25c1361b1a9b7a846" |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 12 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 13 | UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" |
| 14 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 15 | inherit autotools pkgconfig aide-base |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 16 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 17 | PACKAGECONFIG ??=" mhash zlib e2fsattrs posix capabilities curl \ |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 18 | ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit', '', d)} \ |
| 19 | ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \ |
| 20 | " |
| 21 | PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux, libselinux" |
| 22 | PACKAGECONFIG[zlib] = "--with-zlib, --without-zlib, zlib, zlib " |
| 23 | PACKAGECONFIG[xattr] = "--with-xattr, --without-xattr, attr, attr" |
| 24 | PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl, libcurl" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 25 | PACKAGECONFIG[audit] = "--with-audit, --without-audit,audit" |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 26 | PACKAGECONFIG[gcrypt] = "--with-gcrypt, --without-gcrypt, libgcrypt, libgcrypt" |
| 27 | PACKAGECONFIG[mhash] = "--with-mhash, --without-mhash, libmhash, libmhash" |
| 28 | PACKAGECONFIG[e2fsattrs] = "--with-e2fsattrs, --without-e2fsattrs, e2fsprogs, e2fsprogs" |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 29 | PACKAGECONFIG[capabilities] = "--with-capabilities, --without-capabilities, libcap, libcap" |
| 30 | PACKAGECONFIG[posix] = "--with-posix-acl, --without-posix-acl, acl, acl" |
| 31 | |
| 32 | |
| 33 | do_install[nostamp] = "1" |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 34 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 35 | do_install:append () { |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 36 | install -d ${D}${libdir}/${PN}/logs |
| 37 | install -d ${D}${sysconfdir} |
| 38 | install ${WORKDIR}/aide.conf ${D}${sysconfdir}/ |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 39 | |
| 40 | for dir in ${AIDE_INCLUDE_DIRS}; do |
| 41 | echo "${dir} NORMAL" >> ${D}${sysconfdir}/aide.conf |
| 42 | done |
| 43 | for dir in ${AIDE_SKIP_DIRS}; do |
| 44 | echo "!${dir}" >> ${D}${sysconfdir}/aide.conf |
| 45 | done |
| 46 | } |
| 47 | |
| 48 | do_install:class-native () { |
| 49 | install -d ${STAGING_AIDE_DIR}/bin |
| 50 | install -d ${STAGING_AIDE_DIR}/lib/logs |
| 51 | |
| 52 | install ${B}/aide ${STAGING_AIDE_DIR}/bin |
| 53 | install ${WORKDIR}/aide.conf ${STAGING_AIDE_DIR}/ |
| 54 | |
| 55 | sed -i -s "s:\@\@define DBDIR.*:\@\@define DBDIR ${STAGING_AIDE_DIR}/lib:" ${STAGING_AIDE_DIR}/aide.conf |
| 56 | sed -i -e "s:\@\@define LOGDIR.*:\@\@define LOGDIR ${STAGING_AIDE_DIR}/lib/logs:" ${STAGING_AIDE_DIR}/aide.conf |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | CONF_FILE = "${sysconfdir}/aide.conf" |
| 60 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 61 | FILES:${PN} += "${libdir}/${PN} ${sysconfdir}/aide.conf" |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 62 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 63 | pkg_postinst_ontarget:${PN} () { |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 64 | if [ ${AIDE_SCAN_POSTINIT} ]; then |
| 65 | ${bindir}/aide -i |
| 66 | fi |
| 67 | if [ ${AIDE_RESCAN_POSTINIT} && -e ${libdir}/aide/aide.db.gz ]; then |
| 68 | ${bindir}/aide -C |
| 69 | fi |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 70 | } |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 71 | |
| 72 | RDEPENDS:${PN} = "bison libpcre" |
| 73 | |
| 74 | BBCLASSEXTEND = "native" |