File: rules

package info (click to toggle)
kazehakase 0.5.8-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 8,184 kB
  • ctags: 7,837
  • sloc: ansic: 64,119; sh: 19,622; cpp: 12,601; ruby: 1,590; makefile: 1,437; xml: 464
file content (109 lines) | stat: -rwxr-xr-x 3,007 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/usr/bin/make -f
# Copyright © 2004-2006 Hidetaka Iwai  <tyuyu@debian.or.jp>
# Modified by Yavor Doganov <yavor@gnu.org> for gNewSense and later Debian.
# Copyright © 2007, 2008, 2009 Free Software Foundation, Inc.

#export DH_VERBOSE=1

# Include dpatch stuff.
include /usr/share/dpatch/dpatch.make

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

CFLAGS := -Wall -g
LDFLAGS := -Wl,-O1 -Wl,--as-needed

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif

ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
confflags += --build=$(DEB_HOST_GNU_TYPE)
else
confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif

# extract Debian package version from the changelog.
DEBIAN_VERSION := $(shell dpkg-parsechangelog | grep '^Version:' \
		    | awk '{ print $$2; }')

CXXFLAGS := $(CFLAGS)
CPPFLAGS := -DDEBIAN_VERSION=\"\\\"$(DEBIAN_VERSION)\\\"\"

COMPILER_FLAGS := CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
	       	  CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"

config.status: 
	dh_testdir

	./configure $(confflags) $(COMPILER_FLAGS) --prefix=/usr \
	  --mandir=\$${prefix}/share/man --sysconfdir=/etc \
	  --libexecdir=\$${prefix}/lib --enable-migemo \
	  --with-gecko-engine=libxul --disable-shave \
	  --with-ruby=/usr/bin/ruby1.8

build: patch build-stamp 
build-stamp: config.status 
	dh_testdir

	$(MAKE)

	touch $@

clean: clean-patched unpatch

clean-patched:
	dh_testdir
	dh_testroot
	$(RM) build-stamp 
	[ ! -f Makefile ] || $(MAKE) distclean
	$(RM) intltool-extract intltool-merge intltool-update

	dh_clean doltcompile doltlibtool

install: build
	dh_testdir
	dh_testroot
	dh_prep

# Add here commands to install the package into debian/kazehakase.
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
	find $(CURDIR)/debian/tmp/usr/lib/kazehakase -name '*.la' -delete

	convert -resize 32x32 \
	  $(CURDIR)/debian/tmp/usr/share/pixmaps/kazehakase-icon.png \
	  $(CURDIR)/debian/tmp/usr/share/pixmaps/kazehakase-icon.xpm

	dh_install --sourcedir=$(CURDIR)/debian/tmp --fail-missing
# Remove duplicate binaries.
	$(RM) -r $(CURDIR)/debian/kazehakase/usr/lib/kazehakase/embed
	$(RM) $(CURDIR)/debian/kazehakase/usr/lib/kazehakase/kz-embed-process

binary-indep: build install

binary-arch: build install
	dh_testdir 
	dh_testroot 
	dh_installchangelogs ChangeLog
	dh_installdocs TODO*
	dh_installmenu
	dh_strip --dbg-package=kazehakase-dbg
	dh_compress
	dh_fixperms
	dh_makeshlibs --noscripts --exclude=ext --exclude=search
	dh_installdeb
	dh_shlibdeps -pkazehakase
	dh_shlibdeps -pkazehakase-gecko -pkazehakase-webkit \
	  --dpkg-shlibdeps-params=-xkazehakase
	dh_xulrunner
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install