summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7c2d0857b869cef261ae427dc8da10024fe54df9 (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: Anthony Wang <a aat exozy dotme>

_pkgname=sdc
pkgname="$_pkgname-git"
pkgver=r30.a5bfafa
pkgrel=2
pkgdesc="C port of SD, a very efficient flash cards app"
arch=(any)
url="https://git.exozy.me/a/$_pkgname"
license=('GPL')
depends=('sqlite3')
optdepends=('python-pyqt6: PyQT6 GUI'
            'tk: Tkinter GUI')
makedepends=('git' 'gcc')
source=("$_pkgname::git+$url.git")
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/$_pkgname"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "$srcdir/$_pkgname"
	gcc $CFLAGS sd.c segmenttree.c -o sd -lsqlite3
}

package() {
	cd "$srcdir/$_pkgname"
	install -Dm755 sd "$pkgdir/usr/bin/sd"
	install -Dm755 main.py "$pkgdir/usr/bin/sd-qt"
	install -Dm755 tkinter.py "$pkgdir/usr/bin/sd-tk"
	install -Dm644 sd-add.fish "$pkgdir/usr/share/fish/vendor_functions.d/sd-add.fish"
	install -Dm644 sqlitevi.fish "$pkgdir/usr/share/fish/vendor_functions.d/sqlitevi.fish"
}