summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6d8fbb0ad5ac859550a056a0ffdbda6f8230d3b0 (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
# Maintainer: Thomas Weißschuh <thomas t-8ch de>
# Contributor: Stefan Tatschner <stefan@rumpelsepp.org>

pkgname=public-inbox-git
pkgver=1.7.0.r0.e3056686
pkgrel=1
pkgdesc='An "archives first" approach to mailing lists'
arch=('any')
url="https://public-inbox.org"
license=('GPL')
depends=(perl perl-timedate perl-digest-sha perl-email-mime perl-plack perl-uri)
makedepends=('git')
provides=("${pkgname%-VCS}")
conflicts=("${pkgname%-VCS}")
options=('!emptydirs' purge)
source=("${pkgname%-git}::git+https://public-inbox.org/")
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"

	printf "%s" "$(
			git describe --long | sed \
			-e 's/\([^-]*-\)g/r\1/;s/-/./g' \
			-e 's/^v//'
	)"
}

build() {
	cd "$srcdir/${pkgname%-git}"

	unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
	export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
	/usr/bin/perl Makefile.PL
	make
}

check() {
	cd "$srcdir/${pkgname%-git}"

	unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
	export PERL_MM_USE_DEFAULT=1
	make check
}

package() {
	cd "$srcdir/${pkgname%-git}"

	unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
	make DESTDIR="$pkgdir/" install
}