upload tizen1.0 source
[framework/uifw/xorg/lib/libxfont.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for the Debian libxfont 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 PACKAGE = libxfont1
11
12 include debian/xsfbs/xsfbs.mk
13
14 CFLAGS = -Wall -g
15 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
16         CFLAGS += -O0
17 else
18         CFLAGS += -O2
19 endif
20 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
21         NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
22         MAKEFLAGS += -j$(NUMJOBS)
23 endif
24
25 DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
26 DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
27 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
28 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
29         confflags += --build=$(DEB_HOST_GNU_TYPE)
30 else
31         confflags += --build=$(DEB_HOST_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
32 #       confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
33 endif
34
35 confflags += --enable-fc --enable-builtins --enable-pcfformat --enable-bdfformat
36
37 configure: $(STAMP_DIR)/patch
38         autoreconf -vfi
39
40 obj-$(DEB_BUILD_GNU_TYPE)/config.status: configure
41         mkdir -p obj-$(DEB_BUILD_GNU_TYPE)
42         cd obj-$(DEB_BUILD_GNU_TYPE) && \
43         ../configure --prefix=/usr --mandir=\$${prefix}/share/man \
44                      --infodir=\$${prefix}/share/info $(confflags) \
45                      --without-bzip2 \
46                      CFLAGS="$(CFLAGS)" 
47
48 build: build-stamp
49 build-stamp: obj-$(DEB_BUILD_GNU_TYPE)/config.status
50         dh_testdir
51
52         cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
53         >$@
54
55 clean: xsfclean
56         dh_testdir
57         dh_testroot
58         rm -f build-stamp
59
60         rm -f config.cache config.log config.status
61         rm -f */config.cache */config.log */config.status
62         rm -f conftest* */conftest*
63         rm -rf autom4te.cache */autom4te.cache
64         rm -rf obj-*
65         rm -f $$(find -name Makefile.in)
66         rm -f aclocal.m4 config.guess config.h.in config.sub configure
67         rm -f depcomp install-sh ltmain.sh missing mkinstalldirs
68
69         dh_clean
70
71 install: build
72         dh_testdir
73         dh_testroot
74         dh_clean -k
75         dh_installdirs
76
77         cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
78
79 # Build architecture-dependent files here.
80 binary-arch: build install
81         dh_testdir
82         dh_testroot
83
84         dh_installdocs
85         dh_install --sourcedir=debian/tmp --list-missing
86         #dh_install --sourcedir=debian/tmp --list-missing -XlibXfont.la
87         dh_installchangelogs ChangeLog
88         dh_link
89         dh_strip --dbg-package=$(PACKAGE)-dbg
90         dh_compress
91         dh_fixperms
92         dh_makeshlibs -V'libxfont1 (>= 1:1.4.2)'
93         dh_shlibdeps
94         dh_installdeb
95         dh_gencontrol
96         dh_md5sums
97         dh_builddeb
98
99 # Build architecture-independent files here.
100 binary-indep: build install
101 # Nothing to do
102
103 binary: binary-indep binary-arch
104 .PHONY: build clean binary-indep binary-arch binary install