~ubuntu-branches/ubuntu/precise/xfonts-utils/precise

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Tollef Fog Heen, Colin Watson
  • Date: 2006-07-12 16:37:08 UTC
  • Revision ID: james.westby@ubuntu.com-20060712163708-1rhlbakh87jfixxy
Tags: 1:1.0.0-6ubuntu1
[ Tollef Fog Heen ]
* Remove /usr/share/X11/fonts and any empty sub-directories to clean up
  cruft left by fc-cache as well as update-fonts-{scale,dir,alias}

[ Colin Watson ]
* Slightly improve error-handling in the above, and do the .postinst.in
  boilerplate stuff so that the XSF build system doesn't clean it up for
  us.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# debian/rules for the Debian xfonts-utils package.
 
3
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>
 
4
# Copyright © 2005 Daniel Stone <daniel@fooishbar.org>
 
5
# Copyright © 2005 David Nusinow <dnusinow@debian.org>
 
6
 
 
7
# Uncomment this to turn on verbose mode.
 
8
#export DH_VERBOSE=1
 
9
 
 
10
# set this to the name of the main shlib's binary package
 
11
PACKAGE = xfonts-utils
 
12
 
 
13
include debian/xsfbs/xsfbs.mk
 
14
 
 
15
# This package contains multiple modules as shipped by upstream. Each module is # contained in a subdirectory in the root dir of the package. You must list each
 
16
# subdirectory explicitly so that the build system knows what to build
 
17
SUBDIRS="bdftopcf-X11R7.0-1.0.0 mkfontdir-X11R7.0-1.0.1 mkfontscale-X11R7.0-1.0.1 font-util-X11R7.0-1.0.0"
 
18
 
 
19
CFLAGS = -Wall -g
 
20
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
21
        CFLAGS += -O0
 
22
else
 
23
        CFLAGS += -O2
 
24
endif
 
25
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
26
        INSTALL_PROGRAM += -s
 
27
endif
 
28
 
 
29
DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
30
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
31
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
32
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
 
33
        confflags += --build=$(DEB_HOST_GNU_TYPE)
 
34
else
 
35
        confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
 
36
endif
 
37
 
 
38
 
 
39
build: genscripts patch build-stamp
 
40
build-stamp:
 
41
        dh_testdir
 
42
        for FILE in "$(SUBDIRS)"; do \
 
43
                mkdir "$$FILE"-obj-$(DEB_BUILD_GNU_TYPE); \
 
44
                (cd "$$FILE"-obj-$(DEB_BUILD_GNU_TYPE) && \
 
45
                ../"$$FILE"/configure --prefix=/usr --mandir=\$${prefix}/share/man \
 
46
                             --infodir=\$${prefix}/share/info $(confflags) \
 
47
                             --with-mapdir=\$${prefix}/share/fonts/X11/util \
 
48
                             CFLAGS="$(CFLAGS)" && \
 
49
                $(MAKE)) || exit 1; \
 
50
        done
 
51
 
 
52
        touch build-stamp
 
53
 
 
54
clean: xsfclean
 
55
        dh_testdir
 
56
        dh_testroot
 
57
        rm -f build-stamp
 
58
 
 
59
        rm -f config.cache config.log config.status
 
60
        rm -f */config.cache */config.log */config.status
 
61
        rm -f conftest* */conftest*
 
62
        rm -rf autom4te.cache */autom4te.cache
 
63
        rm -rf *-obj-*
 
64
 
 
65
        dh_clean
 
66
 
 
67
install: build
 
68
        dh_testdir
 
69
        dh_testroot
 
70
        dh_clean -k
 
71
        dh_installdirs
 
72
 
 
73
        for FILE in "$(SUBDIRS)"; do \
 
74
                cd "$$FILE"-obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install ; \
 
75
                cd ..; \
 
76
        done
 
77
 
 
78
# Build architecture-dependent files here.
 
79
binary-arch: build install
 
80
        dh_testdir
 
81
        dh_testroot
 
82
 
 
83
        dh_installdocs
 
84
        dh_install --sourcedir=debian/tmp --fail-missing
 
85
        dh_installchangelogs
 
86
        dh_link
 
87
        dh_strip
 
88
        dh_compress
 
89
        dh_fixperms
 
90
        dh_installdeb
 
91
        dh_shlibdeps
 
92
        dh_makeshlibs
 
93
        dh_gencontrol
 
94
        dh_md5sums
 
95
        dh_builddeb
 
96
 
 
97
# Build architecture-independent files here.
 
98
binary-indep: build install
 
99
# Nothing to do
 
100
 
 
101
binary: binary-indep binary-arch
 
102
.PHONY: build clean binary-indep binary-arch binary install