]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - pkgs/nss-util/nss-util.nm
Move packages to pkgs subdirectory.
[people/ms/ipfire-3.x.git] / pkgs / nss-util / nss-util.nm
CommitLineData
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
25include $(PKGROOT)/Include
26
27PKG_NAME = nss-util
28PKG_VER = 3.12.8
29PKG_REL = 0
30
31PKG_MAINTAINER =
32PKG_GROUP = System/Libraries
33PKG_URL = http://www.mozilla.org/projects/security/pki/nss/
34PKG_LICENSE = MPLv1.1 or GPLv2+ or LGPLv2+
35PKG_SUMMARY = Network Security Services Utilities Library.
36
37PKG_BUILD_DEPS+= nspr-devel perl pkg-config psmisc zlib-devel
38
39define PKG_DESCRIPTION
40 Utilities for Network Security Services and the Softoken module.
41endef
42
43PKG_TARBALL = $(THISAPP).tar.bz2
44
45PKG_PACKAGES += $(PKG_NAME_REAL)-devel
46
f7108e23
MT
47PKG_DEPS-$(PKG_NAME_REAL)-devel = $(PKG_NAME_REAL)
48
e0c4818d
MT
49# Mozilla does no versioning :(
50define PKG_FILES-$(PKG_NAME_REAL)-devel
51 /usr/bin/*-config
52 /usr/include
53 /usr/lib/pkgconfig
54endef
55
e0c4818d
MT
56## Define some global environment variables
57# Enable compiler optimizations and disable debugging code
58export BUILD_OPT=1
59export XCFLAGS=$(CFLAGS)
60
61export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
62export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
63
64export NSPR_INCLUDE_DIR=/usr/include/nspr4
65export NSPR_LIB_DIR=/usr/lib
66
67export NSS_INCLUDE_DIR=/usr/include/nss3
68export NSS_LIB_DIR=/usr/lib
69
70export NSS_USE_SYSTEM_SQLITE=1
71
72define STAGE_BUILD
73 cd $(DIR_APP) && make -C ./mozilla/security/coreconf
74 cd $(DIR_APP) && make -C ./mozilla/security/nss
75endef
76
77define 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
109endef