~ubuntu-branches/ubuntu/dapper/tk8.3/dapper-updates

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Mike Markley
  • Date: 2002-01-21 02:46:06 UTC
  • Revision ID: james.westby@ubuntu.com-20020121024606-dg4exzj2sy4qgltp
Tags: 8.3.3-8
Implemented a TK_INC_DIR in tkConfig.sh and aclocal.m4. This
should make it easy for other stuff to automatically locate
the header files. (Closes: #109870)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
 
 
3
# Uncomment this to turn on verbose mode. 
 
4
#export DH_VERBOSE=1
 
5
export DH_COMPAT=2
 
6
 
 
7
v = 8.3
 
8
 
 
9
build: build-stamp
 
10
build-stamp:
 
11
        dh_testdir
 
12
 
 
13
        cd unix && \
 
14
          ./configure --prefix=/usr --includedir=/usr/include/tcl$(v) \
 
15
            --with-tcl=/usr/lib/tcl$(v) --enable-shared && \
 
16
          $(MAKE) CFLAGS="-g -O2 -D_REENTRANT"
 
17
        # Build the static library.
 
18
        cd unix && \
 
19
          ar cr libtk$(v).a *.o && \
 
20
          ar d libtk$(v).a tkAppInit.o && \
 
21
          ranlib libtk$(v).a
 
22
 
 
23
        touch build-stamp
 
24
 
 
25
clean:
 
26
        dh_testdir
 
27
        dh_testroot
 
28
        rm -f build-stamp install-stamp
 
29
 
 
30
        -cd unix && $(MAKE) clean
 
31
        -cd unix && $(MAKE) distclean
 
32
 
 
33
        dh_clean
 
34
 
 
35
install: install-stamp
 
36
install-stamp: build-stamp
 
37
        dh_testdir
 
38
        dh_testroot
 
39
        dh_installdirs
 
40
 
 
41
        mkdir -p debian/tmp/usr
 
42
        cd unix && \
 
43
          make INSTALL_ROOT=`pwd`/../debian/tmp \
 
44
            MAN_INSTALL_DIR=`pwd`/../debian/tmp/usr/share/man \
 
45
            MANN_INSTALL_DIR=`pwd`/../debian/tmp/usr/share/man/man3 install
 
46
        # Fix up the libraries.
 
47
        cp unix/libtk$(v).a debian/tmp/usr/lib
 
48
        mv debian/tmp/usr/lib/libtk$(v).so debian/tmp/usr/lib/libtk$(v).so.1
 
49
        ln -sf libtk$(v).so.1 debian/tmp/usr/lib/libtk$(v).so
 
50
        mv debian/tmp/usr/lib/*.sh debian/tmp/usr/lib/tk$(v)
 
51
        # Fix up the include files.
 
52
        install -d debian/tmp/usr/include/tcl$(v)/tk-private/generic
 
53
        cp generic/*.h debian/tmp/usr/include/tcl$(v)/tk-private/generic
 
54
        install -d debian/tmp/usr/include/tcl$(v)/tk-private/unix
 
55
        cp unix/*.h debian/tmp/usr/include/tcl$(v)/tk-private/unix
 
56
        # Fix up the manpages.
 
57
        cd debian/tmp/usr/share/man/man1 && \
 
58
          mv wish.1 wish$(v).1
 
59
        cd debian/tmp/usr/share/man/man3 && \
 
60
          for f in *.[3n] ; do \
 
61
            mv $$f `echo $$f | sed -e 's/\.[3n]/.3tk/'`; \
 
62
          done
 
63
        rm -rf `pwd`/debian/tmp/usr/lib/tk$(v)/demos
 
64
        ln -sf ../../share/doc/tk$(v)/examples `pwd`/debian/tmp/usr/lib/tk$(v)/demos 
 
65
        # Install pkgIndex.tcl
 
66
        cp unix/pkgIndex.tcl `pwd`/debian/tmp/usr/lib/tk$(v)/
 
67
 
 
68
        touch install-stamp
 
69
 
 
70
# Build architecture-independent files here.
 
71
binary-indep: build install
 
72
        dh_testdir -i
 
73
        dh_testroot -i
 
74
        dh_movefiles -i
 
75
        dh_installdocs -i
 
76
        dh_installchangelogs -i
 
77
        dh_compress -i
 
78
        cd debian/tk$(v)-doc/usr/share/man/man3 && \
 
79
                for f in `find . -type l ! -name "*.gz"`; do \
 
80
                        linkname=`readlink $$f`; \
 
81
                        rm $$f; \
 
82
                        ln -s `echo $$linkname | sed -e 's/\.[3n]/.3tk/'`.gz $${f}.gz; \
 
83
                done
 
84
        dh_fixperms -i
 
85
        dh_installdeb -i
 
86
        dh_gencontrol -i
 
87
        dh_md5sums -i
 
88
        dh_builddeb -i
 
89
 
 
90
# Build architecture-dependent files here.
 
91
binary-arch: build install
 
92
        dh_testdir -a
 
93
        dh_testroot -a
 
94
        dh_movefiles -a
 
95
        dh_installdocs -a
 
96
        install -d `pwd`/debian/tk$(v)/usr/share/doc/tk$(v)/examples/
 
97
        cp -a library/demos/* `pwd`/debian/tk$(v)/usr/share/doc/tk$(v)/examples/
 
98
        rm -f `pwd`/debian/tk$(v)/usr/share/doc/tk$(v)/examples/license.terms
 
99
        rm -rf debian/tk$(v)-dev/usr/share/doc/tk$(v)-dev
 
100
        ln -sf tk$(v) debian/tk$(v)-dev/usr/share/doc/tk$(v)-dev
 
101
        dh_installmenu -a
 
102
        dh_installchangelogs -ptk$(v) -k changes
 
103
        dh_strip -a
 
104
        dh_compress -a -Xusr/share/doc/tk$(v)/examples/
 
105
        dh_fixperms -a
 
106
        dh_installdeb -a
 
107
        dh_makeshlibs -a -V 'tk$(v) (>= 8.3.0)'
 
108
        dh_shlibdeps -a -ldebian/tk$(v)/usr/lib
 
109
        dh_gencontrol -a
 
110
        dh_md5sums -a
 
111
        dh_builddeb -a
 
112
 
 
113
source diff:
 
114
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
 
115
 
 
116
binary: binary-indep binary-arch
 
117
.PHONY: build clean binary-indep binary-arch binary install