On Thu, Jun 02, 2005 at 12:28:23PM -0400, Jason Lieurance wrote: > Hello, > > I'm fairly new to debian as I come from a FreeBSD background and have a > software question. How do you specify options for building your software > with apt-get? > > Example: > > When building software, I'm use to: ./configure <options>, make, make > install. (Like if I want to configure apache with certain options) > > Now, with apt-get, it just goes and does it with no intervention. > > I tried apt-get source but I don't understand what to do as the source,it > looks different than what I'm use to. > > Thanks for any help.
What you really want is pbuilder or sbuild. I have used both and recently switched to pbuilder. The documentation for both is actually pretty good. I used sbuild (now pbuilder) to build the packages that I maintain a couple which I customize/backport. Here is what you need: 1. Install fakeroot, sudo, pbuilder and devscripts. 2. Copy /etc/pbuilderrc into ~/.pbuilderrc and customize to taste. 3. Assuming you are running Sarge, you will want to set it up to create a sarge chroot for you. There comments in pbuilderrc that explain. Also be sure and read pbuilderrc(5). 4. 'apt-get source' on the package you would like to customize and change into the resulting directory. 5. do 'debchange --nmu' and add a short changelog entry saying something like "personal customization". You can also modify the end of the version number at the top of the change log. If I am backporting or customizing a package, I usually choose to do a 'dechange --nmu' and then place the package(s) on hold. That ensures that I always see when new versions make it into the archive. 6. Edit the files in the debian/ directory that you need, most likely just the rules file, to achieve the customizations you would like. 7. After you add your customizations, execute: pdebuild --buildsourceroot fakeroot --pbuilderroot sudo --buildresult /usr/local/src/results You can change the buildresult directory to somewhere else, if you like. After that you will have a built package with a new version number that is customized how you like. Here are the options from my ~/.pbuilderrc: BASETGZ=/var/cache/pbuilder/base.tgz BUILDPLACE=/var/cache/pbuilder/build/ MIRRORSITE=http://http.us.debian.org/debian USEPROC=yes USEDEVPTS=yes USEDEVFS=no BUILDRESULT=/var/cache/pbuilder/result/ DISTRIBUTION=sarge APTCACHE="/var/cache/pbuilder/aptcache/ APTCACHEHARDLINK="yes" REMOVEPACKAGES="lilo" HOOKDIR="" export DEBIAN_FRONTEND="noninteractive" DEBEMAIL="" BUILDSOURCEROOTCMD="fakeroot" PBUILDERROOTCMD="sudo" DEBBUILDOPTS="" APTCONFDIR="" BUILDUSERID=1234 BINDMOUNTS="" DEBOOTSTRAPOPTS[0]='--variant=buildd' Let me know if this helps or if you need any more information. -Roberto -- Roberto C. Sanchez http://familiasanchez.net/~sanchezr
pgpRCN7PI55Ew.pgp
Description: PGP signature