Magellan Linux

Contents of /branches/magellan-next/core/openssl/openssl-1.0.0a-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6014 - (show annotations) (download)
Wed Aug 18 00:11:59 2010 UTC (13 years, 8 months ago) by niro
File size: 2709 byte(s)
auto added: ver bump to 1.0.0a-r2
1 # $Id: openssl-0.9.8k-r5.smage2 5088 2010-03-04 15:51:42Z niro $
2
3 PNAME="openssl"
4 PVER="1.0.0a"
5 PBUILD="r2"
6
7 PCATEGORIE="dev-libs"
8 STATE="unstable"
9
10 DESCRIPTION="Provides libraries for SSL v2/3 and TLS v1."
11 HOMEPAGE="http://www.openssl.org/"
12
13 DEPEND=">= virtual/glibc
14 >= dev-libs/openssl-compat-0.9.7"
15
16 SDEPEND=">= dev-lang/perl-5
17 >= sys-apps/sed-4"
18
19 SRCFILE="${PNAME}-${PVER}.tar.gz"
20 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
21
22 sminclude multilib mtools
23
24 MKCERTS_CVS_REV=1.3
25
26 SRC_URI=(
27 http://www.openssl.org/source/${SRCFILE}
28 mirror://${PNAME}/${SRCFILE}
29 mirror://${PNAME}/openssl-make-certs.sh-${MKCERTS_CVS_REV}
30 mirror://${PNAME}/${PNAME}-${PVER}-magellan.patch
31 mirror://${PNAME}/${PNAME}-${PVER}-fix-manpages.patch
32 mirror://${PNAME}/${PNAME}-0.9.8k-binutils-32bit-asm.patch
33 mirror://${PNAME}/${PNAME}-${PVER}-fix-double-free.patch
34 )
35
36 UP2DATE="updatecmd http://www.openssl.org/source | grep ${PNAME}-[0-9] | sed '/beta/d' | firsttarball gz"
37
38 # pkgs to rebuild: openssh, openvpn, proftpd, dovecot
39
40 src_prepare()
41 {
42 munpack ${SRCFILE} || die
43
44 # fix CFLAGS and allow x86_64 multlib builds
45 mpatch ${PNAME}-${PVER}-magellan.patch || die
46
47 # fixes conflicts with perl, shadow and some broken pod files
48 mpatch ${PNAME}-${PVER}-fix-manpages.patch || die
49
50 # fixes 32bit issues in md4-x86_64 asm code with newer binutils
51 mpatch ${PNAME}-0.9.8k-binutils-32bit-asm.patch || die
52
53 # security fix - CVE-2010-2939
54 mpatch ${PNAME}-${PVER}-fix-double-free.patch || die
55 }
56
57 src_compile()
58 {
59 local abi
60 local libdir
61 local myopts
62
63 for abi in ${MULTILIB_ABIS}
64 do
65 cd ${SRCDIR}-${abi}
66
67 case ${abi} in
68 m32) libdir="lib" ;;
69 m64) libdir="lib64" ;;
70 esac
71
72 myopts="linux-${ARCH}-${abi}"
73 [[ ${ARCH} = i*86 ]] && myopts="linux-elf"
74
75 echo "Compiler: ${myopts}"
76
77 ./Configure \
78 --openssldir=/etc/ssl \
79 --prefix=/usr \
80 --libdir=${libdir} \
81 shared threads zlib ${myopts} || die
82
83 make depend || die
84 done
85
86 mmake -j1 MANDIR=/usr/share/man || die
87 }
88
89 src_install()
90 {
91 cd ${SRCDIR}
92
93 # needed directories
94 minstalldir /etc/ssl || die
95
96 mmake -j1 INSTALL_PREFIX=${BINDIR} MANDIR=/usr/share/man install || die
97
98 # fix permissions
99 mchmod 0755 /usr/$(mlibdir)/pkgconfig || die
100
101 # install certs, make install left them out
102 cp -r certs ${BINDIR}/etc/ssl || die
103 rm -r ${BINDIR}/etc/ssl/certs/{demo,expired} || die
104
105 # keep these directories
106 mkeepdir /etc/ssl/certs || die
107 mkeepdir /etc/ssl/private || die
108 mchmod 0700 /etc/ssl/private || die
109
110 # install our simple certificate creation script
111 minstalldir /usr/sbin || die
112 minstallexec -s openssl-make-certs.sh-${MKCERTS_CVS_REV} /usr/sbin/openssl-make-certs || die
113
114 # install docs
115 minstalldocs CHANGES* FAQ LICENSE NEWS README doc/*.txt || die
116 }