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

pkgname=alephs
pkgver=0.5
pkgrel=1
pkgdesc="A List of Pakistan's Emergency Help Services."
depends=(python)
arch=(any)

source=("https://github.com/siphr/alephs/archive/refs/tags/$pkgver.tar.gz")
url=https://techtum.dev/work-alephs-220621.html#work-alephs-220621
license=('MIT')

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

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

    mkdir -p $pkgdir/usr/bin
    mv _alephs "$pkgdir/usr/bin/alephs"
    chmod +x $pkgdir/usr/bin/alephs

    install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    echo 'Finished setting up ALEPHS.'
}
md5sums=('SKIP')