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 perl-locale-gettext 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=('3b4fb4186ac6440a03d8f2dcf188d4b4')
28 core_perl_dir='/usr/bin/core_perl'
29 export MAKEFLAGS+=" POD2MAN=${core_perl_dir}/pod2man"
30 export MAKEFLAGS+=" POD2HTML=${core_perl_dir}/pod2html"
31 export MAKEFLAGS+=" PROVE=${core_perl_dir}/prove"
32 export PYTHON='/usr/bin/python2'
35 export srcroot="${srcdir}/${pkgbase}-${pkgver}";
38 package_apparmor-parser() {
39 pkgdesc='AppArmor parser - loads AA profiles to kernel module'
40 cd "${srcroot}/parser"; msg2 "${PWD##*/}"
43 #Patch (maybe we can avoid patching by ./configuring things better)
44 patch=Makefile; { rm "$patch"
45 sed -e 's/pdflatex/true/g' > "$patch" #just workaround until we'll get pdflatex package
47 echo '#!/bin/true' > tst/caching.sh #Can't pass this test with current kernel
50 make install DESTDIR=${pkgdir}
53 package_apparmor-libapparmor() {
54 pkgdesc='AppArmor library'
55 makedepends=(swig perl python2 ruby)
56 provides=(apparmor-lib libapparmor apparmor-perl apparmor-python apparmor-ruby)
57 ( cd "${srcroot}/libraries/libapparmor"; msg2 "${PWD##*/}"
59 ./configure --prefix=/usr --with-perl --with-python --with-ruby
61 make install DESTDIR=${pkgdir}
62 #FIXME: this file should install automatically:
63 cp swig/perl/LibAppArmor.pm ${pkgdir}/usr/lib/perl5/vendor_perl/
67 package_apparmor-utils() {
68 pkgdesc='AppArmor userspace utilities'
69 depends=(perl perl-locale-gettext perl-term-readkey perl-file-tail perl-rpc-xml)
70 optdepends=('perl: many apparmor utilities' 'perl-rpc-xml: more utilities')
71 provides=(apparmor-notify);
72 install=('apparmor.install');
73 ( cd "${srcroot}/utils"; msg2 "${PWD##*/}"
75 make install DESTDIR=${pkgdir}
79 package_apparmor-profiles() {
80 pkgdesc='AppArmor sample pre-made profiles'
81 ( cd "${srcroot}/profiles"; msg2 "${PWD##*/}"
83 make install DESTDIR=${pkgdir}
87 package_apparmor-profile-editor() {
88 pkgdesc='AppArmor profile editor using WxWidgets (or WxGTK)'
89 depends=(apparmor-libapparmor wxgtk audit)
90 ( cd "${srcroot}/deprecated/management/profile-editor"; msg2 "${PWD##*/}"
92 ./configure --prefix=/usr
94 make install DESTDIR=${pkgdir}
98 package_apparmor-dbus() {
99 pkgdesc='AppArmor DBUS API'
100 depends=(apparmor-libapparmor)
101 ( cd "${srcroot}/deprecated/management/apparmor-dbus"; msg2 "${PWD##*/}"
103 ./configure --prefix=/usr
105 make install DESTDIR=${pkgdir}
109 package_apparmor-applet() {
110 pkgdesc='AppArmor Applet for Gnome'
111 depends=(apparmor-libapparmor)
112 #FIXME: can't build this:
113 ( cd "${srcroot}/deprecated/management/applets/apparmorapplet-gnome"; msg2 "${PWD##*/}"
115 ./configure --prefix=/usr
117 make install DESTDIR=${pkgdir}
122 pkgdesc='Linux application security framework - mandatory access control for programs'