~ubuntu-branches/ubuntu/oneiric/libxss/oneiric

« back to all changes in this revision

Viewing changes to debian/xsfbs/xsfbs.mk

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau, Brice Goglin, Julien Cristau
  • Date: 2008-03-21 12:26:06 UTC
  • mfrom: (1.1.5 upstream) (2.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20080321122606-uyew95ann2qy8jba
Tags: 1:1.1.3-1
[ Brice Goglin ]
* Add upstream URL to debian/copyright.
* Replace the obsolete ${Source-Version} with ${binary:Version}.

[ Julien Cristau ]
* New upstream release.
* Update debian/copyright from upstream's new COPYING file.
* Remove Branden from Uploaders with his permission, and add myself.
* Don't build-depend on packages with a -1 debian revision.
* Bump Standards-Version to 3.7.3.
* Drop the XS- prefix from Vcs-* control fields.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
# $Id$
3
2
 
4
 
# Debian rules file for xorg-x11 source package
 
3
# Debian X Strike Force Build System (XSFBS): Make portion
5
4
 
6
5
# Copyright 1996 Stephen Early
7
6
# Copyright 1997 Mark Eichin
8
 
# Copyright 1998-2005 Branden Robinson
 
7
# Copyright 1998-2005, 2007 Branden Robinson
9
8
# Copyright 2005 David Nusinow
10
9
#
11
10
# Licensed under the GNU General Public License, version 2.  See the file
22
21
# Pass $(DH_OPTIONS) into the environment for debhelper's benefit.
23
22
export DH_OPTIONS
24
23
 
 
24
# force quilt to not use ~/.quiltrc
 
25
QUILT = quilt --quiltrc /dev/null
 
26
# force QUILT_PATCHES to the default in case it is exported in the environment
 
27
QUILT_PATCHES = patches/
 
28
 
25
29
# Set up parameters for the upstream build environment.
26
30
 
27
31
# Determine (source) package name from Debian changelog.
127
131
        if [ ! -e $(STAMP_DIR)/log ]; then \
128
132
                mkdir $(STAMP_DIR)/log; \
129
133
        fi; \
130
 
        if [ ! -e patches ]; then \
 
134
        if [ -e debian/patches ] && [ ! -e patches ]; then \
131
135
                ln -s debian/patches patches; \
132
136
        fi; \
133
137
        >$@
141
145
                echo "Couldn't find quilt. Please install it or add it to the build-depends for this package."; \
142
146
                exit 1; \
143
147
        fi; \
144
 
        if quilt next; then \
 
148
        if $(QUILT) next >/dev/null 2>&1; then \
145
149
          echo -n "Applying patches..."; \
146
 
          if quilt push -a -v >$(STAMP_DIR)/log/patch 2>&1; then \
 
150
          if $(QUILT) push -a -v >$(STAMP_DIR)/log/patch 2>&1; then \
 
151
            cat $(STAMP_DIR)/log/patch; \
147
152
            echo "successful."; \
148
153
          else \
 
154
            cat $(STAMP_DIR)/log/patch; \
149
155
            echo "failed! (check $(STAMP_DIR)/log/patch for details)"; \
150
156
            exit 1; \
151
157
          fi; \
160
166
        rm -f $(STAMP_DIR)/patch
161
167
        @echo -n "Unapplying patches..."; \
162
168
        if [ -e $(STAMP_DIR)/patches/applied-patches ]; then \
163
 
          if quilt pop -a -v >$(STAMP_DIR)/log/unpatch 2>&1; then \
 
169
          if $(QUILT) pop -a -v >$(STAMP_DIR)/log/unpatch 2>&1; then \
 
170
            cat $(STAMP_DIR)/log/unpatch; \
164
171
            echo "successful."; \
165
172
          else \
 
173
            cat $(STAMP_DIR)/log/unpatch; \
166
174
            echo "failed! (check $(STAMP_DIR)/log/unpatch for details)"; \
167
175
            exit 1; \
168
176
          fi; \
188
196
        rm -rf $(STAMP_DIR) $(SOURCE_DIR)
189
197
        rm -rf imports
190
198
        dh_clean debian/shlibs.local \
191
 
                 debian/MANIFEST.$(ARCH) debian/MANIFEST.$(ARCH).new \
192
199
                 debian/po/pothead
193
200
 
194
201
# Generate the debconf templates POT file header.
201
208
updatepo: debian/po/pothead
202
209
        debian/scripts/debconf-updatepo --pot-header=pothead --verbose
203
210
 
204
 
# Use the MANIFEST files to determine whether we're shipping everything we
205
 
# expect to ship, and not shipping anything we don't expect to ship.
206
 
.PHONY: check-manifest
207
 
stampdir_targets+=check-manifest
208
 
check-manifest: $(STAMP_DIR)/check-manifest
209
 
$(STAMP_DIR)/check-manifest: $(STAMP_DIR)/install
210
 
        # Compare manifests.
211
 
        (cd debian/tmp && find -type f | LC_ALL=C sort | cut -c3-) \
212
 
          >debian/MANIFEST.$(ARCH).new
213
 
        # Construct MANIFEST files from MANIFEST.$(ARCH).in and
214
 
        # MANIFEST.$(ARCH).all or MANIFEST.all.
215
 
        if expr "$(findstring -DBuildFonts=NO,$(IMAKE_DEFINES))" \
216
 
          : "-DBuildFonts=NO" >/dev/null 2>&1; then \
217
 
          LC_ALL=C sort -u debian/MANIFEST.$(ARCH).in >debian/MANIFEST.$(ARCH); \
218
 
        else \
219
 
          if [ -e debian/MANIFEST.$(ARCH).all ]; then \
220
 
            LC_ALL=C sort -u debian/MANIFEST.$(ARCH).in debian/MANIFEST.$(ARCH).all >debian/MANIFEST.$(ARCH); \
221
 
          else \
222
 
            LC_ALL=C sort -u debian/MANIFEST.$(ARCH).in debian/MANIFEST.all >debian/MANIFEST.$(ARCH); \
223
 
          fi; \
224
 
        fi
225
 
        # Confirm that the installed file list has not changed.
226
 
        if [ -e debian/MANIFEST.$(ARCH) ]; then \
227
 
          if ! cmp -s debian/MANIFEST.$(ARCH) debian/MANIFEST.$(ARCH).new; then \
228
 
            diff -U 0 debian/MANIFEST.$(ARCH) debian/MANIFEST.$(ARCH).new || DIFFSTATUS=$$?; \
229
 
            case $${DIFFSTATUS:-0} in \
230
 
              0) ;; \
