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

Andreas Beckmann anbe-guest at alioth.debian.org
Sun Jul 8 12:17:56 UTC 2012


Author: anbe-guest
Date: 2012-07-08 12:17:55 +0000 (Sun, 08 Jul 2012)
New Revision: 966

Modified:
   fglrx-driver/trunk/debian/changelog
   fglrx-driver/trunk/debian/rules
Log:
add support for on-the-fly renaming of debian/*{fglrx => fglrx-legacy}*

Modified: fglrx-driver/trunk/debian/changelog
===================================================================
--- fglrx-driver/trunk/debian/changelog	2012-07-08 11:27:08 UTC (rev 965)
+++ fglrx-driver/trunk/debian/changelog	2012-07-08 12:17:55 UTC (rev 966)
@@ -3,8 +3,9 @@
   [ Andreas Beckmann ]
   * Fix encoding of cs.po from 2xUTF8 to UTF8.
   * 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.
+    - Add more Provides/Conflicts/Replaces on new virtual packages.
+    - Add support for variant specific settings in debian/rules.defs.
+    - Add support for on-the-fly renaming of debian/*{fglrx => fglrx-legacy}*.
   * debian/rules get-orig-source:
     - Add support for zipped installers.
     - Add support for using the internal version as upstream version.

Modified: fglrx-driver/trunk/debian/rules
===================================================================
--- fglrx-driver/trunk/debian/rules	2012-07-08 11:27:08 UTC (rev 965)
+++ fglrx-driver/trunk/debian/rules	2012-07-08 12:17:55 UTC (rev 966)
@@ -8,6 +8,7 @@
 
 include debian/rules.defs
 MULTIARCH	?=
+legacy		?=
 
 ifeq ($(DEB_HOST_ARCH),amd64)
 arch=x86_64
@@ -23,9 +24,22 @@
 
 libdir		 = usr/lib$(if $(MULTIARCH),/$(DEB_HOST_MULTIARCH))
 
-generated=$(shell ls debian/*.in | sed s/\.in$$//g)
-generated	+= fglrx.ids
-generated	+= debian/switchlibglx
+CONTROL_PREFIXES = fglrx libfglrx libgl1-fglrx amd-opencl-icd
+ALL_CONTROL	:= $(wildcard $(patsubst %,debian/%*,$(CONTROL_PREFIXES)))
+LEGACY_CONTROL	:= $(wildcard $(patsubst %,debian/%$(legacy)*,$(CONTROL_PREFIXES)))
+RENAME_CONTROL	 = $(filter-out $(LEGACY_CONTROL),$(ALL_CONTROL))
+RENAMED_CONTROL	 = $(patsubst debian/fglrx%,debian/fglrx$(legacy)%,\
+			$(patsubst debian/libfglrx%,debian/libfglrx$(legacy)%,\
+			$(patsubst debian/libgl1-fglrx%,debian/libgl1-fglrx$(legacy)%,\
+			$(patsubst debian/amd-opencl-icd%,debian/amd-opencl-icd$(legacy)%,\
+				$(RENAME_CONTROL)))))
+TEMPLATES	:= $(wildcard debian/*.in)
+AUTOGEN		+= $(patsubst %.in,%,$(TEMPLATES))
+AUTOGEN		+= fglrx.ids
+AUTOGEN		+= debian/switchlibglx
+AUTOGEN		+= $(patsubst %.in,%,$(RENAMED_CONTROL))
+AUTOKEEP	 =
+AUTOCLEAN	 = $(filter-out $(AUTOKEEP),$(AUTOGEN))
 
 %: %.in debian/rules debian/rules.defs
 	sed -r -e 's%_VERSION_%$(upstream_version)%g' \
@@ -41,7 +55,7 @@
 override_dh_auto_clean:
 	test ! -f debian/man/Makefile || $(MAKE) -C debian/man maintainer-clean
 	rm -f LICENSE.txt
-	rm -f $(generated)
+	rm -f $(AUTOCLEAN)
 	rm -f debian/shlibs.local
 	rm -f arch/x86/usr/X11R6/lib/AMDXvBAx86.cap
 	rm -f arch/x86_64/usr/X11R6/lib64/AMDXvBAx64.cap
@@ -66,7 +80,21 @@
 debian/switchlibglx: debian/switchlibGL
 	ln $< $@
 
-override_dh_auto_configure: $(generated) compare-copyright-license
+# Renaming control files for legacy packaging
+define rename-template
+$1$$(legacy)%: $1%
+	cp -a $$< $$@
+endef
+ifneq (,$(legacy))
+$(foreach p,$(CONTROL_PREFIXES),$(eval $(call rename-template,$p)))
+endif
+
+.PHONY: autogen prepare
+autogen: $(AUTOGEN)
+
+prepare: autogen compare-copyright-license
+
+override_dh_auto_configure: prepare
 	cd debian/man && ./autogen.sh --copy
 	cd debian/man && ./configure --prefix=/usr --mandir=/usr/share/man \
 	    --with-xserver=Xorg




More information about the Pkg-fglrx-devel mailing list