~ubuntu-branches/ubuntu/trusty/openarena/trusty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Bruno "Fuddl" Kleinert
  • Date: 2009-11-19 17:37:45 UTC
  • Revision ID: james.westby@ubuntu.com-20091119173745-2c787mp8v6osge39
Tags: 0.8.1-6
* Convert source package to format 3.0 quilt
  * Drop build dependency on quilt
  * Remove quilt calls from debian/rules
  * Drop build dependency on sharutils, because we now can ship (binary) PNG
    icons in debian 3.0 source packages
* Import a patch from Simon McVittie (see #546184 for details) to fix building
  openarena on amd64 processors with a 32bit userland. Thanks to Simon
  McVittie! (Closes: #546184)
* Allow parallel builds for SMP machines to speed up building openarena
* Update Vcs-* fields as this package now lives in Git

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
#export DH_VERBOSE=1
3
3
 
4
 
# copied from ioq3 make scripts
5
 
Q3OS=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'|sed -e 's/\//_/g')
6
 
Q3ARCH=$(shell uname -m | sed -e s/i.86/i386/)
 
4
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
5
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
6
    MAKEFLAGS += -j$(NUMJOBS)
 
7
endif
 
8
 
 
9
Q3ARCH             := $(shell sh $(CURDIR)/debian/q3arch.sh arch     HOST)
 
10
Q3PLATFORM         := $(shell sh $(CURDIR)/debian/q3arch.sh platform HOST)
 
11
Q3COMPILE_ARCH     := $(shell sh $(CURDIR)/debian/q3arch.sh arch     BUILD)
 
12
Q3COMPILE_PLATFORM := $(shell sh $(CURDIR)/debian/q3arch.sh platform BUILD)
7
13
 
8
14
CFLAGS += -fsigned-char
9
15
 
10
16
build: build-stamp
11
 
build-stamp: patch-stamp
 
17
build-stamp:
12
18
        dh_testdir
13
19
        $(MAKE) USE_CURL=1 \
14
20
                        USE_CURL_DLOPEN=0 \
18
24
                        USE_INTERNAL_SPEEX=0 \
19
25
                        BUILD_CLIENT_SMP=1 \
20
26
                        USE_LOCAL_HEADERS=0 \
21
 
                        DEFAULT_BASEDIR=/usr/share/games/openarena
 
27
                        DEFAULT_BASEDIR=/usr/share/games/openarena \
 
28
                        ARCH=$(Q3ARCH) \
 
29
                        PLATFORM=$(Q3PLATFORM) \
 
30
                        COMPILE_ARCH=$(Q3COMPILE_ARCH) \
 
31
                        COMPILE_PLATFORM=$(Q3COMPILE_PLATFORM)
22
32
        touch $@
23
33
 
24
 
patch-stamp: patch
25
 
        touch patch-stamp
26
 
 
27
 
patch:
28
 
        QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
29
 
 
30
 
unpatch:
31
 
        QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
32
 
        rm -f patch-stamp
33
 
        rm -rf .pc
34
 
 
35
 
clean: patch-stamp clean-patched unpatch
36
 
clean-patched:
 
34
clean:
37
35
        dh_testdir
38
36
        dh_testroot
39
37
        rm -f build-stamp
40
38
        $(MAKE) distclean
41
 
        rm -f openarena128.png openarena32.xpm
 
39
        rm -f debian/openarena32.xpm
42
40
        dh_clean
43
41
 
44
42
install: build
46
44
        dh_testroot
47
45
        dh_clean -k
48
46
        mkdir -p debian/tmp
49
 
        cp build/release-$(Q3OS)-$(Q3ARCH)/openarena.$(Q3ARCH) debian/tmp/openarena
50
 
        cp build/release-$(Q3OS)-$(Q3ARCH)/oa_ded.$(Q3ARCH) debian/tmp/openarena-server
51
 
        uudecode -o openarena128.png debian/oa128.png.uu
52
 
        convert -scale 32x32 openarena128.png openarena32.xpm
 
47
        cp build/release-$(Q3PLATFORM)-$(Q3ARCH)/openarena.$(Q3ARCH) debian/tmp/openarena
 
48
        cp build/release-$(Q3PLATFORM)-$(Q3ARCH)/oa_ded.$(Q3ARCH) debian/tmp/openarena-server
 
49
        convert -scale 32x32 debian/openarena128.png debian/openarena32.xpm
53
50
        dh_install
54
51
        dh_installdirs
55
52
 
76
73
        dh_builddeb
77
74
 
78
75
binary: binary-indep binary-arch
79
 
.PHONY: build clean binary-indep binary-arch binary install clean-patched
 
76
.PHONY: build clean binary-indep binary-arch binary install