Magellan Linux

Contents of /trunk/extras/nss/nss-3.12.4-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3777 - (show annotations) (download)
Tue Nov 3 18:11:51 2009 UTC (14 years, 6 months ago) by niro
File size: 3458 byte(s)
-removed include hack, using pkg-config
1 # $Id$
2
3 PNAME="nss"
4 PVER="3.12.4"
5 PBUILD="r1"
6
7 PCATEGORIE="dev-libs"
8 STATE="unstable"
9
10 DESCRIPTION="Network Security Services (NSS)."
11 HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/"
12
13 DEPEND=">= virtual/glibc
14 >= dev-libs/nspr-4.8.2"
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 )
32
33 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'"
34
35 src_prepare()
36 {
37 munpack ${SRCFILE} || die
38 cd ${SRCDIR}
39
40 # modify install path
41 sed -i 's:SOURCE_PREFIX = $(CORE_DEPTH)/\.\./dist:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \
42 ${SRCDIR}/mozilla/security/coreconf/source.mk || die
43 }
44
45 src_compile()
46 {
47 cd ${SRCDIR}/mozilla/security
48
49 [[ ${ARCH} = x86_64 ]] && export USE_64=1
50
51 # get the right nspr includes and libs on multilib systems
52 export NSPR_INCLUDE_DIR=$(pkg-config --cflags-only-I nspr | sed 's:-I::')
53 export NSPR_LIB_DIR=$(pkg-config --libs-only-L nspr | sed 's:-L::')
54
55 mmake -j1 BUILD_OPT=1 -C coreconf || die
56 mmake -j1 BUILD_OPT=1 -C dbm || die
57 mmake -j1 BUILD_OPT=1 -C nss || die
58 }
59
60 src_install()
61 {
62 cd ${SRCDIR}/mozilla/security/dist
63
64 # put all *.a files in /usr/lib/nss
65 # (because some have conflicting names with existing libraries)
66 minstalldir /usr/$(mlibdir)/nss || die
67 cp -L */lib/*.a ${BINDIR}/usr/$(mlibdir)/nss || die
68 cp -L */lib/*.so ${BINDIR}/usr/$(mlibdir)/nss || die
69 cp -L */lib/*.chk ${BINDIR}/usr/$(mlibdir)/nss || die
70
71 # all the include files
72 minstalldir /usr/include/nss || die
73 minstallfile private/nss/\*.h /usr/include/nss || die
74 minstallfile public/nss/\*.h /usr/include/nss || die
75
76 # install nss-config and pkgconfig file
77 minstalldir /usr/bin || die
78 minstalldir /usr/$(mlibdir)/pkgconfig || die
79 minstallexec -s nss-config.in-${CONF_CVS_REV} /usr/bin/nss-config || die
80 minstallfile -s nss.pc.in-${PC_CVS_REV} /usr/$(mlibdir)/pkgconfig/nss.pc || die
81 local NSS_VMAJOR=$(cat ${SRCDIR}/mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMAJOR" | awk '{print $3}')
82 local NSS_VMINOR=$(cat ${SRCDIR}//mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMINOR" | awk '{print $3}')
83 local NSS_VPATCH=$(cat ${SRCDIR}//mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VPATCH" | awk '{print $3}')
84
85 sed -e "s:@libdir@:/usr/$(mlibdir)/nss:g" \
86 -e "s:@prefix@:/usr:g" \
87 -e "s:@exec_prefix@:\$\{prefix}:g" \
88 -e "s:@includedir@:\$\{prefix}/include/nss:g" \
89 -e "s:@MOD_MAJOR_VERSION@:${NSS_VMAJOR}:g" \
90 -e "s:@MOD_MINOR_VERSION@:${NSS_VMINOR}:g" \
91 -e "s:@MOD_PATCH_VERSION@:${NSS_VPATCH}:g" \
92 -i ${BINDIR}/usr/bin/nss-config || die
93
94 sed -e "s:@libdir@:/usr/$(mlibdir)/nss:g" \
95 -e "s:@prefix@:/usr:g" \
96 -e "s:@exec_prefix@:\$\{prefix}:g" \
97 -e "s:@includedir@:\$\{prefix}/include/nss:" \
98 -e "s:@NSPR_VERSION@:$(nspr-config --version):g" \
99 -e "s:@NSS_VERSION@:$NSS_VMAJOR.$NSS_VMINOR.$NSS_VPATCH:g" \
100 -i ${BINDIR}/usr/$(mlibdir)/pkgconfig/nss.pc || die
101
102 # inform the system about the new ldpath
103 minstalldir /etc/env.d || die
104 echo "LDPATH=/usr/$(mlibdir)/nss" > ${BINDIR}/etc/env.d/08nss || die
105 }

Properties

Name Value
svn:keywords Id