1 # Maintainer: rasmus <rasmus . pank at gmail . com>
5 pkgdesc="Mailnag is a fork of the Popper mail notifier"
7 url="https://launchpad.net/mailnag"
9 depends=('pyxdg' 'python-notify' 'python-gnomekeyring'
10 'python-httplib2' 'pygtk' 'pygobject' 'alsa-utils' )
12 makedepends=('git' 'gettext')
14 optdepends=('gettext: to be able to generate locals. Run mailnag_gen_locales')
16 install=('mailnag.install')
18 _gitroot="https://github.com/pulb/mailnag.git"
24 msg "Connecting to GIT server...."
26 if [ -d $_gitname ] ; then
27 cd $_gitname && git pull origin
28 msg "The local files are updated."
30 git clone $_gitroot $_gitname
33 msg "GIT checkout done or server timeout"
34 msg "Starting make..."
36 rm -rf "$srcdir/$_gitname-build"
37 git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
38 cd "$srcdir/$_gitname-build"
41 for file in $(find . -name '*.py' -print); do
42 sed -i 's_#!.*/usr/bin/python_#!/usr/bin/python2_' $file
43 sed -i 's_#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
46 for file in {mailnag,mailnag_config};do
47 sed -i 's/python/python2/' $file
49 sed -i '2 i LIB_DIR=/usr/share/mailnag/Mailnag' $file
59 install -d -m755 "${pkgdir}"/usr/{bin,share/{${pkgname},applications}}
60 cp -r $srcdir/$_gitname-build/* ${pkgdir}/usr/share/${pkgname}
61 cp $srcdir/$_gitname-build/data/mailnag_config.desktop ${pkgdir}/usr/share/applications
62 ln -s /usr/share/${pkgname}/{mailnag,mailnag_config} ${pkgdir}/usr/bin
63 # ln -s /usr/share/${pkgname}/{gen_locales} ${pkgdir}/usr/bin/mailnag_gen_locales