summaryrefslogtreecommitdiffstats
path: root/chicken-dbus/PKGBUILD
blob: 8bc4dfd0874505243f0a8038f268488c440bb4a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Jim Pryor <profjim@jimpryor.net>
# Warning: The chicken-* egg PKGBUILDS in AUR are auto-generated.
#          Please report errors you notice so that I can tweak the generation script.

pkgname=chicken-dbus
pkgver=0.93
pkgrel=1
pkgdesc="Chicken Scheme Egg: A binding for libdbus, the IPC mechanism"
arch=('i686' 'x86_64')
url="http://chicken.wiki.br/eggref/4/dbus"
license=('MIT')
depends=('chicken>=4.5.0' 'chicken-easyffi' 'chicken-matchable' 'chicken-miscmacros' 'chicken-foreigners' 'dbus-core')
options=(docs !libtool !emptydirs)
install="chicken.install"
source=("$pkgname-$pkgver.chunked::http://chicken.kitten-technologies.co.uk/henrietta.cgi?name=dbus&version=$pkgver"
		"$pkgname-$pkgver.html::http://wiki.call-cc.org/eggref/4/dbus.html"
        "dbus.patch")
md5sums=('891f74b8231f0d655297444e140f5e4f'
         '503a55be746bee8815a95f8ff07bef97'
         '3abccbef575aa13ac1b3cbaefee12ff1')

build() {
	# unchunk the blob that was downloaded from henrietta
	cd "$srcdir"
	mkdir -p "dbus-$pkgver"
	cat "$pkgname-$pkgver.chunked" | while :; do
		while read -r bar ver endbar fname len; do
			[[ -n "$ver" ]] && break
		done
		[[ "$endbar" = "|#" ]] || fname="$ver" len="$endbar"
		[[ -z "$fname" ]] && break
		fname="${fname:1:${#fname}-2}" # delete quotes around fname
		if [[ "${fname: -1}" == / ]]; then
			mkdir -p "dbus-$pkgver/$fname"
		elif [[ "$len" -eq 0 ]]; then
			touch "dbus-$pkgver/$fname"
		else
			dd iflag=fullblock of="dbus-$pkgver/$fname" ibs="$len" count=1 2>/dev/null
		fi
	done

    patch "dbus-${pkgver}/dbus.scm" dbus.patch
}

package () {
	cd "$srcdir/dbus-$pkgver"
	cp ../$pkgname-$pkgver.html dbus.html


	mkdir -p "$pkgdir/usr/lib/chicken/5" "$pkgdir/usr/share/chicken/dbus"

	chicken-install -p "$pkgdir/usr"

		install -Dm644 "dbus.html" "$pkgdir/usr/share/doc/$pkgname/dbus.html"
}