summaryrefslogtreecommitdiffstats
path: root/recipes-security/AppArmor/apparmor_2.10.95.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/AppArmor/apparmor_2.10.95.bb')
-rw-r--r--recipes-security/AppArmor/apparmor_2.10.95.bb116
1 files changed, 116 insertions, 0 deletions
diff --git a/recipes-security/AppArmor/apparmor_2.10.95.bb b/recipes-security/AppArmor/apparmor_2.10.95.bb
new file mode 100644
index 0000000..de09e29
--- /dev/null
+++ b/recipes-security/AppArmor/apparmor_2.10.95.bb
@@ -0,0 +1,116 @@
1SUMMARY = "AppArmor another MAC control system"
2DESCRIPTION = "user-space parser utility for AppArmor \
3 This provides the system initialization scripts needed to use the \
4 AppArmor Mandatory Access Control system, including the AppArmor Parser \
5 which is required to convert AppArmor text profiles into machine-readable \
6 policies that are loaded into the kernel for use with the AppArmor Linux \
7 Security Module."
8HOMEAPAGE = "http://apparmor.net/"
9SECTION = "admin"
10
11LICENSE = "GPLv2 & GPLv2+ & BSD-3-Clause & LGPLv2.1+"
12LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fd57a4b0bc782d7b80fd431f10bbf9d0"
13
14DEPENDS = "bison-native apr apache2"
15
16SRC_URI = " \
17 http://archive.ubuntu.com/ubuntu/pool/main/a/${BPN}/${BPN}_${PV}.orig.tar.gz \
18 file://disable_pdf.patch \
19 file://apparmor.rc \
20 file://functions \
21 file://apparmor \
22 file://apparmor.service \
23 "
24
25SRC_URI[md5sum] = "71a13b9d6ae0bca4f5375984df1a51e7"
26SRC_URI[sha256sum] = "3f659a599718f4a5e2a33140916715f574a5cb3634a6b9ed6d29f7b0617e4d1a"
27
28PARALLEL_MAKE = ""
29
30inherit pkgconfig autotools-brokensep update-rc.d python-dir ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)}
31
32S = "${WORKDIR}/apparmor-${PV}"
33
34PACKAGECONFIG ?="man"
35PACKAGECONFIG[man] = "--enable-man-pages, --disable-man-pages"
36
37PAMLIB="${@bb.utils.contains('DISTRO_FEATURES', 'pam', '1', '0', d)}"
38
39do_configure() {
40 cd ${S}/libraries/libapparmor
41 autoconf --force
42 libtoolize --automake -c
43 automake -ac
44 ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
45 sed -i -e 's#^YACC.*#YACC := bison#' ${S}/parser/Makefile
46 sed -i -e 's#^LEX.*#LEX := flex#' ${S}/parser/Makefile
47}
48
49do_compile () {
50 cd ${S}/libraries/libapparmor
51 oe_runmake
52 cd ${S}/binutils
53 oe_runmake
54 cd ${S}/utils
55 oe_runmake
56 cd ${S}/parser
57 oe_runmake
58 cd ${S}/profiles
59 oe_runmake
60
61 cd ${S}/changehat/mod_apparmor
62 oe_runmake
63
64 if test -z "${PAMLIB}" ; then
65 cd ${S}/changehat/pam_apparmor
66 oe_runmake
67 fi
68}
69
70do_install () {
71 install -d ${D}/${INIT_D_DIR}
72 install -d ${D}/lib/apparmor
73
74 cd ${S}/libraries/libapparmor
75 oe_runmake DESTDIR="${D}" install
76
77 cd ${S}/binutils
78 oe_runmake DESTDIR="${D}" install
79
80 cd ${S}/utils
81 oe_runmake DESTDIR="${D}" install
82
83 cd ${S}/parser
84 oe_runmake DESTDIR="${D}" install
85
86 cd ${S}/profiles
87 oe_runmake DESTDIR="${D}" install
88
89 cd ${S}/changehat/mod_apparmor
90 oe_runmake DESTDIR="${D}" install
91
92 if test -z "${PAMLIB}" ; then
93 cd ${S}/changehat/pam_apparmor
94 oe_runmake DESTDIR="${D}" install
95 fi
96
97 install ${WORKDIR}/apparmor ${D}/${INIT_D_DIR}/apparmor
98
99 install ${WORKDIR}/functions ${D}/lib/apparmor
100}
101
102INITSCRIPT_PACKAGES = "${PN}"
103INITSCRIPT_NAME = "apparmor"
104INITSCRIPT_PARAMS = "start 16 2 3 4 5 . stop 35 0 1 6 ."
105
106SYSTEMD_PACKAGES = "${PN}"
107SYSTEMD_SERVICE_${PN} = "apparmor.service"
108SYSTEMD_AUTO_ENABLE = "disable"
109
110PACKAGES += "python-${PN} mod-${PN}"
111
112FILES_${PN} += "/lib/apparmor/ ${sysconfdir}/apparmor"
113FILES_mod-${PN} = "${libdir}/apache2/modules/*"
114FILES_python-${PN} = "${PYTHON_SITEPACKAGES_DIR}"
115
116RDEPENDS_${PN} += "bash perl"