libixp

git clone git://oldgit.suckless.org/libixp/
Log | Files | Refs | LICENSE

commit 3571aad743966970e616012fa5538d6ec90cfffb
parent 7e06fcd1e137f2c9c11bf833a50aaf368dccd090
Author: Kris Maglione <kris@suckless.org>
Date:   Tue,  6 Jul 2010 21:24:20 -0400

[debian] Add 'deb' make target.

Diffstat:
Makefile | 11+++++++++++
PKGBUILD | 10+++++-----
util/genchangelog | 30++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,5 +1,6 @@ ROOT=. include $(ROOT)/mk/hdr.mk +include $(ROOT)/mk/ixp.mk DIRS = lib \ cmd \ @@ -11,6 +12,16 @@ doc: >$(ROOT)/man/targets.mk $(MAKE) -Cman +deb-dep: + IFS=', '; \ + apt-get -qq install build-essential $$(sed -n 's/([^)]*)//; s/^Build-Depends: \(.*\)/\1/p' debian/control) + +DISTRO = unstable +deb: + $(ROOT)/util/genchangelog libixp-hg $(VERSION) $(DISTRO) + dpkg-buildpackage -rfakeroot -b -nc + [ -d .hg ] && hg revert debian/changelog || true + .PHONY: doc include $(ROOT)/mk/dir.mk diff --git a/PKGBUILD b/PKGBUILD @@ -4,11 +4,11 @@ pkgver=131 pkgrel=1 pkgdesc="The latest hg pull of libixp, a simple 9P filesystem library" url="http://libs.suckless.org/libixp" -license=("MIT") -arch=("i686" "x86_64") -makedepends=("mercurial") -provides=("libixp") -conflicts=("libixp") +license=(MIT) +arch=(i686 x86_64) +makedepends=(mercurial) +provides=(libixp) +conflicts=(libixp) source=() options=(!strip) diff --git a/util/genchangelog b/util/genchangelog @@ -0,0 +1,30 @@ +#!/bin/sh +set -ef + +ifs="$(echo)" +name=$1 +vers=$2 +dist=$3 +desc="Upstream build" +auth="Kris Maglione <kris@suckless.org>" +date=$(date +'%a, %d %b %Y %T %z') +if hg root >/dev/null 2>&1; then + t() { hg log -r . --template "{$@}"; } + vers=$(t rev) + desc=$(t desc) + auth=$(t author) + date=$(t 'date|rfc822date') +fi + +cat >debian/changelog.new <<! +$name ($vers) $dist; urgency=low + + * $desc + + -- $auth $date + +$(cat debian/changelog) +! + +mv debian/changelog.new debian/changelog +