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

Re: Debian Packaging of Shared Library on raspbian wheezy (raspberry pi)



+++ Andrew Bakin [2013-10-22 18:58 +0100]:
>    Hi,
>    I have to say that I am new to the world of Linux and am on a very steep
>    learning curve as I have to package a shared library which I have written
>    in 'C' as well as a Python package. I have successfully created a deb file
>    today which has taken much work. However, it appears it's empty and so
>    installs nothing.
>    Having read a lot of material on the subject there are still some parts
>    that confuse me. I have a million questions but I will try to break it
>    down.

It does feel somewhat overwhelming when you start. Stick with it :-) 
And picking a library for your first package doesn't help - the rules are 
more detailed and complex than for 'leaf' packages.

>    So, there's a shared library written in C (laika.c and exp.c -->
>    liblaika.so.1.0.0). This is produced from a makefile and installed to
>    /usr/lib. The makefile also places laika.h in /usr/include. DESTDIR is set
>    up correctly I think.
>    Now as I understand, debian/rules calls this makefile (make install).

Correct

>    But, I also have a build.sh script which I have used to install the
>    library, before attempting to make a deb package. This actually worked
>    well, but it's no deb package.

So long as it can be made to install to DESTDIR cleanly then it will work fine
for packaging purposes too.

>    My workflow is something like:
>    Create tarball from source: tar -cwzf laika_1.0.0.orig.tar.gz laika-1.0.0
>    run dh_make in laika-1.0.0 : dh_make -s -c gpl3 --native
>    run debuild: debuild -us -uc

That looks sane (except it should be dh_make -l, and there is quite a lot of 
<edit and remove files>, between the dh_make and the debuild. dh_make only gives you a skeleton.
You need to declare which files are installed where (e.g laika.h into /usr/include 
in the laika-dev package, liblaika.so.1.0.0 (and compatibility links) into /usr/lib/$MULTIARACH 
in the liblaika package, etc). This can be done declaratively  (best) or manually 
in the rules files. The dh_* docs are good so you should be able to work it out.

>    So here are my questions:

Others have answered these sensibly.

Come back here when you get stuck again :-)

Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/


Reply to: