updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / pygtk-shutdown-awesome-git / PKGBUILD
blob29a15466713fe018bcf63209318b9f74f6b3d79a
1 # Maintainer: Diep Pham Van <imeo at favadi dot com>
2 # Contributor: Austin <doorknob60 at gmail dot com>
3 pkgname=pygtk-shutdown-awesome-git
4 pkgver=20111221
5 pkgrel=3
6 pkgdesc="A fork of ummaintained shutdown-dialog, build for awesome wm. A simple dialog to shut down the computer. Optional patches inside, see PKGBUILD"
7 arch=('i686' 'x86_64')
8 url="https://github.com/doorknob60/pygtk-shutdown"
9 license=('GPL')
10 depends=('python2' 'pygtk' 'gksu')
11 optdepends=('pm-utils: suspend and hibernate support'\
12         'consolekit: use consolekit rather than /sbin/shutdown and gksu'\
13         'upower: suspend and hibernate support (if also using consolekit)')
14 makedepends=('git')
15 conflicts=('pygtk-shutdown-git' 'pygtk-shutdown-svn')
16 source=()
18 _gitroot="git://github.com/doorknob60/pygtk-shutdown.git"
19 _gitname="pygtk-shutdown"
21 build() {
22   cd "$srcdir"
23   msg "Connecting to GIT server...."
25   if [[ -d "$_gitname" ]]; then
26     cd "$_gitname" && git pull origin
27     msg "The local files are updated."
28   else
29     git clone "$_gitroot" "$_gitname"
30   fi
32   msg "GIT checkout done or server timeout"
33   msg "Starting build..."
35   rm -rf "$srcdir/$_gitname-build"
36   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
37   cd "$srcdir/$_gitname-build"
39   # patch logout command for awesome wm
40   cp ../../awesome.patch .
41   patch pygtk-shutdown awesome.patch
42   # Uncomment the following line if you want to use Consolekit for shutting down rather than gksu and /sbin/shutdown
43   # patch pygtk-shutdown consolekit.patch
45   # Uncomment the following line if you want to use Consolekit as well as upower for suspend and hibernate suppoer
46   # patch pygtk-shutdown consolekit-upower.patch
48   # Uncomment the following line to add support for Suspend and Hibernate via pm-utils (no consolekit)
49   # patch pygtk-shutdown pm-utils.patch
50   
51   
54 package() {
55 install -d "$pkgdir/usr/bin"
56 install -Dm755 "$_gitname-build/pygtk-shutdown" "$pkgdir/usr/bin/"