~ubuntu-branches/ubuntu/lucid/xserver-xorg-video-savage/lucid

« back to all changes in this revision

Viewing changes to debian/xsfbs/xsfbs.mk

  • Committer: Bazaar Package Importer
  • Author(s): Brice Goglin
  • Date: 2008-09-05 19:37:51 UTC
  • Revision ID: james.westby@ubuntu.com-20080905193751-p16ylwnxakd1jnes
Tags: 1:2.2.1-2
Reenable 02_temporary_revert_pciaccess.diff and append all recent
pci-rework changes, closes: #483989.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
# Pass $(DH_OPTIONS) into the environment for debhelper's benefit.
22
22
export DH_OPTIONS
23
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/
 
24
# force quilt to not use ~/.quiltrc and to use debian/patches
 
25
QUILT = QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null
28
26
 
29
27
# Set up parameters for the upstream build environment.
30
28
 
121
119
# Set up the package build directory as quilt expects to find it.
122
120
.PHONY: prepare
123
121
stampdir_targets+=prepare
124
 
prepare: $(STAMP_DIR)/genscripts $(STAMP_DIR)/prepare $(STAMP_DIR)/patches $(STAMP_DIR)/log
 
122
prepare: $(STAMP_DIR)/genscripts $(STAMP_DIR)/prepare $(STAMP_DIR)/log
125
123
$(STAMP_DIR)/prepare: $(STAMP_DIR)/stampdir
126
 
        if [ ! -e $(STAMP_DIR)/patches ]; then \
127
 
                mkdir $(STAMP_DIR)/patches; \
128
 
                ln -s $(STAMP_DIR)/patches .pc; \
129
 
                echo 2 >$(STAMP_DIR)/patches/.version; \
130
 
        fi; \
131
124
        if [ ! -e $(STAMP_DIR)/log ]; then \
132
125
                mkdir $(STAMP_DIR)/log; \
133
126
        fi; \
134
 
        if [ -e debian/patches ] && [ ! -e patches ]; then \
135
 
                ln -s debian/patches patches; \
136
 
        fi; \
137
127
        >$@
138
128
 
139
129
# Apply all patches to the upstream source.
162
152
 
163
153
# Revert all patches to the upstream source.
164
154
.PHONY: unpatch
165
 
unpatch:
 
155
unpatch: $(STAMP_DIR)/prepare
166
156
        rm -f $(STAMP_DIR)/patch
167
157
        @echo -n "Unapplying patches..."; \
168
 
        if [ -e $(STAMP_DIR)/patches/applied-patches ]; then \
 
158
        if $(QUILT) applied >/dev/null 2>/dev/null; then \
169
159
          if $(QUILT) pop -a -v >$(STAMP_DIR)/log/unpatch 2>&1; then \
170
160
            cat $(STAMP_DIR)/log/unpatch; \
171
161
            echo "successful."; \
192
182
.PHONY: xsfclean
193
183
xsfclean: cleanscripts unpatch
194
184
        dh_testdir
195
 
        rm -f .pc patches
 
185
        rm -rf .pc
196
186
        rm -rf $(STAMP_DIR) $(SOURCE_DIR)
197
187
        rm -rf imports
198
188
        dh_clean debian/shlibs.local \
199
 
                 debian/MANIFEST.$(ARCH) debian/MANIFEST.$(ARCH).new \
200
189
                 debian/po/pothead
201
190
 
202
191
# Generate the debconf templates POT file header.
209
198
updatepo: debian/po/pothead
210
199
        debian/scripts/debconf-updatepo --pot-header=pothead --verbose
211
200
 
212
 
# Use the MANIFEST files to determine whether we're shipping everything we
213
 
# expect to ship, and not shipping anything we don't expect to ship.
214
 
.PHONY: check-manifest
215
 
stampdir_targets+=check-manifest
216
 
check-manifest: $(STAMP_DIR)/check-manifest
217
 
$(STAMP_DIR)/check-manifest: $(STAMP_DIR)/install
218
 
        # Compare manifests.
219
 
        (cd debian/tmp && find -type f | LC_ALL=C sort | cut -c3-) \
220
 
          >debian/MANIFEST.$(ARCH).new
221
 
        # Construct MANIFEST files from MANIFEST.$(ARCH).in and
222
 
        # MANIFEST.$(ARCH).all or MANIFEST.all.
223
 
        if expr "$(findstring -DBuildFonts=NO,$(IMAKE_DEFINES))" \
224
 
          : "-DBuildFonts=NO" >/dev/null 2>&1; then \
225
 
          LC_ALL=C sort -u debian/MANIFEST.$(ARCH).in >debian/MANIFEST.$(ARCH); \
226
 
        else \
227
 
          if [ -e debian/MANIFEST.$(ARCH).all ]; then \
