~ubuntu-branches/ubuntu/gutsy/imagemagick/gutsy-updates

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2007-02-10 19:25:25 UTC
  • mfrom: (4.1.8 feisty)
  • Revision ID: james.westby@ubuntu.com-20070210192525-608ho6x9t3kz1ol9
Tags: 7:6.2.4.5.dfsg1-0.14
* Non-maintainer upload.
* coders/palm.c: Fix regression introduced in patch for CVE-2006-5456.
  Avoid bogus second read in macro call. Patch thanks to Vladimir
  Nadvornik. (CVE-2007-0770) Closes: #410435

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
# This is the debhelper compatability version o t2use.
9
9
export DH_COMPAT=3
10
10
 
 
11
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
12
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
13
 
11
14
IMAGEMAGICKVERSION=6.2.4
12
15
 
13
16
ifndef PERL
32
35
        --without-fpx \
33
36
        --without-perl \
34
37
        --with-perl-options='INSTALLDIRS=vendor' \
35
 
        --x-includes=/usr/X11R6/include \
36
 
        --x-libraries=/usr/X11R6/lib
 
38
        --x-includes=/usr/include/X11 \
 
39
        --x-libraries=/usr/lib/X11
37
40
 
38
41
        # Patch the generated libtool to avoid passing -rpath when linking,
39
42
        # and to explicitly link libraries against the libraries they
53
56
                LD_RUN_PATH= \
54
57
                EXTRALIBS='-L../magick/.libs -L/usr/lib -lMagick -L/usr/X11R6/lib -L/usr/lib -L/usr/lib -llcms -ltiff -lfreetype -ljpeg -lpng -lXext -lSM -lICE -lX11 -lbz2 -lxml2 -lz' \
55
58
                LDLOADLIBS='-L../magick/.libs -L/usr/lib -lMagick -L/usr/X11R6/lib -L/usr/lib -L/usr/lib -llcms -ltiff -lfreetype -ljpeg -lpng -lXext -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm -lpthread'
 
59
 
 
60
        # Remove duplicate lib entries that ended up in --ldflags by mistake.   
 
61
        sed -ie '/--ldflags/,+1s/[[:space:]]-l[^[:space:]]\+//g' \
 
62
                "$(CURDIR)/magick/Magick-config"
 
63
 
56
64
        touch build-stamp
57
65
 
 
66
check: check-stamp
 
67
check-stamp: build-stamp
 
68
        dh_testdir
 
69
 
 
70
        # Only run the testsuite to get more info in the build logs for now,
 
71
        # but don't make a failing testsuite fail the whole build. Change it
 
72
        # to a fatal error only once we've got an estimate on how harmful
 
73
        # that would be.
 
74
        @if test "$(DEB_HOST_GNU_TYPE)" = "$(DEB_BUILD_GNU_TYPE)"; then \
 
75
                unset DISPLAY; \
 
76
                LD_LIBRARY_PATH="$(CURDIR)/magick/.libs:$(CURDIR)/wand/.libs:$(CURDIR)/Magick++/lib/.libs:$$LD_LIBRARY_PATH" \
 
77
                $(MAKE) check LD_RUN_PATH= && echo "*** Testsuite succeeded ***" || echo "*** Testsuite failed ***"; \
 
78
        else \
 
79
                echo "Skipping regression tests because we appear to be cross-compiling"; \
 
80
        fi
 
81
 
 
82
        touch check-stamp
58
83
clean:
59
84
        dh_testdir
60
85
        dh_testroot
90
115
        -cp `pwd`/magick/Magick-config.1 $(CURDIR)/debian/imagemagick/usr/share/man/man1/
91
116
        -find $(CURDIR)/debian -type f -name .packlist | xargs rm -f
92
117
 
 
118
        # Duplicate. License file is already included in the doc dir.
 
119
        -rm "$(CURDIR)"/debian/imagemagick/usr/share/ImageMagick-$(IMAGEMAGICKVERSION)/LICENSE
 
120
 
93
121
# Use x-terninal emulator for editing (Bug #132947)     
94
122
#
95
123
        rm $(CURDIR)/debian/imagemagick/usr/lib/ImageMagick-$(IMAGEMAGICKVERSION)/config/delegates.xml
113
141
#        find $(CURDIR)/debian/libmagick9 -empty | xargs rmdir; \
114
142
#       done
115
143
 
 
144
clean-tarball: 
 
145
        # Nuke logo binaries
 
146
        rm -f images/configure.jpg images/logo.jpg images/logo.eps images/examples.jpg \
 
147
                www/Magick++/ImageMagick.png
 
148
        # Nuke the LogoImage define
 
149
        perl -pi -e 'BEGIN{undef $$/;} s/LogoImage\[\]\s+=\s+\{[^\}]+\}/LogoImage[] = {}/s' \
 
150
                coders/magick.c
 
151
 
 
152
 
116
153
# Build architecture-independent files here.
117
154
binary-indep: build install
118
155
# We have nothing to do by default.
119
156
 
120
157
 
121
158
# Build architecture-dependent files here.
122
 
binary-arch: build install
 
159
binary-arch: build check install
123
160
        dh_testdir
124
161
        dh_testroot
125
162
        dh_installdocs