~garuda-id/gkamus/ubuntu

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Mahyuddin Susanto
  • Date: 2011-02-13 17:10:08 UTC
  • Revision ID: udienz@gmail.com-20110213171008-b5d9046k2pb6ffee
adding more configurations

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
3
 
PACKAGE := gkamus
4
 
 
5
 
include /usr/share/cdbs/1/rules/debhelper.mk
6
 
include /usr/share/cdbs/1/class/autotools.mk
7
 
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
8
 
 
9
 
# Add here any variable or target overrides you need.
10
 
LDFLAGS += -Wl,-O1 -Wl,-z,defs -Wl,--warn-unresolved-symbols -Wl,--as-needed
11
 
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12
 
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13
 
 
14
 
# Debian has a central copy of the GPL, no need to distribute again
15
 
common-binary-post-install-arch::
16
 
        rm -f $(DEB_DESTDIR)/usr/share/doc/gkamus/COPYING
 
3
include /usr/share/quilt/quilt.make
 
4
 
 
5
DEB_HOST_GNU_TYPE       ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
6
DEB_BUILD_GNU_TYPE      ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
7
 
 
8
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
 
9
        CROSS=CC=$(DEB_HOST_GNU_TYPE)-gcc
 
10
else
 
11
        CROSS=
 
12
endif
 
13
 
 
14
CXXFLAGS=-ggdb
 
15
 
 
16
clean: unpatch
 
17
        dh_testdir
 
18
        dh_testroot
 
19
        rm -f build-stamp
 
20
        rm -f config.guess config.sub
 
21
 
 
22
        [ ! -f Makefile ] || $(MAKE) clean
 
23
 
 
24
        rm -f config.log
 
25
        dh_clean
 
26
 
 
27
config.status: configure patch
 
28
        dh_testdir
 
29
 
 
30
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
 
31
        cp -f /usr/share/misc/config.guess config.guess
 
32
endif
 
33
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
 
34
        cp -f /usr/share/misc/config.sub config.sub
 
35
endif
 
36
 
 
37
        ./configure $(CROSS) --prefix=/usr 
 
38
 
 
39
build: build-stamp
 
40
build-stamp: config.status
 
41
        dh_testdir
 
42
 
 
43
        $(MAKE)
 
44
        touch build-stamp
 
45
 
 
46
install: build
 
47
        dh_testdir
 
48
        dh_testroot
 
49
        dh_prep
 
50
 
 
51
        $(MAKE) install prefix=$(CURDIR)/debian/gkamus/usr
 
52
 
 
53
binary: binary-arch
 
54
 
 
55
binary-arch: install
 
56
        dh_testdir
 
57
        dh_testroot
 
58
        dh_installchangelogs ChangeLog
 
59
        dh_installdocs
 
60
        dh_installman debian/gkamus.1
 
61
        dh_install
 
62
        dh_installmenu
 
63
        dh_lintian
 
64
        dh_strip --dbg-package=gkamus-dbg
 
65
        dh_compress
 
66
        dh_fixperms
 
67
        dh_installdeb
 
68
        dh_shlibdeps
 
69
        dh_gencontrol
 
70
        dh_md5sums
 
71
        dh_builddeb
 
72
 
 
73
binary-indep:
 
74
 
 
75
.PHONY: clean build install binary binary-arch binary-indep