summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 312c2abc2f5b82f501e766d7e7d81f553746caf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
gitname=fbpanel
pkgname="$gitname-git"
pkgver=44.478754b
pkgrel=2
pkgdesc="NetWM compliant desktop panel (git)"
license=(GPL)
arch=(i686 x86_64)
provides=('fbpanel' 'fbpanel-svn')
conflicts=('fbpanel' 'fbpanel-svn')
depends=('gtk2' 'python2')
makedepends=('automake' 'autoconf')
url="https://github.com/aanatoly/$gitname"
source=("git+$url.git")
sha512sums=('SKIP')

pkgver() {
    cd "${srcdir}/${gitname}"
    local ver="$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
    printf "%s" "${ver//-/.}"
}

prepare() {
    cd "${srcdir}/${gitname}"
    sed -i 's|/usr/bin/python$|/usr/bin/python2|' configure
    ./configure --prefix=/usr --libexecdir=/usr/lib --mandir=/usr/share/man/man1
    echo "LDFLAGSX += -lX11 -lm" >>config.mk
    sed -i 's|/usr/bin/python$|/usr/bin/python2|' repl.py
}
build(){
    cd "${srcdir}/${gitname}"
    ionice -c 3 nice -n 19 make
}
package(){
    cd "${srcdir}/${gitname}"
    make DESTDIR="$pkgdir/" install

    # Add forgotten localization files
    cd po
    for mofile in *.mo;do
        install -Dm755 "$mofile" "$pkgdir/usr/share/fbpanel/locale/${mofile%%_*}/LC_MESSAGES/fbpanel.mo"
    done
}