############################################################################### # # # IPFire.org - A linux based firewall # # Copyright (C) 2007 Michael Tremer & Christian Schmidt # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see . # # # ############################################################################### ############################################################################### # Definitions ############################################################################### include Config PKG_NAME = openssl PKG_VER = 0.9.8j THISAPP = $(PKG_NAME)-$(PKG_VER) DL_FILE = $(THISAPP).tar.gz DIR_APP = $(DIR_SRC)/$(THISAPP) OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) ifneq "$(MACHINE)" "i686" SSL_ARCH = no-asm 386 # 386 implies no-sse2 endif # These arches do support sse2. ifneq "$(TARGET)" "via-c7" ifneq "$(TARGET)" "atom330" ifneq "$(TARGET)" "core2duo" SSL_ARCH += no-sse2 endif endif endif ############################################################################### # Top-level Rules ############################################################################### objects = $(DL_FILE) \ $(THISAPP)-fix_manpages-1.patch \ $(THISAPP)-enginesdir.patch info: $(DO_PKG_INFO) install: $(OBJECT) download : $(objects) $(objects) : @$(LOAD) ############################################################################### # Installation Details ############################################################################### $(OBJECT) : @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-fix_manpages-1.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-enginesdir.patch cd $(DIR_APP) && sed -i -e 's/-O3 -fomit-frame-pointer/$(CFLAGS)/' Configure cd $(DIR_APP) && sed -e 's/__OpenBSD__/__linux__/' -e 's/arandom/urandom/' \ -i.orig crypto/rand/randfile.c cd $(DIR_APP) && sed 's/__OpenBSD__/__linux__/' -i.orig crypto/uid.c cd $(DIR_APP) && find crypto/ -name Makefile -exec \ sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i.orig {} \; cd $(DIR_APP) && \ ./Configure \ --prefix=/usr \ --openssldir=/etc/pki/tls \ --enginesdir=/usr/lib/openssl/engines \ linux-elf $(SSL_ARCH) \ shared \ zlib-dynamic \ enable-camellia \ enable-seed \ enable-tlsext \ enable-rfc3779 \ no-idea \ no-mdc2 \ no-rc5 \ no-ec \ no-ecdh \ no-ecdsa \ -DSSL_FORBID_ENULL # Build. cd $(DIR_APP) && make all build-shared #$(PARALLELISMFLAGS) # Generate hashes for the included certs. cd $(DIR_APP) && make rehash build-shared cd $(DIR_APP) && make install build-shared cd $(DIR_APP) && cp -v -r certs /etc/pki/tls mv -v /usr/lib/{libcrypto,libssl}.a /usr/lib/static install -d /usr/lib/openssl mv -v /usr/lib/engines /usr/lib/openssl -mkdir -m700 /etc/pki/CA -mkdir -m700 /etc/pki/CA/private install -m 0644 $(DIR_SRC)/config/ssl/openssl.cnf /etc/pki/tls @rm -rf $(DIR_APP) /etc/pki/tls/man @$(POSTBUILD)