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/
7 true && pkgname=(apparmor-parser apparmor-libapparmor apparmor-utils apparmor-profiles)
13 url='https://launchpad.net/apparmor'
15 makedepends=(swig perl python2 ruby wxgtk audit)
16 optdepends=('kernel26>=2.6.36: kernel with AppArmor support')
18 pacman -Qi apparmor-libapparmor &>/dev/null &&
19 true && pkgname=(${pkgname[*]} apparmor-profile-editor apparmor-dbus) &&
20 depends=(${depends[*]} apparmor-libapparmor) &&
21 msg "Building with libapparmor dependent packages..."
23 bigver="$(echo $pkgver | cut -d . -f -2)"
24 source=("http://launchpad.net/apparmor/$bigver/$pkgver/+download/apparmor-$pkgver.tar.gz")
25 md5sums=('76b37656bf42fedab0d0b9d47e690a8b')
28 export MAKEFLAGS+=' POD2MAN=/usr/lib/perl5/core_perl/bin/pod2man'
29 export MAKEFLAGS+=' POD2HTML=/usr/lib/perl5/core_perl/bin/pod2html'
30 export MAKEFLAGS+=' PROVE=/usr/lib/perl5/core_perl/bin/prove'
31 export PYTHON='/usr/bin/python2'
34 export srcroot="${srcdir}/${pkgbase}-${pkgver}";
37 package_apparmor-parser() {
38 pkgdesc='AppArmor parser - loads AA profiles to kernel module'
39 cd "${srcroot}/parser"; msg2 "${PWD##*/}"
42 #Patch (maybe we can avoid patching by ./configuring things better)
43 patch=Makefile; { rm "$patch"
44 sed -e 's/pdflatex/true/g' > "$patch" #just workaround until we'll get pdflatex package
46 echo '#!/bin/true' > tst/caching.sh #Can't pass this test with current kernel
49 make install DESTDIR=${pkgdir}
52 package_apparmor-libapparmor() {
53 pkgdesc='AppArmor library'
54 makedepends=(swig perl python2 ruby)
55 provides=(apparmor-lib libapparmor apparmor-perl apparmor-python apparmor-ruby)
56 ( cd "${srcroot}/libraries/libapparmor"; msg2 "${PWD##*/}"
58 ./configure --prefix=/usr --with-perl --with-python --with-ruby
60 make install DESTDIR=${pkgdir}
61 #FIXME: this file should install automatically:
62 cp swig/perl/LibAppArmor.pm ${pkgdir}/usr/lib/perl5/vendor_perl/
66 package_apparmor-utils() {
67 pkgdesc='AppArmor userspace utilities'
68 depends=(perl perl-locale-gettext perl-term-readkey perl-file-tail perl-rpc-xml)
69 optdepends=('perl: many apparmor utilities' 'perl-rpc-xml: more utilities')
70 provides=(apparmor-notify);
71 ( cd "${srcroot}/utils"; msg2 "${PWD##*/}"
73 make install DESTDIR=${pkgdir}
77 package_apparmor-profiles() {
78 pkgdesc='AppArmor sample pre-made profiles'
79 ( cd "${srcroot}/profiles"; msg2 "${PWD##*/}"
81 make install DESTDIR=${pkgdir}
85 package_apparmor-profile-editor() {
86 pkgdesc='AppArmor profile editor using WxWidgets (or WxGTK)'
87 depends=(apparmor-libapparmor wxgtk audit)
88 ( cd "${srcroot}/deprecated/management/profile-editor"; msg2 "${PWD##*/}"
90 ./configure --prefix=/usr
92 make install DESTDIR=${pkgdir}
96 package_apparmor-dbus() {
97 pkgdesc='AppArmor DBUS API'
98 depends=(apparmor-libapparmor)
99 ( cd "${srcroot}/deprecated/management/apparmor-dbus"; msg2 "${PWD##*/}"
101 ./configure --prefix=/usr
103 make install DESTDIR=${pkgdir}
107 package_apparmor-applet() {
108 pkgdesc='AppArmor Applet for Gnome'
109 depends=(apparmor-libapparmor)
110 #FIXME: can't build this:
111 ( cd "${srcroot}/deprecated/management/applets/apparmorapplet-gnome"; msg2 "${PWD##*/}"
113 ./configure --prefix=/usr
115 make install DESTDIR=${pkgdir}
120 pkgdesc='Linux application security framework - mandatory access control for programs'