Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to create a debian package of the TIGCC, a C compiler for TI Calculators in correspondence with it's main developer, who is using Fedora and thus can only create and test RPMs.

I've got both the x86 binaries and the sources. However I'd prefer to build it from the sources. TIGCC consists of several small programs (C compiler, linker, assembly (a68k) compiler, ...) with their own makefiles.

I think the main problem I've got is: How do I create a makefile calling the single one* (I guess $(MAKE) -f ./rel/path/to/Makefile) and where do I have to place it?

The second question is: How do I tell the builder where the single parts are going to be installed (compiled stuff to /usr/tigcc/bin, doc to usr/share/doc/tigcc, a.s.o.)?

I've already tried to create it from the binaries, but it crashed my testing system (saucy) and got some problem with it's dependencies (TIGCC depends on libc6)

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The debian/rules file is what drives the building process. It is in fact a Makefile, but it also allows you to also take advantage of various packaging helpers. So your rules file might look something like:

#!/usr/bin/make -f

%:
    dh $@

override_dh_auto_build:
    $(MAKE) -f path/to/first/Makefile
    $(MAKE) -f path/to/second/Makefile

To install the files to the right place, use a debian/install file. See this answer.

I suggest that you take a look at the Ubuntu Packaging Guide.

share|improve this answer
    
You may also want to use pbuilder or sbuilder to test building your package in a virtual chroot. –  saiarcot895 Feb 21 at 21:27
    
It was because of the missing debian/install –  the_Seppi Feb 22 at 14:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.