Annotation of /branches/R11-unstable/core/openssl/openssl-1.0.2a-r1.smage2
Parent Directory | Revision Log
Revision 24775 -
(hide annotations)
(download)
Fri Apr 17 08:35:16 2015 UTC (9 years, 1 month ago) by niro
Original Path: trunk/core/openssl/openssl-1.0.2a-r1.smage2
File size: 2857 byte(s)
Fri Apr 17 08:35:16 2015 UTC (9 years, 1 month ago) by niro
Original Path: trunk/core/openssl/openssl-1.0.2a-r1.smage2
File size: 2857 byte(s)
-dropped multilib patch
1 | niro | 24774 | # $Id$ |
2 | |||
3 | PNAME="openssl" | ||
4 | PVER="1.0.2a" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCAT="dev-libs" | ||
8 | |||
9 | DESCRIPTION="Provides libraries for SSL v2/3 and TLS v1." | ||
10 | HOMEPAGE="http://www.openssl.org/" | ||
11 | |||
12 | DEPEND=">= virtual/glibc" | ||
13 | |||
14 | SDEPEND=">= dev-lang/perl-5 | ||
15 | >= virtual/sed" | ||
16 | |||
17 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
18 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
19 | |||
20 | sminclude multilib mtools | ||
21 | msetfeature "!check" | ||
22 | |||
23 | MKCERTS_CVS_REV=1.3 | ||
24 | |||
25 | SRC_URI=( | ||
26 | http://www.openssl.org/source/${SRCFILE} | ||
27 | mirror://${PNAME}/${SRCFILE} | ||
28 | mirror://${PNAME}/openssl-make-certs.sh-${MKCERTS_CVS_REV} | ||
29 | ) | ||
30 | |||
31 | UP2DATE="updatecmd -dont_wrap_pre http://www.openssl.org/source/ | grep 'LATEST' | sed 's:.*\(openssl-.*.tar.\(gz\|xz\|bz2\)\).*:\1:' | firsttarball gz" | ||
32 | |||
33 | # pkgs to rebuild: openssh, openvpn, proftpd, dovecot, subversion, neon, nxssh | ||
34 | |||
35 | src_compile() | ||
36 | { | ||
37 | local abi | ||
38 | local libdir | ||
39 | local myopts | ||
40 | |||
41 | for abi in ${MULTILIB_ABIS} | ||
42 | do | ||
43 | cd ${SRCDIR}-${abi} | ||
44 | |||
45 | case ${abi} in | ||
46 | m32) libdir="lib" ;; | ||
47 | m64) libdir="lib64" ;; | ||
48 | esac | ||
49 | |||
50 | myopts="linux-${ARCH}-${abi}" | ||
51 | [[ ${ARCH} = i*86 ]] && myopts="linux-elf" | ||
52 | |||
53 | echo "Compiler: ${myopts}" | ||
54 | |||
55 | ./Configure \ | ||
56 | --openssldir=/etc/ssl \ | ||
57 | --prefix=/usr \ | ||
58 | --libdir=${libdir} \ | ||
59 | shared threads zlib ${myopts} || die | ||
60 | |||
61 | make depend || die | ||
62 | done | ||
63 | |||
64 | mmake -j1 MANDIR=/usr/share/man || die | ||
65 | } | ||
66 | |||
67 | src_install() | ||
68 | { | ||
69 | cd ${SRCDIR} | ||
70 | |||
71 | # needed directories | ||
72 | minstalldir /etc/ssl || die | ||
73 | |||
74 | mmake -j1 INSTALL_PREFIX=${BINDIR} MANDIR=/usr/share/man install || die | ||
75 | |||
76 | # fix permissions | ||
77 | mchmod 0755 /usr/$(mlibdir)/pkgconfig || die | ||
78 | |||
79 | # install certs, make install left them out | ||
80 | cp -r certs ${BINDIR}/etc/ssl || die | ||
81 | rm -r ${BINDIR}/etc/ssl/certs/{demo,expired} || die | ||
82 | |||
83 | # keep these directories | ||
84 | mkeepdir /etc/ssl/certs || die | ||
85 | mkeepdir /etc/ssl/private || die | ||
86 | mchmod 0700 /etc/ssl/private || die | ||
87 | |||
88 | # install our simple certificate creation script | ||
89 | minstalldir /usr/sbin || die | ||
90 | minstallexec -s openssl-make-certs.sh-${MKCERTS_CVS_REV} /usr/sbin/openssl-make-certs || die | ||
91 | |||
92 | # namespace openssl programs to prevent conflicts with other man pages (from gentoo) | ||
93 | cd ${BINDIR}/usr/share/man | ||
94 | local m d s | ||
95 | for m in $(find . -type f | xargs grep -L '#include') | ||
96 | do | ||
97 | d=${m%/*} ; d=${d#./} ; m=${m##*/} | ||
98 | [[ ${m} == openssl.1* ]] && continue | ||
99 | [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!" | ||
100 | mv ${d}/{,ssl-}${m} | ||
101 | # fix up references to renamed man pages | ||
102 | sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m} | ||
103 | ln -s ssl-${m} ${d}/openssl-${m} | ||
104 | # locate any symlinks that point to this man page ... we assume | ||
105 | # that any broken links are due to the above renaming | ||
106 | for s in $(find -L ${d} -type l) | ||
107 | do | ||
108 | s=${s##*/} | ||
109 | rm -f ${d}/${s} | ||
110 | ln -s ssl-${m} ${d}/ssl-${s} | ||
111 | ln -s ssl-${s} ${d}/openssl-${s} | ||
112 | done | ||
113 | done | ||
114 | [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :(" | ||
115 | |||
116 | # install docs | ||
117 | minstalldocs CHANGES* FAQ LICENSE NEWS README doc/*.txt || die | ||
118 | } |