~ubuntu-branches/ubuntu/vivid/inform/vivid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Jan Christoph Nordholz
  • Date: 2008-05-26 22:09:44 UTC
  • mfrom: (2.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080526220944-ba7phz0d1k4vo7wx
Tags: 6.31.1+dfsg-1
* Remove a considerable number of files from the package
  due to unacceptable licensing terms.
* Repair library symlinks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
# debian.rules file - for inform (6.30)
3
 
# Based on sample debian.rules file (copyright 1994,1995 by Ian Jackson).
4
 
#
5
 
# I [iwj10] hereby give you perpetual unlimited permission to copy,
6
 
# modify and relicense this file, provided that you do not remove
7
 
# my name from the file itself.  (I assert my moral right of
8
 
# paternity under the Copyright, Designs and Patents Act 1988.)
9
 
# This file may have to be extensively modified
10
 
 
11
 
package=inform
12
 
version=6.30
13
 
 
14
 
build:
15
 
        $(checkdir)
16
 
        ./configure --prefix=/usr
17
 
        make
18
 
        tex extra/Craft.Of.Adventure.tex
19
 
        touch build
20
2
 
21
3
clean:
22
 
        $(checkdir)
23
 
        -make clean
24
 
        -rm -f build config.log config.status
25
 
        -rm -f Craft.Of.Adventure.dvi
26
 
        -rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars
27
 
        -test -r /usr/share/misc/config.sub && \
28
 
                cp -f /usr/share/misc/config.sub config.sub
29
 
        -test -r /usr/share/misc/config.guess && \
30
 
                cp -f /usr/share/misc/config.guess config.guess
31
 
 
32
 
binary-indep:   checkroot build
33
 
        $(checkdir)
34
 
        -rm -rf debian/tmp
35
 
        # First create directories
36
 
        install -d debian/tmp debian/tmp/DEBIAN
37
 
        install -d debian/tmp/usr/share/doc/$(package)/html
38
 
        install -d debian/tmp/usr/share/doc/$(package)/tutorial
39
 
        install -d debian/tmp/usr/share/info
40
 
        install -d debian/tmp/usr/share/menu
41
 
        # Symlink to documentation in /usr/share/doc/inform
42
 
        ln -s inform debian/tmp/usr/share/doc/inform-docs
43
 
        # Copy documentation
44
 
        cp -r html/* debian/tmp/usr/share/doc/$(package)/html
45
 
        cp -r tutor/* debian/tmp/usr/share/doc/$(package)/tutorial
46
 
        cp -r info/* debian/tmp/usr/share/info
47
 
        gzip -9v debian/tmp/usr/share/info/*
48
 
        cp Craft.Of.Adventure.dvi debian/tmp/usr/share/doc/$(package)
49
 
        gzip -9v debian/tmp/usr/share/doc/$(package)/Craft.Of.Adventure.dvi
50
 
        # Copy menu file
51
 
        cp debian/inform-menu debian/tmp/usr/share/menu/$(package)
52
 
        # Remove unneeded stuff
53
 
        rm -f debian/tmp/usr/share/info/Makefile*
54
 
        # Various bits and pieces needed to build package
55
 
        cp debian/doc.postinst debian/tmp/DEBIAN/postinst
56
 
        cp debian/doc.postrm debian/tmp/DEBIAN/postrm
57
 
        cp debian/doc.prerm debian/tmp/DEBIAN/prerm
58
 
        chmod +x debian/tmp/DEBIAN/postinst debian/tmp/DEBIAN/postrm debian/tmp/DEBIAN/prerm
59
 
        dpkg-gencontrol -pinform-docs
60
 
        chown -R root:root debian/tmp
61
 
        chmod -R g-ws debian/tmp
62
 
        dpkg --build debian/tmp ..
63
 
 
64
 
binary-arch:    checkroot build
65
 
        $(checkdir)
66
 
        -rm -rf debian/tmp
67
 
        # First create directories
68
 
        install -d debian/tmp debian/tmp/DEBIAN
69
 
        install -d debian/tmp/usr/share/doc/$(package)/demos
70
 
        install -d debian/tmp/usr/share/$(package)
71
 
        install -d debian/tmp/usr/local/share/$(package)/include
72
 
        install -d debian/tmp/usr/local/share/$(package)/module
73
 
        install -d debian/tmp/usr/bin
74
 
        install -d debian/tmp/usr/share/man/man1
75
 
        # Copy documentation
76
 
        cp debian/copyright debian/tmp/usr/share/doc/$(package)/.
77
 
        cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian
78
 
        gzip -9v debian/tmp/usr/share/doc/$(package)/changelog.Debian
79
 
        # Copy examples
80
 
        cp -r demos/*.inf debian/tmp/usr/share/doc/$(package)/demos
81
 
        gzip -9v debian/tmp/usr/share/doc/$(package)/demos/*
82
 
        # Copy other files
83
 
        cp debian/inform.1 debian/tmp/usr/share/man/man1
84
 
        gzip -9v debian/tmp/usr/share/man/man1/inform.1
85
 
        make install DESTDIR=$(CURDIR)/debian/tmp/
86
 
        # Now remove the stuff we didn't want installed here
87
 
        rm -r debian/tmp/usr/share/zcode
88
 
        rm -r debian/tmp/usr/share/inform/manual
89
 
        rm -r debian/tmp/usr/info
90
 
        rm -r debian/tmp/usr/share/inform/include
91
 
        rm -r debian/tmp/usr/share/inform/module
92
 
        # Fix symlink
93
 
        ln -sf inform-$(version) debian/tmp/usr/bin/inform
94
 
        # Various bits and pieces needed to build package
95
 
        dpkg-shlibdeps src/inform
96
 
        dpkg-gencontrol -pinform
97
 
        chown -R root:root debian/tmp
98
 
        chmod -R u+w debian/tmp
99
 
        chmod -R g-ws debian/tmp
100
 
        dpkg --build debian/tmp ..
101
 
 
102
 
define checkdir
103
 
        test -f src/$(package).c -a -f debian/rules
104
 
endef
105
 
 
106
 
# Below here is fairly generic really
107
 
 
108
 
binary:         binary-indep binary-arch
109
 
 
110
 
source diff:
111
 
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
112
 
 
113
 
checkroot:
114
 
        $(checkdir)
115
 
        test root = "`whoami`"
116
 
 
117
 
.PHONY: binary binary-arch binary-indep clean checkroot
 
4
        dh_testdir
 
5
        dh_testroot
 
6
        rm -f build.stamp unpack.stamp
 
7
        [ ! -f inform-6.31.1/Makefile ] || $(MAKE) -C inform-6.31.1 maintainer-clean
 
8
        dh_clean
 
9
 
 
10
unpack: unpack.stamp
 
11
unpack.stamp:
 
12
        dh_testdir
 
13
        cp /usr/share/misc/config.sub /usr/share/misc/config.guess \
 
14
          inform-6.31.1/config/
 
15
        touch unpack.stamp
 
16
 
 
17
build: unpack build.stamp
 
18
build.stamp:
 
19
        dh_testdir
 
20
        cd inform-6.31.1 && ./configure --prefix=/usr
 
21
        $(MAKE) -C inform-6.31.1
 
22
        touch build.stamp
 
23
 
 
24
binary: binary-arch binary-indep
 
25
binary-indep:
 
26
binary-arch: build
 
27
        dh_testdir
 
28
        dh_testroot
 
29
        dh_install
 
30
        dh_installdocs
 
31
        dh_installchangelogs
 
32
        dh_fixperms
 
33
        dh_strip
 
34
        dh_link
 
35
        dh_compress
 
36
        dh_installdeb
 
37
        dh_shlibdeps
 
38
        dh_gencontrol
 
39
        dh_builddeb
 
40
 
 
41
.PHONY: clean unpack build binary binary-arch binary-indep