[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: scons /rules



On Sat, Mar 7, 2009 at 3:25 PM, Grammostola Rosea
<rosea.grammostola@gmail.com> wrote:
> Hi,
>
> I want to build my first package. I have to edit the rules file, but how?
> What are in general the things you have to do when building a scons package?
>
> And there is also not an makefile, but an SConstruct file, right?

In general, it's pretty similar to a normal make setup. Instead of
calling $(MAKE), just define SCONS (e.g., SCONS = scons, at the top of
the file) and then call $(SCONS). The upstream SConstruct file should
support DESTDIR setting when you call $(SCONS) install.

You may also need to remove .sconsign.dblite config.log .sconf_temp
manually in debian/clean.

Be aware that due to the way scons works, "scons -c" will not work if
the SConstruct file cannot initialize itself. That is to say, if
"scons" does not work without patching the makefile, then to allow the
package to build properly, you will either have to (a) manually
replicate the purpose of scons clean in the clean: target of
debian/rules, or (b) force the clean target to depend on the patch
target, e.g.:

clean: patch clean-patched unpatch
clean-patched:
    $(SCONS) -c
    etc...

This only applies in a few cases though, and getting upstream to fix
this is far better than implementing this kind of clean target.

Just use "man" to discover the differences between the dh_* commands,
and be sure to remove any that you don't need (don't just comment them
out).

Regards,
Daniel

-- 
Daniel Moerner <dmoerner@gmail.com>


Reply to: