blob: 1b1747fdd1f4ca401c3ecc38503cef86f48eab6a (
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
|
# Maintainer:
# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu >
# Contributor: Franziskus Kiefer <franziskuskiefer@gmail.com>
_pkgname="nspr"
pkgname="$_pkgname-hg"
pkgver=4.35.r4.g3e25d69ba6b2
pkgrel=1
pkgdesc="Netscape Portable Runtime"
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR"
arch=(x86_64)
license=(MPL GPL)
depends=(glibc sh)
makedepends=(mercurial zip)
conflicts=('nspr')
provides=("nspr=${pkgver%.r*}")
_pkgsrc="$_pkgname"
source=("hg+https://hg.mozilla.org/projects/nspr")
sha256sums=('SKIP')
pkgver() {
cd "$_pkgsrc"
hg log -r . --template '{latesttag}.r{latesttagdistance}.g{node|short}\n' \
| sed 's/^[a-zA-Z_]*//;s/_RTM//;s/_\([a-zA-Z][a-zA-Z0-9]\+\)/\1/;s/_/./g' \
| tr '[:upper:]' '[:lower:]'
}
prepare() {
cd "$_pkgsrc"
local _configure_options=(
--prefix=/usr
--libdir=/usr/lib
--includedir=/usr/include/nspr
--enable-optimize
--disable-debug
--enable-64bit
)
./configure "${_configure_options[@]}"
}
build() {
cd "$_pkgsrc"
make ${SOURCE_DATE_EPOCH:+
SH_NOW="${SOURCE_DATE_EPOCH}000000"
SH_DATE="$(date --utc --date="@$SOURCE_DATE_EPOCH" '+%Y-%m-%d %T')"
}
}
package() {
cd "$_pkgsrc"
make DESTDIR="$pkgdir" install
ln -s nspr.pc "$pkgdir/usr/lib/pkgconfig/mozilla-nspr.pc"
rm -r "$pkgdir"/usr/bin/{compile-et.pl,prerr.properties} \
"$pkgdir"/usr/include/nspr/md
}
|