Magellan Linux

Annotation of /branches/R11-stable/core/openssl/openssl-1.0.1j-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22705 - (hide annotations) (download)
Tue Oct 28 08:28:34 2014 UTC (9 years, 6 months ago) by niro
File size: 3046 byte(s)
-release branches/R11-stable
1 niro 22453 # $Id$
2    
3     PNAME="openssl"
4     PVER="1.0.1j"
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     mirror://${PNAME}/${PNAME}-1.0.1a-magellan.patch
30     )
31    
32     UP2DATE="updatecmd -dont_wrap_pre http://www.openssl.org/source/ | grep 'LATEST' | sed 's:.*\(openssl-.*.tar.\(gz\|xz\|bz2\)\).*:\1:' | firsttarball gz"
33    
34     # pkgs to rebuild: openssh, openvpn, proftpd, dovecot, subversion, neon, nxssh
35    
36     src_prepare()
37     {
38     munpack ${SRCFILE} || die
39    
40     # fix CFLAGS and allow x86_64 multlib builds
41     mpatch ${PNAME}-1.0.1a-magellan.patch || die
42     }
43    
44     src_compile()
45     {
46     local abi
47     local libdir
48     local myopts
49    
50     for abi in ${MULTILIB_ABIS}
51     do
52     cd ${SRCDIR}-${abi}
53    
54     case ${abi} in
55     m32) libdir="lib" ;;
56     m64) libdir="lib64" ;;
57     esac
58    
59     myopts="linux-${ARCH}-${abi}"
60     [[ ${ARCH} = i*86 ]] && myopts="linux-elf"
61    
62     echo "Compiler: ${myopts}"
63    
64     ./Configure \
65     --openssldir=/etc/ssl \
66     --prefix=/usr \
67     --libdir=${libdir} \
68     shared threads zlib ${myopts} || die
69    
70     make depend || die
71     done
72    
73     mmake -j1 MANDIR=/usr/share/man || die
74     }
75    
76     src_install()
77     {
78     cd ${SRCDIR}
79    
80     # needed directories
81     minstalldir /etc/ssl || die
82    
83     mmake -j1 INSTALL_PREFIX=${BINDIR} MANDIR=/usr/share/man install || die
84    
85     # fix permissions
86     mchmod 0755 /usr/$(mlibdir)/pkgconfig || die
87    
88     # install certs, make install left them out
89     cp -r certs ${BINDIR}/etc/ssl || die
90     rm -r ${BINDIR}/etc/ssl/certs/{demo,expired} || die
91    
92     # keep these directories
93     mkeepdir /etc/ssl/certs || die
94     mkeepdir /etc/ssl/private || die
95     mchmod 0700 /etc/ssl/private || die
96    
97     # install our simple certificate creation script
98     minstalldir /usr/sbin || die
99     minstallexec -s openssl-make-certs.sh-${MKCERTS_CVS_REV} /usr/sbin/openssl-make-certs || die
100    
101     # namespace openssl programs to prevent conflicts with other man pages (from gentoo)
102     cd ${BINDIR}/usr/share/man
103     local m d s
104     for m in $(find . -type f | xargs grep -L '#include')
105     do
106     d=${m%/*} ; d=${d#./} ; m=${m##*/}
107     [[ ${m} == openssl.1* ]] && continue
108     [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
109     mv ${d}/{,ssl-}${m}
110     # fix up references to renamed man pages
111     sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
112     ln -s ssl-${m} ${d}/openssl-${m}
113     # locate any symlinks that point to this man page ... we assume
114     # that any broken links are due to the above renaming
115     for s in $(find -L ${d} -type l)
116     do
117     s=${s##*/}
118     rm -f ${d}/${s}
119     ln -s ssl-${m} ${d}/ssl-${s}
120     ln -s ssl-${s} ${d}/openssl-${s}
121     done
122     done
123     [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
124    
125     # install docs
126     minstalldocs CHANGES* FAQ LICENSE NEWS README doc/*.txt || die
127     }