]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/openssl/openssl.inc
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / openssl / openssl.inc
1 SECTION = "libs"
2 DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
3 HOMEPAGE = "http://www.openssl.org/"
4 LICENSE = "openssl"
5
6 SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz"
7 S = "${WORKDIR}/openssl-${PV}"
8
9 AR_append = " r"
10 export 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
13 export CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}"
14
15 export DIRS = "crypto ssl apps"
16 export EX_LIBS = "-lgcc -ldl -L${STAGING_LIBDIR}"
17 export AS = "${CC} -c"
18
19 PACKAGES =+ "libcrypto libssl"
20 FILES_libcrypto = "${libdir}/libcrypto.so*"
21 FILES_libssl = "${libdir}/libssl.so*"
22
23 do_compile () {
24         cd util
25         perl perlpath.pl ${bindir}
26         cd ..
27         ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
28
29         # endianness fun.. whee
30         . ${CONFIG_SITE}
31         if test "x$ac_cv_c_bigendian" = "xyes"; then
32                 CFLAG="${CFLAG} -DB_ENDIAN"
33         elif test "x$ac_cv_c_littleendian" = "xyes"; then
34                 CFLAG="${CFLAG} -DL_ENDIAN"
35         elif test "x$ac_cv_c_bigendian" = "xno" && test "x$ac_cv_c_littleendian" = "xno"; then
36                 # no idea what to do with this...
37                 :
38         else
39                 CFLAG="${CFLAG} -DL_ENDIAN"
40         fi
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-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
68 do_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
74 do_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 }