]>
Commit | Line | Data |
---|---|---|
e0c4818d MT |
1 | ############################################################################### |
2 | # # | |
3 | # IPFire.org - A linux based firewall # | |
4 | # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # | |
5 | # # | |
6 | # This program is free software: you can redistribute it and/or modify # | |
7 | # it under the terms of the GNU General Public License as published by # | |
8 | # the Free Software Foundation, either version 3 of the License, or # | |
9 | # (at your option) any later version. # | |
10 | # # | |
11 | # This program is distributed in the hope that it will be useful, # | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
18 | # # | |
19 | ############################################################################### | |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include $(PKGROOT)/Include | |
26 | ||
27 | PKG_NAME = nss-util | |
28 | PKG_VER = 3.12.8 | |
29 | PKG_REL = 0 | |
30 | ||
31 | PKG_MAINTAINER = | |
32 | PKG_GROUP = System/Libraries | |
33 | PKG_URL = http://www.mozilla.org/projects/security/pki/nss/ | |
34 | PKG_LICENSE = MPLv1.1 or GPLv2+ or LGPLv2+ | |
35 | PKG_SUMMARY = Network Security Services Utilities Library. | |
36 | ||
37 | PKG_BUILD_DEPS+= nspr-devel perl pkg-config psmisc zlib-devel | |
38 | ||
39 | define PKG_DESCRIPTION | |
40 | Utilities for Network Security Services and the Softoken module. | |
41 | endef | |
42 | ||
43 | PKG_TARBALL = $(THISAPP).tar.bz2 | |
44 | ||
45 | PKG_PACKAGES += $(PKG_NAME_REAL)-devel | |
46 | ||
f7108e23 MT |
47 | PKG_DEPS-$(PKG_NAME_REAL)-devel = $(PKG_NAME_REAL) |
48 | ||
e0c4818d MT |
49 | # Mozilla does no versioning :( |
50 | define PKG_FILES-$(PKG_NAME_REAL)-devel | |
51 | /usr/bin/*-config | |
52 | /usr/include | |
53 | /usr/lib/pkgconfig | |
54 | endef | |
55 | ||
e0c4818d MT |
56 | ## Define some global environment variables |
57 | # Enable compiler optimizations and disable debugging code | |
58 | export BUILD_OPT=1 | |
59 | export XCFLAGS=$(CFLAGS) | |
60 | ||
61 | export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 | |
62 | export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 | |
63 | ||
64 | export NSPR_INCLUDE_DIR=/usr/include/nspr4 | |
65 | export NSPR_LIB_DIR=/usr/lib | |
66 | ||
67 | export NSS_INCLUDE_DIR=/usr/include/nss3 | |
68 | export NSS_LIB_DIR=/usr/lib | |
69 | ||
70 | export NSS_USE_SYSTEM_SQLITE=1 | |
71 | ||
72 | define STAGE_BUILD | |
73 | cd $(DIR_APP) && make -C ./mozilla/security/coreconf | |
74 | cd $(DIR_APP) && make -C ./mozilla/security/nss | |
75 | endef | |
76 | ||
77 | define STAGE_INSTALL | |
78 | -mkdir -pv $(BUILDROOT)/usr/bin | |
79 | -mkdir -pv $(BUILDROOT)/usr/include/nss3 | |
80 | -mkdir -pv $(BUILDROOT)/usr/lib/pkgconfig | |
81 | ||
82 | install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/lib/libnssutil3.so \ | |
83 | $(BUILDROOT)/usr/lib | |
84 | ||
85 | sed -e "s,@libdir@,/usr/lib,g" \ | |
86 | -e "s,@prefix@,/usr,g" \ | |
87 | -e "s,@exec_prefix@,/usr,g" \ | |
88 | -e "s,@includedir@,/usr/include/nss3,g" \ | |
89 | -e "s,@MOD_MAJOR_VERSION@,$$(grep "#define.*NSSUTIL_VMAJOR" $(DIR_APP)/mozilla/security/nss/lib/util/nssutil.h | awk '{print $3}'),g" \ | |
90 | -e "s,@MOD_MINOR_VERSION@,$$(grep "#define.*NSSUTIL_VMINOR" $(DIR_APP)/mozilla/security/nss/lib/util/nssutil.h | awk '{print $3}'),g" \ | |
91 | -e "s,@MOD_PATCH_VERSION@,$$(grep "#define.*NSSUTIL_VPATCH" $(DIR_APP)/mozilla/security/nss/lib/util/nssutil.h | awk '{print $3}'),g" \ | |
92 | < $(DIR_SOURCE)/nss-util-config.in \ | |
93 | > $(BUILDROOT)/usr/bin/nss-util-config | |
94 | chmod -v 755 $(BUILDROOT)/usr/bin/nss-util-config | |
95 | ||
96 | sed \ | |
97 | -e "s,%libdir%,/usr/lib,g" \ | |
98 | -e "s,%prefix%,/usr,g" \ | |
99 | -e "s,%exec_prefix%,/usr,g" \ | |
100 | -e "s,%includedir%,/usr/include/nss3,g" \ | |
101 | -e "s,%NSPR_VERSION%,$$(nspr-config --version),g" \ | |
102 | -e "s,%NSSUTIL_VERSION%,$(PKG_NAME),g" \ | |
103 | < $(DIR_SOURCE)/nss-util.pc.in \ | |
104 | > $(BUILDROOT)/usr/lib/pkgconfig/nss-util.pc | |
105 | ||
106 | # The util headers, the rest come from softokn and nss | |
107 | cp -vf $(DIR_APP)/mozilla/dist/public/nss/*.h $(BUILDROOT)/usr/include/nss3 | |
108 | chmod -v 644 $(BUILDROOT)/usr/include/nss3/*.h | |
109 | endef |