Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
4 include /usr/share/dpkg/buildflags.mk
5 CFLAGS+=$(CPPFLAGS)
6 CXXFLAGS+=$(CPPFLAGS)
7 DPKG_EXPORT_BUILDFLAGS = 1
8 include /usr/share/dpkg/architecture.mk
9
10 # SOVERSION is chosen by us, initially set to the first digit of the version in
11 # NEWS. The version is automatically computed by reading the NEWS file.
12 SOVERSION_GENERS=1
13 VERSION_GENERS=$(shell grep "Version[[:blank:]][[:digit:].]*" NEWS | sed 's/Version[[:blank:]]\([[:digit:].]*\)[[:blank:]].*/\1/' | head -n1)
14
15 %:
16 dh $@ --buildsystem=cmake
17
18 override_dh_auto_configure:
19 # Using our hand-made CMakeLists.txt to build with CMake.
20 cp debian/CMakeLists.txt .
21 dh_auto_configure -- \
22 -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \
23 -DCMAKE_INSTALL_PREFIX="/usr" \
24 -DSOVERSION_GENERS="$(SOVERSION_GENERS)" \
25 -DVERSION_GENERS="$(VERSION_GENERS)"
26
27 override_dh_auto_clean:
28 dh_auto_clean
29 # Removing the hand-made CMakeLists.txt.
30 -rm CMakeLists.txt