]>
Commit | Line | Data |
---|---|---|
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 | ||
25 | include $(PKGROOT)/Include | |
26 | ||
27 | PKG_NAME = openssl | |
2dc05f75 | 28 | PKG_VER = 1.0.0 |
93c1e71e MT |
29 | PKG_REL = 0 |
30 | ||
68d15d21 | 31 | PKG_MAINTAINER = Michael Tremer <michael.tremer@ipfire.org> |
93c1e71e MT |
32 | PKG_GROUP = 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 | ||
036fcb12 | 37 | PKG_BUILD_DEPS+= bc gnutls-devel perl zlib-devel |
93c1e71e MT |
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 | ||
036fcb12 MT |
47 | PKG_PACKAGES += $(PKG_NAME)-devel |
48 | ||
93c1e71e MT |
49 | ifneq "$(MACHINE)" "i686" |
50 | SSL_ARCH = no-asm 386 # 386 implies no-sse2 | |
51 | endif | |
52 | ||
53 | # These arches do support sse2. | |
54 | #ifneq "$(TARGET)" "via-c7" | |
55 | #ifneq "$(TARGET)" "atom" | |
56 | #ifneq "$(TARGET)" "core2duo" | |
57 | # SSL_ARCH += no-sse2 | |
58 | #endif | |
59 | #endif | |
60 | #endif | |
61 | ||
93c1e71e | 62 | define STAGE_PREPARE_CMDS |
93c1e71e | 63 | cd $(DIR_APP) && sed -e 's/__OpenBSD__/__linux__/' -e 's/arandom/urandom/' \ |
80032003 | 64 | -i crypto/rand/randfile.c |
93c1e71e | 65 | |
93c1e71e MT |
66 | cd $(DIR_APP) && sed -e 's/__OpenBSD__/__linux__/' -i crypto/rand/rand_unix.c |
67 | ||
68 | cd $(DIR_APP) && find crypto/ -name Makefile -exec \ | |
80032003 | 69 | sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \; |
68d15d21 MT |
70 | |
71 | # # Modify the various perl scripts to reference perl in the right location. | |
72 | cd $(DIR_APP) && perl util/perlpath.pl /usr/bin | |
73 | ||
74 | # Generate a table with the compile settings for my perusal. | |
75 | cd $(DIR_APP) && touch Makefile | |
76 | cd $(DIR_APP) && make TABLE PERL=/usr/bin/perl | |
93c1e71e MT |
77 | endef |
78 | ||
79 | define STAGE_BUILD | |
80 | cd $(DIR_APP) && \ | |
81 | ./Configure \ | |
82 | --prefix=/usr \ | |
83 | --openssldir=/etc/pki/tls \ | |
84 | --enginesdir=/usr/lib/openssl/engines \ | |
85 | linux-elf $(SSL_ARCH) \ | |
86 | shared \ | |
87 | zlib-dynamic \ | |
88 | enable-camellia \ | |
9ceab1e7 | 89 | enable-md2 \ |
93c1e71e MT |
90 | enable-seed \ |
91 | enable-tlsext \ | |
92 | enable-rfc3779 \ | |
93 | no-idea \ | |
94 | no-mdc2 \ | |
95 | no-rc5 \ | |
96 | no-ec \ | |
97 | no-ecdh \ | |
98 | no-ecdsa \ | |
99 | -DSSL_FORBID_ENULL | |
100 | ||
101 | # Build. | |
68d15d21 | 102 | cd $(DIR_APP) && make depend all build-shared RPM_OPT_FLAGS="$(CFLAGS)" #$(PARALLELISMFLAGS) |
93c1e71e MT |
103 | |
104 | # Generate hashes for the included certs. | |
105 | cd $(DIR_APP) && make rehash build-shared | |
106 | endef | |
107 | ||
80032003 MT |
108 | define STAGE_TEST |
109 | cd $(DIR_APP) && make test | |
110 | endef | |
111 | ||
93c1e71e MT |
112 | define STAGE_INSTALL |
113 | cd $(DIR_APP) && make install build-shared INSTALL_PREFIX=$(BUILDROOT) | |
114 | ||
68d15d21 MT |
115 | # Install manpages do right place |
116 | -mkdir -pv $(BUILDROOT)/usr/share | |
117 | mv -v $(BUILDROOT)/etc/pki/tls/man $(BUILDROOT)/usr/share/ | |
118 | ||
93c1e71e MT |
119 | -mkdir -pv $(BUILDROOT)/usr/lib/openssl |
120 | mv -v $(BUILDROOT)/usr/lib/engines $(BUILDROOT)/usr/lib/openssl | |
121 | ||
122 | -mkdir -pv $(BUILDROOT)/etc/pki/CA/private | |
123 | chmod -v 700 -R $(BUILDROOT)/etc/pki/CA | |
124 | ||
125 | -mkdir -pv $(BUILDROOT)/etc/pki/tls | |
126 | install -m 0644 $(DIR_SOURCE)/openssl.cnf $(BUILDROOT)/etc/pki/tls | |
127 | cd $(DIR_APP) && cp -v -r certs $(BUILDROOT)/etc/pki/tls | |
128 | endef | |
129 |