-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eddy Petrişor wrote:
> Package: fglrx-driver
> Version: 8.31.5-1
> Severity: normal
> Tags: patch
> 
> Hello,

Hello again,

Some clarifications about this patch

> I read the debian README.hacking and realized that instead of a big
> chunck of that file a get-orig-source[1] target in debian/rules could
> be created (See Debian Policy 4.9), so I implemented it.
> 
> Patch is attached. It is just a patch to the rules file, the
> README.hacking file is not touched, just the rules file.
> 
> Please include it in the next release of the package.

This will allow running a command like:

debian/rules DEB_BUILD_OPTIONS='VER=8.33.6' get-orig-source

which will:
- - check if we are in the root of the package
- - check if VER is specified; I opted for this format since
DEB_BUILD_OPTIONS is the only suitable standardized method of passing
configuration options to the makefile. If you feel like it, you can use
directly some variable like DEB_NEW_UPSTREAM_VERSION
- - download ati-driver-installer-8.33.6-x86.x86_64.run from ati's site in
the CACHEDIR (/tmp) if the file is not there yet
- - copy the installer file in the current directory
- - create the orig tarball for the specified version which will be placed
in the .. directory.

Note that temporary data is vehiculated in the current directory, but is
cleaned up at the end of the target execution as the policy requires for
get-orig-source.

> [1] http://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules
> 
> 
> -- System Information:
> Debian Release: 4.0
>   APT prefers testing
>   APT policy: (900, 'testing')
> Architecture: amd64 (x86_64)
> Shell:  /bin/sh linked to /bin/bash
> Kernel: Linux 2.6.18-3-amd64
> Locale: LANG=ro_RO.UTF-8, LC_CTYPE=ro_RO.UTF-8 (charmap=UTF-8)
> 
> 
> ------------------------------------------------------------------------
> 
> diff -rN -u rules.orig rules
> --- rules.orig        2007-02-05 02:48:31.000000000 +0200
> +++ rules     2007-02-05 02:48:31.000000000 +0200
> @@ -41,6 +41,13 @@
>  PKG_kernel_src  := fglrx-kernel-src
>  PKG_control     := fglrx-control
>  
> +ifneq (,$(filter VER=%,$(DEB_BUILD_OPTIONS)))
> +     NEW_UPSTREAM_VERSION := $(subst VER=,,$(filter 
> VER=%,$(DEB_BUILD_OPTIONS)))
> +     INSTALLER := ati-driver-installer-$(NEW_UPSTREAM_VERSION)-x86.x86_64.run
> +     URL_PATH := 
> https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux
> +     CACHEDIR := /tmp
> +endif
> +
>  build: extra_src/panel/fireglcontrol debian/man/Makefile
>       dh_testdir
>       # build man pages
> @@ -231,4 +238,56 @@
>  
>  binary-indep: build
>  
> -.PHONY: binary binary-arch binary-indep build clean distclean
> +get-orig-source-checks:
> +
> +     # this target needs DEB_BUILD_OPTIONS to contain the version 
> specification
> +     # in the following form: VER=some.version.number
> +
> +     (if [ -z "$(NEW_UPSTREAM_VERSION)" ] ; \
> +      then \
> +       echo "Version not defined" ; \
> +       exit 1 ; \
> +      fi)
> +
> +     # if dpkg-parsechangelog fails, we're not running
> +     #the command from the proper place
> +     (if [ -z "$(UPSTREAM_VERSION)" ] ; \
> +      then \
> +       echo "Run this command from the root of the $(PKG_driver) package" ; \
> +       exit 1 ; \
> +      fi)
> +
> +$(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)
> +
> +     [ -f $(CACHEDIR)/$(INSTALLER) ] || wget $(URL_PATH)/$(INSTALLER) -c -O 
> $(CACHEDIR)/$(INSTALLER)
> +     cp $(CACHEDIR)/$(INSTALLER) .
> +
> +get-orig-source: ../$(PKG_driver)_$(NEW_UPSTREAM_VERSION).orig.tar.gz
> +
> +../$(PKG_driver)_$(NEW_UPSTREAM_VERSION).orig.tar.gz: get-orig-source-checks 
> $(INSTALLER)
> +
> +     (mkdir $(PKG_driver)-$(NEW_UPSTREAM_VERSION).orig \
> +      && cd $(PKG_driver)-$(NEW_UPSTREAM_VERSION).orig \
> +      && /bin/sh ../$(INSTALLER) --extract . \
> +      && rm -f README.distro *.sh \
> +      && rm -fr packages setup.data x4* \
> +      && rm -f arch/*/lib/modules/fglrx/fglrx.*.o \
> +      && rm -f x*/usr/X11R6/bin/fireglcontrolpanel \
> +      && rmdir x*/usr/X11R6/bin)
> +
> +     # create the tarball
> +     (tar c $(PKG_driver)-$(NEW_UPSTREAM_VERSION).orig \
> +      | gzip --best --rsyncable > 
> $(PKG_driver)_$(NEW_UPSTREAM_VERSION).orig.tar.gz \
> +      && mv $(PKG_driver)_$(NEW_UPSTREAM_VERSION).orig.tar.gz ../)
> +
> +     # cleanup
> +     rm -fr $(PKG_driver)-$(NEW_UPSTREAM_VERSION).orig && \
> +     rm $(INSTALLER)
> +
> +.PHONY: binary binary-arch binary-indep build clean distcleam 
> get-orig-source get-orig-source-checks
> 


- --
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFxsvAY8Chqv3NRNoRAtDNAKCslFAS2BbQMxhF+wqcGFkOmh7eOACfSOQx
upxDzJd9l5DPjEGqGISIi2s=
=UK9+
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to