summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ba1972d5a3d517a5c2f951c0ab2bb1c2b45c7bd1 (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: siphr <archlinux@techtum.dev>

_pypkgname=rwpk
pkgname=rwp
pkgver=0.0.3
pkgrel=1
pkgdesc="Random Pakistani languages words/phrases generator."
depends=(python)
arch=(any)
source=("https://github.com/siphr/rwp/archive/refs/tags/$pkgver.tar.gz")
url=https://www.techtum.dev/work-rwp-220314.html
license=('MIT')

build() {
    echo "BUILDING..."
    cd "$srcdir/$pkgname-$pkgver/py/"
    python setup.py build
    
    echo -e '#!/bin/sh\n\nexec python -m rwpk.rwpk "$@"' > _rwp
}

package() {
    echo "INSTALLING..."
    cd "$srcdir/$pkgname-$pkgver/py/"
    python setup.py install --root="$pkgdir" --optimize=1 --skip-build

    mkdir -p $pkgdir/usr/bin
    mv _rwp "$pkgdir/usr/bin/$pkgname"
    chmod +x $pkgdir/usr/bin/$pkgname

    install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    echo 'Finished setting up rwp.'
}

md5sums=('a3eb4a1c10505f376997ceb875a6d5b1')