| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
# Sample debian/rules that uses debhelper. |
| 4 |
# This file was originally written by Joey Hess and Craig Small. |
| 5 |
# As a special exception, when this file is copied by dh-make into a |
| 6 |
# dh-make output file, you may use that output file without restriction. |
| 7 |
# This special exception was added by Craig Small in version 0.37 of dh-make. |
| 8 |
|
| 9 |
# Uncomment this to turn on verbose mode. |
| 10 |
#export DH_VERBOSE=1 |
| 11 |
|
| 12 |
export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) |
| 13 |
export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) |
| 14 |
export CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) |
| 15 |
export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed |
| 16 |
|
| 17 |
export AUTOHEADER = true |
| 18 |
|
| 19 |
# Ensure that texlive respects SOURCE_DATE_EPOCH for reproducible builds |
| 20 |
export FORCE_SOURCE_DATE=1 |
| 21 |
|
| 22 |
%: |
| 23 |
dh $@ |
| 24 |
|
| 25 |
override_dh_auto_clean: |
| 26 |
rm -rf lib/.libs |
| 27 |
dh_auto_clean |
| 28 |
dh_auto_clean --buildsystem=cmake |
| 29 |
|
| 30 |
override_dh_auto_configure: |
| 31 |
CONFIG_SHELL=/bin/bash dh_auto_configure -- \ |
| 32 |
--enable-shared \ |
| 33 |
--enable-deriv \ |
| 34 |
--enable-r12 \ |
| 35 |
--enable-debug=opt \ |
| 36 |
--with-libint-max-am=6 \ |
| 37 |
--with-libderiv-max-am1=5 \ |
| 38 |
--with-libderiv-max-am2=4 \ |
| 39 |
--prefix=/usr \ |
| 40 |
--with-cc-optflags="$(CFLAGS) $(CPPFLAGS)" \ |
| 41 |
--with-cxx-optflags="$(CXXFLAGS) $(CPPFLAGS)" \ |
| 42 |
--with-libdirs="$(LDFLAGS)" \ |
| 43 |
--with-pic |
| 44 |
dh_auto_configure --buildsystem=cmake -- \ |
| 45 |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
| 46 |
-DCMAKE_INSTALL_LIBDIR=lib \ |
| 47 |
-DMAX_AM_ERI=6 \ |
| 48 |
-DENABLE_XHOST=OFF |
| 49 |
|
| 50 |
override_dh_auto_build: |
| 51 |
$(MAKE) -C doc |
| 52 |
dh_auto_build |
| 53 |
dh_auto_build --buildsystem=cmake |
| 54 |
|
| 55 |
override_dh_auto_install: |
| 56 |
dh_auto_install |
| 57 |
(cd debian/tmp/usr/lib/*/; \ |
| 58 |
ln -s libderiv.so.1 libderiv-stable.so.1; \ |
| 59 |
ln -s libint.so.1 libint-stable.so.1; \ |
| 60 |
ln -s libr12.so.1 libr12-stable.so.1) |
| 61 |
|
| 62 |
override_dh_installchangelogs: |
| 63 |
dh_installchangelogs CHANGES |