~dricottone/huttese-apk

ref: 3c4b3a32ce6b35f087ae7cb6195b6f6c7e564ea2 huttese-apk/sr.ht/searchhut/APKBUILD -rw-r--r-- 2.1 KiB
3c4b3a32 — Drew DeVault searchhut: new aport 2 years ago
                                                                                
3c4b3a32 Drew DeVault
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
46
47
48
49
50
51
52
53
54
55
56
57
58
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=searchhut
pkgver=0_git20220714
_commit=c2c75b565a615031fb5c41c3d259c87313bfc763
pkgrel=0
pkgdesc="Search engine"
url="https://searchhut.org"
license="AGPL-3.0"
arch="all"
pkgusers="$pkgname"
pkggroups="$pkgname"
install="$pkgname.pre-install"
makedepends="go"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/searchhut/archive/$_commit.tar.gz
	sh-api.initd
	sh-api.confd
	sh-web.initd
	sh-web.confd
	"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # no upstream tests

export GOPATH="$srcdir"
export GOFLAGS="$GOFLAGS -trimpath -modcacherw"

build() {
	make
}

package() {
	mkdir -p "$pkgdir"/usr/bin
	for bin in sh-admin sh-api sh-index sh-search sh-web
	do
		cp $bin "$pkgdir"/usr/bin/
	done

	install -Dm755 "$srcdir"/sh-api.initd "$pkgdir"/etc/init.d/sh-api
	install -Dm644 "$srcdir"/sh-api.confd "$pkgdir"/etc/conf.d/sh-api
	install -Dm755 "$srcdir"/sh-web.initd "$pkgdir"/etc/init.d/sh-web
	install -Dm644 "$srcdir"/sh-web.confd "$pkgdir"/etc/conf.d/sh-web

	mkdir -p "$pkgdir"/etc/searchhut
	install -Dm644 config.example.ini "$pkgdir"/etc/searchhut/config.ini

	mkdir -p "$pkgdir"/usr/share/searchhut/templates
	mkdir -p "$pkgdir"/usr/share/searchhut/static
	install -Dm644 templates/* "$pkgdir"/usr/share/searchhut/templates
	install -Dm644 static/* "$pkgdir"/usr/share/searchhut/static
}

sha512sums="
e6c94455ebd779dd5df5604a498451df91e277353372ffeb7ec0cc4bd367f2c674c453f9711b5d9fb731c95b5b10a01a9cff2487088e1d1aa55b0d086c4021ed  searchhut-0_git20220714.tar.gz
682a3eccdc59603392bb29ecdfaef07353dcf03d73be4e4a34f4658fada4849163abac2049d9fc988710e47c03b95db4806c7c6f8e4946c177d998f1a838f11d  sh-api.initd
37704c27c178c1e1f7d7475769ec62c5a76cf3acd8e2ab5d981b665d77c21b6135ea73f27b2b79a158fbff814bcdadbc11f31f09c9212064967c712b3bc7907c  sh-api.confd
fc7998ef7de051b4288387b5a172293a0fb6402dc6f6facdfa02f8aa628d4d307e0d2e94f40dfbd4a6bab066961d1af6a8c88bb61fe7b589748a6be0a7b0ef37  sh-web.initd
798824b3100e41de019ccd86f565094826b7a33369f97b07ce33da323817f95b401e07fc73c3d9e3302955a1284b086d18e5355182294f07d301dbbc30ffd278  sh-web.confd
"