Annotation of /smage/branches/alx07x-unstable/core/openssl/openssl-1.1.1g-r1.smage2
Parent Directory | Revision Log
Revision 14584 -
(hide annotations)
(download)
Tue Aug 4 11:23:13 2020 UTC (3 years, 9 months ago) by niro
File size: 3473 byte(s)
Tue Aug 4 11:23:13 2020 UTC (3 years, 9 months ago) by niro
File size: 3473 byte(s)
-release branches/alx07x-unstable
1 | niro | 13924 | # $Id$ |
2 | |||
3 | PNAME="openssl" | ||
4 | PVER="1.1.1g" | ||
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 | >= app-crypt/openssl-c_rehash-1.6" | ||
14 | |||
15 | SDEPEND=">= dev-lang/perl-5 | ||
16 | >= virtual/sed" | ||
17 | |||
18 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
19 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
20 | |||
21 | ALX_PKG_KEEP="usr/$(mlibdir)/libcrypto.so | ||
22 | usr/$(mlibdir)/libcrypto.so.* | ||
23 | usr/$(mlibdir)/libssl.so | ||
24 | usr/$(mlibdir)/libssl.so.* | ||
25 | usr/bin/openssl | ||
26 | etc/ssl/openssl.cnf" | ||
27 | sminclude multilib mbuild mtools alx-split | ||
28 | msetfeature "!check" | ||
29 | |||
30 | MKCERTS_CVS_REV=1.3 | ||
31 | |||
32 | SRC_URI=( | ||
33 | http://www.openssl.org/source/${SRCFILE} | ||
34 | mirror://${PNAME}/${SRCFILE} | ||
35 | mirror://${PNAME}/openssl-make-certs.sh-${MKCERTS_CVS_REV} | ||
36 | ) | ||
37 | |||
38 | UP2DATE="updatecmd http://ftp.openssl.org/source/ | grep '${PNAME}-[0-9]' | highesttarball gz" | ||
39 | |||
40 | # pkgs to rebuild: openssh, openvpn, proftpd, dovecot, subversion, neon, nxssh | ||
41 | |||
42 | src_compile() | ||
43 | { | ||
44 | local abi | ||
45 | local libdir | ||
46 | local myopts | ||
47 | local myoptflags | ||
48 | |||
49 | for abi in ${MULTILIB_ABIS} | ||
50 | do | ||
51 | cd ${SRCDIR}-${abi} | ||
52 | |||
53 | case ${abi} in | ||
54 | m32) libdir="lib" ;; | ||
55 | m64) libdir="lib64" ;; | ||
56 | esac | ||
57 | |||
58 | myopts="linux-${ARCH}" | ||
59 | [[ ${ARCH} = i*86 ]] && myopts="linux-elf" | ||
60 | if [[ ${ARCH} = x86_64 ]] && [[ ${abi} = m32 ]] | ||
61 | then | ||
62 | myopts="linux-elf" | ||
63 | fi | ||
64 | |||
65 | # disable ssl3 | ||
66 | myoptflags+=" no-ssl3-method" | ||
67 | # enable 64 bit ec_nistp | ||
68 | if [[ ${ARCH} = x86_64 ]] && [[ ${abi} = m64 ]] | ||
69 | then | ||
70 | myoptflags+=" enable-ec_nistp_64_gcc_128" | ||
71 | fi | ||
72 | |||
73 | echo "Compiler: ${myopts}" | ||
74 | |||
75 | abi-${abi} ./Configure \ | ||
76 | --openssldir=/etc/ssl \ | ||
77 | --prefix=/usr \ | ||
78 | --libdir=${libdir} \ | ||
79 | shared ${myoptflags} threads zlib ${myopts} || die | ||
80 | |||
81 | make depend || die | ||
82 | done | ||
83 | |||
84 | mmake -j1 MANDIR=/usr/share/man || die | ||
85 | } | ||
86 | |||
87 | alx_generic_src_install() | ||
88 | { | ||
89 | cd ${SRCDIR} | ||
90 | |||
91 | # needed directories | ||
92 | minstalldir /etc/ssl || die | ||
93 | |||
94 | mmake -j1 DESTDIR=${BINDIR} MANDIR=/usr/share/man install || die | ||
95 | |||
96 | # fix permissions | ||
97 | mchmod 0755 /usr/$(mlibdir)/pkgconfig || die | ||
98 | |||
99 | # # install certs, make install left them out | ||
100 | # cp -r certs ${BINDIR}/etc/ssl || die | ||
101 | # rm -r ${BINDIR}/etc/ssl/certs/{demo,expired} || die | ||
102 | |||
103 | # keep these directories | ||
104 | mkeepdir /etc/ssl/certs || die | ||
105 | mkeepdir /etc/ssl/private || die | ||
106 | mchmod 0700 /etc/ssl/private || die | ||
107 | |||
108 | # install our simple certificate creation script | ||
109 | minstalldir /usr/sbin || die | ||
110 | minstallexec -s openssl-make-certs.sh-${MKCERTS_CVS_REV} /usr/sbin/openssl-make-certs || die | ||
111 | |||
112 | # namespace openssl programs to prevent conflicts with other man pages (from gentoo) | ||
113 | cd ${BINDIR}/usr/share/man | ||
114 | local m d s | ||
115 | for m in $(find . -type f | xargs grep -L '#include') | ||
116 | do | ||
117 | d=${m%/*} ; d=${d#./} ; m=${m##*/} | ||
118 | [[ ${m} == openssl.1* ]] && continue | ||
119 | [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!" | ||
120 | mv ${d}/{,ssl-}${m} | ||
121 | # fix up references to renamed man pages | ||
122 | sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m} | ||
123 | ln -s ssl-${m} ${d}/openssl-${m} | ||
124 | # locate any symlinks that point to this man page ... we assume | ||
125 | # that any broken links are due to the above renaming | ||
126 | for s in $(find -L ${d} -type l) | ||
127 | do | ||
128 | s=${s##*/} | ||
129 | rm -f ${d}/${s} | ||
130 | ln -s ssl-${m} ${d}/ssl-${s} | ||
131 | ln -s ssl-${s} ${d}/openssl-${s} | ||
132 | done | ||
133 | done | ||
134 | [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :(" | ||
135 | |||
136 | # install docs | ||
137 | minstalldocs CHANGES* FAQ LICENSE NEWS README doc/*.txt || die | ||
138 | |||
139 | # rename orig c_rehash to c_rehash.pl on alx, we use an shell script to drop the perl runtime dep | ||
140 | mv ${BINDIR}/usr/bin/c_rehash{,.pl} || die | ||
141 | } |