[ gpsdrive ] improvement to debian build rules

Hamish hamish_b at yahoo.com
Mon Jan 26 13:47:06 AKST 2009


Joerg wrote:
> It was on intention to exclude on availability on the
> platform and not on installed package.
>
> I first thought of phrasing it different: 
> 	if debian-etch; then 
> 		exclude some stuff
> 	fi
> but couldn't find a way to easily decide which revision I have and if
> it's debian or ubuntu. So the closest was to ask if the system can
> install gda3-dev.

ah, ok.

but I think it's a bit of a moot point- debian/control build-depends
on libgda3-dev unless you have patched it somehow based on the distro.
So it should abort before it starts based on the missing -dev package.

And if you have patched debian/control somehow I think it is much better
to also patch DefineOptions.cmake at the same time, not do tricky tests
in debian/rules.


what's ubuntu's equivalent of /etc/debian_version ?

if [ -e /etc/debian_version ] ; then 
  # is debian
  if [ `cat /etc/debian_version` = "4.0" ] ; then
    echo "is etch"
  fi
else
  ubuntu...
fi


> I even thought about putting this part into a seperate shell script.
> ANd yes it works at least on debian-etch vs. Debian-lenny here on the
> build-cluster.

SVN:
  if apt-cache search libgda3-dev | grep -q libgda3-dev ; echo $? ; then

AFAICT the if/then test is based on the exit status of the last result:
'echo $?' always returns with exit status 0 regardless of what is printed
to stdout by it.


Hamish



      



More information about the GPSdrive mailing list