File: rules

package info (click to toggle)
libgclib 0.11.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 928 kB
  • sloc: cpp: 17,728; makefile: 125; sh: 6
file content (36 lines) | stat: -rwxr-xr-x 1,097 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
#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

include /usr/share/dpkg/default.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CXXFLAGS_MAINT_APPEND  = -Wall -pedantic -flto -fPIC
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-flto

%:
	dh $@

override_dh_install:
	dh_install
	d-shlibmove --commit \
		    --multiarch \
		    --devunversioned \
		    --exclude-la \
		    --movedev debian/tmp/usr/include usr \
		    --movedev "debian/tmp/usr/lib/*/pkgconfig/*.pc" usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
		    debian/tmp/usr/lib/*/*.so
	mkdir debian/$(DEB_SOURCE)-dev/usr/include/gclib
	mv debian/$(DEB_SOURCE)-dev/usr/include/*.h* debian/$(DEB_SOURCE)-dev/usr/include/gclib
	# delete header files of not compiled C++ source files
	find debian/$(DEB_SOURCE)-dev -name gdimg.h -delete
	find debian/$(DEB_SOURCE)-dev -name GBam.h -delete

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o mdtest mdtest.cpp ./.libs/libgclib.a $(LIBS) -lpthread
	./mdtest
	echo "FIXME: needs MD string as argument"
endif