Hi,

> I see.  Maybe the following would be sensible.  Or maybe hard-code
> "Debian" like /usr/bin/chromium does.
> 
> diff --git i/debian/rules w/debian/rules
> index cc4981d2..83cf7a4e 100755
> --- i/debian/rules
> +++ w/debian/rules
> @@ -6,7 +6,11 @@ DEBIAN_UPSTREAM_VERSION      := $(shell echo 
> $(DEBIAN_VERSION) | sed 's/^\(.*\)-[^-]*
>  DEBIAN_REVISION              := $(shell echo $(DEBIAN_VERSION) | sed 
> 's/^.*r\([^-]*\)-.*/\1/')
>  DEBIAN_DIST          := $(shell lsb_release -ds | tr -d '()')
>  DEBIAN_DIST_NAME     := $(shell lsb_release -si)
> +ifeq (Debian,$(DEBIAN_DIST_NAME))
>  DEBIAN_DIST_VERSION  := $(shell cat /etc/debian_version)
> +else
> +DEBIAN_DIST_VERSION  := $(shell lsb_release -sr)
> +endif
>  MULTIARCH            := $(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)
>  USE_SYSTEM_FFMPEG    := 1
>  ifeq (1,$(USE_SYSTEM_FFMPEG))

Looks good to me. It may be even better to check for lsb_release and
only fall back to "Debian" and the contents of /etc/debian_version if it
is not available. I modified /usr/bin/chromium to do just that (see
attached patch) -- something similar should be possible for
debian/rules.


Best regards,
Michael
--- /usr/bin/chromium	2012-01-12 19:25:11.749989909 +0100
+++ /usr/bin/chromium	2012-01-12 19:35:59.314005728 +0100
@@ -47,10 +47,14 @@
 export CHROME_WRAPPER="`readlink -f "$0"`"
 export CHROME_DESKTOP=$APPNAME.desktop
 
-#DIST=`lsb_release -si`
-#RELEASE=`lsb_release -sr`
-DIST=Debian
-RELEASE=`cat /etc/debian_version`
+if type lsb_release > /dev/null
+then
+  DIST=`lsb_release -si`
+  RELEASE=`lsb_release -sr`
+else
+  DIST=Debian
+  RELEASE=`cat /etc/debian_version`
+fi
 
 # Set CHROME_VERSION_EXTRA visible in the About dialog and in about:version
 if [ "$DIST $RELEASE" = "$BUILD_DIST" ] ; then

Reply via email to