summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 83f3d38dec8bf46bf78fd66ddaaa29c680aeba97 (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
# Maintainer: Lucas Kent <rubickent at gmail dot com>

pkgname=filetimecapsule-git
arch=('any')
pkgver=1
pkgrel=1
md5sums=('SKIP')
depends=('python' 'python-tornado' 'nginx')
license=('GPL3')
makedepends=('git')
source=('git+https://github.com/rukai/FileTimeCapsule.git')
url="http://filetimecapsule.com"
pkgdesc="A webservice for disabling distracting files."

pkgver(){
    cd $srcdir/FileTimeCapsule
    #generate nice pkgver from git repo
    git describe | sed 's/\([^-]*-g\)/r\1/g' | sed 's/-/./g' | sed 's/^v//'
}

prepare(){
    cd $srcdir/FileTimeCapsule
    #let the launch script know where the nginx config file is stored
    sed -i 's|$configPath|/etc/webapps/filetimecapsule/|' run.sh
}

package(){
    dest=$pkgdir/usr/share/webapps/filetimecapsule/
    config=$pkgdir/etc/webapps/filetimecapsule/
    bin=$pkgdir/usr/bin/
    cd $srcdir/FileTimeCapsule/

    install -dm554 $dest
    install -dm554 $config
    install -m554 nginx.conf $config/

    cp -rt $dest backend css fonts graphics js templates gpl-3.0.txt server.py generateDB.py run.sh
    install -dm755 $bin
    ln -rs $dest/run.sh $bin/filetimecapsule
}