summaryrefslogtreecommitdiff
path: root/package/libnss/libnss.mk
diff options
context:
space:
mode:
authorWill Newton <will.newton@imgtec.com>2011-07-08 14:19:16 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2011-07-11 00:44:00 +0200
commit2016db44e815ddd5fc92ceea35ba439839d8c8b3 (patch)
tree3a9485d5621edcd8101ce0e5da43dfbf1e20bea2 /package/libnss/libnss.mk
parent36b4b852eea02a95f6162cba4ed5e7f3079637c0 (diff)
package: add libnss
NSS is the Network Security Services library developed as part of the Mozilla project. It provides similar functions to OpenSSL but allows MPL, GPL and LGPL licensing. [Peter: fix target install] Signed-off-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/libnss/libnss.mk')
-rw-r--r--package/libnss/libnss.mk67
1 files changed, 67 insertions, 0 deletions
diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk
new file mode 100644
index 000000000..3f7642f89
--- /dev/null
+++ b/package/libnss/libnss.mk
@@ -0,0 +1,67 @@
+#############################################################
+#
+# libnss
+#
+#############################################################
+LIBNSS_VERSION = 3.12.9
+LIBNSS_SOURCE = nss-$(LIBNSS_VERSION).tar.gz
+LIBNSS_SITE_VERSION = $(subst .,_,$(LIBNSS_VERSION))
+LIBNSS_SITE = https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(LIBNSS_SITE_VERSION)_RTM/src/
+LIBNSS_SUBDIR = mozilla/security
+LIBNSS_DISTDIR = mozilla/dist
+LIBNSS_INSTALL_STAGING = YES
+LIBNSS_DEPENDENCIES = libnspr sqlite zlib
+
+LIBNSS_BUILD_VARS = MOZILLA_CLIENT=1 \
+ NSPR_INCLUDE_DIR=$(STAGING_DIR)/usr/include/nspr \
+ NSPR_LIB_DIR=$(STAGING_DIR)/usr/lib \
+ BUILD_OPT=1 \
+ NS_USE_GCC=1 \
+ OPTIMIZER="$(TARGET_CFLAGS)" \
+ NSS_USE_SYSTEM_SQLITE=1 \
+ NSS_ENABLE_ECC=1 \
+ NATIVE_CC="$(HOSTCC)" \
+ TARGETCC="$(TARGET_CC)" \
+ TARGETCCC="$(TARGET_CXX)" \
+ TARGETRANLIB="$(TARGET_RANLIB)" \
+ OS_ARCH="Linux" \
+ OS_RELEASE="2.6" \
+ OS_TEST="$(ARCH)"
+
+
+define LIBNSS_BUILD_CMDS
+ $(MAKE1) -C $(@D)/$(LIBNSS_SUBDIR)/nss build_coreconf build_dbm all \
+ SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \
+ DIST=$(@D)/$(LIBNSS_DISTDIR) \
+ CHECKLOC= \
+ $(LIBNSS_BUILD_VARS)
+endef
+
+define LIBNSS_INSTALL_STAGING_CMDS
+ $(INSTALL) -m 755 -t $(STAGING_DIR)/usr/lib/ \
+ $(@D)/$(LIBNSS_DISTDIR)/lib/*.so
+ $(INSTALL) -m 755 -d $(STAGING_DIR)/usr/include/nss
+ $(INSTALL) -m 644 -t $(STAGING_DIR)/usr/include/nss \
+ $(@D)/$(LIBNSS_DISTDIR)/public/nss/*
+ $(INSTALL) -m 755 -t $(STAGING_DIR)/usr/lib/ \
+ $(@D)/$(LIBNSS_DISTDIR)/lib/*.a
+endef
+
+define LIBNSS_INSTALL_TARGET_CMDS
+ $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/lib/ \
+ $(@D)/$(LIBNSS_DISTDIR)/lib/*.so
+ $(INSTALL) -m 755 -d $(TARGET_DIR)/usr/include/nss
+ $(INSTALL) -m 644 -t $(TARGET_DIR)/usr/include/nss \
+ $(@D)/$(LIBNSS_DISTDIR)/public/nss/*
+ $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/lib/ \
+ $(@D)/$(LIBNSS_DISTDIR)/lib/*.a
+endef
+
+define LIBNSS_CLEAN_CMDS
+ -$(MAKE1) -C $(@D)/$(LIBNSS_SUBDIR) clobber \
+ clobber_dbm \
+ clobber_coreconf \
+ BUILD_OPT=1
+endef
+
+$(eval $(call GENTARGETS,package,libnss))