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

Re: Package with CMAKE based C library



Hi Werner,

I just finished working up a CMAKE package that has it's own install target and creates the appropriate directories, manpages etc. I used the basic dh_* Makefile, and did a couple overrides to account for things that were performed by the CMakeLists.txt file.

It really depends on what the CMAKE project does as to what your rules file will end up looking like. This particular project accounts for Debian builds, as well as Mac OSX and RPM. I used my own version of the control file though. Im not sure I've done this 100% correct, but It's building without any Lintian errors or warnings.

You can also use CDBS, but I found it just as easy to use dh_*. I'm sure the the Debian Mentors can get you sorted out on this. Maybe they can help me out as well, as I could be out in left field here :-)

Rules File -- I added the comments just so i could see it easy in the build log

DH_VERBOSE = 1
export DH_OPTIONS=-v

%:
    dh $@ --parallel

# CMakeLists.txt install target creates all the appropriate dir's
override_dh_install:
@echo '---------------------------------------------------------------------'
    @echo ' Overiding: dh_install to NULL'
@echo '--------------------------------------------------------------------'

# Manpages are build by a Cmake target
override_dh_installman:
@echo '---------------------------------------------------------------------'
    @echo ' Overiding: dh_installman to NULL'
@echo '---------------------------------------------------------------------'

# Manpages are already compressed
override_dh_compress:
@echo '---------------------------------------------------------------------'
    @echo ' Overiding: dh_compress to exclude *.1.gz files'
@echo '---------------------------------------------------------------------'
    dh_compress -X1.gz

73's
Greg, KI7MT


On 10/21/2014 03:27 PM, Werner Detter wrote:
Hi everybody,

I want to package a library, developed in C (libcmime) which is based on cmake. If I'm
right - there should be

a) the main package "libcmime"
/usr/lib/libcmime.so.0.1 (symlink to the next one)
/usr/lib/libcmime.so.0.1.14

b) the dev package "libcmime-dev"
/usr/lib/libcmime.so (symlink to 0.1.19)
/usr/include/cmime/*.h
/usr/lib/pkgconfig/cmime.pc

As this package is the first one with a C library, based on CMAKE for me it would be great if
anyone could point me to a similar package to stud debian/rules

Thanks and cheers,
Werner




Reply to: