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

Re: Package with CMAKE based C library



Hi KI7MT, 
hi everybody

thanks for your reply - I'm currently building the package with cdbs, debian/rules 
right now implements:

#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
#include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include /usr/share/cdbs/1/class/cmake.mk
#export DH_VERBOSE = 1

binary-post-install/%::
        dh_installchangelogs CHANGELOG

It build's the package. So far, so good. But I'm still wondering what
needs to be done to split the package into "libcmime" and "libcmime-dev" :) 

In other words: how do i tell the packaging process to create two packages and
to put: 

/usr/lib/libcmime.so.0.1 
/usr/lib/libcmime.so.0.1.14

into the "main" package, and 

/usr/lib/libcmime.so (symlink to 0.1.14)
/usr/include/cmime/*.h
/usr/lib/pkgconfig/cmime.pc

into the -dev package


Cheers,
Werner



[1] Currently only one package is created, wich installs the following files: 
*) /usr/lib
lrwxrwxrwx  1 root root          15 Oct 21 23:08 libcmime.so -> libcmime.so.0.1
lrwxrwxrwx  1 root root          18 Oct 21 23:08 libcmime.so.0.1 -> libcmime.so.0.1.14
-rw-r--r--  1 root root       89320 Oct 21 23:08 libcmime.so.0.1.14

*) /usr/include/cmime
-rw-r--r--  1 root root  4424 Sep 23 15:55 cmime_address.h
-rw-r--r--  1 root root  3273 Sep 23 15:55 cmime_base64.h
-rw-r--r--  1 root root  1913 Oct 21 23:08 cmime_config.h
-rw-r--r--  1 root root  3716 Sep 23 15:55 cmime_header.h
-rw-r--r--  1 root root  7077 Sep 23 15:55 cmime_list.h
-rw-r--r--  1 root root 19017 Sep 23 15:55 cmime_message.h
-rw-r--r--  1 root root  6872 Sep 23 15:55 cmime_part.h
-rw-r--r--  1 root root  3166 Sep 23 15:55 cmime_qp.h
-rw-r--r--  1 root root  3894 Sep 23 15:55 cmime_string.h
-rw-r--r--  1 root root  2942 Sep 23 15:55 cmime_util.h

*) /usr/lib/pkgconfig/libcmime.pc 


Am 21.10.14 23:57, schrieb ki7mt:
> 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: