updated on Wed Jan 25 20:08:56 UTC 2012
[aur-mirror.git] / pygtk-shutdown-git / PKGBUILD
blobaa78d959c87dea935cd3f1783a32397f4b2e8cdc
1 # Maintainer: Austin <doorknob60 at gmail dot com>
2 pkgname=pygtk-shutdown-git
3 pkgver=20110823
4 pkgrel=1
5 pkgdesc="A fork of ummaintained shutdown-dialog. A simple dialog to shut down the computer. Optional patches inside, see PKGBUILD"
6 arch=('i686' 'x86_64')
7 url="https://github.com/doorknob60/pygtk-shutdown"
8 license=('GPL')
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)')
13 makedepends=('git')
14 source=()
16 _gitroot="git://github.com/doorknob60/pygtk-shutdown.git"
17 _gitname="pygtk-shutdown"
19 build() {
20   cd "$srcdir"
21   msg "Connecting to GIT server...."
23   if [[ -d "$_gitname" ]]; then
24     cd "$_gitname" && git pull origin
25     msg "The local files are updated."
26   else
27     git clone "$_gitroot" "$_gitname"
28   fi
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
45   
46   
49 package() {
50 install -d "$pkgdir/usr/bin"
51 install -Dm755 "$_gitname-build/pygtk-shutdown" "$pkgdir/usr/bin/"