Receipt for: dpkg

source
# SliTaz package receipt.

PACKAGE="dpkg"
VERSION="1.17.27"
CATEGORY="misc"
SHORT_DESC="Debian package management system."
MAINTAINER="shann@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://wiki.debian.org/dpkg"

TARBALL="${PACKAGE}_$VERSION.tar.xz"
#WGET_URL="http://people.slitaz.org/~shann/packages/$PACKAGE/$TARBALL"	# 1.16.12
WGET_URL="https://cloudfront.debian.net/debian-archive/debian/pool/main/d/dpkg/$TARBALL"

DEPENDS="bzlib liblzma zlib"
BUILD_DEPENDS="file liblzma-dev ncurses-dev perl bzip2-dev"

CONFIG_FILES="/etc/logrotate.d/dpkg
/etc/cron.daily/dpkg
/etc/alternatives/README
/etc/dpkg/dpkg.cfg"

# What is the latest version available today?
current_version()
{
	wget -O - ${WGET_URL%/*} 2>/dev/null | \
	sed "/latest/d;/${PACKAGE}_/!d;/tar/!d;s|.*${PACKAGE}_\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
	./configure &&
	make &&
	make install
}

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

	cp -a $install/usr/etc		$fs
	cp -a $install/usr/sbin		$fs
	cp -a $install/usr/bin		$fs/usr
	cp -a $install/usr/share/dpkg	$fs/usr/share
	rm				$fs/usr/share/dpkg/*.mk
}