File: rules

package info (click to toggle)
liblemon 1.3.1+dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 4,212 kB
  • sloc: cpp: 64,054; sh: 463; xml: 170; makefile: 29; ansic: 3
file content (42 lines) | stat: -rwxr-xr-x 1,351 bytes parent folder | download
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
#!/usr/bin/make -f

# DH_VERBOSE := 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

CMAKE_EXTRA_FLAGS += -DBUILD_SHARED_LIBS=TRUE -DLEMON_DOC_USE_MATHJAX=YES

%:
	dh $@

override_dh_auto_build:
	dh_auto_build
	cd obj-*/doc && make html

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd obj-* && make check
	cd obj-* && ctest -E lgf_reader_writer_test
endif

override_dh_install:
	dh_install
	cp -a obj-*/lemon/liblemon_static.a debian/tmp/usr/lib/liblemon.a
	# rename cmake config file
	mv debian/tmp/usr/share/lemon/cmake/LEMONConfig.cmake debian/tmp/usr/share/lemon/cmake/lemonConfig.cmake
	# Modify CMake config file to add multiarch
	sed -i 's:usr/lib:usr/lib/$(DEB_HOST_MULTIARCH):' debian/tmp/usr/share/lemon/cmake/*
	d-shlibmove --commit \
		    --multiarch \
		    --devunversioned \
                    --exclude-la \
		    --override "s/libglpk40-dev/libglpk-dev/" \
		    --movedev debian/tmp/usr/include/* usr/include \
		    --movedev "debian/tmp/usr/lib/pkgconfig/*.pc" usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
		    --movedev "debian/tmp/usr/share/lemon/cmake/*" usr/lib/$(DEB_HOST_MULTIARCH)/cmake/lemon \
                    debian/tmp/usr/lib/*.so
        # dh_missing stumbles upon this file
	find debian -name lemon-0.x-to-1.x.sh -delete

override_dh_installchangelogs:
	dh_installchangelogs NEWS