diff options
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl.inc')
-rw-r--r-- | meta/recipes-connectivity/openssl/openssl.inc | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc new file mode 100644 index 0000000000..2482585c64 --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl.inc | |||
@@ -0,0 +1,100 @@ | |||
1 | DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." | ||
2 | HOMEPAGE = "http://www.openssl.org/" | ||
3 | BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" | ||
4 | SECTION = "libs/network" | ||
5 | |||
6 | # "openssl | SSLeay" dual license | ||
7 | LICENSE = "openssl" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=83d26c69f6f0172ee7f795790424b453" | ||
9 | |||
10 | DEPENDS = "perl-native" | ||
11 | |||
12 | SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz" | ||
13 | S = "${WORKDIR}/openssl-${PV}" | ||
14 | |||
15 | AR_append = " r" | ||
16 | CFLAG = "${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \ | ||
17 | -DTERMIO ${FULL_OPTIMIZATION} -Wall" | ||
18 | |||
19 | # -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom | ||
20 | CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}" | ||
21 | CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}" | ||
22 | |||
23 | export DIRS = "crypto ssl apps" | ||
24 | export EX_LIBS = "-lgcc -ldl" | ||
25 | export AS = "${CC} -c" | ||
26 | |||
27 | PARALLEL_MAKE = "" | ||
28 | |||
29 | inherit pkgconfig siteinfo | ||
30 | |||
31 | PACKAGES =+ "libcrypto libssl" | ||
32 | FILES_libcrypto = "${libdir}/libcrypto.so.*" | ||
33 | FILES_libssl = "${libdir}/libssl.so.*" | ||
34 | FILES_${PN} =+ " ${libdir}/ssl/*" | ||
35 | |||
36 | do_configure () { | ||
37 | cd util | ||
38 | perl perlpath.pl ${bindir} | ||
39 | cd .. | ||
40 | ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/ | ||
41 | |||
42 | os=${HOST_OS} | ||
43 | if [ "x$os" = "xlinux-uclibc" ]; then | ||
44 | os=linux | ||
45 | fi | ||
46 | target="$os-${HOST_ARCH}" | ||
47 | case $target in | ||
48 | linux-arm) | ||
49 | target=linux-elf-arm | ||
50 | ;; | ||
51 | linux-armeb) | ||
52 | target=linux-elf-armeb | ||
53 | ;; | ||
54 | linux-sh3) | ||
55 | target=debian-sh3 | ||
56 | ;; | ||
57 | linux-sh4) | ||
58 | target=debian-sh4 | ||
59 | ;; | ||
60 | linux-i486) | ||
61 | target=debian-i386-i486 | ||
62 | ;; | ||
63 | linux-i586) | ||
64 | target=debian-i386-i586 | ||
65 | ;; | ||
66 | linux-i686) | ||
67 | target=debian-i386-i686/cmov | ||
68 | ;; | ||
69 | linux-mips) | ||
70 | target=debian-mips | ||
71 | ;; | ||
72 | linux-mipsel) | ||
73 | target=debian-mipsel | ||
74 | ;; | ||
75 | linux-powerpc) | ||
76 | target=linux-ppc | ||
77 | ;; | ||
78 | linux-supersparc) | ||
79 | target=linux-sparcv8 | ||
80 | ;; | ||
81 | linux-sparc) | ||
82 | target=linux-sparcv8 | ||
83 | ;; | ||
84 | esac | ||
85 | # inject machine-specific flags | ||
86 | sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure | ||
87 | perl ./Configure shared --prefix=${prefix} --openssldir=${libdir}/ssl $target | ||
88 | } | ||
89 | |||
90 | do_compile () { | ||
91 | oe_runmake | ||
92 | } | ||
93 | |||
94 | do_install () { | ||
95 | install -m 0755 -d ${D}${libdir}/pkgconfig | ||
96 | oe_runmake INSTALL_PREFIX="${D}" install | ||
97 | chmod 644 ${D}${libdir}/pkgconfig/openssl.pc | ||
98 | oe_libinstall -so libcrypto ${D}${libdir} | ||
99 | oe_libinstall -so libssl ${D}${libdir} | ||
100 | } | ||