updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / firestarter / PKGBUILD
blobdba85a8eec6a3941fcd7853911d1f85bf2d49708
1 # Maintainer: Phillip Smith <fukawi2@NO-SPAM.gmail.com>
2 # http://github.com/fukawi2/aur-packages
4 ### I AM ONLY THE PACKAGER, NOT THE DEVELOPER
5 ### Please ask support questions about this software in one of:
6 ###   1) The AUR comments; OR
7 ###   2) Upstream forums/maillist etc; OR
8 ###   3) The ArchLinux forums
9 ### I do not always know enough about the software itself, or don't have the
10 ### time to promptly respond to direct emails.
11 ### If you have found a problem with the package/PKGBUILD (as opposed to
12 ### the software) then please do email me or post an AUR comment.
14 pkgname=firestarter
15 pkgver=1.0.3
16 pkgrel=11
17 pkgdesc="GUI fron-end for iptables"
18 arch=('i686' 'x86_64')
19 license=('GPL2')
20 depends=('iptables' 'gtk2' 'libgnome' 'libgnomeui' 'libglade' 'pango' 'gksu' 'perl-xml-parser')
21 makedepends=('patch')
22 url="http://www.fs-security.com/"
23 install="${pkgname}.install"
24 source=("http://downloads.sourceforge.net/firestarter/$pkgname-$pkgver.tar.gz"
25         'rc.firestarter'
26         '12_firestarter_transparent_icon.patch'
27         '18_fix_memleak.patch'
28         '20-net-tools-ifconfig-format-change.patch'
29         'events-log-fix.patch'
30         'menu-toolbar-icons-fix.patch')
31 md5sums=('f46860a9e16dac4b693bd05f16370b03'
32          '76ece068fa966c70b0764ec9e644edf5'
33          'b657c53280b30f1b4976ec01eff085e8'
34          'b31efd1caf430d979e26abb2618a3659'
35          '7bcd40b3690e3833078ea31a8a9935f1'
36          'acd91fefe00edb41dd38fcc91567707f'
37          'ea9cd9b92939c554b26ccdfe735a2d90')
39 build() {
40   cd $srcdir/$pkgname-$pkgver
41   
42   # Apply patches to fix things
43   # Transparent tray icon (from Ubuntu launchpad)
44   patch -Np1 -i "$srcdir/12_firestarter_transparent_icon.patch"
45   # fix GUI crashes on newer Gnome libs (from Ubuntu launchpad)
46   patch -Np1 -i "$srcdir/18_fix_memleak.patch"
47   # patch to use the new 'ifconfig' from net-tools (thanks to Joeny Ang)
48   patch -Np1 -i "$srcdir/20-net-tools-ifconfig-format-change.patch"
49   
50   # Replace kernel.log with iptables.log
51   patch -Np1 -i ../events-log-fix.patch
52   
53   # menu-toolbar-icons-fix.patch: fixed a couple menu and toolbar icons to follow GTK theme
54   patch -Np1 -i ../menu-toolbar-icons-fix.patch
55   
56   # Configure, Build and Install to $pkgdir
57   export LDFLAGS='-lX11'
58   ./configure \
59     --prefix=/usr \
60     --sysconfdir=/etc \
61     --localstatedir=/var
62   
63   make
66 package() {
67   cd $srcdir/$pkgname-$pkgver
69   make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=${pkgdir} install
70   
71   # Create default empty ruleset and fix permissions
72   mkdir ${pkgdir}/etc/firestarter/outbound/
73   touch ${pkgdir}/etc/firestarter/outbound/allow-service
74   chown -R root:root ${pkgdir}/etc/firestarter/
76   # Install rc.init script
77   install -D -m755 ${srcdir}/rc.firestarter ${pkgdir}/etc/rc.d/firestarter
78   
79   # Fix the desktop launcher to run with root permission using gksudo.
80   sed -i "s|Exec=|TryExec=gksu\n\0gksu |" \
81     ${pkgdir}/usr/share/gnome/apps/Internet/firestarter.desktop
82   
83   # Move the .desktop file to a standard location
84   install -Dm644 $pkgdir/usr/share/gnome/apps/Internet/${pkgname}.desktop $pkgdir/usr/share/applications/${pkgname}.desktop
85   rm -rf $pkgdir/usr/share/gnome
86   
87   # Merge Schema files to /usr/share/gconf so the .install file
88   # can update the database at install time.
89   mkdir -p ${pkgdir}/usr/share/gconf/schemas
90   gconf-merge-schema ${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas \
91     ${srcdir}/${pkgname}-${pkgver}/*.schemas
92   rm -Rf ${pkgdir}/etc/gconf
95 # vim:set ts=2 sw=2 et: