| 1 | #!/usr/bin/make -f |
|---|
| 2 | |
|---|
| 3 | include /usr/share/quilt/quilt.make |
|---|
| 4 | |
|---|
| 5 | PACKAGE = libpixman-1-0 |
|---|
| 6 | SHLIBS_VERSION = 0.19.4 |
|---|
| 7 | |
|---|
| 8 | # Disable Gtk+ autodetection: |
|---|
| 9 | confflags = --disable-gtk |
|---|
| 10 | |
|---|
| 11 | CFLAGS = -Wall -g |
|---|
| 12 | ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) |
|---|
| 13 | CFLAGS += -O0 |
|---|
| 14 | else |
|---|
| 15 | CFLAGS += -O2 |
|---|
| 16 | endif |
|---|
| 17 | ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
|---|
| 18 | NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
|---|
| 19 | MAKEFLAGS += -j$(NUMJOBS) |
|---|
| 20 | endif |
|---|
| 21 | |
|---|
| 22 | DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) |
|---|
| 23 | DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
|---|
| 24 | DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
|---|
| 25 | ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
|---|
| 26 | confflags += --build=$(DEB_HOST_GNU_TYPE) |
|---|
| 27 | else |
|---|
| 28 | confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) |
|---|
| 29 | endif |
|---|
| 30 | |
|---|
| 31 | autogen: autogen-stamp |
|---|
| 32 | autogen-stamp: $(QUILT_STAMPFN) |
|---|
| 33 | dh_testdir |
|---|
| 34 | autoreconf -vfi |
|---|
| 35 | touch $@ |
|---|
| 36 | |
|---|
| 37 | config: config-stamp |
|---|
| 38 | config-stamp: autogen-stamp |
|---|
| 39 | dh_testdir |
|---|
| 40 | test -d build || mkdir build |
|---|
| 41 | cd build && \ |
|---|
| 42 | ../configure \ |
|---|
| 43 | --prefix=/usr \ |
|---|
| 44 | --mandir=\$${prefix}/share/man \ |
|---|
| 45 | --infodir=\$${prefix}/share/info \ |
|---|
| 46 | $(confflags) \ |
|---|
| 47 | CFLAGS="$(CFLAGS)" |
|---|
| 48 | touch $@ |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | build: build-stamp |
|---|
| 52 | build-stamp: config-stamp |
|---|
| 53 | dh_testdir |
|---|
| 54 | cd build && $(MAKE) |
|---|
| 55 | cd build && $(MAKE) check |
|---|
| 56 | |
|---|
| 57 | touch $@ |
|---|
| 58 | |
|---|
| 59 | clean: unpatch |
|---|
| 60 | dh_testdir |
|---|
| 61 | dh_testroot |
|---|
| 62 | rm -f autogen-stamp config-stamp build-stamp install-stamp |
|---|
| 63 | |
|---|
| 64 | rm -f config.cache config.log config.status |
|---|
| 65 | rm -f */config.cache */config.log */config.status |
|---|
| 66 | rm -f conftest* */conftest* |
|---|
| 67 | rm -rf autom4te.cache */autom4te.cache |
|---|
| 68 | rm -rf build |
|---|
| 69 | find -name Makefile.in -delete |
|---|
| 70 | rm -f compile config.guess config.sub configure depcomp install-sh |
|---|
| 71 | rm -f ltmain.sh missing INSTALL aclocal.m4 config.h.in |
|---|
| 72 | |
|---|
| 73 | dh_clean |
|---|
| 74 | |
|---|
| 75 | install: install-stamp |
|---|
| 76 | install-stamp: build-stamp |
|---|
| 77 | dh_testdir |
|---|
| 78 | dh_testroot |
|---|
| 79 | dh_clean -k |
|---|
| 80 | dh_installdirs |
|---|
| 81 | |
|---|
| 82 | cd build && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install |
|---|
| 83 | touch $@ |
|---|
| 84 | |
|---|
| 85 | # Install architecture-dependent files here. |
|---|
| 86 | binary-arch: install |
|---|
| 87 | dh_testdir |
|---|
| 88 | dh_testroot |
|---|
| 89 | |
|---|
| 90 | dh_installdocs |
|---|
| 91 | dh_install --sourcedir=debian/tmp --list-missing |
|---|
| 92 | dh_installchangelogs ChangeLog |
|---|
| 93 | dh_link |
|---|
| 94 | dh_strip --dbg-package=$(PACKAGE)-dbg |
|---|
| 95 | dh_compress |
|---|
| 96 | dh_fixperms |
|---|
| 97 | dh_makeshlibs -p$(PACKAGE) --add-udeb $(PACKAGE)-udeb -V"$(PACKAGE) (>= $(SHLIBS_VERSION))" -- -c4 |
|---|
| 98 | dh_installdeb |
|---|
| 99 | dh_shlibdeps |
|---|
| 100 | dh_gencontrol |
|---|
| 101 | dh_md5sums |
|---|
| 102 | dh_builddeb |
|---|
| 103 | |
|---|
| 104 | binary-indep: install |
|---|
| 105 | # Nothing to do |
|---|
| 106 | |
|---|
| 107 | binary: binary-indep binary-arch |
|---|
| 108 | .PHONY: autogen config build clean binary-indep binary-arch binary install |
|---|