summaryrefslogtreecommitdiffstats
path: root/meta-extras/packages/openssl/openssl.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-extras/packages/openssl/openssl.inc')
-rw-r--r--meta-extras/packages/openssl/openssl.inc80
1 files changed, 80 insertions, 0 deletions
diff --git a/meta-extras/packages/openssl/openssl.inc b/meta-extras/packages/openssl/openssl.inc
new file mode 100644
index 0000000000..e7e3b37e3c
--- /dev/null
+++ b/meta-extras/packages/openssl/openssl.inc
@@ -0,0 +1,80 @@
1DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
2HOMEPAGE = "http://www.openssl.org/"
3LICENSE = "openssl"
4SECTION = "libs/network"
5
6SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz"
7S = "${WORKDIR}/openssl-${PV}"
8
9AR_append = " r"
10export CFLAG = "-fPIC -DTHREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DTERMIO -Wall ${FULL_OPTIMIZATION}"
11
12# -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom
13export CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}"
14export CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}"
15
16export DIRS = "crypto ssl apps"
17export EX_LIBS = "-lgcc -ldl -L${STAGING_LIBDIR}"
18export AS = "${CC} -c"
19
20PACKAGES =+ "libcrypto libssl"
21FILES_libcrypto = "${libdir}/libcrypto.so*"
22FILES_libssl = "${libdir}/libssl.so*"
23
24do_compile () {
25 cd util
26 perl perlpath.pl ${bindir}
27 cd ..
28 ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
29
30 # Additional flag based on target endiness (see siteinfo.bbclass)
31 CFLAG="${CFLAG} ${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)}"
32
33 os=${HOST_OS}
34 if [ "x$os" = "xlinux-uclibc" ]; then
35 os=linux
36 fi
37 target="$os-${HOST_ARCH}"
38 case $target in
39 linux-arm)
40 target=linux-elf-arm
41 ;;
42 linux-armeb)
43 target=linux-elf-armeb
44 ;;
45 linux-sh3)
46 target=debian-sh3
47 ;;
48 linux-sh4)
49 target=debian-sh4
50 ;;
51 linux-i486)
52 target=linux-pentium
53 ;;
54 linux-i586)
55 target=linux-pentium
56 ;;
57 linux-i686)
58 target=linux-ppro
59 ;;
60 linux-powerpc)
61 target=linux-ppc
62 ;;
63 esac
64 perl ./Configure shared --prefix=${prefix} --openssldir=${libdir}/ssl $target
65 oe_runmake
66}
67
68do_stage () {
69 cp --dereference -R include/openssl ${STAGING_INCDIR}/
70 oe_libinstall -a -so libcrypto ${STAGING_LIBDIR}
71 oe_libinstall -a -so libssl ${STAGING_LIBDIR}
72}
73
74do_install () {
75 install -m 0755 -d ${D}${libdir}/pkgconfig
76 oe_runmake INSTALL_PREFIX="${D}" install
77 chmod 644 ${D}${libdir}/pkgconfig/openssl.pc
78 oe_libinstall -so libcrypto ${D}${libdir}
79 oe_libinstall -so libssl ${D}${libdir}
80}