~ubuntu-branches/ubuntu/intrepid/balder2d/intrepid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Bjørn Hansen
  • Date: 2006-10-14 15:33:42 UTC
  • Revision ID: james.westby@ubuntu.com-20061014153342-pm52hssh42z92giq
Tags: 1.0~rc1-1
* Initial release
* This is my first Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# -*- makefile -*-
 
3
# Sample debian/rules that uses debhelper.
 
4
# This file was originally written by Joey Hess and Craig Small.
 
5
# As a special exception, when this file is copied by dh-make into a
 
6
# dh-make output file, you may use that output file without restriction.
 
7
# This special exception was added by Craig Small in version 0.37 of dh-make.
 
8
 
 
9
# Uncomment this to turn on verbose mode.
 
10
export DH_VERBOSE=1
 
11
DESTDIR=$(CURDIR)/debian/tmp
 
12
 
 
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
 
 
23
configure: configure-stamp
 
24
configure-stamp:
 
25
        dh_testdir
 
26
        # Add here commands to configure the package.
 
27
 
 
28
        touch configure-stamp
 
29
 
 
30
 
 
31
build: build-stamp
 
32
 
 
33
build-stamp: configure-stamp 
 
34
        dh_testdir
 
35
 
 
36
        # Add here commands to compile the package.
 
37
        scons
 
38
        #docbook-to-man debian/balder2d.sgml > balder2d.1
 
39
 
 
40
        touch build-stamp
 
41
 
 
42
clean:
 
43
        dh_testdir
 
44
        dh_testroot
 
45
        rm -f build-stamp configure-stamp
 
46
 
 
47
        # Add here commands to clean up after the build process.
 
48
        scons -c
 
49
        rm -f scons-signatures*
 
50
 
 
51
        dh_clean 
 
52
 
 
53
install: build install-indep install-arch
 
54
 
 
55
install-indep:
 
56
        dh_testdir
 
57
        dh_testroot
 
58
        dh_clean -k -i
 
59
        dh_installdirs -i
 
60
 
 
61
        # Add commands here to install the data files to debian/tmp.
 
62
        # DESTDIR=$(CURDIR)/debian/tmp is defined above
 
63
        mkdir -p $(DESTDIR)/usr/share/games/balder2d
 
64
        cp -r $(CURDIR)/bin/* $(DESTDIR)/usr/share/games/balder2d/
 
65
        rm $(DESTDIR)/usr/share/games/balder2d/balder2d
 
66
        rm $(DESTDIR)/usr/share/games/balder2d/maps/balder2d_export.py
 
67
        rm $(DESTDIR)/usr/share/games/balder2d/scripts/test/*
 
68
        rmdir $(DESTDIR)/usr/share/games/balder2d/scripts/test
 
69
        
 
70
        dh_install -i
 
71
 
 
72
install-arch:
 
73
        dh_testdir
 
74
        dh_testroot
 
75
        dh_clean -k -s
 
76
        dh_installdirs -s
 
77
        # Add commands here to install the binary files to debian/tmp.
 
78
        # DESTDIR=$(CURDIR)/debian/tmp is defined above
 
79
        mkdir -p $(DESTDIR)/usr/lib/balder2d
 
80
        cp $(CURDIR)/bin/balder2d $(DESTDIR)/usr/lib/balder2d
 
81
        mkdir -p $(DESTDIR)/usr/games
 
82
        cp $(CURDIR)/run_balder.sh $(DESTDIR)/usr/games/balder2d
 
83
        mkdir -p $(DESTDIR)/usr/share/applications/
 
84
        cp $(CURDIR)/Balder2D.desktop $(DESTDIR)/usr/share/applications/
 
85
        mkdir -p $(DESTDIR)/usr/share/pixmaps/
 
86
        cp $(CURDIR)/bin/balder2d.xpm $(DESTDIR)/usr/share/pixmaps/
 
87
        
 
88
        dh_install -s
 
89
        
 
90
# Build architecture-independent files here.
 
91
binary-indep: build install
 
92
        dh_testdir -i
 
93
        dh_testroot -i
 
94
        dh_installchangelogs -i
 
95
        dh_installdocs -i
 
96
        dh_compress -i
 
97
        dh_fixperms -i
 
98
        dh_installdeb -i
 
99
        dh_gencontrol -i
 
100
        dh_md5sums -i
 
101
        dh_builddeb -i
 
102
        
 
103
# Build architecture-dependent files here.
 
104
binary-arch: build install
 
105
        dh_testdir -a
 
106
        dh_testroot -a
 
107
        dh_installchangelogs history.txt -a
 
108
        dh_installdocs -a
 
109
        dh_installman debian/balder2d.6 -a
 
110
        dh_link -a
 
111
        dh_strip -a
 
112
        dh_compress -a
 
113
        dh_fixperms -a
 
114
        dh_installdeb -a
 
115
        dh_shlibdeps -a
 
116
        dh_gencontrol -a
 
117
        dh_md5sums -a
 
118
        dh_builddeb -a
 
119
 
 
120
binary: binary-indep binary-arch
 
121
.PHONY: build clean binary-indep binary-arch binary install configure