updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / gnome-shell-extension-timer-git / PKGBUILD
blobf5cd83147e573b9f84df4c78e3584381a2db7618
1 # Maintainer: Ole Ernst <olebowle at gmx dot com>
2 pkgname=gnome-shell-extension-timer-git
3 pkgver=20111102
4 pkgrel=1
5 pkgdesc="A simple timer extension for gnome-shell"
6 arch=('any')
7 url="http://github.com/olebowle/gnome-shell-timer"
8 license=('GPL3')
9 depends=('gnome-shell')
10 makedepends=('git')
11 install=('gnome-shell-extension-timer-git.install')
13 _gitroot="git://github.com/olebowle/gnome-shell-timer.git"
14 _gitname="gnome-shell-timer"
16 build() {
17     cd "${srcdir}/"
18     msg "Connecting to the GIT server..."
19     if [ -d "${srcdir}/${_gitname}" ] ; then
20         cd ${_gitname}
21         git pull origin
22         msg "The local files are updated..."
23     else
24         git clone ${_gitroot} ${_gitname}
25     fi
26     msg "GIT checkout done."
29 package() {
30     cd "${srcdir}/${_gitname}/"
31     mkdir -p "${pkgdir}/usr/share/gnome-shell/extensions"
32     cp -R "timer@olebowle.gmx.com" "${pkgdir}/usr/share/gnome-shell/extensions/"
33     mkdir -p "$pkgdir/usr/share/glib-2.0/schemas"
34     cp "org.gnome.shell.extensions.timer.gschema.xml" "$pkgdir/usr/share/glib-2.0/schemas/"
35     mkdir -p "${pkgdir}/usr/share/icons/hicolor/scalable/apps"
36     cp "utilities-timer-symbolic.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/"
37     cp "gnome-shell-timer-config.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/"
39     mkdir -p "$pkgdir/usr/bin"
40     cp "gnome-shell-timer-config.py" "$pkgdir/usr/bin/gnome-shell-timer-config"
41     mkdir -p "$pkgdir/usr/share/applications"
42     cp "gnome-shell-timer-config.desktop" "$pkgdir/usr/share/applications/"
44     for _lang in `locale -a | grep '^[[:alpha:]]\+_[[:alpha:]]\+$'`; do
45         if [ -d "po/${_lang}" ]; then
46             mkdir -p "$pkgdir/usr/share/locale/${_lang}/LC_MESSAGES"
47             msgfmt -cv -o "${pkgdir}/usr/share/locale/${_lang}/LC_MESSAGES/gnome-shell-timer.mo" "po/${_lang}/gnome-shell-timer.po"
48         fi
49     done