]>
Commit | Line | Data |
---|---|---|
e0c4818d | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
e0c4818d MT |
4 | ############################################################################### |
5 | ||
802ea3af MT |
6 | name = nss-util |
7 | version = 3.12.8 | |
8 | release = 1 | |
e0c4818d | 9 | |
802ea3af MT |
10 | groups = System/Libraries |
11 | url = http://www.mozilla.org/projects/security/pki/nss/ | |
12 | license = MPLv1.1 or GPLv2+ or LGPLv2+ | |
13 | summary = Network Security Services Utilities Library. | |
e0c4818d | 14 | |
802ea3af | 15 | description |
e0c4818d | 16 | Utilities for Network Security Services and the Softoken module. |
802ea3af MT |
17 | end |
18 | ||
19 | source_dl = | |
20 | sources = %{thisapp}.tar.bz2 | |
21 | ||
22 | build | |
23 | requires | |
24 | nspr-devel | |
25 | perl | |
26 | pkg-config | |
27 | psmisc | |
28 | zlib-devel | |
29 | end | |
30 | ||
31 | ## Define some global environment variables | |
32 | # Enable compiler optimizations and disable debugging code | |
33 | export BUILD_OPT=1 | |
34 | export XCFLAGS=%{CFLAGS} | |
35 | ||
36 | export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 | |
37 | export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 | |
38 | ||
39 | export NSPR_INCLUDE_DIR=/usr/include/nspr4 | |
40 | export NSPR_LIB_DIR=/usr/lib | |
41 | ||
42 | export NSS_INCLUDE_DIR=/usr/include/nss3 | |
43 | export NSS_LIB_DIR=/usr/lib | |
44 | ||
45 | export NSS_USE_SYSTEM_SQLITE=1 | |
46 | ||
47 | build | |
48 | make -C ./mozilla/security/coreconf | |
49 | make -C ./mozilla/security/nss | |
50 | end | |
51 | ||
52 | install | |
53 | mkdir -pv %{BUILDROOT}/usr/bin | |
54 | mkdir -pv %{BUILDROOT}/usr/include/nss3 | |
55 | mkdir -pv %{BUILDROOT}/usr/lib/pkgconfig | |
56 | ||
57 | install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnssutil3.so \ | |
58 | %{BUILDROOT}/usr/lib | |
59 | ||
60 | sed -e "s,@libdir@,/usr/lib,g" \ | |
61 | -e "s,@prefix@,/usr,g" \ | |
62 | -e "s,@exec_prefix@,/usr,g" \ | |
63 | -e "s,@includedir@,/usr/include/nss3,g" \ | |
64 | -e "s,@MOD_MAJOR_VERSION@,$$(grep "#define.*NSSUTIL_VMAJOR" %{DIR_APP}/mozilla/security/nss/lib/util/nssutil.h | awk '{print $3}'),g" \ | |
65 | -e "s,@MOD_MINOR_VERSION@,$$(grep "#define.*NSSUTIL_VMINOR" %{DIR_APP}/mozilla/security/nss/lib/util/nssutil.h | awk '{print $3}'),g" \ | |
66 | -e "s,@MOD_PATCH_VERSION@,$$(grep "#define.*NSSUTIL_VPATCH" %{DIR_APP}/mozilla/security/nss/lib/util/nssutil.h | awk '{print $3}'),g" \ | |
67 | < %{DIR_SOURCE}/nss-util-config.in \ | |
68 | > %{BUILDROOT}/usr/bin/nss-util-config | |
69 | chmod -v 755 %{BUILDROOT}/usr/bin/nss-util-config | |
70 | ||
71 | sed \ | |
72 | -e "s,%libdir%,/usr/lib,g" \ | |
73 | -e "s,%prefix%,/usr,g" \ | |
74 | -e "s,%exec_prefix%,/usr,g" \ | |
75 | -e "s,%includedir%,/usr/include/nss3,g" \ | |
76 | -e "s,%NSPR_VERSION%,$$(nspr-config --version),g" \ | |
77 | -e "s,%NSSUTIL_VERSION%,%{name},g" \ | |
78 | < %{DIR_SOURCE}/nss-util.pc.in \ | |
79 | > %{BUILDROOT}/usr/lib/pkgconfig/nss-util.pc | |
80 | ||
81 | # The util headers, the rest come from softokn and nss | |
82 | cp -vf %{DIR_APP}/mozilla/dist/public/nss/*.h %{BUILDROOT}/usr/include/nss3 | |
83 | chmod -v 644 %{BUILDROOT}/usr/include/nss3/*.h | |
84 | end | |
85 | end | |
86 | ||
87 | packages | |
88 | package %{name} | |
89 | ||
90 | package %{name}-devel | |
91 | template DEVEL | |
92 | ||
93 | requires | |
94 | %{name} | |
95 | end | |
96 | ||
97 | # Mozilla does no versioning :( | |
98 | files | |
99 | /usr/bin/*-config | |
100 | /usr/include | |
101 | /usr/lib/pkgconfig | |
102 | end | |
103 | end | |
104 | end |