summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9086f2d1b01367a0cfea2a62fdd6e7edf4504d02 (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
# Maintainer: Ammon Smith <ammon.i.smith@gmail.com>

_pkgname=qotd
pkgname="$_pkgname"
pkgver=0.5.0
pkgrel=1
pkgdesc="A simple RFC 865-compliant QOTD (quote of the day) daemon."
arch=('any')
url="https://gitlab.com/ammongit/$_pkgname"
license=('GPL')
depends=('glibc')
makedepends=('git' 'gcc' 'ghostscript' 'gzip')
optdepends=()
provides=("$_pkgname")
conflicts=("$_pkgname")
options=()
install="$pkgname.install"
source=("git+https://gitlab.com/ammongit/$_pkgname.git")
sha256sums=('SKIP')
backup=('etc/qotd.conf')

build() {
    cd "$srcdir/$_pkgname"

	# Go to the correct commit for this release
	git reset --hard "$(git rev-parse "v$pkgver")"

	# Compile sources
	make release
}

package() {
    cd "$srcdir/$_pkgname"
	make ROOT="$pkgdir" SYSTEMD=1 install
	mkdir -p "$pkgdir/usr/share/man"
	mv "$pkgdir"/usr/share/man{5,8} "$pkgdir/usr/share/man"
	install -D -m644 "doc/$_pkgname.pdf" "$pkgdir/usr/share/doc/$_pkgname/$_pkgname.pdf"
    install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}