File: rules

package info (click to toggle)
udunits 2.2.20-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 3,208 kB
  • ctags: 1,621
  • sloc: sh: 11,255; ansic: 10,803; xml: 2,611; yacc: 491; lex: 331; makefile: 233
file content (35 lines) | stat: -rwxr-xr-x 1,259 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f


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

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LIBDIR:=debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
PKGLIBDIR:=debian/libudunits2-0/usr/lib/$(DEB_HOST_MULTIARCH)
DEVLIBDIR:=debian/libudunits2-dev/usr/lib/$(DEB_HOST_MULTIARCH)
VERFILE:=$(shell pwd)/debian/udunits2.ver

# magic debhelper rule
%:
	dh $@  --with autoreconf

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	LDFLAGS=" -Wl,--as-needed -Wl,--version-script,${VERFILE} $(LDFLAGS)" \
			dh_auto_configure -- --datarootdir=/usr/share/xml

override_dh_auto_install:
	dh_auto_install
	dh_installchangelogs CHANGE_LOG
	$(MAKE) pdf html info
	cp udunits2.info debian/libudunits2-0/usr/share/info
	cp prog/*info debian/udunits-bin/usr/share/info
	mkdir -p $(DEVLIBDIR)/pkgconfig
	cp $(LIBDIR)/*.a $(DEVLIBDIR)
	cp $(LIBDIR)/pkgconfig/* $(DEVLIBDIR)/pkgconfig
	# hacks because dh_links doesn't do multiarch yet
	dh_link -p libudunits2-dev  /usr/lib/$(DEB_HOST_MULTIARCH)/libudunits2.so.0.1.0   /usr/lib/$(DEB_HOST_MULTIARCH)/libudunits2.so
	dh_link -p libudunits2-0    /usr/lib/$(DEB_HOST_MULTIARCH)/libudunits2.so.0.1.0   /usr/lib/$(DEB_HOST_MULTIARCH)/libudunits2.so.0