summaryrefslogtreecommitdiffstats
path: root/tenshi/PKGBUILD
blob: a1ec7ebbdf10e3f0ae7a065ac19958327491c7b5 (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
43
44
45
# Contributor: Ryan Corder <ryanc@greengrey.org>

pkgname=tenshi
pkgver=0.9.1
pkgrel=1
pkgdesc="real-time log monitor from the Gentoo Linux project"
arch=(i686  x86_64)
license="custom"
depends=('perl')
install="$pkgname.install"
source=(http://dev.inversepath.com/tenshi/$pkgname-$pkgver.tar.gz
        'tenshi'
        'tenshi-conf.d'
        'tenshi.install')
url="http://dev.inversepath.com/trac/tenshi"
md5sums=('17a2f5f72b232b81b01f800e0e932a99'
         'c1de0e9473003f816d79e0dfb3f19a3b'
         '947a195840ff67bbd558135e25c94165'
         'b1605a5f5396cf44dca3ae49c327a4e8')

build() {
    cd $startdir
    chmod -R og-rwx ./

    cd ${startdir}/src/$pkgname-$pkgver

    # create retired directories first
    mkdir -m 0755 -p $startdir/pkg/usr/sbin || return 1
    mkdir -m 0750 -p $startdir/pkg/var/lib/tenshi || return 1
    mkdir -m 0750 -p $startdir/pkg/etc/tenshi || return 1
    mkdir -m 0755 -p $startdir/pkg/etc/conf.d || return 1
    mkdir -m 0755 -p $startdir/pkg/etc/rc.d || return 1

    # install tenshi binary
    install -m 755 $startdir/src/$pkgname-$pkgver/tenshi $startdir/pkg/usr/sbin || return 1

    # install config and init file
    install -m 640 $startdir/src/$pkgname-$pkgver/tenshi.conf $startdir/pkg/etc/tenshi || return 1
    install -m 644 $startdir/tenshi-conf.d $startdir/pkg/etc/conf.d/tenshi || return 1
    install -m 755 $startdir/tenshi $startdir/pkg/etc/rc.d/tenshi || return 1

    # install docs and man pages
    install -Dm 644 $startdir/src/$pkgname-$pkgver/LICENSE $startdir/pkg/usr/share/licenses/$pkgname/LICENSE || return 1
    install -Dm 644 $startdir/src/$pkgname-$pkgver/tenshi.8 $startdir/pkg/usr/man/man8/tenshi.8 || return 1
}