1 # Maintainer: Diep Pham Van <imeo at favadi dot com>
2 # Contributor: Austin <doorknob60 at gmail dot com>
3 pkgname=pygtk-shutdown-awesome-git
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"
8 url="https://github.com/doorknob60/pygtk-shutdown"
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)')
15 conflicts=('pygtk-shutdown-git' 'pygtk-shutdown-svn')
18 _gitroot="git://github.com/doorknob60/pygtk-shutdown.git"
19 _gitname="pygtk-shutdown"
23 msg "Connecting to GIT server...."
25 if [[ -d "$_gitname" ]]; then
26 cd "$_gitname" && git pull origin
27 msg "The local files are updated."
29 git clone "$_gitroot" "$_gitname"
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
55 install -d "$pkgdir/usr/bin"
56 install -Dm755 "$_gitname-build/pygtk-shutdown" "$pkgdir/usr/bin/"