"Timothy H. Keitt" <[EMAIL PROTECTED]> wrote:
>Colin Watson wrote:
>> Johan Groth <[EMAIL PROTECTED]> wrote:
>>> I'm a newbie to Debian (a former Red Hat user) and am wondering how to
>>> recompile a .deb from a src .deb with different compile options than the
>>> default ones? In Red Hat you change rpmrc and then type rpm -rebuild
>>> <src-package.srpm>. I assume there is something similar in Debian.
>> 
>> Yes, you cd to the top-level directory of the unpacked source tree,
>> change debian/rules and possibly other files, and type
>> 'dpkg-buildpackage -rfakeroot' (you need the dpkg-dev and fakeroot
>> packages). If you install the devscripts package you can just type
>> 'debuild'.
>> 
>> (For both of those commands, adding '-us -uc' will stop the package
>> building scripts from trying to sign the source package or the .changes
>> file, which unless you're the maintainer you normally won't be able to
>> do.)
>
>Anyway to get this to work with 'apt-get --compile source <pkgname>'?  
>It would be really nice if there were a way to override the default 
>compile flags on a system wide basis.

Not yet. There's just way too much variation in the upstream Makefiles
that Debian packages are based on for this to be easily standardized.
Setting CFLAGS in your environment may often work, depending on the
package.

Debian policy is moving in this sort of direction, though, I think. For
example, packages at policy version 3.2.0 or above should support
setting DEB_BUILD_OPTIONS=debug in the environment to compile with
debugging support, or DEB_BUILD_OPTIONS=debug,nostrip to refrain from
stripping debugging symbols from the resulting binaries - if it makes
sense for them to do so, of course. Apart from that, I suppose the main
compiler flags you might want to set on a system-wide basis would be
optimization levels and processor-specific tuning. The pentium-builder
package may help with this.

-- 
Colin Watson                                     [EMAIL PROTECTED]

Reply via email to