1 # Maintainer: Austin <doorknob60 at gmail dot com>
2 pkgname=pygtk-shutdown-git
5 pkgdesc="A fork of ummaintained shutdown-dialog. A simple dialog to shut down the computer. Optional patches inside, see PKGBUILD"
7 url="https://github.com/doorknob60/pygtk-shutdown"
9 depends=('python2' 'pygtk' 'gksu')
10 optdepends=('pm-utils: suspend and hibernate support'\
11 'consolekit: use consolekit rather than /sbin/shutdown and gksu'\
12 'upower: suspend and hibernate support (if also using consolekit)')
16 _gitroot="git://github.com/doorknob60/pygtk-shutdown.git"
17 _gitname="pygtk-shutdown"
21 msg "Connecting to GIT server...."
23 if [[ -d "$_gitname" ]]; then
24 cd "$_gitname" && git pull origin
25 msg "The local files are updated."
27 git clone "$_gitroot" "$_gitname"
30 msg "GIT checkout done or server timeout"
31 msg "Starting build..."
33 rm -rf "$srcdir/$_gitname-build"
34 git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
35 cd "$srcdir/$_gitname-build"
37 # Uncomment the following line if you want to use Consolekit for shutting down rather than gksu and /sbin/shutdown
38 # patch pygtk-shutdown consolekit.patch
40 # Uncomment the following line if you want to use Consolekit as well as upower for suspend and hibernate suppoer
41 # patch pygtk-shutdown consolekit-upower.patch
43 # Uncomment the following line to add support for Suspend and Hibernate via pm-utils (no consolekit)
44 # patch pygtk-shutdown pm-utils.patch
50 install -d "$pkgdir/usr/bin"
51 install -Dm755 "$_gitname-build/pygtk-shutdown" "$pkgdir/usr/bin/"