]> git.ipfire.org Git - ipfire-2.x.git/blob - lfs/openssl-compat
Revert "core123: Ship updated usbutils"
[ipfire-2.x.git] / lfs / openssl-compat
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2016 IPFire Team <info@ipfire.org> #
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 Config
26
27 VER = 1.0.2o
28
29 THISAPP = openssl-$(VER)
30 DL_FILE = $(THISAPP).tar.gz
31 DL_FROM = $(URL_IPFIRE)
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
33
34 TARGET = $(DIR_INFO)/$(THISAPP)$(KCFG)
35
36 export RPM_OPT_FLAGS = $(CFLAGS)
37
38 CONFIGURE_OPTIONS = \
39 --prefix=/usr \
40 --openssldir=/etc/ssl \
41 --enginesdir=/usr/lib/openssl/engines \
42 shared \
43 zlib-dynamic \
44 enable-camellia \
45 enable-md2 \
46 disable-ssl2 \
47 enable-seed \
48 enable-tlsext \
49 enable-rfc3779 \
50 no-idea \
51 no-mdc2 \
52 no-rc5 \
53 no-srp \
54 -DSSL_FORBID_ENULL \
55 $(OPENSSL_ARCH)
56
57 ifeq "$(IS_64BIT)" "1"
58 OPENSSL_ARCH = linux-generic64
59 else
60 OPENSSL_ARCH = linux-generic32
61 endif
62
63 ifeq "$(BUILD_ARCH)" "aarch64"
64 OPENSSL_ARCH = linux-aarch64
65 endif
66
67 ifeq "$(BUILD_ARCH)" "x86_64"
68 OPENSSL_ARCH = linux-x86_64
69 endif
70
71 ifeq "$(BUILD_ARCH)" "i586"
72 OPENSSL_ARCH = linux-elf
73
74 ifneq "$(KCFG)" "-sse2"
75 OPENSSL_ARCH += no-sse2
76 endif
77 endif
78
79 ###############################################################################
80 # Top-level Rules
81 ###############################################################################
82
83 objects = $(DL_FILE)
84
85 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
86
87 $(DL_FILE)_MD5 = 44279b8557c3247cbe324e2322ecd114
88
89 install : $(TARGET)
90
91 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
92
93 download :$(patsubst %,$(DIR_DL)/%,$(objects))
94
95 md5 : $(subst %,%_MD5,$(objects))
96
97 ###############################################################################
98 # Downloading, checking, md5sum
99 ###############################################################################
100
101 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
102 @$(CHECK)
103
104 $(patsubst %,$(DIR_DL)/%,$(objects)) :
105 @$(LOAD)
106
107 $(subst %,%_MD5,$(objects)) :
108 @$(MD5)
109
110 ###############################################################################
111 # Installation Details
112 ###############################################################################
113
114 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
115 @$(PREBUILD)
116 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
117 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openssl-1.0.0-beta5-enginesdir.patch
118 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openssl-1.0.2a-rpmbuild.patch
119 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openssl-1.0.2h-weak-ciphers.patch
120 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openssl-1.0.2g-disable-sslv2v3.patch
121
122 # i586 specific patches
123 ifeq "$(BUILD_ARCH)" "i586"
124 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openssl-1.0.2a_disable_ssse3_for_amd.patch
125 endif
126
127 # With openssl 1.0.2e, pod2mantest is missing
128 echo -e "#!/bin/bash\necho \$$(which pod2man)" > $(DIR_APP)/util/pod2mantest
129 chmod a+x $(DIR_APP)/util/pod2mantest
130
131 # Apply our CFLAGS
132 cd $(DIR_APP) && sed -i Configure \
133 -e "s/-O3 -fomit-frame-pointer/$(CFLAGS)/g"
134
135 cd $(DIR_APP) && find crypto/ -name Makefile -exec \
136 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
137
138 cd $(DIR_APP) && ./Configure $(CONFIGURE_OPTIONS)
139
140 cd $(DIR_APP) && make depend
141 cd $(DIR_APP) && make
142
143 # Install libraries only
144 cd $(DIR_APP) && install -m 755 \
145 libcrypto.so.10 libssl.so.10 /usr/lib
146
147 @rm -rf $(DIR_APP)
148 @$(POSTBUILD)