| 1 |
#!/usr/bin/make -f |
| 2 |
# debian/rules for the Debian xfonts-scalable package. |
| 3 |
# Copyright © 2004 Scott James Remnant <[email protected]> |
| 4 |
# Copyright © 2005 Daniel Stone <[email protected]> |
| 5 |
# Copyright © 2005 David Nusinow <[email protected]> |
| 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-scalable |
| 12 |
|
| 13 |
include debian/xsfbs/xsfbs.mk |
| 14 |
|
| 15 |
CFLAGS = -Wall -g |
| 16 |
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) |
| 17 |
CFLAGS += -O0 |
| 18 |
else |
| 19 |
CFLAGS += -O2 |
| 20 |
endif |
| 21 |
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
| 22 |
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
| 23 |
MAKEFLAGS += -j$(NUMJOBS) |
| 24 |
endif |
| 25 |
|
| 26 |
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) |
| 27 |
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
| 28 |
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
| 29 |
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
| 30 |
confflags += --build=$(DEB_HOST_GNU_TYPE) |
| 31 |
else |
| 32 |
confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) |
| 33 |
endif |
| 34 |
|
| 35 |
|
| 36 |
build: build-stamp |
| 37 |
build-indep: build-stamp |
| 38 |
build-stamp: $(STAMP_DIR)/prepare |
| 39 |
dh_testdir |
| 40 |
autoreconf -vfi |
| 41 |
mkdir -p build |
| 42 |
cd build && \ |
| 43 |
../configure --prefix=/usr --mandir=\$${prefix}/share/man \ |
| 44 |
--infodir=\$${prefix}/share/info $(confflags) \ |
| 45 |
CFLAGS="$(CFLAGS)" FCCACHE=/bin/true |
| 46 |
cd build && $(MAKE) |
| 47 |
>$@ |
| 48 |
|
| 49 |
build-arch: |
| 50 |
# Nothing to do |
| 51 |
|
| 52 |
clean: xsfclean |
| 53 |
dh_testdir |
| 54 |
dh_testroot |
| 55 |
rm -f build-stamp |
| 56 |
|
| 57 |
rm -f config.cache config.log config.status |
| 58 |
rm -f */config.cache */config.log */config.status |
| 59 |
rm -f conftest* */conftest* |
| 60 |
rm -rf autom4te.cache */autom4te.cache |
| 61 |
rm -rf build |
| 62 |
rm -f aclocal.m4 configure config.guess config.sub |
| 63 |
rm -f install-sh missing mkinstalldirs |
| 64 |
find -name Makefile.in -delete |
| 65 |
|
| 66 |
dh_clean |
| 67 |
|
| 68 |
install: build |
| 69 |
dh_testdir |
| 70 |
dh_testroot |
| 71 |
dh_prep |
| 72 |
dh_installdirs |
| 73 |
|
| 74 |
cd build && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install |
| 75 |
install -D -m644 debian/fonts.scale \ |
| 76 |
debian/tmp/etc/X11/fonts/Type1/xfonts-scalable.scale |
| 77 |
|
| 78 |
# Build architecture-dependent files here. |
| 79 |
binary-arch: build install |
| 80 |
# Nothing to do |
| 81 |
|
| 82 |
# Build architecture-independent files here. |
| 83 |
binary-indep: build install |
| 84 |
dh_testdir |
| 85 |
dh_testroot |
| 86 |
|
| 87 |
dh_installdocs |
| 88 |
dh_install --sourcedir=debian/tmp --exclude=fonts.dir --exclude=fonts.scale |
| 89 |
dh_missing --fail-missing --exclude=fonts.dir --exclude=fonts.scale |
| 90 |
dh_installxfonts |
| 91 |
dh_installchangelogs |
| 92 |
dh_compress |
| 93 |
dh_fixperms |
| 94 |
dh_installdeb |
| 95 |
dh_gencontrol |
| 96 |
dh_md5sums |
| 97 |
dh_builddeb |
| 98 |
|
| 99 |
binary: binary-indep binary-arch |
| 100 |
.PHONY: build clean binary-indep binary-arch binary install |