Sharing projects between Debian and Ubuntu

Asked by Philip Ashmore

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:
Last query:
Last reply:
Revision history for this message
Curtis Hovey (sinzui) said :
#1

lsb_release is the right way to find the distro information.

Revision history for this message
Philip Ashmore (contact-philipashmore) said :
#2

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?

Revision history for this message
Philip Ashmore (contact-philipashmore) said :
#3

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

Revision history for this message
Philip Ashmore (contact-philipashmore) said :
#4

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