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