1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
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. #
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. #
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/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
25 include $(PKGROOT)/Include
31 PKG_MAINTAINER = Michael Tremer <michael.tremer@ipfire.org>
32 PKG_GROUPS = System/Libraries
33 PKG_URL = http://www.openssl.org/
35 PKG_SUMMARY = A general purpose cryptography library with TLS implementation.
37 PKG_BUILD_DEPS+= bc gnutls-devel perl zlib-devel
39 define PKG_DESCRIPTION
40 The OpenSSL toolkit provides support for secure communications between \
41 machines. OpenSSL includes a certificate management tool and shared \
42 libraries which provide various cryptographic algorithms and protocols.
45 PKG_TARBALL = $(THISAPP).tar.gz
47 PKG_PACKAGES += $(PKG_NAME)-devel
49 ifneq "$(MACHINE)" "i686"
50 SSL_ARCH = no-asm 386 # 386 implies no-sse2
53 # These arches do support sse2.
54 #ifneq "$(TARGET)" "via-c7"
55 #ifneq "$(TARGET)" "atom"
56 #ifneq "$(TARGET)" "core2duo"
62 define STAGE_PREPARE_CMDS
63 cd $(DIR_APP) && find crypto/ -name Makefile -exec \
64 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
66 # # Modify the various perl scripts to reference perl in the right location.
67 cd $(DIR_APP) && perl util/perlpath.pl /usr/bin
69 # Generate a table with the compile settings for my perusal.
70 cd $(DIR_APP) && touch Makefile
71 cd $(DIR_APP) && make TABLE PERL=/usr/bin/perl
78 --openssldir=/etc/pki/tls \
79 --enginesdir=/usr/lib/openssl/engines \
80 linux-elf $(SSL_ARCH) \
94 cd $(DIR_APP) && make depend all build-shared RPM_OPT_FLAGS="$(CFLAGS)" #$(PARALLELISMFLAGS)
96 # Generate hashes for the included certs.
97 cd $(DIR_APP) && make rehash build-shared
101 cd $(DIR_APP) && make test
105 cd $(DIR_APP) && make install build-shared INSTALL_PREFIX=$(BUILDROOT)
107 -mkdir -pv $(BUILDROOT)/lib
108 mv -vf $(BUILDROOT)/usr/lib/lib{crypto,ssl}.so.* $(BUILDROOT)/lib
109 ln -svf ../../lib/libcrypto.so.10 $(BUILDROOT)/usr/lib/libcrypto.so
110 ln -svf ../../lib/libssl.so.10 $(BUILDROOT)/usr/lib/libssl.so
112 # Install manpages do right place
113 -mkdir -pv $(BUILDROOT)/usr/share
114 mv -v $(BUILDROOT)/etc/pki/tls/man $(BUILDROOT)/usr/share/
116 -mkdir -pv $(BUILDROOT)/usr/lib/openssl
117 mv -v $(BUILDROOT)/usr/lib/engines $(BUILDROOT)/usr/lib/openssl
119 -mkdir -pv $(BUILDROOT)/etc/pki/CA/private
120 chmod -v 700 -R $(BUILDROOT)/etc/pki/CA
122 -mkdir -pv $(BUILDROOT)/etc/pki/tls
123 install -m 0644 $(DIR_SOURCE)/openssl.cnf $(BUILDROOT)/etc/pki/tls
124 cd $(DIR_APP) && cp -v -r certs $(BUILDROOT)/etc/pki/tls