| 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 | |
| 5 | pkgname=apparmor |
| 6 | pkgver=2.5.1 |
| 7 | pkgrel=5 |
| 8 | pkgdesc="Linux application security framework - mandatory access control for programs" |
| 9 | arch=(i686 x86_64) |
| 10 | license=(GPL) |
| 11 | url='https://launchpad.net/apparmor' |
| 12 | depends=(perl perl-locale-gettext perl-term-readkey perl-file-tail perl-rpc-xml) |
| 13 | makedepends=(autoconf automake make gcc swig perl python2 ruby wxgtk audit) |
| 14 | optdepends=('perl: many apparmor utilities' 'perl-rpc-xml: more utilities') |
| 15 | provides=(apparmor-parser libapparmor apparmor-utils apparmor-profiles apparmor-notify |
| 16 | apparmor-lib apparmor-perl apparmor-python apparmor-ruby |
| 17 | apparmor-dbus apparmor-profile-editor apparmor-applet |
| 18 | ) |
| 19 | bigver="$(echo $pkgver | cut -d . -f -2)" |
| 20 | source=("http://launchpad.net/apparmor/$bigver/$pkgver/+download/apparmor-$pkgver.tar.gz") |
| 21 | md5sums=('76b37656bf42fedab0d0b9d47e690a8b') |
| 22 | |
| 23 | build() { |
| 24 | cd "${srcdir}/${pkgname}-${pkgver}" |
| 25 | |
| 26 | msg2 'Global configuration' |
| 27 | export MAKEFLAGS+=' POD2MAN=/usr/lib/perl5/core_perl/bin/pod2man' |
| 28 | export MAKEFLAGS+=' POD2HTML=/usr/lib/perl5/core_perl/bin/pod2html' |
| 29 | export MAKEFLAGS+=' PROVE=/usr/lib/perl5/core_perl/bin/prove' |
| 30 | export PYTHON='/usr/bin/python2' |
| 31 | |
| 32 | msg2 'Patching...' |
| 33 | #Patch (maybe we can avoid patching by ./configuring things better) |
| 34 | patch=parser/Makefile; { rm "$patch" |
| 35 | sed -e 's/pdflatex/true/g' > "$patch" #just workaround until we'll get pdflatex package |
| 36 | } < "$patch" |
| 37 | echo '#!/bin/true' > parser/tst/caching.sh #Can't pass this test with current kernel |
| 38 | |
| 39 | |
| 40 | msg 'Build (these sections can be used for splitpkg in future...)' |
| 41 | ( cd parser; msg2 "${PWD##*/}" |
| 42 | make |
| 43 | make install DESTDIR=${pkgdir} |
| 44 | ) |
| 45 | ( cd libraries/libapparmor; msg2 "${PWD##*/}" |
| 46 | ./autogen.sh |
| 47 | ./configure --prefix=/usr --with-perl --with-python --with-ruby |
| 48 | make |
| 49 | make install DESTDIR=${pkgdir} |
| 50 | #FIXME: this file should install automatically: |
| 51 | cp swig/perl/LibAppArmor.pm ${pkgdir}/usr/lib/perl5/vendor_perl/ |
| 52 | ) |
| 53 | ( cd utils; msg2 "${PWD##*/}" |
| 54 | make |
| 55 | make install DESTDIR=${pkgdir} |
| 56 | ) |
| 57 | ( cd profiles; msg2 "${PWD##*/}" |
| 58 | make |
| 59 | make install DESTDIR=${pkgdir} |
| 60 | ) |
| 61 | |
| 62 | #FIXME: depends on this package itself (logparse.h,...): |
| 63 | #We should build it in splitpkg with proper dependences |
| 64 | #Now you can build, install, build and install again to enable: |
| 65 | if pacman -Qi apparmor &>/dev/null; then |
| 66 | |
| 67 | ( cd deprecated/management/profile-editor; msg2 "${PWD##*/}" |
| 68 | ./macros/autogen.sh |
| 69 | ./configure --prefix=/usr |
| 70 | make |
| 71 | make install DESTDIR=${pkgdir} |
| 72 | ) |
| 73 | ( cd deprecated/management/apparmor-dbus; msg2 "${PWD##*/}" |
| 74 | ./autogen.sh |
| 75 | ./configure --prefix=/usr |
| 76 | make |
| 77 | make install DESTDIR=${pkgdir} |
| 78 | ) |
| 79 | #FIXME: can't build this: |
| 80 | #( cd deprecated/management/applets/apparmorapplet-gnome; msg2 "${PWD##*/}" |
| 81 | # ./autogen.sh |
| 82 | # ./configure --prefix=/usr |
| 83 | # make |
| 84 | # make install DESTDIR=${pkgdir} |
| 85 | # ) |
| 86 | |
| 87 | fi; |
| 88 | } |