]> git.armaanb.net Git - asd-repo.git/blob - extra/nss/build
gmake: new package at 4.3
[asd-repo.git] / extra / nss / build
1 #!/bin/sh -e
2
3 export NSS_USE_SYSTEM_SQLITE=1
4 export NSS_ENABLE_WERROR=0
5 export USE_64=1
6 export BUILD_OPT=1
7 export NSS_DISABLE_GTESTS=1
8 export CC="${CC:-cc}"
9 export CCC="${CXX:-c++}"
10 export CXX="${CXX:-c++}"
11
12 patch -p1 < intel.patch
13
14 gmake -j1 -C nss nss_build_all
15
16 # TODO: Maybe install the NSS binaries. They're uneeded
17 #       right now as we handle certs differently.
18 #
19 # TODO: Maybe install nss-config. Nothing uses it yet
20 #       and this build system is terrible so shhh.
21 # NOTE: firefox builds using system nss/nspr require these bins.
22
23 install -Dt "$1/usr/include/nss" -m644 dist/public/nss/*.h
24 install -Dt "$1/usr/include/nss" -m644 dist/Linux*/include/*.h
25 install -Dt "$1/usr/lib"               dist/Linux*/lib/*.so
26 install -Dt "$1/usr/lib"         -m644 dist/Linux*/lib/*.chk
27
28 # Yucky. This is needed by qtwebengine.
29 install -Dt "$1/usr/include/nss/obsolete" \
30     -m644 dist/Linux*/include/obsolete/*.h
31
32 # Install the NSPR files. This is a joint package as I'd
33 # rather not juggle which version of NSPR works best with NSS.
34 install -Dt "$1/usr/include/nspr" -m644 nspr/pr/include/*.h
35 install -Dt "$1/usr/include/nspr" -m644 nspr/lib/*/*.h
36
37 # Disgusting. Disgusting. Disgusting. Disgusting. Disgusting.
38 find nspr/Linux* -name \*.so \
39     -exec install -Dt "$1/usr/lib" {} \;
40
41 # This is disgusting and I hate this package with a passion.
42 sed nss/pkg/pkg-config/nss.pc.in \
43     -e "s,%libdir%,/usr/lib,g" \
44     -e "s,%prefix%,/usr,g" \
45     -e "s,%exec_prefix%,/usr/bin,g" \
46     -e "s,%includedir%,/usr/include/nss,g" \
47     -e "s,%NSPR_VERSION%,4.29,g" \
48     -e "s,%NSS_VERSION%,3.67,g" |
49 install -Dm644 /dev/stdin "$1/usr/lib/pkgconfig/nss.pc"
50
51 # This is disgusting and I hate this package with a passion.
52 sed nspr/Linux*/config/nspr.pc \
53     -e "s,/usr/local,/usr,g" |
54 install -Dm644 /dev/stdin "$1/usr/lib/pkgconfig/nspr.pc"
55
56 # Install the license
57 install -Dm755 nss/COPYING "$1/usr/share/LICENSES/nss.license"