############################################################################### # # # IPFire.org - A linux based firewall # # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see . # # # ############################################################################### ############################################################################### # Definitions ############################################################################### include $(PKGROOT)/Include PKG_NAME = nss-softokn PKG_VER = 3.12.8 PKG_REL = 0 PKG_MAINTAINER = PKG_GROUP = System/Libraries PKG_URL = http://www.mozilla.org/projects/security/pki/nss/ PKG_LICENSE = MPLv1.1 or GPLv2+ or LGPLv2+ PKG_SUMMARY = Network Security Services Softoken Module. PKG_BUILD_DEPS+= nspr-devel nss-util-devel perl pkg-config psmisc sqlite-devel \ zlib-devel define PKG_DESCRIPTION Network Security Services Softoken Cryptographic Module. endef PKG_TARBALL = $(THISAPP)-stripped.tar.bz2 PKG_PACKAGES += $(PKG_NAME_REAL)-devel PKG_DEPS-$(PKG_NAME_REAL)-devel += nss-util-devel # Mozilla does no versioning :( define PKG_FILES-$(PKG_NAME_REAL)-devel /usr/bin/*-config /usr/include /usr/lib/libfreebl3.so /usr/lib/pkgconfig endef ## Define some global environment variables export FREEBL_NO_DEPEND=1 export FREEBL_USE_PRELINK=1 # Enable compiler optimizations and disable debugging code export BUILD_OPT=1 export XCFLAGS=$(CFLAGS) export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 export NSPR_INCLUDE_DIR=/usr/include/nspr4 export NSPR_LIB_DIR=/usr/lib export NSS_INCLUDE_DIR=/usr/include/nss3 export NSS_LIB_DIR=/usr/lib export NSS_USE_SYSTEM_SQLITE=1 define STAGE_BUILD cd $(DIR_APP) && make -C ./mozilla/security/coreconf cd $(DIR_APP) && make -C ./mozilla/security/dbm cd $(DIR_APP) && make -C ./mozilla/security/nss endef define STAGE_INSTALL -mkdir -pv $(BUILDROOT)/lib -mkdir -pv $(BUILDROOT)/usr/include/nss3 -mkdir -pv $(BUILDROOT)/usr/{bin,lib} -mkdir -pv $(BUILDROOT)/usr/lib/pkgconfig -mkdir -pv $(BUILDROOT)/usr/lib/nss/unsupported-tools install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/lib/libsoftokn3.so \ $(BUILDROOT)/usr/lib install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/lib/libnssdbm3.so \ $(BUILDROOT)/usr/lib install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/lib/libfreebl3.so \ $(BUILDROOT)/lib ln -svf ../../lib/libfreebl3.so $(BUILDROOT)/usr/lib/libfreebl3.so # Copy the binaries we ship as unsupported install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/shlibsign $(BUILDROOT)/usr/lib/nss/unsupported-tools sed -e "s,@libdir@,/usr/lib,g" \ -e "s,@prefix@,/usr,g" \ -e "s,@exec_prefix@,/usr,g" \ -e "s,@includedir@,/usr/include/nss3,g" \ -e "s,@MOD_MAJOR_VERSION@,$$(grep "#define.*SOFTOKEN_VMAJOR" $(DIR_APP)/mozilla/security/nss/lib/softoken/softkver.h | awk '{print $3}'),g" \ -e "s,@MOD_MINOR_VERSION@,$$(grep "#define.*SOFTOKEN_VMINOR" $(DIR_APP)/mozilla/security/nss/lib/softoken/softkver.h | awk '{print $3}'),g" \ -e "s,@MOD_PATCH_VERSION@,$$(grep "#define.*SOFTOKEN_VPATCH" $(DIR_APP)/mozilla/security/nss/lib/softoken/softkver.h | awk '{print $3}'),g" \ < $(DIR_SOURCE)/nss-softokn-config.in \ > $(BUILDROOT)/usr/bin/nss-softokn-config chmod -v 755 $(BUILDROOT)/usr/bin/nss-softokn-config # XXX need to fix this sed \ -e "s,%libdir%,/usr/lib,g" \ -e "s,%prefix%,/usr,g" \ -e "s,%exec_prefix%,/usr,g" \ -e "s,%includedir%,/usr/include/nss3,g" \ -e "s,%NSS_VERSION%,$(PKG_VER),g" \ -e "s,%NSPR_VERSION%,$$(nspr-config --version),g" \ -e "s,%NSSUTIL_VERSION%,$$(nss-util-config --version),g" \ -e "s,%SOFTOKEN_VERSION%,$(PKG_VER),g" \ < $(DIR_SOURCE)/nss-softokn.pc.in \ > $(BUILDROOT)/usr/lib/pkgconfig/nss-softokn.pc # Copy the include files we want cp -vf $(DIR_APP)/mozilla/dist/public/nss/*.h $(BUILDROOT)/usr/include/nss3 cp -vf $(DIR_APP)/mozilla/dist/private/nss/blapi.h \ $(BUILDROOT)/usr/include/nss3 chmod -v 644 $(BUILDROOT)/usr/include/nss3/*.h endef