| 1 | #!/usr/bin/make -f |
1 | #!/usr/bin/make -f |
| 2 | # -*- makefile -*- |
2 | # -*- makefile -*- |
|
|
3 | # Sample debian/rules that uses debhelper. |
|
|
4 | # This file was originally written by Joey Hess and Craig Small. |
|
|
5 | # As a special exception, when this file is copied by dh-make into a |
|
|
6 | # dh-make output file, you may use that output file without restriction. |
|
|
7 | # This special exception was added by Craig Small in version 0.37 of dh-make. |
|
|
8 | |
| 3 | # Uncomment this to turn on verbose mode. |
9 | # Uncomment this to turn on verbose mode. |
| 4 | #export DH_VERBOSE=1 |
10 | #export DH_VERBOSE=1 |
| 5 | |
11 | |
|
|
12 | %: |
|
|
13 | dh $@ --with autotools-dev |
| 6 | |
14 | |
| 7 | # These are used for cross-compiling and for saving the configure script |
15 | override_dh_auto_configure: |
| 8 | # from having to guess our platform (since we know it already) |
16 | dh_auto_configure -- --enable-ascii-docs --datadir=/usr/share/doc --with-etcdir=/etc/psiconv |
| 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 | |
17 | |
| 12 | |
18 | override_dh_auto_install: |
| 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 --mandir=/usr/share/man --with-etcdir=/etc/psiconv |
|
|
| 27 | |
|
|
| 28 | |
|
|
| 29 | build: build-stamp |
|
|
| 30 | build-stamp: config.status |
|
|
| 31 | dh_testdir |
|
|
| 32 | $(MAKE) pkgdatadir=/usr/share/doc/psiconv-doc |
19 | dh_auto_install -- pkgdatadir=/usr/share/doc/psiconv-doc |
| 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 pkgdatadir=/usr/share/doc/psiconv-doc |
|
|
| 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 libpsiconv-dev libpsiconv6 psiconv |
|
|
| 61 | |
|
|
| 62 | libpsiconv-dev: |
|
|
| 63 | dh_testdir |
|
|
| 64 | dh_testroot |
|
|
| 65 | rm -rf debian/$@ |
|
|
| 66 | dh_installdirs -p $@ |
|
|
| 67 | ln -sfn libpsiconv6 debian/$@/usr/share/doc/$@ |
|
|
| 68 | dh_install -p $@ --sourcedir debian/tmp |
|
|
| 69 | dh_installman -p $@ |
|
|
| 70 | dh_link -p $@ |
|
|
| 71 | dh_strip -p $@ |
|
|
| 72 | dh_compress -p $@ |
|
|
| 73 | dh_fixperms -p $@ |
|
|
| 74 | dh_installdeb -p $@ |
|
|
| 75 | dh_gencontrol -p $@ |
|
|
| 76 | dh_md5sums -p $@ |
|
|
| 77 | dh_builddeb -p $@ |
|
|
| 78 | |
|
|
| 79 | psiconv-doc: |
|
|
| 80 | dh_testdir |
|
|
| 81 | dh_testroot |
|
|
| 82 | rm -rf debian/$@ |
|
|
| 83 | dh_installdirs -p $@ |
|
|
| 84 | dh_installdocs -p $@ |
|
|
| 85 | dh_install -p $@ --sourcedir debian/tmp |
|
|
| 86 | dh_installchangelogs -p $@ |
|
|
| 87 | dh_compress -p $@ |
|
|
| 88 | dh_fixperms -p $@ |
|
|
| 89 | dh_installdeb -p $@ |
|
|
| 90 | dh_gencontrol -p $@ |
|
|
| 91 | dh_md5sums -p $@ |
|
|
| 92 | dh_builddeb -p $@ |
|
|
| 93 | |
|
|
| 94 | libpsiconv6: |
|
|
| 95 | dh_testdir |
|
|
| 96 | dh_testroot |
|
|
| 97 | rm -rf debian/$@ |
|
|
| 98 | dh_installdirs -p $@ |
|
|
| 99 | dh_installdocs -p $@ |
|
|
| 100 | dh_install -p $@ --sourcedir debian/tmp |
|
|
| 101 | dh_installchangelogs -p $@ |
|
|
| 102 | dh_link -p $@ |
|
|
| 103 | dh_strip -p $@ |
|
|
| 104 | dh_compress -p $@ |
|
|
| 105 | dh_fixperms -p $@ |
|
|
| 106 | dh_makeshlibs -p $@ |
|
|
| 107 | dh_shlibdeps -p $@ |
|
|
| 108 | dh_installdeb -p $@ |
|
|
| 109 | dh_gencontrol -p $@ |
|
|
| 110 | dh_md5sums -p $@ |
|
|
| 111 | dh_builddeb -p $@ |
|
|
| 112 | |
|
|
| 113 | psiconv: |
|
|
| 114 | dh_testdir |
|
|
| 115 | dh_testroot |
|
|
| 116 | rm -rf debian/$@ |
|
|
| 117 | dh_installdirs -p $@ |
|
|
| 118 | ln -sfn libpsiconv6 debian/$@/usr/share/doc/$@ |
|
|
| 119 | dh_install -p $@ --sourcedir debian/tmp |
|
|
| 120 | dh_installman -p $@ |
|
|
| 121 | dh_link -p $@ |
|
|
| 122 | dh_strip -p $@ |
|
|
| 123 | dh_compress -p $@ |
|
|
| 124 | dh_fixperms -p $@ |
|
|
| 125 | dh_shlibdeps -p $@ |
|
|
| 126 | dh_installdeb -p $@ |
|
|
| 127 | dh_gencontrol -p $@ |
|
|
| 128 | dh_md5sums -p $@ |
|
|
| 129 | dh_builddeb -p $@ |
|
|
| 130 | |
|
|
| 131 | |
|
|
| 132 | binary: binary-indep binary-arch |
|
|
| 133 | .PHONY: build clean binary-indep binary-arch binary install |
|
|