]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blame - pkgs/core/openssl/openssl.nm
Merge branch 'next'
[people/arne_f/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 37PKG_BUILD_DEPS+= bc perl
7ec4bf0a 38PKG_DEPS += gnutls 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
93c1e71e
MT
48ifneq "$(MACHINE)" "i686"
49 SSL_ARCH = no-asm 386 # 386 implies no-sse2
50endif
51
52# These arches do support sse2.
53#ifneq "$(TARGET)" "via-c7"
54#ifneq "$(TARGET)" "atom"
55#ifneq "$(TARGET)" "core2duo"
56# SSL_ARCH += no-sse2
57#endif
58#endif
59#endif
60
61###############################################################################
62# Installation Details
63###############################################################################
64
65define STAGE_PREPARE_CMDS
80032003 66 cd $(DIR_APP) && sed -e 's/-O3 -fomit-frame-pointer/$(CFLAGS)/' -i Configure
93c1e71e
MT
67
68 cd $(DIR_APP) && sed -e 's/__OpenBSD__/__linux__/' -e 's/arandom/urandom/' \
80032003 69 -i crypto/rand/randfile.c
93c1e71e 70
93c1e71e
MT
71 cd $(DIR_APP) && sed -e 's/__OpenBSD__/__linux__/' -i crypto/rand/rand_unix.c
72
73 cd $(DIR_APP) && find crypto/ -name Makefile -exec \
80032003 74 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
93c1e71e
MT
75endef
76
77define STAGE_BUILD
78 cd $(DIR_APP) && \
79 ./Configure \
80 --prefix=/usr \
81 --openssldir=/etc/pki/tls \
82 --enginesdir=/usr/lib/openssl/engines \
83 linux-elf $(SSL_ARCH) \
84 shared \
85 zlib-dynamic \
86 enable-camellia \
87 enable-seed \
88 enable-tlsext \
89 enable-rfc3779 \
90 no-idea \
91 no-mdc2 \
92 no-rc5 \
93 no-ec \
94 no-ecdh \
95 no-ecdsa \
96 -DSSL_FORBID_ENULL
97
98 # Build.
99 cd $(DIR_APP) && make all build-shared #$(PARALLELISMFLAGS)
100
101 # Generate hashes for the included certs.
102 cd $(DIR_APP) && make rehash build-shared
103endef
104
80032003
MT
105define STAGE_TEST
106 cd $(DIR_APP) && make test
107endef
108
93c1e71e
MT
109define STAGE_INSTALL
110 cd $(DIR_APP) && make install build-shared INSTALL_PREFIX=$(BUILDROOT)
111
112 -mkdir -pv $(BUILDROOT)/usr/lib/openssl
113 mv -v $(BUILDROOT)/usr/lib/engines $(BUILDROOT)/usr/lib/openssl
114
115 -mkdir -pv $(BUILDROOT)/etc/pki/CA/private
116 chmod -v 700 -R $(BUILDROOT)/etc/pki/CA
117
118 -mkdir -pv $(BUILDROOT)/etc/pki/tls
119 install -m 0644 $(DIR_SOURCE)/openssl.cnf $(BUILDROOT)/etc/pki/tls
120 cd $(DIR_APP) && cp -v -r certs $(BUILDROOT)/etc/pki/tls
121endef
122