File: rules

package info (click to toggle)
diagnostics 0.3.3-12.1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 4,148 kB
  • sloc: cpp: 13,603; sh: 10,950; makefile: 225; ansic: 9
file content (46 lines) | stat: -rwxr-xr-x 1,491 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_CXXFLAGS_MAINT_APPEND := -Wall -Werror -pedantic -Wno-unused-function

%:
	dh $@ --with autoreconf

DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

override_dh_auto_clean:
	dh_auto_clean
	$(RM) -r libltdl

override_dh_auto_configure:
	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
		--prefix=/usr --mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--disable-update-makefiles \
		CXXFLAGS="$(CXXFLAGS)" # LDFLAGS="-Wl,-z,defs"

override_dh_auto_test:
	# run all internal tests
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) check CXXFLAGS="$(filter-out -Werror, $(CXXFLAGS))"
endif

override_dh_auto_install:
	dh_auto_install

	sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
	
	#pkg-config .pc install:
	install -d $(CURDIR)/debian/tmp/usr/lib/pkgconfig
	install -m 644 debian/*.pc $(CURDIR)/debian/tmp/usr/lib/pkgconfig