~netrek-developers/netrek-client-cow/trunk

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Collin Pruitt
  • Date: 2009-05-12 04:30:09 UTC
  • Revision ID: collinp111@gmail.com-20090512043009-3jsjojoyrk16oass
Initial upload - updated from http://james.tooraweenah.com/darcs/netrek-client-cow/ using darcs (hince the existnace of _darcs), fully patched.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# -*- makefile -*-
 
3
 
 
4
# Uncomment this to turn on verbose mode.
 
5
#export DH_VERBOSE=1
 
6
 
 
7
# These are used for cross-compiling and for saving the configure script
 
8
# from having to guess our platform (since we know it already)
 
9
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
10
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
11
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
 
12
CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
 
13
else
 
14
CROSS= --build $(DEB_BUILD_GNU_TYPE)
 
15
endif
 
16
 
 
17
 
 
18
 
 
19
config.status: configure
 
20
        dh_testdir
 
21
        # Add here commands to configure the package.
 
22
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
 
23
        cp -f /usr/share/misc/config.sub config.sub
 
24
endif
 
25
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
 
26
        cp -f /usr/share/misc/config.guess config.guess
 
27
endif
 
28
        ./configure $(CROSS) --prefix=/usr \
 
29
                --bindir=\$${prefix}/games \
 
30
                --datadir=\$${prefix}/share/games \
 
31
                --mandir=\$${prefix}/share/man \
 
32
                --infodir=\$${prefix}/share/info \
 
33
                CFLAGS="$(CFLAGS)" \
 
34
                LDFLAGS="-Wl,-z,defs"
 
35
 
 
36
 
 
37
build: build-stamp
 
38
 
 
39
build-stamp:  config.status 
 
40
        dh_testdir
 
41
 
 
42
        # Add here commands to compile the package.
 
43
        $(MAKE)
 
44
 
 
45
        touch $@
 
46
 
 
47
clean: 
 
48
        dh_testdir
 
49
        dh_testroot
 
50
        rm -f build-stamp 
 
51
 
 
52
        # Add here commands to clean up after the build process.
 
53
        [ ! -f Makefile ] || [ ! -f key.mk ] ||  $(MAKE) distclean
 
54
        rm -f config.sub config.guess
 
55
 
 
56
        dh_clean 
 
57
 
 
58
install: build
 
59
        dh_testdir
 
60
        dh_testroot
 
61
        dh_clean -k 
 
62
        dh_installdirs
 
63
 
 
64
        # Add here commands to install the package into debian/netrek-client-cow.
 
65
        #$(MAKE) prefix=$(CURDIR)/debian/netrek-client-cow/usr install
 
66
        $(MAKE) DESTDIR=$(CURDIR)/debian/netrek-client-cow BINDIR=/usr/games install
 
67
 
 
68
        mv $(CURDIR)/debian/netrek-client-cow/usr/games/netrek \
 
69
                $(CURDIR)/debian/netrek-client-cow/usr/games/netrek-client-cow
 
70
 
 
71
# Build architecture-independent files here.
 
72
binary-indep: build install
 
73
# We have nothing to do by default.
 
74
 
 
75
# Build architecture-dependent files here.
 
76
binary-arch: build install
 
77
        dh_testdir
 
78
        dh_testroot
 
79
        dh_installchangelogs ChangeLog
 
80
        dh_installdocs
 
81
        dh_installexamples
 
82
        dh_install
 
83
        dh_installmenu
 
84
        dh_installman debian/netrek-client-cow.6
 
85
        dh_link
 
86
        dh_strip
 
87
        dh_compress
 
88
        dh_fixperms
 
89
        dh_installdeb
 
90
        dh_shlibdeps
 
91
        dh_gencontrol
 
92
        dh_md5sums
 
93
        dh_builddeb
 
94
 
 
95
binary: binary-indep binary-arch
 
96
.PHONY: build clean binary-indep binary-arch binary install