summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3a9c1fea9ca84d2a87ded8016d6da202a8bbc988 (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
# Maintainer: Luca CPZ <luca.cpz [at] gmail [dot] com>

pkgname=lain-git
pkgcom=1695; /pkgsha=/cpkgsha=724c7b9
pkgsha=85db468
pkgver=$pkgcom.$pkgsha
pkgrel=1
pkgdesc="Layouts, asynchronous widgets and utilities for Awesome WM"
arch=('any')
url="https://github.com/lcpz/lain"
license=('GPL2')
depends=('awesome')
optdepends=('curl: for IMAP, MPD and weather widgets')
makedepends=('git')
provides=('lain')
conflicts=('lain')
source=("git://github.com/lcpz/lain.git")
md5sums=('SKIP')

package() {
    # check if awesome is stable or git
    if [ -d "/usr/share/awesome/lib/" ]; then
        aw_path="$pkgdir/usr/share/awesome/lib"
    else
        aw_path="$pkgdir/usr/local/share/awesome/lib"
    fi

    install -dm755 "$aw_path/lain"
    git --git-dir=lain/.git --work-tree=lain/ reset --hard $pkgsha --quiet
    rm -rf lain/{wiki,.git*,*.rockspec,*TEMPLATE*}
    cp -a lain $aw_path

    # fix scripts permissions
    find "$pkgdir" -type f ! -path "*/scripts/*" -print0 | xargs -0 chmod -R 644
}