~ubuntu-branches/debian/lenny/groff/lenny

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-08-26 09:27:51 UTC
  • mfrom: (4.1.5 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080826092751-o0e973nopyv475st
Tags: 1.18.1.1-21
* Build-depend on xutils-dev rather than xutils (thanks, Daniel Schepler;
  closes: #485203).
* Update DEB_BUILD_OPTIONS parsing code from policy 3.8.0.
* Build-depend on x11proto-core-dev rather than x-dev (thanks, Lintian).
* Use /bin/bash for eqn2graph and pic2graph due to use of $RANDOM, even
  though that's only a fallback in case mktemp fails (closes: #489604).
* Display more helpful output if a device was not found but is known to be
  one of the devices in the groff binary package rather than groff-base.
* Define .PS and .PE to empty strings in pic output to inhibit -wmac
  warnings (closes: #495713); similarly, define .EQ and .EN to empty
  strings in eqn output.
* Add information to debian/copyright (a file from newer groff releases
  and a clarifying e-mail) noting that upstream has relicensed the groff
  documentation under the terms of the GPL (closes: #374569).
* Remove some fallback constructs from groffer that aren't necessary with
  POSIX shells and that break dash (closes: #489604).

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
CC  = gcc
8
8
CXX = g++
9
 
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
9
ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
10
10
CFLAGS = -O2 -g -Wall
11
11
else
12
12
CFLAGS = -g -Wall
27
27
devbase = ascii ascii8 latin1 nippon ps utf8
28
28
devx11  = X100 X100-12 X75 X75-12
29
29
 
30
 
ifeq (,$(findstring no-groff-x11,$(DEB_BUILD_OPTIONS)))
 
30
ifeq (,$(filter no-groff-x11,$(DEB_BUILD_OPTIONS)))
31
31
GROFF_X11 := yes
32
32
else
33
33
GROFF_X11 := no
41
41
BINARY_TARGETS := binary-groff-base binary-groff
42
42
DH_EXCLUDE     := -Ngroff-x11
43
43
 
 
44
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
45
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
46
 
 
47
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
 
48
  confflags += --build=$(DEB_HOST_GNU_TYPE)
 
49
else
 
50
  confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
 
51
endif
 
52
 
44
53
configure: configure-stamp
45
54
configure-stamp:
46
55
        if [ ! -f Makefile.clean ]; then cp -p Makefile Makefile.clean; fi
47
56
        -rm -f config.log config.cache
48
57
        CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" \
49
58
                PSPRINT=lpr PAGE=A4 \
50
 
                ./configure --prefix=/usr --mandir=\$${prefix}/share/man \
 
59
                ./configure $(confflags) \
 
60
                            --prefix=/usr --mandir=\$${prefix}/share/man \
51
61
                            --infodir=\$${prefix}/share/info --enable-multibyte
52
62
        touch $@
53
63
 
84
94
        rm -f man/index.* 
85
95
        find . -name tags | xargs -r rm -f
86
96
        find . -name '*.cc.combine' | xargs -r rm -f
87
 
        -$(MAKE) -C doc -i extraclean
88
 
        -$(MAKE) -C src/xditview extraclean
89
 
        -$(MAKE) -i realclean extraclean
 
97
        [ ! -f doc/Makefile ] || $(MAKE) -C doc -i extraclean
 
98
        [ ! -f src/xditview/Makefile ] || $(MAKE) -C src/xditview extraclean
 
99
        if [ -f Makefile ] && [ -f Makefile.clean ]; then \
 
100
                $(MAKE) -i realclean extraclean; \
 
101
        fi
90
102
        rm -f src/xditview/Imakefile src/xditview/Makefile
91
103
        dh_clean configure-stamp build-stamp
92
104
        rm -f debian/groff-base.files debian/groff-base.links
151
163
        # 'make install' creates this directory when installing documentation.
152
164
        dh_link usr/share/doc/groff-base usr/share/doc/groff
153
165
        dh_installdocs -Xcopyright
 
166
        # Move non-English manual pages to proper locations
 
167
        mv $(gtmp)/usr/share/man/man7/groff_mmse.7 \
 
168
           $(gtmp)/usr/share/man/sv/man7/
154
169
ifeq ($(GROFF_X11),yes)
155
170
        install -m644 src/xditview/ChangeLog \
156
171
                      $(gtmp)/usr/share/doc/groff/ChangeLog.gxditview