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 define STAGE_PREPARE_CMDS
54 cd $(DIR_APP) && find crypto/ -name Makefile -exec \
55 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
57 # # Modify the various perl scripts to reference perl in the right location.
58 cd $(DIR_APP) && perl util/perlpath.pl /usr/bin
60 # Generate a table with the compile settings for my perusal.
61 cd $(DIR_APP) && touch Makefile
62 cd $(DIR_APP) && make TABLE PERL=/usr/bin/perl
69 --openssldir=/etc/pki/tls \
70 --enginesdir=/usr/lib/openssl/engines \
71 linux-elf $(SSL_ARCH) \
85 cd $(DIR_APP) && make depend all build-shared RPM_OPT_FLAGS="$(CFLAGS)" #$(PARALLELISMFLAGS)
87 # Generate hashes for the included certs.
88 cd $(DIR_APP) && make rehash build-shared
92 cd $(DIR_APP) && make test
96 cd $(DIR_APP) && make install build-shared INSTALL_PREFIX=$(BUILDROOT)
98 -mkdir -pv $(BUILDROOT)/lib
99 mv -vf $(BUILDROOT)/usr/lib/lib{crypto,ssl}.so.* $(BUILDROOT)/lib
100 ln -svf ../../lib/libcrypto.so.10 $(BUILDROOT)/usr/lib/libcrypto.so
101 ln -svf ../../lib/libssl.so.10 $(BUILDROOT)/usr/lib/libssl.so
103 # Install manpages do right place
104 -mkdir -pv $(BUILDROOT)/usr/share
105 mv -v $(BUILDROOT)/etc/pki/tls/man $(BUILDROOT)/usr/share/
107 -mkdir -pv $(BUILDROOT)/usr/lib/openssl
108 mv -v $(BUILDROOT)/usr/lib/engines $(BUILDROOT)/usr/lib/openssl
110 -mkdir -pv $(BUILDROOT)/etc/pki/CA/private
111 chmod -v 700 -R $(BUILDROOT)/etc/pki/CA
113 -mkdir -pv $(BUILDROOT)/etc/pki/tls
114 install -m 0644 $(DIR_SOURCE)/openssl.cnf $(BUILDROOT)/etc/pki/tls
115 cd $(DIR_APP) && cp -v -r certs $(BUILDROOT)/etc/pki/tls