Sharing projects between Debian and Ubuntu

Asked by Philip Ashmore on 2012-07-07

I've written some c/c++/automake packages in SourceForge specifically so that they can be built for Debian and Ubuntu.

They all include a top-level make file, so that someone can
   make -j7 release ubuntu
and end up with packages they can install under the "build" directory.

These projects include a "debian" folder but Debians and Ubuntus requirements for the "debian/changelog" file are different.

Is there a standard way to handle this?
For instance, I could use lsb_release in configure to figure out which distribution the package is building on.

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Philip Ashmore
Solved:
2012-07-08
Last query:
2012-07-08
Last reply:
2012-07-08
Curtis Hovey (sinzui) said : #1

lsb_release is the right way to find the distro information.

But then I'd have a dependency on lsb_release - is that cross-platform?
It just occurred to me that libtool, a package I need anyway, has a --help option:
On Debian:
$ libtool --help | grep 'libtool:' | awk '{ print $5; }'
> Debian-2.4.2-1.1
On Ubuntu:
> Debian-2.4.2-1ubuntu1

Is this difference something that's unique to Ubuntu, or is it common among Debian derivatives?

$ libtool --help | grep 'libtool:' | sed -e 's| |\n|g' | grep Debian
is more robust - it doesn't depend on libtool being Gnu libtool.

I guess I've answered my own question - thanks for your answer anyway.