Receipt for: n2nc
source
PACKAGE="n2nc"
VERSION="r_133"
CATEGORY="network"
SHORT_DESC="Nat 2 Nat COnnector."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="GPL2"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="https://n2nc.sourceforge.net/"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
DEPENDS="zlib libcrypto10 gcc-lib-base"
BUILD_DEPENDS="bash openssl10-dev bzip2-dev zlib-dev automake autoconf libtool"
current_version()
{
wget -O - https://sourceforge.net/projects/n2nc/files/n2nc/ 2>/dev/null | \
sed '/scope="row/!d;s|.*a href="|"https://sourceforge.net|;s| .*||;q' | xargs wget -O - 2>/dev/null | \
sed '/scope="row/!d;s|.*/n2nc/||;s|/.*||;s|-|_|;q'
}
compile_rules()
{
# openssl10: build against the isolated OpenSSL 1.0 tree -- system openssl
# is 3.x which dropped the 1.0 APIs/struct layout openssh 9.3p1 needs.
# --with-ssl-dir derives the lib path from a single dir, but the 1.0
# headers (/usr/include/openssl-1.0) and libs (/usr/lib/openssl-1.0) live
# apart, so it linked the system 3.x lib instead. Feed both via flags and
# -L the 1.0 dir so -lcrypto resolves to the versioned 1.0 lib.
export CFLAGS="$CFLAGS -I/usr/include/openssl-1.0"
export CPPFLAGS="$CPPFLAGS -I/usr/include/openssl-1.0"
export LDFLAGS="$LDFLAGS -L/usr/lib/openssl-1.0"
export PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig:$PKG_CONFIG_PATH
mv $PACKAGE $src 2> /dev/null
cd $src
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
./configure --prefix=/usr --mandir=/usr/share/man \
--localstatedir=/var \
$CONFIGURE_ARGS &&
make &&
make DESTDIR=$DESTDIR install
}
genpkg_rules()
{
mkdir -p $fs/usr
cp -a $install/usr/bin $fs/usr
cp -a $install/usr/lib $fs/usr
}