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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
# Variables declaration
ABI_VERSION=1
VERSION=$(shell cat VERSION | sed -e 's/\([0-9]*\.[0-9]*\)-[0-9]*/\1/')
MAJOR_VERSION=$(shell cat VERSION | sed -e 's/\([0-9]*\)\.[0-9]*/\1/')
MINOR_VERSION=$(shell cat VERSION | sed -e 's/[0-9]*\.\([0-9]*\)/\1/')
SONAME=$(MAJOR_VERSION)
LIBRHEOLEF=librheolef${ABI_VERSION}
LIBRHEOLEF_DEV=librheolef-dev
RHEOLEF_DOC=rheolef-doc
RHEOLEF_RUNTIME=rheolef
TMPDIR=debian/tmp-rheolef
# compilation flags
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) $(CXXFLAGS)
CFLAGS := $(CXXFLAGS)
%:
dh $@
override_dh_autoreconf:
# Prepare the debian control files necessary for the creation of the packages
cat debian/shlibs.librheolef1.X | \
sed -e "s/\@LIBRHEOLEF\@/$(LIBRHEOLEF)/g" \
-e "s/\@MAJOR_VERSION\@/$(MAJOR_VERSION)/g" \
-e "s/\@MINOR_VERSION\@/$(MINOR_VERSION)/g" \
-e "s/\@VERSION\@/$(VERSION)/g" \
-e "s/\@SONAME\@/$(SONAME)/g" > debian/shlibs.$(LIBRHEOLEF)
echo 'shlibs:Depends=libc6 (>= 2.7-1), libgcc1 (>= 1:4.3.1-9), libstdc++6 (>= 4.3.1-9)' > debian/$(LIBRHEOLEF).substvars
./bootstrap
override_dh_auto_configure:
./bootstrap
CXX=g++ CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" dh_auto_configure -- --disable-optim --enable-debian-packaging --enable-fast-install --disable-ginac --without-trilinos-libdir --enable-permissive
override_dh_auto_clean:
dh_auto_clean
# removing installation directories
rm -Rf $(TMPDIR)
# removing and/or reinitialising files generated after templates
# rm -f debian/shlibs.local
override_dh_auto_test:
# dh_auto_test --no-parallel
# -> will be supported with the forthcoming rheolef-7.0 upstream version
true
override_dh_auto_install:
make install DESTDIR=$(CURDIR)/$(TMPDIR)
dh_movefiles --sourcedir=$(TMPDIR)
# removing some useless progs
rm -f $(TMPDIR)/usr/bin/doc2man
rm -f $(TMPDIR)/usr/bin/doc2texi
rm -f $(TMPDIR)/usr/bin/doc2oxy
# remove info/dir
rm -f $(TMPDIR)/usr/share/info/dir*
# delete rpath (debian policy) if any:
- chrpath -d $(TMPDIR)/usr/bin/branch
- chrpath -d $(TMPDIR)/usr/bin/field
- chrpath -d $(TMPDIR)/usr/bin/geo
- chrpath -d $(TMPDIR)/usr/bin/csr
- chrpath -d $(TMPDIR)/usr/lib/*/librheolef.*so*
- chrpath -d $(TMPDIR)/usr/lib/*/rheolef/mkgeo_*
- chrpath -d $(TMPDIR)/usr/lib/*/rheolef/msh2geo_int
- chrpath -d $(TMPDIR)/usr/lib/*/rheolef/mkgeo_ball_gmsh_fix
# Changing file access permissions
chmod 755 $(TMPDIR)/usr/share/rheolef/check-shlibpath_var.sh
override_dh_install:
dh_install --sourcedir=$(TMPDIR)
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params="--ignore-missing-info"
override_dh_installchangelogs:
dh_installchangelogs ChangeLog
override_dh_compress:
dh_compress -X.pdf -Xexamples/
override_dh_gencontrol:
dh_gencontrol --dpkg-gencontrol-params="-Tdebian/$(LIBRHEOLEF).substvars"
|