| 1 | #!/usr/bin/make -f | 
| 2 | # -*- makefile -*- | 
| 3 | # Uncomment this to turn on verbose mode. | 
| 4 | #export DH_VERBOSE=1 | 
| 5 |  | 
| 6 |  | 
| 7 | # These are used for cross-compiling and for saving the configure script | 
| 8 | # from having to guess our platform (since we know it already) | 
| 9 | DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) | 
| 10 | DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) | 
| 11 |  | 
| 12 |  | 
| 13 | CFLAGS = -Wall -g | 
| 14 |  | 
| 15 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) | 
| 16 | CFLAGS += -O0 | 
| 17 | else | 
| 18 | CFLAGS += -O2 | 
| 19 | endif | 
| 20 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) | 
| 21 | INSTALL_PROGRAM += -s | 
| 22 | endif | 
| 23 |  | 
| 24 | config.status: configure | 
| 25 | dh_testdir | 
| 26 | CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --enable-ascii-docs --datadir=/usr/share/doc | 
| 27 |  | 
| 28 |  | 
| 29 | build: build-stamp | 
| 30 | build-stamp:  config.status | 
| 31 | dh_testdir | 
| 32 | $(MAKE) | 
| 33 | touch build-stamp | 
| 34 |  | 
| 35 | clean: | 
| 36 | dh_testdir | 
| 37 | dh_testroot | 
| 38 | rm -f build-stamp | 
| 39 | -$(MAKE) distclean | 
| 40 | ifneq "$(wildcard /usr/share/misc/config.sub)" "" | 
| 41 | cp -f /usr/share/misc/config.sub config.sub | 
| 42 | endif | 
| 43 | ifneq "$(wildcard /usr/share/misc/config.guess)" "" | 
| 44 | cp -f /usr/share/misc/config.guess config.guess | 
| 45 | endif | 
| 46 | dh_clean | 
| 47 |  | 
| 48 | install: build | 
| 49 | dh_testdir | 
| 50 | dh_testroot | 
| 51 | dh_clean -k | 
| 52 | $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp | 
| 53 |  | 
| 54 |  | 
| 55 | # Build architecture-independent files here. | 
| 56 | binary-indep: build install psiconv-doc | 
| 57 |  | 
| 58 |  | 
| 59 | # Build architecture-dependent files here. | 
| 60 | binary-arch: build install psiconv-dev libpsiconv5 psiconv | 
| 61 |  | 
| 62 | psiconv-dev: | 
| 63 | dh_testdir | 
| 64 | dh_testroot | 
| 65 | rm -rf debian/$@ | 
| 66 | dh_installdirs -p $@ | 
| 67 | ln -sfn libpsiconv5 debian/$@/usr/share/doc/$@ | 
| 68 | dh_install -p $@ --sourcedir debian/tmp | 
| 69 | dh_link -p $@ | 
| 70 | dh_strip -p $@ | 
| 71 | dh_compress -p $@ | 
| 72 | dh_fixperms -p $@ | 
| 73 | dh_installdeb -p $@ | 
| 74 | dh_gencontrol -p $@ | 
| 75 | dh_md5sums -p $@ | 
| 76 | dh_builddeb -p $@ | 
| 77 |  | 
| 78 | psiconv-doc: | 
| 79 | dh_testdir | 
| 80 | dh_testroot | 
| 81 | rm -rf debian/$@ | 
| 82 | dh_installdirs -p $@ | 
| 83 | ln -sfn libpsiconv5 debian/$@/usr/share/doc/$@ | 
| 84 | dh_install -p $@ --sourcedir debian/tmp | 
| 85 | dh_compress -p $@ | 
| 86 | dh_fixperms -p $@ | 
| 87 | dh_installdeb -p $@ | 
| 88 | dh_gencontrol -p $@ | 
| 89 | dh_md5sums -p $@ | 
| 90 | dh_builddeb -p $@ | 
| 91 |  | 
| 92 | libpsiconv5: | 
| 93 | dh_testdir | 
| 94 | dh_testroot | 
| 95 | rm -rf debian/$@ | 
| 96 | dh_installdirs -p $@ | 
| 97 | dh_installdocs -p $@ | 
| 98 | dh_install -p $@ --sourcedir debian/tmp | 
| 99 | dh_link -p $@ | 
| 100 | dh_strip -p $@ | 
| 101 | dh_compress -p $@ | 
| 102 | dh_fixperms -p $@ | 
| 103 | dh_makeshlibs -p $@ | 
| 104 | dh_installdeb -p $@ | 
| 105 | dh_gencontrol -p $@ | 
| 106 | dh_md5sums -p $@ | 
| 107 | dh_builddeb -p $@ | 
| 108 |  | 
| 109 | psiconv: | 
| 110 | dh_testdir | 
| 111 | dh_testroot | 
| 112 | rm -rf debian/$@ | 
| 113 | dh_installdirs -p $@ | 
| 114 | ln -sfn libpsiconv5 debian/$@/usr/share/doc/$@ | 
| 115 | dh_install -p $@ --sourcedir debian/tmp | 
| 116 | dh_installman -p $@ --sourcedir debian/tmp | 
| 117 | dh_link -p $@ | 
| 118 | dh_strip -p $@ | 
| 119 | dh_compress -p $@ | 
| 120 | dh_fixperms -p $@ | 
| 121 | dh_installdeb -p $@ | 
| 122 | dh_gencontrol -p $@ | 
| 123 | dh_md5sums -p $@ | 
| 124 | dh_builddeb -p $@ | 
| 125 |  | 
| 126 |  | 
| 127 | binary: binary-indep binary-arch | 
| 128 | .PHONY: build clean binary-indep binary-arch binary install |