chiark / gitweb /
better changelog comment
[chiark-tcl.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # chiark-tcl - various Tcl bindings and extensions
4 # Copyright 2006 Ian Jackson
5 #
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation; either version 2 of the
9 # License, or (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this library; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19 # 02110-1301, USA.
20
21
22 majversion=1
23 srcpackage=chiark-tcl
24 libpackage=libtcl-chiark-$(majversion)
25 docpackage=libtcl-chiark-$(majversion)
26 docdir=usr/share/doc/$(docpackage)
27
28 define checkdir
29         test -f hbytes/hbytes.tct
30 endef
31
32 build:
33         $(checkdir)
34         $(MAKE) prefix=/usr VERSION=$(majversion)
35
36 clean:
37         $(checkdir)
38         $(MAKE) clean
39         rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars*
40         dh_clean
41
42 binary-indep:
43
44 binary-arch:    checkroot build
45         $(checkdir)
46         -rm -rf debian/$(docpackage) debian/$(libpackage)
47         install -d debian/$(libpackage)/usr/lib
48         install -d debian/$(docpackage)/usr/share/doc/$(docpackage)
49         install -d debian/$(libpackage)/usr/share/lintian/overrides
50
51         cp */*.so debian/$(libpackage)/usr/lib/.
52         cp debian/lintian-overrides \
53                 debian/$(libpackage)/usr/share/lintian/overrides/$(libpackage)
54
55         set -e; for f in */*.[ch]; do                                   \
56                 perl debian/extractdoc <$$f                             \
57                         debian/$(docpackage)/$(docdir)/ $$f .txt;       \
58                 done
59         cp */*.tct debian/README debian/copyright \
60                 debian/$(docpackage)/$(docdir)
61
62         dh_installchangelogs
63         dh_strip
64
65         dh_shlibdeps
66
67         # be consistent about what we compress:
68         dh_compress -X'*.[ch].txt'
69
70         dh_fixperms
71         dh_gencontrol
72         dh_md5sums
73         dh_builddeb
74
75 # Below here is fairly generic really
76
77 binary:         binary-indep binary-arch
78
79 source diff:
80         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
81
82 checkroot:
83         $(checkdir)
84         dh_testroot
85
86 .PHONY: binary binary-arch binary-indep clean checkroot