231
 
              1) if [ -n "$$IGNORE_MANIFEST_CHANGES" ]; then \
232
 
                   echo 'MANIFEST check failed; ignoring problem because \$$IGNORE_MANIFEST_CHANGES set' >&2; \
233
 
                   echo 'Please ensure that the package maintainer has an up-to-date version of the' >&2; \
234
 
                   echo 'MANIFEST.$(ARCH).in file.' >&2; \
235
 
                 else \
236
 
                   echo 'MANIFEST check failed; please see debian/README' >&2; \
237
 
                   exit 1; \
238
 
                 fi; \
239
 
                 ;; \
240
 
              *) echo "diff reported unexpected exit status $$DIFFSTATUS when performing MANIFEST check" >&2; \
241
 
                 exit 1; \
242
 
                 ;; \
243
 
            esac; \
244
 
          fi; \
245
 
        fi
246
 
        >$@
247
 
 
248
 
# Because we build (and install) different files depending on whether or not
249
 
# any architecture-independent packages are being created, the list of files we
250
 
# expect to see will differ; see the discussion of the "build" target above.
251
 
.PHONY: check-manifest-arch check-manifest-indep
252
 
check-manifest-arch: IMAKE_DEFINES+= -DBuildSpecsDocs=NO -DBuildFonts=NO -DInstallHardcopyDocs=NO
253
 
