aboutsummaryrefslogtreecommitdiffstats
path: root/nss/PKGBUILD
blob: 0360a4a46906ce980524a46384da3ba694cad254 (plain) (blame)
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
#Maintainer: Zee Eichel  <zee@dracos-linux.org>

pkgname=nss
pkgver=3.42.1
pkgrel=1
pkgdesc="Network Security Services"
arch=('x86_64')
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS"
license=('MPL' 'GPL')
depends=('nspr>=4.20' 'sqlite' 'p11-kit')
source=("https://ftp.mozilla.org/pub/security/nss/releases/NSS_${pkgver//./_}_RTM/src/nss-${pkgver}.tar.gz"
	      "http://www.linuxfromscratch.org/patches/blfs/8.4/nss-3.42.1-standalone-1.patch"
)
sha256sums=("087db37d38fd49dfd584dd2a8b5baa7fc88de7c9bd97c0c2d5be4abcafc61fc6"
            "7b365cdfe968977296ed7b32a2cb196d05f364661dca856487717ee5dcb54b28"
)

prepare() {
	cd "${srcdir}/nss-${pkgver}/nss"

	patch -Np2 -i "${srcdir}/nss-3.42.1-standalone-1.patch"
}

build() {
	cd "${srcdir}/nss-${pkgver}/nss"

	make -j1 \
		BUILD_OPT=1 \
		NSPR_INCLUDE_DIR=/usr/include/nspr \
		USE_SYSTEM_ZLIB=1 \
		ZLIB_LIBS=-lz \
		NSS_ENABLE_WERROR=0 \
		NSS_USE_SYSTEM_SQLITE=1 \
		USE_64=1
}

package() {
	cd "${srcdir}/nss-${pkgver}/nss"

	install -v -dm755 "${pkgdir}/usr/bin"
	install -v -dm755 "${pkgdir}/usr/include/nss"
	install -v -dm755 "${pkgdir}/usr/lib/pkgconfig"

	install -v -m755 ../dist/Linux*/bin/certutil "${pkgdir}/usr/bin"
	install -v -m755 ../dist/Linux*/bin/nss-config "${pkgdir}/usr/bin"
	install -v -m755 ../dist/Linux*/bin/pk12util "${pkgdir}/usr/bin"

	cp -RL ../dist/public/nss/* "${pkgdir}/usr/include/nss"
	cp -RL ../dist/private/nss/* "${pkgdir}/usr/include/nss"

	install -v -m755 ../dist/Linux*/lib/*.so "${pkgdir}/usr/lib"
	install -v -m644 ../dist/Linux*/lib/libcrmf.a "${pkgdir}/usr/lib"
	install -v -m644 ../dist/Linux*/lib/*.chk "${pkgdir}/usr/lib"
	install -v -m644 ../dist/Linux*/lib/pkgconfig/nss.pc "${pkgdir}/usr/lib/pkgconfig/nss.pc"
	ln -sfv ./pkcs11/p11-kit-trust.so $pkgdir/usr/lib/libnssckbi.so
}