Receipt for: linuxdcpp

source stuff/linuxdcpp.desktop
# SliTaz package receipt.

PACKAGE="linuxdcpp"
VERSION="1.1.0"
CATEGORY="network"
SHORT_DESC="Direct Connect client based on DC++."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://launchpad.net/linuxdcpp"

TARBALL="$PACKAGE-$VERSION.tar.bz2"
WGET_URL="https://launchpad.net/$PACKAGE/${VERSION%.*}/$VERSION/+download/$TARBALL"

DEPENDS="bzlib gcc-lib-base gtk+ libglade openssl10"
BUILD_DEPENDS="bzlib bzip2-dev freetype-dev gtk+-dev libboost-dev
	libglade-dev libnotify-dev scons openssl10-dev"

# What is the latest version available today?
current_version()
{
	wget -O - $WEB_SITE 2>/dev/null | \
	sed '/Latest version is/!d;s|.*is ||'
}

# Rules to configure and make the package.
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 CXXFLAGS="$CXXFLAGS -I/usr/include/openssl-1.0"
	export LDFLAGS="$LDFLAGS -L/usr/lib/openssl-1.0"

	mkdir -p $DESTDIR/usr

	scons PREFIX=/usr &&
	scons PREFIX=$DESTDIR/usr install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/share/pixmaps

	cook_copy_folders	bin
	cp -a $install/usr/share/linuxdcpp	$fs/usr/share
	cd					$fs/usr/share/pixmaps
	ln -s ../linuxdcpp/pixmaps/linuxdcpp.png .
}