check-manifest-arch: check-manifest
254
 
check-manifest-indep: check-manifest
255
 
 
256
211
# Remove files from the upstream source tree that we don't need, or which have
257
212
# licensing problems.  It must be run before creating the .orig.tar.gz.
258
213
#
264
219
        dh_testdir
265
220
        grep -rvh '^#' debian/prune/ | xargs --no-run-if-empty rm -rf
266
221
 
267
 
# Change to what should be the correct directory, ensure it is, and if
268
 
# so, create the .orig.tar.gz file.  Exclude the debian directory and its
269
 
# contents, and any .svn directories and their contents (so that we can safely
270
 
# build an .orig.tar.gz from SVN checkout, not just an export).
271
 
#
272
 
# Note: This rule is for Debian package maintainers' convenience, and is not
273
 
# needed for conventional build scenarios.
274
 
#
275
 
# This rule *IS* the recommended method for creating a new .orig.tar.gz file,
276
 
# for the rare situations when one is needed.
277
 
.PHONY: make-orig-tar-gz
278
 
make-orig-tar-gz: clean prune-upstream-tree
279
 
        ( cd .. \
280
 
          && if [ $(shell basename $(CURDIR)) != $(SOURCE_NAME)-$(NO_EPOCH_VER) ]; then \
281
 
            echo "Our current working directory has the wrong name. Renaming..." >&2; \
282
 
                mv $(CURDIR) $(SOURCE_NAME)-$(NO_EPOCH_VER); \
283
 
          fi; \
284
 
            tar --exclude=debian --exclude=debian/* \
285
 
                --exclude=.svn --exclude=.svn/* \
286
 
                -cf - $(SOURCE_NAME)-$(NO_EPOCH_VER) \
287
 
            | gzip -9 >$(SOURCE_NAME)_$(NO_EPOCH_VER).orig.tar.gz; \
288
 
           )
289
 
 
290
222
# Verify that there are no offsets or fuzz in the patches we apply.
291
223
#
292
224
# Note: This rule is for Debian package maintainers' convenience, and is not
296
228
        @echo -n "Auditing patches..."; \
297
229
        >$(STAMP_DIR)/log/patch; \
298
230
        FUZZY=; \
299
 
        while [ -n "$$(quilt next)" ]; do \
300
 
          RESULT=$$(quilt push -v | tee -a $(STAMP_DIR)/log/patch | grep ^Hunk | sed 's/^Hunk.*\(succeeded\|FAILED\).*/\1/');\
 
231
        while [ -n "$$($(QUILT) next)" ]; do \
 
232
          RESULT=$$($(QUILT) push -v | tee -a $(STAMP_DIR)/log/patch | grep ^Hunk | sed 's/^Hunk.*\(succeeded\|FAILED\).*/\1/');\
301
233
          case "$$RESULT" in \
302
234
            succeeded) \
303
 
              echo "fuzzy patch: $$(quilt top)" \
304
 
                | tee -a $(STAMP_DIR)/log/$$(quilt top); \
 
235
              echo "fuzzy patch: $$($(QUILT) top)" \
 
236
                | tee -a $(STAMP_DIR)/log/$$($(QUILT) top); \
305
237
              FUZZY=yes; \
306
238
              ;; \
307
239
            FAILED) \
308
 
              echo "broken patch: $$(quilt next)" \
309
 
                | tee -a $(STAMP_DIR)/log/$$(quilt next); \
 
240
              echo "broken patch: $$($(QUILT) next)" \
 
241
                | tee -a $(STAMP_DIR)/log/$$($(QUILT) next); \
310
242
              exit 1; \
311
243
              ;; \
312
244
          esac; \