On Tue, Apr 24, 2007 at 03:59:56AM -0700, John Pye wrote: > I'm trying to get my head around package building with Debian, coming > from my earlier experiences with RPMs.
Welcome to Debian! > One technique which I found quite good with RPMs was the ability to > create a tarball that *included* the necessary .spec file, and then > just typing "rpmbuild -ta mytarball.tar.bz2". This would extract the > spec file from the tarball and then proceed with the build in my > special build directory (/usr/src/rpm or wherever). > > Is there any comparable way of building a .deb package from a single > tarball like this? Not that I know of. But you can do it from an expanded source directory in several ways: $ cd $sourcedir ; dpkg-buildpackage -rfakeroot or if you just want the .deb and don't need build-dependencies checked: $ cd $sourcedir ; fakeroot debian/rules binary > The reason I ask is because I am packaging *my own* software. Being > required to apply a diff against my own tarball in this case doesn't > seem to make sense. Most of the tutorials seem to assume that you are > packaging someone else's code, so the focus is a bit different. You don't *have* to have a .diff - this is the case for "native" packages. It's worth noting that native packages will not have a debian-specific version number (e.g. "1.3" instead of the non-native "1.3-1"). If you start of with your "raw" (non-debianized) source directory and run $ cd $sourcedir; dh_make --native you should start off in the right direction (read up on dh_make first - it's in the dh-make package) [1] If you're doing you own software, then you probably want the debian/ directory in subversion too - and svn-buildpackage is your friend. > So: assuming I have complete control over what is in my tarball, what > is the neatest, tidiest and safest way to set up and run an > actual .deb build? Neat, tidy and safe? I'm sure that these goals must be conflicting in some respects :-) There are several build tools available in debian, some of which are: - pbuilder - handy for building in a controlled environment (=chroot) - pbuilder-uml - build in an virtual machine - pentium-builder/athlon-builder - architecture-optimized packages and lots more - mostly geared towards automated builds, usually starting with the .dsc and tarball source... Hope this helps [1] dh-make is the traditional debian package build system - there are others (newer ones) around too (which I never experimented with). Anything that ends up with a valid .deb file will do. -- Karl E. Jorgensen [EMAIL PROTECTED] http://www.jorgensen.org.uk/ [EMAIL PROTECTED] http://karl.jorgensen.com ==== Today's fortune: The ratio of literacy to illiteracy is a constant, but nowadays the illiterates can read. -- Alberto Moravia
signature.asc
Description: Digital signature