minidlna: update to 1.1.2
[opendreambox.git] / meta-opendreambox / recipes-connectivity / openssl / libssl.inc
1 SUMMARY = "Secure Socket Layer"
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=f9a8f968107345e0b75aa8c2ecaa7ec8"
9
10 DEPENDS = "perl-native-runtime"
11
12 SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
13           "
14 S = "${WORKDIR}/openssl-${PV}"
15
16 AR_append = " r"
17 # Avoid binaries being marked as requiring an executable stack since it 
18 # doesn't(which causes and this causes issues with SELinux
19 CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
20         -DTERMIO ${CFLAGS} -Wall -Wa,--noexecstack"
21
22 export DIRS = "crypto ssl"
23 export EX_LIBS = "-lgcc -ldl"
24 export AS = "${CC} -c"
25
26 inherit pkgconfig siteinfo
27
28 PACKAGES =+ "libcrypto${BINV}"
29 FILES_libcrypto${BINV} = "${base_libdir}/libcrypto.so.${BINV}"
30
31 do_configure () {
32         cd util
33         perl perlpath.pl ${STAGING_BINDIR_NATIVE}
34         cd ..
35         ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
36
37         os=${HOST_OS}
38         if [ "x$os" = "xlinux-uclibc" ]; then
39                 os=linux
40         elif [ "x$os" = "xlinux-uclibceabi" ]; then
41                 os=linux
42         elif [ "x$os" = "xlinux-gnueabi" ]; then
43                 os=linux
44         fi
45         target="$os-${HOST_ARCH}"
46         case $target in
47         linux-arm)
48                 target=linux-armv4
49                 ;;
50         linux-armeb)
51                 target=linux-elf-armeb
52                 ;;
53         linux-sh3)
54                 target=debian-sh3
55                 ;;
56         linux-sh4)
57                 target=debian-sh4
58                 ;;
59         linux-i486)
60                 target=debian-i386-i486
61                 ;;
62         linux-i586 | linux-viac3)
63                 target=debian-i386-i586
64                 ;;
65         linux-i686)
66                 target=debian-i386-i686/cmov
67                 ;;
68         linux-gnux32-x86_64)
69                 target=linux-x32
70                 ;;
71         linux-gnu64-x86_64)
72                 target=linux-x86_64
73                 ;;
74         linux-mips)
75                 target=debian-mips
76                 ;;
77         linux-mipsel)
78                 target=debian-mipsel
79                 ;;
80         linux-*-mips64)
81                target=linux-mips
82                 ;;
83         linux-powerpc)
84                 target=linux-ppc
85                 ;;
86         linux-gnuspe-powerpc)
87                 target=linux-ppc
88                 ;;
89         linux-powerpc64)
90                 target=linux-ppc64
91                 ;;
92         linux-supersparc)
93                 target=linux-sparcv8
94                 ;;
95         linux-sparc)
96                 target=linux-sparcv8
97                 ;;
98         darwin-i386)
99                 target=darwin-i386-cc
100                 ;;
101         esac
102         # inject machine-specific flags
103         sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure
104         useprefix=${prefix}
105         if [ "x$useprefix" = "x" ]; then
106                 useprefix=/
107         fi        
108         perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=`basename ${libdir}` $target
109 }
110
111 do_compile () {
112         oe_runmake
113 }
114
115 do_install() {
116         install -d ${D}${base_libdir}
117         install -m 755 libcrypto.so.${BINV} ${D}${base_libdir}
118         install -d ${D}${libdir}
119         install -m 755 libssl.so.${BINV} ${D}${libdir}
120 }
121
122 RBREAKS_${PN} = "libssl (<= ${BINV})"
123 RREPLACES_${PN} = "libssl (<= ${BINV})"
124 RBREAKS_libcrypto${BINV} = "libcrypto (<= ${BINV})"
125 RREPLACES_libcrypto${BINV} = "libcrypto (<= ${BINV})"