File: rules

package info (click to toggle)
libgpg-error 1.35-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,844 kB
  • sloc: ansic: 22,324; sh: 13,156; makefile: 488; awk: 333; lisp: 138; sed: 16
file content (70 lines) | stat: -rwxr-xr-x 2,067 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/make -f
export DEB_BUILD_MULTIARCH ?= $(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	touch po/libgpg-error.pot
	dh_auto_configure --builddirectory=build -- \
	    --enable-static \
	    --disable-rpath \
	    --infodir=\$${prefix}/share/info \
	    --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_build-arch:
	dh_auto_build --parallel --builddirectory=build
ifeq ($(DEB_HOST_MULTIARCH),$(DEB_BUILD_MULTIARCH))
	tail -vn+0 build/src/lock-obj-pub.native.h
endif

override_dh_auto_install-arch:
	dh_auto_install --parallel --builddirectory=build

override_dh_install:
	sed -e"s,@DEB_HOST_MULTIARCH@,${DEB_HOST_MULTIARCH},g" \
	    debian/libgpg-error0.install.in > debian/libgpg-error0.install
	sed -e"s,@DEB_HOST_MULTIARCH@,${DEB_HOST_MULTIARCH},g" \
	    debian/libgpg-error-dev.install.in > debian/libgpg-error-dev.install
	dh_install

override_dh_missing:
	dh_missing --list-missing

override_dh_installchangelogs:
	dh_installchangelogs -A NEWS

override_dh_installdocs:
	dh_installdocs -A README

override_dh_makeshlibs:
	dh_makeshlibs -V --add-udeb=libgpg-error0-udeb

override_dh_link:
	dh_link -plibgpg-error-dev lib/$(DEB_HOST_MULTIARCH)/libgpg-error.so.0 usr/lib/$(DEB_HOST_MULTIARCH)/libgpg-error.so

### "arch-independent" Windows builds: ###

WIN_FLAGS=LDFLAGS="-Xlinker --no-insert-timestamp" CFLAGS="-g -Os -fdebug-prefix-map=$(shell pwd)=." CPPFLAGS=

override_dh_auto_build-indep:
	for cpu in i686 x86_64; do \
	 mkdir -p build-$$cpu-w64-mingw32 && \
	 cd build-$$cpu-w64-mingw32 && $(WIN_FLAGS) ../configure \
	    --prefix=/usr/$$cpu-w64-mingw32 \
	    --enable-static \
	    --host $$cpu-w64-mingw32 && \
	  $(WIN_FLAGS) $(MAKE) \
	  || exit 1 ; \
	  cd .. ; \
	done

override_dh_auto_install-indep:
	for cpu in i686 x86_64; do \
	  cd build-$$cpu-w64-mingw32 && \
	  $(MAKE) install DESTDIR=$(shell pwd)/debian/tmp \
	  || exit 1 ; \
	  cd .. ; \
	done