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

Re: gs-aladdin source - how do i compile?



tom@halahan.com wrote:
>I want to compile gs on my box because i want to add in new drivers.
>However I am having trouble understanding how I can introduce my new c
>source code before compiling.  There is no obvious source tree (like
>for a src-tar.gz).  Where do i slot in new code and how can i play with
>the code? 

'apt-get source gs' or 'apt-get source gs-aladdin', change into the
directory that produces, make your changes, then 'dpkg-buildpackage
-rfakeroot' (having installed the dpkg-dev and fakeroot packages, plus
anything else relevant - especially any Build-Depends: and
Build-Depends-Indep: from debian/control). That should spit out a .deb
in the parent directory.

Oh yeah ... gs-aladdin is one of those annoying packages that has
archives within archives that get patched in debian/rules and stuff.
Some developers like those because they can be easier for the developer
to manage if large numbers of patches are involved. In the case of
gs-aladdin, change into the top-level directory of the source tree (the
one with 'debian' and 'upstream' subdirectories) and type 'debian/rules
configure' to unpack and patch all the archives.

Note that there's no general mechanism for dealing with such packages
yet; to some extent, you have to figure it out for each package. :( I
suppose you could always do a 'debian/rules build' and interrupt it
partway through.

>How do you compile a deb source (tried dpkg-deb -b to no real results)?

That's for taking a filesystem archive (basically, the binary files that
make up a .deb, in a specific arrangement) and turning it into a .deb.
It's only for people building packages; if you don't know what it does,
don't use it.

dpkg-buildpackage is one of the standard tools for building packages;
see its man page. With -rfakeroot, it ultimately ends up calling
something like 'fakeroot debian/rules binary'.

There's also a higher-level wrapper in the devscripts package called
'debuild', which may be handier for you.

>where is there better documentation??

The man pages for the tools I mentioned above; the Debian Packaging
Manual (in the packaging-manual package); the Debian New Maintainers'
Guide (in the maint-guide package).

The man page for apt-get, under the 'source' option, gives you a hint
that dpkg-buildpackage is involved in the process.

In the case of the non-standard build system outlined above, sadly,
nowhere really. You just have to work it out for yourself, or read the
arguments about it in the mailing list archives. :(

Cheers,

-- 
Colin Watson                                     [cjw44@flatline.org.uk]



Reply to: