Topic: Create custom package using external library

Dear ttylinux users, and dear Douglas !

I'm trying to create new packages for ttylinux. My goal is to get openswan working on ttylinux (I really need to implement L2TP/Ipsec to TTYLinux !!!).
I put the openswan sources into the pkg-src folder and tried to create a pkg-bld script to correctly build the program.
My problem starts some seconds after the build process startup... Openswan use an external lib (gmplib).
So I don't only need the compile this lib, but I need to let openswan get access to the gmplib headers.

Is there a proper way to do that ? Has somebody a package example using an external lib ?

Best regards and thank you in advance for your help !

Piziwate

Re: Create custom package using external library

It sounds like you are using an older version. Please download the latest source distribution; you'll see that the build scripts are differently organized now, but still very similar.

In your case with gmplib, the lib must be built and the header files and libs put into TTYLINUX_BUILD_DIR, but the headers do not need to go into the binary package. For the other package(s) that need the header files and libraries, in the pkg-bld/*.sh scripts use $TTYLINUX_BUILD_DIR in the ./configure command line and/or the make command line. For alsa-utils, which depends upon alsa-libs, only the ./configure command line needs to reference the location of the alsa-lib install directory:
./configure \
        --build=${MACHTYPE} \
        --host=${XBT_TARGET} \
        --target=${XBT_TARGET} \
        --with-alsa-inc-prefix=${TTYLINUX_BUILD_DIR}/usr/include \
        --with-alsa-prefix=${TTYLINUX_BUILD_DIR}/usr/lib \
        --with-curses=ncurses \
        --disable-xmlto

Re: Create custom package using external library

Dear Douglas,

Thank you for your help ! I know, the version I'm using is a little bit outdated... I'm a little bit lazy to upgrade all my changes (default password, config, startup scripts and custom kernel modules) to the last version. But now, I don't really have the choice.
This is my colleague who will be happy... He is asking me to get the new features (we got sftp working on the last version with dropbear... very nice to remote debug).

Thank you again for your help. Once I get openswan working on the last ttylinux, I'll post it as package for the community !

Bye

Piziwate

Last edited by piziwate (2011-10-16 04:34:43)

Re: Create custom package using external library

Hello Douglas,

I compiled successfully openswan with gmplib. This is great and your build scripts works fine and are easy to adapt.
Did you already cross-compile openssl on ttylinux mp8 ? I spend the whole day trying to compile it, but I got a lots of problems... This is really annoying, openssl and ipsec-tools are used by openswan :-(.
If you have an idea, it would be really welcomed !

Best regards

Piziwate