Annotation of /trunk/extras/nss/nss-3.12.3-r1.smage2
Parent Directory | Revision Log
Revision 1659 -
(hide annotations)
(download)
Wed May 13 10:45:07 2009 UTC (15 years ago) by niro
File size: 3524 byte(s)
Wed May 13 10:45:07 2009 UTC (15 years ago) by niro
File size: 3524 byte(s)
auto added: ver bump to 3.12.3-r1
1 | niro | 1659 | # $Id$ |
2 | |||
3 | PNAME="nss" | ||
4 | PVER="3.12.3" | ||
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.7.4" | ||
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 | SRC_URI=( | ||
24 | ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(echo ${PVER} | sed "s:\.:\_:g")_RTM/src/${SRCFILE} | ||
25 | mirror://${PNAME}/${SRCFILE} | ||
26 | mirror://${PNAME}/nss-config.in | ||
27 | mirror://${PNAME}/nss.pc.in | ||
28 | ) | ||
29 | |||
30 | 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'" | ||
31 | |||
32 | src_prepare() | ||
33 | { | ||
34 | munpack ${SRCFILE} || die | ||
35 | cd ${SRCDIR} | ||
36 | |||
37 | # hack nspr paths (taken from gentoo) | ||
38 | echo 'INCLUDES += -I/usr/include/nspr -I$(DIST)/include/dbm' \ | ||
39 | >> ${SRCDIR}/mozilla/security/coreconf/headers.mk || die | ||
40 | |||
41 | # fix pathes on 64bit systems | ||
42 | sed -i 's:$(DIST)/lib:${ROOT}/usr/'"$(mlibdir)"/nspr':' \ | ||
43 | ${SRCDIR}/mozilla/security/coreconf/location.mk || die | ||
44 | |||
45 | # modify install path | ||
46 | sed -i 's:SOURCE_PREFIX = $(CORE_DEPTH)/\.\./dist:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \ | ||
47 | ${SRCDIR}/mozilla/security/coreconf/source.mk || die | ||
48 | } | ||
49 | |||
50 | src_compile() | ||
51 | { | ||
52 | cd ${SRCDIR}/mozilla/security/coreconf | ||
53 | |||
54 | [[ ${ARCH} = x86_64 ]] && export USE_64=1 | ||
55 | |||
56 | mmake -j1 BUILD_OPT=1 || die | ||
57 | cd ${SRCDIR}/mozilla/security/dbm | ||
58 | mmake -j1 BUILD_OPT=1 || die | ||
59 | cd ${SRCDIR}/mozilla/security/nss | ||
60 | mmake -j1 BUILD_OPT=1 || die | ||
61 | } | ||
62 | |||
63 | src_install() | ||
64 | { | ||
65 | cd ${SRCDIR}/mozilla/security/dist | ||
66 | |||
67 | # put all *.a files in /usr/lib/nss | ||
68 | # (because some have conflicting names with existing libraries) | ||
69 | minstalldir /usr/$(mlibdir)/nss || die | ||
70 | cp -L */lib/*.a ${BINDIR}/usr/$(mlibdir)/nss || die | ||
71 | cp -L */lib/*.so ${BINDIR}/usr/$(mlibdir)/nss || die | ||
72 | cp -L */lib/*.chk ${BINDIR}/usr/$(mlibdir)/nss || die | ||
73 | |||
74 | # all the include files | ||
75 | minstalldir /usr/include/nss || die | ||
76 | minstallfile private/nss/\*.h /usr/include/nss || die | ||
77 | minstallfile public/nss/\*.h /usr/include/nss || die | ||
78 | |||
79 | # install nss-config and pkgconfig file | ||
80 | minstalldir /usr/bin || die | ||
81 | minstalldir /usr/$(mlibdir)/pkgconfig || die | ||
82 | minstallexec -s nss-config.in /usr/bin/nss-config || die | ||
83 | minstallfile -s nss.pc.in /usr/$(mlibdir)/pkgconfig/nss.pc || die | ||
84 | local NSS_VMAJOR=$(cat ${SRCDIR}/mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMAJOR" | awk '{print $3}') | ||
85 | local NSS_VMINOR=$(cat ${SRCDIR}//mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMINOR" | awk '{print $3}') | ||
86 | local NSS_VPATCH=$(cat ${SRCDIR}//mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VPATCH" | awk '{print $3}') | ||
87 | |||
88 | sed -e "s:@libdir@:/usr/$(mlibdir)/nss:g" \ | ||
89 | -e "s:@prefix@:/usr:g" \ | ||
90 | -e "s:@exec_prefix@:\$\{prefix}:g" \ | ||
91 | -e "s:@includedir@:\$\{prefix}/include/nss:g" \ | ||
92 | -e "s:@MOD_MAJOR_VERSION@:${NSS_VMAJOR}:g" \ | ||
93 | -e "s:@MOD_MINOR_VERSION@:${NSS_VMINOR}:g" \ | ||
94 | -e "s:@MOD_PATCH_VERSION@:${NSS_VPATCH}:g" \ | ||
95 | -i ${BINDIR}/usr/bin/nss-config || die | ||
96 | |||
97 | sed -e "s:@libdir@:/usr/$(mlibdir)/nss:g" \ | ||
98 | -e "s:@prefix@:/usr:g" \ | ||
99 | -e "s:@exec_prefix@:\$\{prefix}:g" \ | ||
100 | -e "s:@includedir@:\$\{prefix}/include/nss:" \ | ||
101 | -e "s:@NSPR_VERSION@:$(nspr-config --version):g" \ | ||
102 | -e "s:@NSS_VERSION@:$NSS_VMAJOR.$NSS_VMINOR.$NSS_VPATCH:g" \ | ||
103 | -i ${BINDIR}/usr/$(mlibdir)/pkgconfig/nss.pc || die | ||
104 | |||
105 | # inform the system about the new ldpath | ||
106 | minstalldir /etc/env.d || die | ||
107 | echo "LDPATH=/usr/$(mlibdir)/nss" > ${BINDIR}/etc/env.d/08nss || die | ||
108 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |