updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / chessdb-beta / PKGBUILD
blobcc38cc02f68789d10b5bf3add7253d5801871078
1 # $Id$
2 # Maintainer: Daniel Corson <dancor@gmail.com>
3 pkgname=chessdb-beta
4 pkgver=3.6.19_beta_1
5 _source_name=ChessDB-${pkgver//_/-}
6 pkgrel=1
7 pkgdesc="Free chess database"
8 # Note on x86_64 at least I had to disable "Options -> Autosave on Exit"
9 # because an error was preventing exit otherwise..
10 arch=('i686', 'x86_64')
11 url="http://chessdb.sourceforge.net"
12 license=('GPL')
13 depends=(tk)
14 source=(http://downloads.sourceforge.net/chessdb/$_source_name.tar.gz)
15 md5sums=('de7a158e90102c905a0c65240a289934')
17 build() {
18   cd $startdir/src/$_source_name
19   
20   _bindir="/usr/bin"
21   _sharedir="/usr/share/chessdb"
22   _soundsdir="$_sharedir/sounds"
23   _tbdir="$_sharedir/tablebases"
24   _mandir="/usr/man"
25         
26   # Should the upstream Makefile be changed to simplify this?
27   ./configure \
28     BINDIR="$_bindir" \
29     SHAREDIR="$_sharedir" \
30     SOUNDSDIR="$_soundsdir" \
31     TBDIR="$_tbdir" \
32     MANDIR="$_mandir"
33   
34   make || return 1
36   # Upstream "make install" seems to be broken (refers to both $(SHAREDIR) and
37   # $(DESTDIR)$(SHAREDIR) as if both are full paths?)
38   #
39   #make \
40   #  DESTDIR="$pkgdir" \
41   #  SHAREDIR="$pkgdir$_sharedir" \
42   #  SOUNDSDIR="$pkgdir$_soundsdir" \
43   #  TBDIR="$pkgdir$_tbdir" \
44   #  MANDIR="$pkgdir$_mandir" \
45   #  install
47   _sounds=( sounds/Back.wav sounds/1.wav sounds/2.wav sounds/3.wav \
48     sounds/4.wav sounds/5.wav sounds/6.wav sounds/7.wav sounds/8.wav \
49     sounds/CastleK.wav sounds/Bishop.wav sounds/CastleQ.wav \
50     sounds/Check.wav sounds/King.wav sounds/Knight.wav sounds/Mate.wav \
51     sounds/Promote.wav sounds/Queen.wav sounds/Rook.wav sounds/a.wav \
52     sounds/b.wav sounds/c.wav sounds/d.wav sounds/e.wav sounds/f.wav \
53     sounds/g.wav sounds/h.wav sounds/x.wav )
54   _scripts=( sc_addmove sc_epgn sc_spell sc_eco sc_import sc_remote \
55     sc_tree chessdbpgn pgnfix spliteco )
56   _execs=( pgnchessdb tkchessdb tcchessdb scmerge chessdblet )
57   _man6=( manpages/chessdb.6 )
59   install -m 755 -d "$pkgdir$_sharedir"
60   install -m 755 -d "$pkgdir$_bindir"
61   install -m 755 -d "$pkgdir$_soundsdir"
62   # Tablebases dir is created but empty; files are meant to be installed
63   # separately.
64   install -m 755 -d "$pkgdir$_tbdir"
65   install -m 755 -d "$pkgdir$_mandir"/man6
66   install -m 644 -p "${_sounds[@]}" "$pkgdir$_soundsdir"
67   install -m 644 -p "${_man6[@]}" "$pkgdir$_mandir"/man6
68   install -m 755 chessdb "${_scripts[@]}" "${_execs[@]}" "$pkgdir$_bindir"
69   install -m 755 -d "$pkgdir/$_sharedir"
70   install -m 644 -p chessdb.eco ratings.ssp "$pkgdir$_sharedir"