Contents of /smage/branches/alx-0_6_0/extras/nss/nss-3.12.10-r1.smage2
Parent Directory | Revision Log
Revision 2660 -
(show annotations)
(download)
Mon Jul 11 11:37:27 2011 UTC (12 years, 10 months ago) by niro
File size: 3731 byte(s)
Mon Jul 11 11:37:27 2011 UTC (12 years, 10 months ago) by niro
File size: 3731 byte(s)
auto added: ver bump to 3.12.10-r1
1 | # $Id$ |
2 | |
3 | PNAME="nss" |
4 | PVER="3.12.10" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="dev-libs" |
8 | |
9 | DESCRIPTION="Network Security Services (NSS)." |
10 | HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/" |
11 | |
12 | DEPEND=">= virtual/glibc |
13 | >= dev-libs/nspr-4.8.8 |
14 | >= dev-db/sqlite-3.7" |
15 | |
16 | SDEPEND=">= sys-apps/sed-4" |
17 | |
18 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
19 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
20 | |
21 | sminclude mtools |
22 | |
23 | CONF_CVS_REV=1.2 |
24 | PC_CVS_REV=1.2 |
25 | |
26 | SRC_URI=( |
27 | ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(echo ${PVER} | sed "s:\.:\_:g")_RTM/src/${SRCFILE} |
28 | mirror://${PNAME}/${SRCFILE} |
29 | mirror://${PNAME}/nss-config.in-${CONF_CVS_REV} |
30 | mirror://${PNAME}/nss.pc.in-${PC_CVS_REV} |
31 | mirror://${PNAME}/${PNAME}-3.12.4-no-local-sql.patch |
32 | ) |
33 | |
34 | UP2DATE="updatecmd 'http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/?C=M;D=A' | grep NSS | sed -n 's/.*NSS_\(.*\)_RTM.*/\1/;s/_/./g;$ p'" |
35 | |
36 | src_prepare() |
37 | { |
38 | munpack ${SRCFILE} || die |
39 | cd ${SRCDIR} |
40 | |
41 | mpatch ${PNAME}-3.12.4-no-local-sql.patch || die |
42 | |
43 | # modify install path |
44 | sed -i 's:SOURCE_PREFIX = $(CORE_DEPTH)/\.\./dist:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \ |
45 | ${SRCDIR}/mozilla/security/coreconf/source.mk || die |
46 | } |
47 | |
48 | src_compile() |
49 | { |
50 | cd ${SRCDIR}/mozilla/security |
51 | |
52 | [[ ${ARCH} = x86_64 ]] && export USE_64=1 |
53 | |
54 | # use system sqlite |
55 | export NSS_USE_SYSTEM_SQLITE=1 |
56 | |
57 | export FREEBL_NO_DEPEND=1 |
58 | export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 |
59 | export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 |
60 | |
61 | # get the right nspr includes and libs on multilib systems |
62 | export NSPR_INCLUDE_DIR=$(pkg-config --cflags-only-I nspr | sed 's:-I::') |
63 | export NSPR_LIB_DIR=$(pkg-config --libs-only-L nspr | sed 's:-L::') |
64 | |
65 | mmake -j1 BUILD_OPT=1 -C coreconf || die |
66 | mmake -j1 BUILD_OPT=1 -C dbm || die |
67 | mmake -j1 BUILD_OPT=1 -C nss || die |
68 | } |
69 | |
70 | src_install() |
71 | { |
72 | cd ${SRCDIR}/mozilla/security/dist |
73 | |
74 | # put all *.a files in /usr/lib/nss |
75 | # (because some have conflicting names with existing libraries) |
76 | minstalldir /usr/$(mlibdir)/nss || die |
77 | cp -L */lib/*.a ${BINDIR}/usr/$(mlibdir)/nss || die |
78 | cp -L */lib/*.so ${BINDIR}/usr/$(mlibdir)/nss || die |
79 | cp -L */lib/*.chk ${BINDIR}/usr/$(mlibdir)/nss || die |
80 | |
81 | # all the include files |
82 | minstalldir /usr/include/nss || die |
83 | minstallfile private/nss/\*.h /usr/include/nss || die |
84 | minstallfile public/nss/\*.h /usr/include/nss || die |
85 | |
86 | # install nss-config and pkgconfig file |
87 | minstalldir /usr/bin || die |
88 | minstalldir /usr/$(mlibdir)/pkgconfig || die |
89 | minstallexec -s nss-config.in-${CONF_CVS_REV} /usr/bin/nss-config || die |
90 | minstallfile -s nss.pc.in-${PC_CVS_REV} /usr/$(mlibdir)/pkgconfig/nss.pc || die |
91 | local NSS_VMAJOR=$(cat ${SRCDIR}/mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMAJOR" | awk '{print $3}') |
92 | local NSS_VMINOR=$(cat ${SRCDIR}//mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMINOR" | awk '{print $3}') |
93 | local NSS_VPATCH=$(cat ${SRCDIR}//mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VPATCH" | awk '{print $3}') |
94 | |
95 | sed -e "s:@libdir@:/usr/$(mlibdir)/nss:g" \ |
96 | -e "s:@prefix@:/usr:g" \ |
97 | -e "s:@exec_prefix@:\$\{prefix}:g" \ |
98 | -e "s:@includedir@:\$\{prefix}/include/nss:g" \ |
99 | -e "s:@MOD_MAJOR_VERSION@:${NSS_VMAJOR}:g" \ |
100 | -e "s:@MOD_MINOR_VERSION@:${NSS_VMINOR}:g" \ |
101 | -e "s:@MOD_PATCH_VERSION@:${NSS_VPATCH}:g" \ |
102 | -i ${BINDIR}/usr/bin/nss-config || die |
103 | |
104 | sed -e "s:@libdir@:/usr/$(mlibdir)/nss:g" \ |
105 | -e "s:@prefix@:/usr:g" \ |
106 | -e "s:@exec_prefix@:\$\{prefix}:g" \ |
107 | -e "s:@includedir@:\$\{prefix}/include/nss:" \ |
108 | -e "s:@NSPR_VERSION@:$(nspr-config --version):g" \ |
109 | -e "s:@NSS_VERSION@:$NSS_VMAJOR.$NSS_VMINOR.$NSS_VPATCH:g" \ |
110 | -i ${BINDIR}/usr/$(mlibdir)/pkgconfig/nss.pc || die |
111 | |
112 | # inform the system about the new ldpath |
113 | minstalldir /etc/env.d || die |
114 | echo "LDPATH=/usr/$(mlibdir)/nss" > ${BINDIR}/etc/env.d/08nss || die |
115 | } |