]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - pkgs/openssl/openssl.nm
openssl: Remove some dead code.
[people/ms/ipfire-3.x.git] / pkgs / openssl / openssl.nm
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
25 include $(PKGROOT)/Include
26
27 PKG_NAME = openssl
28 PKG_VER = 1.0.0d
29 PKG_REL = 3
30
31 PKG_MAINTAINER = Michael Tremer <michael.tremer@ipfire.org>
32 PKG_GROUPS = System/Libraries
33 PKG_URL = http://www.openssl.org/
34 PKG_LICENSE = OpenSSL
35 PKG_SUMMARY = A general purpose cryptography library with TLS implementation.
36
37 PKG_BUILD_DEPS+= bc gnutls-devel perl zlib-devel
38
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.
43 endef
44
45 PKG_TARBALL = $(THISAPP).tar.gz
46
47 PKG_PACKAGES += $(PKG_NAME)-devel
48
49 ifneq "$(MACHINE)" "i686"
50 SSL_ARCH = no-asm 386 # 386 implies no-sse2
51 endif
52
53 define STAGE_PREPARE_CMDS
54 cd $(DIR_APP) && find crypto/ -name Makefile -exec \
55 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
56
57 # # Modify the various perl scripts to reference perl in the right location.
58 cd $(DIR_APP) && perl util/perlpath.pl /usr/bin
59
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
63 endef
64
65 define STAGE_BUILD
66 cd $(DIR_APP) && \
67 ./Configure \
68 --prefix=/usr \
69 --openssldir=/etc/pki/tls \
70 --enginesdir=/usr/lib/openssl/engines \
71 linux-elf $(SSL_ARCH) \
72 shared \
73 zlib-dynamic \
74 enable-camellia \
75 enable-md2 \
76 enable-seed \
77 enable-tlsext \
78 enable-rfc3779 \
79 no-idea \
80 no-mdc2 \
81 no-rc5 \
82 -DSSL_FORBID_ENULL
83
84 # Build.
85 cd $(DIR_APP) && make depend all build-shared RPM_OPT_FLAGS="$(CFLAGS)" #$(PARALLELISMFLAGS)
86
87 # Generate hashes for the included certs.
88 cd $(DIR_APP) && make rehash build-shared
89 endef
90
91 define STAGE_TEST
92 cd $(DIR_APP) && make test
93 endef
94
95 define STAGE_INSTALL
96 cd $(DIR_APP) && make install build-shared INSTALL_PREFIX=$(BUILDROOT)
97
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
102
103 # Install manpages do right place
104 -mkdir -pv $(BUILDROOT)/usr/share
105 mv -v $(BUILDROOT)/etc/pki/tls/man $(BUILDROOT)/usr/share/
106
107 -mkdir -pv $(BUILDROOT)/usr/lib/openssl
108 mv -v $(BUILDROOT)/usr/lib/engines $(BUILDROOT)/usr/lib/openssl
109
110 -mkdir -pv $(BUILDROOT)/etc/pki/CA/private
111 chmod -v 700 -R $(BUILDROOT)/etc/pki/CA
112
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
116 endef
117