228
 
            LC_ALL=C sort -u debian/MANIFEST.$(ARCH).in debian/MANIFEST.$(ARCH).all >debian/MANIFEST.$(ARCH); \
229
 
          else \
230
 
            LC_ALL=C sort -u debian/MANIFEST.$(ARCH).in debian/MANIFEST.all >debian/MANIFEST.$(ARCH); \
231
 
          fi; \
232
 
        fi
233
 
        # Confirm that the installed file list has not changed.
234
 
        if [ -e debian/MANIFEST.$(ARCH) ]; then \
235
 
          if ! cmp -s debian/MANIFEST.$(ARCH) debian/MANIFEST.$(ARCH).new; then \
236
 
            diff -U 0 debian/MANIFEST.$(ARCH) debian/MANIFEST.$(ARCH).new || DIFFSTATUS=$$?; \
237
 
            case $${DIFFSTATUS:-0} in \
238
 
              0) ;; \
239
 
              1) if [ -n "$$IGNORE_MANIFEST_CHANGES" ]; then \
240
 
                   echo 'MANIFEST check failed; ignoring problem because \$$IGNORE_MANIFEST_CHANGES set' >&2; \
241
 
                   echo 'Please ensure that the package maintainer has an up-to-date version of the' >&2; \
242
 
                   echo 'MANIFEST.$(ARCH).in file.' >&2; \
243
 
                 else \
244
 
                   echo 'MANIFEST check failed; please see debian/README' >&2; \
245
 
                   exit 1; \
246
 
                 fi; \
247
 
                 ;; \
248
 
              *) echo "diff reported unexpected exit status $$DIFFSTATUS when performing MANIFEST check" >&2; \
249
 
                 exit 1; \
250
 
                 ;; \
251
 
            esac; \
252
 
          fi; \
253
 
        fi
254
 
        >$@
255
 
 
256
 
# Because we build (and install) different files depending on whether or not
257
 
# any architecture-independent packages are being created, the list of files we
258
 
# expect to see will differ; see the discussion of the "build" target above.
259
 
.PHONY: check-manifest-arch check-manifest-indep
260
 
check-manifest-arch: IMAKE_DEFINES+= -DBuildSpecsDocs=NO -DBuildFonts=NO -DInstallHardcopyDocs=NO
261
 
check-manifest-arch: check-manifest
262
 
check-manifest-indep: check-manifest
263
 
 
264
201
# Remove files from the upstream source tree that we don't need, or which have
265
202
# licensing problems.  It must be run before creating the .orig.tar.gz.
266
203
#
272
209
        dh_testdir
273
210
        grep -rvh '^#' debian/prune/ | xargs --no-run-if-empty rm -rf
274
211
 
275
 
# Change to what should be the correct directory, ensure it is, and if
276
 
# so, create the .orig.tar.gz file.  Exclude the debian directory and its
277
 
# contents, and any .svn directories and their contents (so that we can safely
278
 
# build an .orig.tar.gz from SVN checkout, not just an export).
279
 
#
280
 
# Note: This rule is for Debian package maintainers' convenience, and is not
281
 
# needed for conventional build scenarios.
282
 
#
283
 
# This rule *IS* the recommended method for creating a new .orig.tar.gz file,
284
 
# for the rare situations when one is needed.
285
 
.PHONY: make-orig-tar-gz
286
 
make-orig-tar-gz: clean prune-upstream-tree
287
 
        ( cd .. \
288
 
          && if [ $(shell basename $(CURDIR)) != $(SOURCE_NAME)-$(NO_EPOCH_VER) ]; then \
289
 
            echo "Our current working directory has the wrong name. Renaming..." >&2; \
290
 
                mv $(CURDIR) $(SOURCE_NAME)-$(NO_EPOCH_VER); \
291
 
          fi; \
292
 
            tar --exclude=debian --exclude=debian/* \
293
 
                --exclude=.svn --exclude=.svn/* \
294
 
                -cf - $(SOURCE_NAME)-$(NO_EPOCH_VER) \
295
 
            | gzip -9 >$(SOURCE_NAME)_$(NO_EPOCH_VER).orig.tar.gz; \
296
 
           )
297
 
 
298
212
# Verify that there are no offsets or fuzz in the patches we apply.
299
213
#
300
214
# Note: This rule is for Debian package maintainers' convenience, and is not
373
287
endif
374
288
 
375
289
.PHONY: serverabi
376
 
serverabi:
 
290
serverabi: install
377
291
ifeq ($(SERVERMINVERS),)
378
292
        @echo error: xserver-xorg-dev needs to be installed
379
293
        @exit 1
383
297
        echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars
384
298
endif
385
299
 
386
 
include debian/xsfbs/xsfbs-autoreconf.mk
387
 
 
388
300
# vim:set noet ai sts=8 sw=8 tw=0: