summaryrefslogtreecommitdiff
path: root/pcr/gmid/PKGBUILD
blob: cd743cd3a50b7f0005b36aaee1058f6727f3d53c (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer (aur): Andrea Feletto <andrea@andreafeletto.com>
# Maintainer: Wael Karram <wael@waelk.tech>
# Contributor: bill-auger <bill-auger@programmer.net>


# parabola changes and rationale:
# - delete unlicensed files
# - add openrc service files


pkgname=gmid
pkgver=1.8.4
pkgrel=1
pkgdesc='Fast Gemini server written with security in mind.'
arch=('x86_64')
arch+=('i686' 'armv7h')
url='https://gmid.omarpolo.com'
license=('ISC')
install=${pkgname}.install
backup=(etc/conf.d/${pkgname}
        etc/${pkgname}.conf)
depends=('libretls' 'libevent')
mksource=(https://github.com/omar-polo/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz)
source=(
	https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.tar.xz{,.sig}
	"gmid.service"
	"gmid.sysusers"
	"gmid.confd"
	"gmid.initd"
	"gmid.conf"
	"index.gmi"
)
mksha256sums=('abecdec3bfc2f2deac9d57b84e43334484fc537e5086a3c061f07f6311c89d2f')
sha256sums=(
	'0'
	'SKIP'
	'946de0766343225068a0e3f38cb39a4a93ef312525dd775226b938cd08706b94'
	'4d943727a57dbf5f246963c0f90ccc54919cc2296538457e6b16f29f7580d9d6'
# 	'6f3814be535099857b579126e5fb5ff9a9a6520d4ea9116c8a0c6a8589ab9ef6'
	'eddbe93741d01077426bc0239db42815c75a0da5191b4e6528df60ae3e0e5bb3'
	'f396c7db961c45ddb8e48acf42708b3faf9df2a3eaa56f30d9e64d4de0971e88'
	'7acf491fee5f2693b30666b1f2c6eb0a4db33e9ef3154e1cbfb62186c6fa7be6'
# 	'db240698dfb804d203299b3c89015a493c4fe97bec5cb3b3f920e566045191ce'
# 	'fac76dfe3da74d9dce4ed3acbb6bd0023904140bd71219a7cac06236e2e93d29'
	'361cd4ef2b47437b0f5729d56d0ef88851e56812ab88546c82cda0092fe86139'
)
validpgpkeys=('3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40') # bill-auger

mksource() {
	cd "$srcdir/$pkgname-$pkgver"

	# Remove unlicensed files
	rm -rf contrib
	rm -rf site
}

build() {
	cd "$srcdir/$pkgname-$pkgver"
	MANDIR='usr/share/man/' ./configure --prefix='usr/'
	make
}

package() {
	# Install the config and service files.
	cd "$srcdir"
	install -Dm644 gmid.service -t "$pkgdir/usr/lib/systemd/system"
	install -Dm644 gmid.sysusers -t "$pkgdir/usr/lib/sysusers.d"
	install -Dm644 gmid.confd "$pkgdir/etc/conf.d/gmid"
	install -Dm755 gmid.initd "$pkgdir/etc/init.d/gmid"
	install -Dm644 gmid.conf "$pkgdir/etc/gmid.conf"

	# Install the program files.
	cd "$srcdir/$pkgname-$pkgver"
	make DESTDIR="$pkgdir/" install

	# Install the documentation files.
	install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
	install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
	install -Dm644 ../index.gmi "$pkgdir/usr/share/doc/$pkgname/index.gmi"
}