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
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
# [ Maintainer Notes ]
#
# Unlike the nvidia-cuda-toolkit packaging, I wouldn't like to maintain a
# pile of *.install files. Here all the *.install files are auto-generated
# from python script debian/control.py .
# http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16917/l_mkl_2020.4.304.tgz
MKL_ORIG_TARBALL = intel-mkl_2020.4.304.orig.tar.gz
# debugging i386 builds on amd64. [not formal cross build but dirty hack]
#export DEB_HOST_ARCH = i386
#export DEB_HOST_MULTIARCH = i386-linux-gnu
export LC_ALL = C.UTF-8
export HOME = /tmp/
AUTOGEN_FILES = $(patsubst %.in, %, $(wildcard debian/*.in debian/pkgconfig/*.in))
%:: %.in debian/rules
sed -e "s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g" \
-e "s/@DEB_HOST_ARCH@/$(DEB_HOST_ARCH)/g" < $< > $@
%:
dh $@
.PHONY: checksum extract-rpms autogen
checksum:
@-md5sum -c debian/intel-mkl.md5 || \
echo "[1;31mERROR, md5sum check failed for some reason.[;m"
extract-rpms: checksum
rpm --rebuilddb
rpm --import PUBLIC_KEY.PUB
rpm -qa
rpm -qi gpg-pubkey-7e6c5dbe-5d91bb57
set -e -x; for rpmfile in $$(find rpm -type f -name '*.rpm' | sort); do \
rpm -K $$rpmfile; \
rpm2cpio $$rpmfile | cpio -idmv; \
done
rpm -e gpg-pubkey-7e6c5dbe-5d91bb57
autogen: extract-rpms $(AUTOGEN_FILES)
python3 debian/control.py # Generate install files and lintian overrides
override_dh_auto_configure: autogen
# deal with embedded libjs-jquery
find opt -name jquery-1.11.1.min.js -exec ln -sfv /usr/share/javascript/jquery/jquery.min.js {} \;
override_dh_auto_clean:
debconf-updatepo
-$(RM) debian/*.install # auto-generated install files
-$(RM) debian/*.lintian-overrides # auto-generated lintian files
$(RM) $(AUTOGEN_FILES)
-$(RM) -rf debian/__pycache__
-$(RM) -rf opt # extracted from upstream rpm packages
# don't strip any of these binary blobs per intel's ISSL license.
override_dh_strip:
override_dh_strip_nondeterminism:
|