~ubuntu-branches/ubuntu/wily/sgt-puzzles/wily

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-10-01 22:10:50 UTC
  • mfrom: (1.2.14)
  • Revision ID: package-import@ubuntu.com-20141001221050-a83g6j14c9dal6ek
Tags: 20140928.r10274-1
* New upstream version
  - Version scheme is now date-based
  - Fix a failure to warn about non-unique rows/columns in non-square Unruly
    grids (Closes: #718354)
* Add Debian menu entries for Range and Signpost
* debian/watch: Delete, as new versions are date-based and there is
  currently no obvious way to find the last date changed
* Disable 304_combine-binaries.diff which no longer applies
* Build using autotools
  - Drop patches 301_fix-install-dirs.diff, 305_no-werror.diff
* Exclude puzzles.chm from orig tarball because it requires non-free tools
  to regenerate from source
* Update policy version to 3.9.6; no changes required

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
override SHELL := /bin/bash
5
5
 
6
6
DEBIAN_VERSION := $(shell dpkg-parsechangelog | sed -r 's/^Version: //; t; d')
7
 
UPSTREAM_VERSION := $(shell echo $(DEBIAN_VERSION) | sed -r 's/^[0-9]*://; s/-[^-]*$$//')
8
7
 
9
8
LANGUAGES := en $(patsubst debian/po/%.po,%,$(wildcard debian/po/*.po))
10
9
 
11
10
# Distributed files that we regenerate
12
 
AUTOGEN_FILES := list.c Makefile Makefile.cyg Makefile.emcc Makefile.gnustep \
13
 
                 Makefile.nestedvm Makefile.osx Makefile.vc Makefile.wce \
14
 
                 preprocessed.but puzzles.txt puzzles.hlp puzzles.cnt HACKING
 
11
AUTOGEN_FILES := HACKING Makefile.am Makefile.cyg Makefile.emcc \
 
12
                 Makefile.gnustep Makefile.gtk Makefile.in Makefile.nestedvm \
 
13
                 Makefile.osx Makefile.vc Makefile.wce aclocal.m4 configure \
 
14
                 depcomp install-sh list.c missing preprocessed.but \
 
15
                 puzzles.cnt puzzles.hlp puzzles.txt
15
16
 
16
17
%:
17
18
        dh $@
18
19
 
19
20
override_dh_auto_configure:
20
21
        ./mkfiles.pl
 
22
        ./mkauto.sh
 
23
        CPPFLAGS="-DDEBIAN_VERSION=\"\\\"$(DEBIAN_VERSION)\\\"\" -DHELP_BROWSER_PATH=\"\\\"yelp:khelpcenter:sensible-browser\\\"\"" ./configure --prefix=/usr --bindir=/usr/games --program-prefix=sgt-
21
24
        [ -L po ] || ln -s debian/po po
22
25
        rm -f preprocessed.but
23
26
 
24
27
override_dh_auto_build:
25
 
        $(MAKE) "VER=-DREVISION=$(UPSTREAM_VERSION)" \
26
 
            "XFLAGS=-DDEBIAN_VERSION=\"\\\"$(DEBIAN_VERSION)\\\"\" -DHELP_BROWSER_PATH=\"\\\"yelp:khelpcenter:sensible-browser\\\"\"" \
27
 
            puzzles
 
28
        $(MAKE)
28
29
        $(MAKE) -f Makefile.doc BINPREFIX=sgt-
29
30
 
30
31
override_dh_auto_install:
31
 
        $(MAKE) DESTDIR=debian/sgt-puzzles BINPREFIX=sgt- install
 
32
        $(MAKE) DESTDIR=debian/sgt-puzzles install
32
33
 
33
34
override_dh_installdocs:
34
35
        for lang in $(LANGUAGES); do \
51
52
        done
52
53
 
53
54
override_dh_auto_clean:
54
 
        ! [ -f Makefile ] || $(MAKE) clean
 
55
        ! [ -f Makefile ] || $(MAKE) distclean
55
56
        $(MAKE) -f Makefile.doc clean
56
57
        if [ -d .git ]; then                            \
57
58
                git checkout HEAD $(AUTOGEN_FILES);     \
59
60
                rm -f $(AUTOGEN_FILES);                 \
60
61
        fi
61
62
        rm -f po
62
 
        dh_clean debian/substvars gamedesc.txt version2.def
 
63
        dh_clean debian/substvars compile gamedesc.txt version2.def
63
64
 
64
 
# The test rule doesn't currently work with the combined executable we build
65
 
override_dh_auto_test:
66
 
        :
 
65
get-orig-source:
 
66
        wget -O puzzles-new.tar.gz http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles.tar.gz
 
67
        version="$$(tar -xOzf puzzles-new.tar.gz --wildcards '*/version.h' | \
 
68
                    sed -n 's/^\#define VER "Version \([^ ]*\)"$$/\1/p')" \
 
69
        && test -n "$$version"                                          \
 
70
        && mk-origtargz --exclude-file '*.chm' -v"$$version" puzzles-new.tar.gz
 
71
        rm -f puzzles-new.tar.gz