1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2016 IPFire Team <info@ipfire.org> #
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 ###############################################################################
29 THISAPP = openssl-$(VER)
30 DL_FILE = $(THISAPP).tar.gz
31 DL_FROM = $(URL_IPFIRE)
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
34 TARGET = $(DIR_INFO)/$(THISAPP)$(KCFG)
36 export RPM_OPT_FLAGS = $(CFLAGS)
40 --openssldir=/etc/ssl \
41 --enginesdir=/usr/lib/openssl/engines \
57 ifeq "$(IS_64BIT)" "1"
58 OPENSSL_ARCH = linux-generic64
60 OPENSSL_ARCH = linux-generic32
63 ifeq "$(BUILD_ARCH)" "aarch64"
64 OPENSSL_ARCH = linux-aarch64
67 ifeq "$(BUILD_ARCH)" "x86_64"
68 OPENSSL_ARCH = linux-x86_64
71 ifeq "$(BUILD_ARCH)" "i586"
72 OPENSSL_ARCH = linux-elf
74 ifneq "$(KCFG)" "-sse2"
75 OPENSSL_ARCH += no-sse2
79 ###############################################################################
81 ###############################################################################
85 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
87 $(DL_FILE)_MD5 = 44279b8557c3247cbe324e2322ecd114
91 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
93 download :$(patsubst %,$(DIR_DL)/%,$(objects))
95 md5 : $(subst %,%_MD5,$(objects))
97 ###############################################################################
98 # Downloading, checking, md5sum
99 ###############################################################################
101 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
104 $(patsubst %,$(DIR_DL)/%,$(objects)) :
107 $(subst %,%_MD5,$(objects)) :
110 ###############################################################################
111 # Installation Details
112 ###############################################################################
114 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
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
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
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
132 cd $(DIR_APP) && sed -i Configure \
133 -e "s/-O3 -fomit-frame-pointer/$(CFLAGS)/g"
135 cd $(DIR_APP) && find crypto/ -name Makefile -exec \
136 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
138 cd $(DIR_APP) && ./Configure $(CONFIGURE_OPTIONS)
140 cd $(DIR_APP) && make depend
141 cd $(DIR_APP) && make
143 # Install libraries only
144 cd $(DIR_APP) && install -m 755 \
145 libcrypto.so.10 libssl.so.10 /usr/lib