]>
Commit | Line | Data |
---|---|---|
cd1a2927 | 1 | ############################################################################### |
cd1a2927 | 2 | # # |
70df8302 MT |
3 | # IPFire.org - A linux based firewall # |
4 | # Copyright (C) 2007 Michael Tremer & Christian Schmidt # | |
5 | # # | |
6 | # This program is free software: you can redistribute it and/or modify # | |
cd1a2927 | 7 | # it under the terms of the GNU General Public License as published by # |
70df8302 | 8 | # the Free Software Foundation, either version 3 of the License, or # |
cd1a2927 MT |
9 | # (at your option) any later version. # |
10 | # # | |
70df8302 | 11 | # This program is distributed in the hope that it will be useful, # |
cd1a2927 MT |
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 # | |
70df8302 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # |
cd1a2927 | 18 | # # |
cd1a2927 MT |
19 | ############################################################################### |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
246556fe | 27 | PKG_NAME = openssl |
5b26c5f8 | 28 | VER = 0.9.8j |
cd1a2927 | 29 | |
246556fe | 30 | THISAPP = $(PKG_NAME)-$(VER) |
cd1a2927 | 31 | DL_FILE = $(THISAPP).tar.gz |
cd1a2927 | 32 | DIR_APP = $(DIR_SRC)/$(THISAPP) |
246556fe | 33 | |
6679675b | 34 | OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) |
cd1a2927 | 35 | |
9f87d5ba MT |
36 | ifneq "$(MACHINE)" "i686" |
37 | SSL_ARCH = no-asm 386 # 386 implies no-sse2 | |
38 | endif | |
39 | ||
40 | # These arches do support sse2. | |
41 | ifneq "$(TARGET)" "via-c7" | |
42 | ifneq "$(TARGET)" "atom330" | |
43 | ifneq "$(TARGET)" "core2duo" | |
44 | SSL_ARCH += no-sse2 | |
45 | endif | |
46 | endif | |
47 | endif | |
48 | ||
cd1a2927 MT |
49 | ############################################################################### |
50 | # Top-level Rules | |
51 | ############################################################################### | |
52 | ||
9f87d5ba MT |
53 | objects = $(DL_FILE) \ |
54 | $(THISAPP)-fix_manpages-1.patch \ | |
55 | $(THISAPP)-enginesdir.patch | |
cd1a2927 | 56 | |
62a10ba1 MT |
57 | info: |
58 | $(DO_PKG_INFO) | |
59 | ||
6679675b | 60 | install: $(OBJECT) |
cd1a2927 | 61 | |
87703b91 | 62 | download : $(objects) |
cd1a2927 | 63 | |
87703b91 | 64 | $(objects) : |
cd1a2927 MT |
65 | @$(LOAD) |
66 | ||
cd1a2927 MT |
67 | ############################################################################### |
68 | # Installation Details | |
69 | ############################################################################### | |
70 | ||
6679675b | 71 | $(OBJECT) : |
cd1a2927 MT |
72 | @$(PREBUILD) |
73 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) | |
246556fe | 74 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-fix_manpages-1.patch |
9f87d5ba | 75 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-enginesdir.patch |
f3baef97 | 76 | |
9f87d5ba | 77 | cd $(DIR_APP) && sed -i -e 's/-O3 -fomit-frame-pointer/$(CFLAGS)/' Configure |
f3baef97 MT |
78 | |
79 | cd $(DIR_APP) && sed -e 's/__OpenBSD__/__linux__/' -e 's/arandom/urandom/' \ | |
80 | -i.orig crypto/rand/randfile.c | |
81 | ||
82 | cd $(DIR_APP) && sed 's/__OpenBSD__/__linux__/' -i.orig crypto/uid.c | |
f3baef97 MT |
83 | |
84 | cd $(DIR_APP) && find crypto/ -name Makefile -exec \ | |
85 | sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i.orig {} \; | |
86 | ||
9f87d5ba MT |
87 | cd $(DIR_APP) && \ |
88 | ./Configure \ | |
89 | --prefix=/usr \ | |
90 | --openssldir=/etc/pki/tls \ | |
91 | --enginesdir=/usr/lib/openssl/engines \ | |
92 | linux-elf $(SSL_ARCH) \ | |
93 | shared \ | |
94 | zlib-dynamic \ | |
95 | enable-camellia \ | |
96 | enable-seed \ | |
97 | enable-tlsext \ | |
98 | enable-rfc3779 \ | |
99 | no-idea \ | |
100 | no-mdc2 \ | |
101 | no-rc5 \ | |
102 | no-ec \ | |
103 | no-ecdh \ | |
104 | no-ecdsa \ | |
105 | -DSSL_FORBID_ENULL | |
106 | ||
107 | # Build. | |
108 | cd $(DIR_APP) && make all build-shared #$(PARALLELISMFLAGS) | |
109 | ||
110 | # Generate hashes for the included certs. | |
111 | cd $(DIR_APP) && make rehash build-shared | |
112 | ||
113 | cd $(DIR_APP) && make install build-shared | |
114 | cd $(DIR_APP) && cp -v -r certs /etc/pki/tls | |
f3baef97 MT |
115 | |
116 | mv -v /usr/lib/{libcrypto,libssl}.a /usr/lib/static | |
9f87d5ba MT |
117 | install -d /usr/lib/openssl |
118 | mv -v /usr/lib/engines /usr/lib/openssl | |
119 | ||
120 | -mkdir -m700 /etc/pki/CA | |
121 | -mkdir -m700 /etc/pki/CA/private | |
122 | ||
123 | install -m 0644 $(DIR_SRC)/config/ssl/openssl.cnf /etc/pki/tls | |
f3baef97 | 124 | |
9f87d5ba | 125 | @rm -rf $(DIR_APP) /etc/pki/tls/man |
cd1a2927 | 126 | @$(POSTBUILD) |