1 # Contributor: Thomas Mudrunka <harvie@@email..cz>
2 # Maintainer: Thomas Mudrunka <harvie@@email..cz>
3 # You can also contact me on http://blog.harvie.cz/
4 # Maintainer: Max Fierke <max@maxfierke.com>
8 true && pkgname=(apparmor-parser apparmor-libapparmor apparmor-utils apparmor-profiles apparmor-pam)
11 arch=('i686' 'x86_64')
13 url='http://wiki.apparmor.net/index.php/Main_Page'
15 makedepends=('swig' 'perl' 'python2' 'ruby' 'perl-locale-gettext' 'perl-rpc-xml' 'wxgtk' 'audit')
16 #optdepends=('linux-hardened: kernel with AppArmor, SELinux, Grsecurity/PAX, and TOMOYO support')
17 pacman -Qi apparmor-libapparmor &>/dev/null &&
18 true && pkgname=(${pkgname[*]} apparmor-profile-editor apparmor-dbus) &&
19 depends=(${depends[*]} apparmor-libapparmor) &&
20 msg "Building with libapparmor dependent packages..."
22 bigver="$(echo ${pkgver} | cut -d . -f -2)"
23 source=("http://launchpad.net/apparmor/${bigver}/${pkgver}/+download/apparmor-${pkgver}.tar.gz"
26 md5sums=('9cc38779a43004dbc7f09932fa848366'
27 '3c56820370318f6f195ea88b723ef628')
28 sha1sums=('9428e466e242b9381ac152dafb58d488c8a01921'
29 '02951f448d7a3d222472304d3135c324f9909923')
30 sha256sums=('ff8a2f49f902faa78e502590c65d3850fb9a2a3453bef0dc1f99e947c52fc60f'
31 '6dc84e8c3cdc6009ae128930a04fd8d3bf36afc2fd8f4283c234f235753fa8ca')
32 sha384sums=('badb2852546ecf4a9bf2969a6689be3da839bea7f4b06dbc8f5946a0869bbc859b1d70427e0a12318adc98127ca157c1'
33 'fa032ddb7d66050f017c4f8297ceb8affbfeaf7b7d447eb6408a23d205f495579b1eec4f127d4611c4d382ef06ae0a49')
34 sha512sums=('7573d1e99f0214f26add021b2492c19b3fd340a8b5f964ce6759a026a947f4281564264b8daa14ec30cb0817d05473e8b48a9fc24bcd93e5b4c59d9a6b99ba7d'
35 '2b4f811f923dfcf424f45d3c91c662193fab45c4a1e3f2f9bb039bd76865e93139c87df838ad57eb9fc618b0f07bcaca917f34eff008bc330d0129b79017825f')
39 core_perl_dir='/usr/bin/core_perl'
40 export MAKEFLAGS+=" POD2MAN=${core_perl_dir}/pod2man"
41 export MAKEFLAGS+=" POD2HTML=${core_perl_dir}/pod2html"
42 export MAKEFLAGS+=" PROVE=${core_perl_dir}/prove"
43 export PYTHON='/usr/bin/python2'
46 export srcroot="${srcdir}/${pkgbase}-${pkgver}";
49 package_apparmor-parser() {
50 pkgdesc='AppArmor parser - loads AA profiles to kernel module'
51 cd "${srcroot}/parser"; msg2 "${PWD##*/}"
54 #Patch (maybe we can avoid patching by ./configuring things better)
55 patch=Makefile; { rm "$patch"
56 sed -e 's/pdflatex/true/g' > "$patch" #just workaround until we'll get pdflatex package
58 echo '#!/bin/true' > tst/caching.sh #Can't pass this test with current kernel
61 make install DESTDIR=${pkgdir}
64 package_apparmor-libapparmor() {
65 pkgdesc='AppArmor library'
66 makedepends=(swig perl python2 ruby)
67 provides=('apparmor-lib' 'libapparmor' 'apparmor-perl' 'apparmor-python' 'apparmor-ruby')
68 ( cd "${srcroot}/libraries/libapparmor"; msg2 "${PWD##*/}"
70 ./configure --prefix=/usr --with-perl --with-python --with-ruby
72 make install DESTDIR=${pkgdir}
73 #FIXME: this file should install automatically:
74 cp swig/perl/LibAppArmor.pm ${pkgdir}/usr/lib/perl5/vendor_perl/
78 package_apparmor-utils() {
79 pkgdesc='AppArmor userspace utilities'
80 depends=('perl' 'perl-locale-gettext' 'perl-term-readkey' 'perl-file-tail' 'perl-rpc-xml')
81 optdepends=('perl: many apparmor utilities' 'perl-rpc-xml: more utilities')
82 provides=('apparmor-notify');
83 install='apparmor.install'
84 ( cd "${srcroot}/utils"; msg2 "${PWD##*/}"
86 make install DESTDIR=${pkgdir}
87 mkdir -p ${pkgdir}/etc/rc.d
88 cp ../../apparmor ${pkgdir}/etc/rc.d/
92 package_apparmor-profiles() {
93 pkgdesc='AppArmor sample pre-made profiles'
94 ( cd "${srcroot}/profiles"; msg2 "${PWD##*/}"
96 make install DESTDIR=${pkgdir}
100 package_apparmor-profile-editor() {
101 pkgdesc='AppArmor profile editor using WxWidgets (or WxGTK)'
102 depends=('apparmor-libapparmor' 'wxgtk' 'audit')
103 ( cd "${srcroot}/deprecated/management/profile-editor"; msg2 "${PWD##*/}"
105 ./configure --prefix=/usr
107 make install DESTDIR=${pkgdir}
111 package_apparmor-dbus() {
112 pkgdesc='AppArmor DBUS API'
113 depends=('apparmor-libapparmor')
114 ( cd "${srcroot}/deprecated/management/apparmor-dbus"; msg2 "${PWD##*/}"
116 ./configure --prefix=/usr
118 make install DESTDIR=${pkgdir}
122 package_apparmor-applet() {
123 pkgdesc='AppArmor Applet for Gnome'
124 depends=('apparmor-libapparmor')
125 #FIXME: can't build this:
126 ( cd "${srcroot}/deprecated/management/applets/apparmorapplet-gnome"; msg2 "${PWD##*/}"
128 ./configure --prefix=/usr
130 make install DESTDIR=${pkgdir}
134 package_apparmor-pam() {
135 pkgdesc='AppArmor PAM library'
136 depends=('apparmor-libapparmor')
137 ( cd "${srcroot}/changehat/pam_apparmor"; msg2 "${PWD##*/}"
139 make install DESTDIR=${pkgdir}
144 pkgdesc='Linux application security framework - mandatory access control for programs'