[Pkg-fglrx-devel] r965 - fglrx-driver/trunk/debian

Andreas Beckmann anbe-guest at alioth.debian.org
Sun Jul 8 11:27:09 UTC 2012


Author: anbe-guest
Date: 2012-07-08 11:27:08 +0000 (Sun, 08 Jul 2012)
New Revision: 965

Modified:
   fglrx-driver/trunk/debian/changelog
   fglrx-driver/trunk/debian/rules
Log:
enhance get-orig-source target

Modified: fglrx-driver/trunk/debian/changelog
===================================================================
--- fglrx-driver/trunk/debian/changelog	2012-07-08 10:27:27 UTC (rev 964)
+++ fglrx-driver/trunk/debian/changelog	2012-07-08 11:27:08 UTC (rev 965)
@@ -5,6 +5,9 @@
   * Prepare for co-existence of fglrx-legacy-driver:
    - Add more Provides/Conflicts/Replaces on new virtual packages.
    - Add support for variant specific settings in debian/rules.defs.
+  * debian/rules get-orig-source:
+    - Add support for zipped installers.
+    - Add support for using the internal version as upstream version.
 
   [ Patrick Matthäi ]
   * Use again the signature file from fglrx itself. The imported one is only

Modified: fglrx-driver/trunk/debian/rules
===================================================================
--- fglrx-driver/trunk/debian/rules	2012-07-08 10:27:27 UTC (rev 964)
+++ fglrx-driver/trunk/debian/rules	2012-07-08 11:27:08 UTC (rev 965)
@@ -142,11 +142,13 @@
 ############################################################################
 
 ifneq (,$(filter VER=%,$(DEB_BUILD_OPTIONS)))
-NEW_UPSTREAM_VERSION=$(patsubst VER=%,%,$(filter VER=%,$(DEB_BUILD_OPTIONS)))
-INSTALLER=amd-driver-installer-$(NEW_UPSTREAM_VERSION)-x86.x86_64.run
-URL_PATH=www2.ati.com/drivers/linux
-CACHEDIR=/tmp
-endif
+INSTALLER		?= amd-driver-installer-$(NEW_UPSTREAM_VERSION)-x86.x86_64.run
+INSTALLER_ZIP		?= $(INSTALLER:.run=.zip)
+URL_PATH		?= www2.ati.com/drivers/linux
+CACHEDIR		?= /tmp
+NEW_UPSTREAM_VERSION	?= $(patsubst VER=%,%,$(filter VER=%,$(DEB_BUILD_OPTIONS)))
+INTERNAL_VERSION	:= $(shell test ! -s $(INSTALLER) || sh $(INSTALLER) --info | sed -n '/^Identification:/ s/[^0-9]*//p')
+REAL_UPSTREAM_VERSION	?= $(NEW_UPSTREAM_VERSION)
 
 get-orig-source-checks:
 	# This target needs DEB_BUILD_OPTIONS to contain the version specification
@@ -157,18 +159,18 @@
 $(INSTALLER):
 	# Make sure the .run package is in the proper place,
 	# but first try to look in the "cache".
-	# For some reason wget refuses to clobber and restarts everytime.
-	# wget $(URL_PATH)/$(INSTALLER) -c -O $(CACHEDIR)/$(INSTALLER)
-	[ -s $(CACHEDIR)/$(INSTALLER) ] || \
-	    wget $(URL_PATH)/$(INSTALLER) -c -O $(CACHEDIR)/$(INSTALLER)
-	[ -s $(CACHEDIR)/$(INSTALLER) ]
-	cp $(CACHEDIR)/$(INSTALLER) .
+	[ -s $(CACHEDIR)/$(INSTALLER) ] || [ -s $(CACHEDIR)/$(INSTALLER_ZIP) ] || \
+	    wget $(URL_PATH)/$(INSTALLER) -c -O $(CACHEDIR)/$(INSTALLER) || \
+	    wget $(URL_PATH)/$(INSTALLER_ZIP) -c -O $(CACHEDIR)/$(INSTALLER_ZIP) || \
+	[ -s $(CACHEDIR)/$(INSTALLER) ] || [ -s $(CACHEDIR)/$(INSTALLER_ZIP) ]
+	[ ! -s $(CACHEDIR)/$(INSTALLER) ] || cp -a $(CACHEDIR)/$(INSTALLER) .
+	[ -s $(INSTALLER) ] || unzip $(CACHEDIR)/$(INSTALLER_ZIP)
 
-../$(packagename)_$(NEW_UPSTREAM_VERSION).orig.tar.bz2: get-orig-source-checks $(INSTALLER)
-	mkdir $(packagename)-$(NEW_UPSTREAM_VERSION).orig
+../$(packagename)_$(REAL_UPSTREAM_VERSION).orig.tar.bz2: $(INSTALLER) debian/rules
+	rm -fr $(packagename)-$(REAL_UPSTREAM_VERSION).orig
+	sh $(INSTALLER) --extract $(packagename)-$(REAL_UPSTREAM_VERSION).orig
 	@set -x ; \
-	    cd $(packagename)-$(NEW_UPSTREAM_VERSION).orig \
-	    && /bin/sh ../$(INSTALLER) --extract . \
+	    cd $(packagename)-$(REAL_UPSTREAM_VERSION).orig \
 	    && rm -f README.distro *.sh *.exp cimle-xdgsu installer_creation_policy \
 	    && rm -rf packages setup.data \
 	    && rm -rf x4* x6* \
@@ -176,13 +178,21 @@
 	    && chmod -R a-sx,u=rwX,go=rX . \
 	    && find . -type f \( -path '*/bin/*' -o -path '*/sbin/*' -o -name '*.sh' \) -exec chmod a+x {} +
 	# Create the tarball.
-	tar -cjf $(packagename)_$(NEW_UPSTREAM_VERSION).orig.tar.bz2 \
+	tar -cjf $(packagename)_$(REAL_UPSTREAM_VERSION).orig.tar.bz2 \
 	    --owner=root --group=src \
-	    $(packagename)-$(NEW_UPSTREAM_VERSION).orig
-	mv $(packagename)_$(NEW_UPSTREAM_VERSION).orig.tar.bz2 ../
+	    $(packagename)-$(REAL_UPSTREAM_VERSION).orig
+	mv $(packagename)_$(REAL_UPSTREAM_VERSION).orig.tar.bz2 ../
 	# Cleanup.
-	rm -fr $(packagename)-$(NEW_UPSTREAM_VERSION).orig
+	rm -fr $(packagename)-$(REAL_UPSTREAM_VERSION).orig
+
+get-orig-source: get-orig-source-checks $(INSTALLER)
+	$(MAKE) -f debian/rules repack_upstream_archive
 	rm -f $(INSTALLER)
 
-.PHONY: get-orig-source
-get-orig-source: ../$(packagename)_$(NEW_UPSTREAM_VERSION).orig.tar.bz2
+repack_upstream_archive: ../$(packagename)_$(REAL_UPSTREAM_VERSION).orig.tar.bz2
+else
+get-orig-source:
+	# This target needs DEB_BUILD_OPTIONS to contain the version specification
+	# in the following form: VER=some.version.number
+endif
+.PHONY: get-orig-source repack_upstream_archive




More information about the Pkg-fglrx-devel mailing list