1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
|
#!/usr/bin/make -f
# Sample debian.rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself. (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified
#
# Modified to be a prototype for debmake by Christoph Lameter <clameter@debian.org>
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all future=+lfs
SHELL=/bin/bash
package=openssl
# For generating the manpages
export VERSION=$(DEB_VERSION_UPSTREAM)
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
export CROSS_COMPILE ?= $(DEB_HOST_GNU_TYPE)-
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
CONFARGS = --prefix=/usr --openssldir=/usr/lib/ssl --libdir=lib/$(DEB_HOST_MULTIARCH) no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms no-capieng
OPT_alpha = ev4 ev5
ARCHOPTS = OPT_$(DEB_HOST_ARCH)
OPTS = $($(ARCHOPTS))
WANTED_LIBC_VERSION = 2.3.1-10
ifeq (,$(findstring terse,$(DEB_BUILD_OPTIONS)))
TESTSUITE_FLAGS = HARNESS_VERBOSE=yes
else
TESTSUITE_FLAGS =
endif
ifeq ($(DEB_HOST_ARCH_CPU), amd64)
CONFARGS += enable-ec_nistp_64_gcc_128
endif
%:
dh $@ --without autoreconf
override_dh_auto_configure:
test -z "$(OPTS)" || for opt in $(OPTS); \
do \
set -xe; \
mkdir build_$$opt; \
cd build_$$opt ; \
../Configure shared $(CONFARGS) debian-$(DEB_HOST_ARCH)-$$opt; \
perl configdata.pm -d; \
cd .. ;\
done
mkdir build_static; cd build_static; ../Configure no-shared $(CONFARGS) debian-$(DEB_HOST_ARCH) ;perl configdata.pm -d
# Debian Perl policy 5.1 (Script Magic)
mkdir build_shared; cd build_shared; HASHBANGPERL=/usr/bin/perl ../Configure shared $(CONFARGS) debian-$(DEB_HOST_ARCH) ;perl configdata.pm -d
override_dh_auto_build-indep:
$(MAKE) -C build_shared all
override_dh_auto_build-arch:
$(MAKE) -C build_static all
test -z "$(OPTS)" || for opt in $(OPTS); \
do \
set -xe; \
$(MAKE) -C build_$$opt all; \
done
ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
$(MAKE) -C build_shared all
override_dh_auto_test-indep:
override_dh_auto_test-arch:
ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
@echo Skipping tests
else
test -z "$(OPTS)" || for opt in $(OPTS); \
do \
set -xe; \
$(MAKE) -C build_$$opt test $(TESTSUITE_FLAGS); \
done
$(MAKE) -C build_static test $(TESTSUITE_FLAGS)
$(MAKE) -C build_shared test $(TESTSUITE_FLAGS)
endif
override_dh_auto_clean:
rm -rf build_static build_shared
test -z "$(OPTS)" || for opt in $(OPTS); \
do \
set -xe; \
rm -rf build_$$opt; \
done
rm -f doc/openssl.pod doc/crypto.pod doc/ssl.pod
dh_auto_clean
override_dh_auto_install-indep:
# Install is only required for the -indep only build, that is if
# -arch isn't run as well. Otherwise install will fail because
# usr/lib/ssl/cert is a symlink to a non existing target.
if [ ! -L debian/tmp/usr/lib/ssl/certs ]; then \
$(MAKE) -C build_shared install DESTDIR=`pwd`/debian/tmp ;\
mkdir -p debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/openssl ;\
mv debian/tmp/usr/include/openssl/opensslconf.h debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/openssl/ ;\
fi
override_dh_auto_install-arch:
$(MAKE) -C build_shared install DESTDIR=`pwd`/debian/tmp
# pic static libraries, nobody should need them
cp -pf build_static/libcrypto.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libcrypto.a
cp -pf build_static/libssl.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libssl.a
mkdir -p debian/tmp/etc/ssl
mv debian/tmp/usr/lib/ssl/{certs,openssl.cnf,private} debian/tmp/etc/ssl/
ln -s /etc/ssl/{certs,openssl.cnf,private} debian/tmp/usr/lib/ssl/
cp -pf debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libcrypto.so.* debian/libcrypto1.1-udeb/usr/lib/
cp -pf debian/tmp/etc/ssl/openssl.cnf debian/libcrypto1.1-udeb/usr/lib/ssl/openssl.cnf
cp -pf debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libssl.so.* debian/libssl1.1-udeb/usr/lib/
cp -auv build_shared/lib*.so* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
for opt in $(OPTS); \
do set -xe; \
mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/$$opt; \
cp -auv build_$$opt/lib*.so* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/$$opt/; \
done
mkdir -p debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/openssl
mv debian/tmp/usr/include/openssl/opensslconf.h debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/openssl/
override_dh_installchangelogs:
dh_installchangelogs CHANGES
override_dh_fixperms:
if [ -d debian/openssl/etc/ssl/private ] ; then \
chmod 700 debian/openssl/etc/ssl/private ; \
fi
dh_fixperms -a -X etc/ssl/private
override_dh_perl:
dh_perl -d
override_dh_makeshlibs:
dh_makeshlibs -a -V --add-udeb="libcrypto1.1-udeb" -Xengines -- -c4
override_dh_shlibdeps:
sed -i '/^udeb: libssl/s/libcrypto1.1-udeb/libssl1.1-udeb/' debian/libssl1.1/DEBIAN/shlibs
dh_shlibdeps -a -L libssl1.1
|