updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / chicken-bb / PKGBUILD
blob2fe3449565c8e68f6d3b862b7b097e98bc9cace4
1 # Maintainer: Jim Pryor <profjim@jimpryor.net>
2 # Warning: The chicken-* egg PKGBUILDS in AUR are auto-generated.
3 #          Please report errors you notice so that I can tweak the generation script.
5 pkgname=chicken-bb
6 pkgver=1.27
7 pkgrel=4
8 pkgdesc="Chicken Scheme Egg: An easy-to-use GUI toolkit based on FLTK"
9 arch=('i686' 'x86_64')
10 url="http://chicken.wiki.br/eggref/4/bb"
11 license=('BSD')
12 depends=('chicken>=4.5.0' 'chicken-silex' 'chicken-easyffi' 'chicken-matchable' 'libjpeg' 'libpng' 'libxft' 'mesa' 'fltk' # 'flu'
13         )
14 options=(docs !libtool !emptydirs)
15 install="chicken.install"
16 source=("$pkgname-$pkgver.chunked::http://chicken.kitten-technologies.co.uk/henrietta.cgi?name=bb&version=$pkgver"
17                 "$pkgname-$pkgver.html::http://chicken.wiki.br/eggref/4/bb.html")
18 md5sums=('6b37f9e80eb78a7a2989575a571b1d77' '0dd1edc869eaf3f892bf1ba151add316')
20 build() {
21         # unchunk the blob that was downloaded from henrietta
22         cd "$srcdir"
23         mkdir -p "bb-$pkgver"
24         cat "$pkgname-$pkgver.chunked" | while :; do
25                 while read -r bar ver endbar fname len; do
26                         [[ -n "$ver" ]] && break
27                 done
28                 [[ "$endbar" = "|#" ]] || fname="$ver" len="$endbar"
29                 [[ -z "$fname" ]] && break
30                 fname="${fname:1:${#fname}-2}" # delete quotes around fname
31                 if [[ "${fname: -1}" == / ]]; then
32                         mkdir -p "bb-$pkgver/$fname"
33                 elif [[ "$len" -eq 0 ]]; then
34                         touch "bb-$pkgver/$fname"
35                 else
36                         dd iflag=fullblock of="bb-$pkgver/$fname" ibs="$len" count=1 2>/dev/null
37                 fi
38         done
39         
41         cd "$srcdir/bb-$pkgver"
42         cp ../$pkgname-$pkgver.html bb.html
43         
44         sed -r 's/^(#define widget_type\(x\) \(\()int\)/\1size_t)/' -i.orig bb-support.cpp 
45         
46         mkdir -p "$pkgdir/usr/lib/chicken/5" "$pkgdir/usr/share/chicken/bb"
47                 
48         chicken-install -p "$pkgdir/usr"
49         
50                 install -Dm644 "bb.html" "$pkgdir/usr/share/doc/$pkgname/bb.html"