~ubuntu-branches/ubuntu/jaunty/gtkboard/jaunty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Barak A. Pearlmutter
  • Date: 2008-08-30 19:44:22 UTC
  • mfrom: (3.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20080830194422-jmqa36yw6loev5lr
Tags: 0.11pre0-8
* Move gtkboard executable from /usr/bin to /usr/games
* Minor Debian packaging updates, dh 7, rev policy

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
# Sample debian/rules that uses debhelper.
3
 
# GNU copyright 1997 to 1999 by Joey Hess.
4
 
 
5
 
# Uncomment this to turn on verbose mode.
6
 
#export DH_VERBOSE=1
7
 
 
8
 
 
9
 
# These are used for cross-compiling and for saving the configure script
10
 
# from having to guess our platform (since we know it already)
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
 
 
15
 
CFLAGS = -Wall -g
16
 
 
17
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18
 
        CFLAGS += -O0
19
 
else
20
 
        CFLAGS += -O2
21
 
endif
22
 
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
23
 
        INSTALL_PROGRAM += -s
24
 
endif
25
 
 
26
 
config.status: configure
27
 
        dh_testdir
28
 
        # Add here commands to configure the package.
29
 
        ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
30
 
 
31
2
 
32
3
build: build-stamp
33
 
 
34
 
build-stamp:  config.status
35
 
        dh_testdir
36
 
 
37
 
        # Add here commands to compile the package.
38
 
        $(MAKE)
39
 
        #/usr/bin/docbook-to-man debian/gtkboard.sgml > gtkboard.1
40
 
 
 
4
build-stamp:
 
5
        dh build --before auto_configure
 
6
        dh_auto_configure -- --bindir=\$${prefix}/games
 
7
        dh build --after auto_configure
41
8
        touch build-stamp
42
9
 
43
10
clean:
44
 
        dh_testdir
45
 
        rm -f build-stamp
46
 
 
47
 
        # Add here commands to clean up after the build process.
48
 
        -$(MAKE) distclean
 
11
        dh $@
49
12
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
50
13
        cp -f /usr/share/misc/config.sub config.sub
51
14
endif
53
16
        cp -f /usr/share/misc/config.guess config.guess
54
17
endif
55
18
 
56
 
 
57
 
        dh_clean
58
 
 
59
 
install: build manpage
60
 
        dh_testdir
61
 
        dh_clean -k
62
 
        dh_installdirs
63
 
 
64
 
        # Add here commands to install the package into debian/gtkboard.
65
 
        $(MAKE) install DESTDIR=$(CURDIR)/debian/gtkboard
66
 
        mkdir --parents debian/gtkboard/usr/share/doc/gtkboard/html/devel
67
 
        cp -a doc/index.html       debian/gtkboard/usr/share/doc/gtkboard/html/
68
 
        cp -a doc/devel/devel/index.html debian/gtkboard/usr/share/doc/gtkboard/html/devel/
 
19
install: install-stamp
 
20
install-stamp: build
 
21
        dh install --before fixperms
 
22
        install -d debian/gtkboard/usr/share/doc/gtkboard/html/devel
 
23
        install doc/index.html \
 
24
                debian/gtkboard/usr/share/doc/gtkboard/html/
 
25
        install doc/devel/devel/index.html \
 
26
                debian/gtkboard/usr/share/doc/gtkboard/html/devel/
69
27
        install -d debian/gtkboard/usr/share/applications
70
 
        install -m644 debian/gtkboard.desktop debian/gtkboard/usr/share/applications
71
 
 
72
 
 
73
 
# Build architecture-independent files here.
74
 
binary-indep: build install
75
 
# We have nothing to do by default.
76
 
 
77
 
# Build architecture-dependent files here.
78
 
binary-arch: build install
79
 
        dh_testdir
80
 
        dh_testroot
81
 
        dh_installchangelogs ChangeLog
82
 
        dh_installdocs
83
 
        dh_installexamples
84
 
#       dh_install
85
 
#       dh_installmenu
86
 
#       dh_installdebconf
87
 
#       dh_installlogrotate
88
 
#       dh_installemacsen
89
 
#       dh_installpam
90
 
#       dh_installmime
91
 
#       dh_installinit
92
 
#       dh_installcron
93
 
#       dh_installinfo
94
 
        dh_installman debian/gtkboard.6
95
 
        dh_link
96
 
        dh_strip
97
 
        dh_compress
98
 
        dh_fixperms
99
 
#       dh_perl
100
 
#       dh_python
101
 
#       dh_makeshlibs
102
 
        dh_installdeb
103
 
        dh_shlibdeps
104
 
        dh_gencontrol
105
 
        dh_md5sums
106
 
        dh_builddeb
107
 
 
108
 
binary: binary-indep binary-arch
 
28
        install debian/gtkboard.desktop \
 
29
                debian/gtkboard/usr/share/applications
 
30
        dh install --remaining
 
31
        touch install-stamp
 
32
 
 
33
binary binary-arch binary-indep: install
 
34
        dh $@
 
35
 
109
36
.PHONY: build clean binary-indep binary-arch binary install
110
37
 
111
38
## This will re-generate the man page.
112
39
## Not used during normal build; just a good place to keep this info.
 
40
 
 
41
#install-stamp: manpage
 
42
 
113
43
manpage: debian/gtkboard.6
114
 
debian/gtkboard.6:
115
 
        help2man --name="play a variety of board games" --section=6 --no-info --output=$@ src/gtkboard
 
44
 
 
45
debian/gtkboard.6: build
 
46
        help2man --name="play a variety of board games" \
 
47
                 --section=6 --no-info --output=$@ \
 
48
                src/gtkboard
 
49
 
116
50
.PHONY: manpage