updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / pacsyu-git / PKGBUILD
blob44f92c956ddd6a35f452c419297827c2cb0d7bcc
1 # Maintainer: Alfonso Saavedra "Son Link" <sonlink.dourden@gmail.com>
2 pkgname=pacsyu-git
3 _pkgname=pacsyu
4 pkgver=20120108
5 pkgrel=1
6 pkgdesc="Update notifier based on python2 and GTK2"
7 arch=(any)
8 url="http://sonlinkblog.blogspot.com/p/pacsyu.html"
9 license=('GPL3')
10 groups=()
11 depends=('vte' 'python2' 'pygtk' 'python-notify' 'sudo' 'cower-legacy')
12 optdepends=('cower: if you use Pacman 4')
13 makedepends=('git')
14 source=('pacsyu.desktop' 'sample.pacsyu')
15 md5sums=('b778fd770f657ff517315e73a7f18081'
16          '2cdb4521a959592f3614cd8b1b30333b')
18 _gitroot="git://github.com/son-link/PacSyu.git"
19 _gitname="PacSyu"
21 build() {
22   msg "Connecting to GIT server...."
24  if [ -d $_gitname ] ; then
25     cd $_gitname && git pull origin
26     msg "The local files are updated."
27   else
28     git clone $_gitroot $_gitname
29   fi
31   msg "GIT checkout done or server timeout"
33 package() {
34   cd "${srcdir}/${_gitname}"
35   msg "Starting make..."
37   mkdir -p $pkgdir/usr/share/$_pkgname
38   mkdir -p $pkgdir/usr/bin
39   mkdir -p $pkgdir/usr/share/locale
40         
41   install -m755 $_pkgname.py $pkgdir/usr/bin/$_pkgname
42   sed -i "s/lang/\/usr\/share\/locale/g" $pkgdir/usr/bin/$_pkgname
43   sed -i "s/modules/\/usr\/share\/$_pkgname/g" $pkgdir/usr/bin/$_pkgname
44   sed -i "s/COPYING/\/usr\/share\/$_pkgname\/COPYING/g" $pkgdir/usr/bin/$_pkgname
46   cp modules/* *.svg COPYING CHANGELOG README $pkgdir/usr/share/$_pkgname/
47   
48   mkdir -p $pkgdir/usr/share/icons/
49   cp pacsyu.svg $pkgdir/usr/share/icons/
50   
51   sed -i "s/copyfile('/copyfile('\/usr\/share\/$_pkgname\//g" $pkgdir/usr/share/$_pkgname/config.py
52   sed -i "s/gtk.gdk.pixbuf_new_from_file('/gtk.gdk.pixbuf_new_from_file('\/usr\/share\/icons\//g" $pkgdir/usr/bin/$_pkgname
54   cp lang/* -r $pkgdir/usr/share/locale/
55   
56   mkdir -p $pkgdir/usr/share/applications/
57   install -Dm644 "${srcdir}/pacsyu.desktop" "${pkgdir}/usr/share/applications/pacsyu.desktop"
58   install -Dm644 "${srcdir}/sample.pacsyu" "${pkgdir}/usr/share/$_pkgname/sample.$_pkgname"
59