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.
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).
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.
1) Should I be trying to use the build.sh script at all? If not, I need a mechanism for copying some files in the deb package (a udev rule). I know I can do this in debian/rules - more reading required.
2) Should I use dh_make -s or dh_make -l (single binary or library)? I used -l as you might expect but ran into all sorts of problems with laika-dev asking for files in usr/include which I didn't understand.
3) Also, I have used dh_make --native to stop quilt complaining about upstream modifications. I don't understand this part yet so have bypassed it. Is this an issue?
This will probably get me going.
I originally planned to have the same deb contain some python packages but I have decided to split it up so the python stuff gets a package of its own which depends on laika-1.0.0. Is this the right way to go?
pi@raspberrypi /home/shares/public/sandbox/laika-1.0.0 $ debuild -us -uc
dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: source package laika
dpkg-buildpackage: source version 1.0.0
dpkg-source --before-build laika-1.0.0
dpkg-buildpackage: host architecture armhf
fakeroot debian/rules clean
dh clean
dh_testdir
dh_auto_clean
dh_clean
rm -f debian/laika.substvars
rm -f debian/laika.*.debhelper
rm -rf debian/laika/
rm -f debian/*.debhelper.log
rm -f debian/files
find . \( \( -type f -a \
\( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
-o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
-o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
-o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
\) -exec rm -f {} \; \) -o \
\( -type d -a -name autom4te.cache -prune -exec rm -rf {} \; \) \)
rm -f *-stamp
dpkg-source -b laika-1.0.0
dpkg-source: info: using source format `3.0 (native)'
dpkg-source: info: building laika in laika_1.0.0.tar.gz
dpkg-source: info: building laika in laika_1.0.0.dsc
debian/rules build
dh build
dh_testdir
dh_auto_configure
dh_auto_build
dh_auto_test
fakeroot debian/rules binary
dh binary
dh_testroot
dh_prep
rm -f debian/laika.substvars
rm -f debian/laika.*.debhelper
rm -rf debian/laika/
dh_installdirs
install -d debian/laika
dh_auto_install
dh_install
dh_installdocs
install -g 0 -o 0 -d debian/laika/usr/share/doc/laika
install -g 0 -o 0 -m 644 -p debian/copyright debian/laika/usr/share/doc/laika/copyright
dh_installchangelogs
install -o 0 -g 0 -p -m644 debian/changelog debian/laika/usr/share/doc/laika/changelog
dh_installexamples
dh_installman
dh_installcatalogs
dh_installcron
dh_installdebconf
install -o 0 -g 0 -d debian/laika/DEBIAN
dh_installemacsen
dh_installifupdown
dh_installinfo
dh_pysupport
dh_pysupport: This program is deprecated, you should use dh_python2 instead. Migration guide:
http://deb.li/dhs2p
/usr/share/python-support/private/movemodules debian/laika
dh_installinit
dh_installmenu
dh_installmime
dh_installmodules
dh_installlogcheck
dh_installlogrotate
dh_installpam
dh_installppp
dh_installudev
dh_installwm
dh_installxfonts
dh_installgsettings
dh_bugfiles
dh_ucf
dh_lintian
dh_gconf
dh_icons
dh_perl
dh_usrlocal
dh_link
dh_compress
cd debian/laika
chmod a-x usr/share/doc/laika/changelog
gzip -9nf usr/share/doc/laika/changelog
cd '/home/shares/public/sandbox/laika-1.0.0'
dh_fixperms
find debian/laika -print0 2>/dev/null | xargs -0r chown --no-dereference 0:0
find debian/laika ! -type l -print0 2>/dev/null | xargs -0r chmod go=rX,u+rw,a-s
find debian/laika/usr/share/doc -type f ! -regex 'debian/laika/usr/share/doc/[^/]*/examples/.*' -print0 2>/dev/null | xargs
-0r chmod 644
find debian/laika/usr/share/doc -type d -print0 2>/dev/null | xargs -0r chmod 755
find debian/laika/usr/share/man debian/laika/usr/man/ debian/laika/usr/X11*/man/ -type f -print0 2>/dev/null | xargs -0r ch
mod 644
find debian/laika -perm -5 -type f \( -name '*.so.*' -or -name '*.so' -or -name '*.la' -or -name '*.a' \) -print0 2>/dev/nu
ll | xargs -0r chmod 644
find debian/laika/usr/include -type f -print0 2>/dev/null | xargs -0r chmod 644
find debian/laika/usr/share/applications -type f -print0 2>/dev/null | xargs -0r chmod 644
find debian/laika -perm -5 -type f \( -name '*.cmxs' \) -print0 2>/dev/null | xargs -0r chmod 644
find debian/laika/usr/lib/perl5 debian/laika/usr/share/perl5 -type f -perm -5 -name '*.pm' -print0 2>/dev/null | xargs -0r
chmod a-X
find debian/laika/usr/lib -type f -name '*.ali' -print0 2>/dev/null | xargs -0r chmod uga-w
dh_strip
dh_makeshlibs
rm -f debian/laika/DEBIAN/shlibs
dh_shlibdeps
dh_installdeb
dh_gencontrol
echo misc:Depends= >> debian/laika.substvars
dpkg-gencontrol -ldebian/changelog -Tdebian/laika.substvars -Pdebian/laika
dpkg-gencontrol: warning: Depends field of package laika: unknown substitution variable ${shlibs:Depends}
chmod 644 debian/laika/DEBIAN/control
chown 0:0 debian/laika/DEBIAN/control
dh_md5sums
(cd debian/laika >/dev/null ; find . -type f ! -regex './DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum >
DEBIAN/md5sums) >/dev/null
chmod 644 debian/laika/DEBIAN/md5sums
chown 0:0 debian/laika/DEBIAN/md5sums
dh_builddeb
dpkg-deb --build debian/laika ..
dpkg-deb: building package `laika' in `../laika_1.0.0_armhf.deb'.
dpkg-genchanges >../laika_1.0.0_armhf.changes
dpkg-genchanges: including full source code in upload
dpkg-source --after-build laika-1.0.0
dpkg-buildpackage: full upload; Debian-native package (full source is included)
Now running lintian...
W: laika: empty-binary-package
Finished running lintian.
pi@raspberrypi /home/shares/public/sandbox/laika-1.0.0 $