]> git.ipfire.org Git - ipfire-3.x.git/blame - pkgs/core/openssl/openssl.nm
openssl: Add zlib as runtime dependency & bc for testsuite.
[ipfire-3.x.git] / pkgs / core / openssl / openssl.nm
CommitLineData
93c1e71e
MT
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include $(PKGROOT)/Include
26
27PKG_NAME = openssl
28PKG_VER = 0.9.8k
29PKG_REL = 0
30
31PKG_MAINTAINER =
32PKG_GROUP = System/Libraries
33PKG_URL = http://www.openssl.org/
34PKG_LICENSE = OpenSSL
35PKG_SUMMARY = A general purpose cryptography library with TLS implementation.
36
7d4ff953
MT
37PKG_BUILD_DEPS+= bc perl
38PKG_DEPS += zlib
93c1e71e
MT
39
40define PKG_DESCRIPTION
41 The OpenSSL toolkit provides support for secure communications between \
42 machines. OpenSSL includes a certificate management tool and shared \
43 libraries which provide various cryptographic algorithms and protocols.
44endef
45
46PKG_TARBALL = $(THISAPP).tar.gz
47
48PKG_PATCHES += $(THISAPP)-fix_manpages-1.patch
49PKG_PATCHES += $(THISAPP)-enginesdir.patch
50PKG_PATCHES += $(THISAPP)-no-rpath.patch
51
52ifneq "$(MACHINE)" "i686"
53 SSL_ARCH = no-asm 386 # 386 implies no-sse2
54endif
55
56# These arches do support sse2.
57#ifneq "$(TARGET)" "via-c7"
58#ifneq "$(TARGET)" "atom"
59#ifneq "$(TARGET)" "core2duo"
60# SSL_ARCH += no-sse2
61#endif
62#endif
63#endif
64
65###############################################################################
66# Installation Details
67###############################################################################
68
69define STAGE_PREPARE_CMDS
70 cd $(DIR_APP) && sed -i -e 's/-O3 -fomit-frame-pointer/$(CFLAGS)/' Configure
71
72 cd $(DIR_APP) && sed -e 's/__OpenBSD__/__linux__/' -e 's/arandom/urandom/' \
73 -i.orig crypto/rand/randfile.c
74
75 cd $(DIR_APP) && sed 's/__OpenBSD__/__linux__/' -i.orig crypto/uid.c
76 cd $(DIR_APP) && sed -e 's/__OpenBSD__/__linux__/' -i crypto/rand/rand_unix.c
77
78 cd $(DIR_APP) && find crypto/ -name Makefile -exec \
79 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i.orig {} \;
80endef
81
82define STAGE_BUILD
83 cd $(DIR_APP) && \
84 ./Configure \
85 --prefix=/usr \
86 --openssldir=/etc/pki/tls \
87 --enginesdir=/usr/lib/openssl/engines \
88 linux-elf $(SSL_ARCH) \
89 shared \
90 zlib-dynamic \
91 enable-camellia \
92 enable-seed \
93 enable-tlsext \
94 enable-rfc3779 \
95 no-idea \
96 no-mdc2 \
97 no-rc5 \
98 no-ec \
99 no-ecdh \
100 no-ecdsa \
101 -DSSL_FORBID_ENULL
102
103 # Build.
104 cd $(DIR_APP) && make all build-shared #$(PARALLELISMFLAGS)
105
106 # Generate hashes for the included certs.
107 cd $(DIR_APP) && make rehash build-shared
108endef
109
110define STAGE_INSTALL
111 cd $(DIR_APP) && make install build-shared INSTALL_PREFIX=$(BUILDROOT)
112
113 -mkdir -pv $(BUILDROOT)/usr/lib/openssl
114 mv -v $(BUILDROOT)/usr/lib/engines $(BUILDROOT)/usr/lib/openssl
115
116 -mkdir -pv $(BUILDROOT)/etc/pki/CA/private
117 chmod -v 700 -R $(BUILDROOT)/etc/pki/CA
118
119 -mkdir -pv $(BUILDROOT)/etc/pki/tls
120 install -m 0644 $(DIR_SOURCE)/openssl.cnf $(BUILDROOT)/etc/pki/tls
121 cd $(DIR_APP) && cp -v -r certs $(BUILDROOT)/etc/pki/tls
122endef
123