updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / xtrs / PKGBUILD
blobd19f5eb2b81bb7b984d649334ba632e5795e2444
1 # Contributor: Joe Peterson <joe at skyrush dot com>
3 pkgname=xtrs
4 pkgver=4.9d
5 pkgrel=1 
6 pkgdesc="Radio Shack TRS-80 emulator"
7 url="http://www.tim-mann.org/xtrs.html"
8 arch=('i686' 'x86_64')
9 license=('custom')
10 depends=(ncurses readline libx11)
11 makedepends=()
12 conflicts=()
13 replaces=()
14 backup=()
15 install=$pkgname.install
16 source=(http://www.tim-mann.org/trs80/$pkgname-$pkgver.tar.gz
17         http://www.tim-mann.org/trs80/ld4-631.zip
18         COPYING)
19 md5sums=('8bb7cf88a3bc1da890f1f29398120bf3'
20          'f2678aa45b76d935a34a0cd2b108925d'
21          'fe1257721c755b39cf36dc33442d02af')
23 build() {
24   cd $srcdir/$pkgname-$pkgver
26   # Build xtrs
27   make DEBUG="${CFLAGS}" \
28        DISKDIR="-DDISKDIR='\"/usr/share/xtrs\"'" \
29        DEFAULT_ROM="-DDEFAULT_ROM='\"/usr/share/xtrs/romimage\"' \
30                     -DDEFAULT_ROM3='\"/usr/share/xtrs/romimage.m3\"' \
31                     -DDEFAULT_ROM4P='\"/usr/share/xtrs/romimage.m4p\"'" \
32        || return 1
34   # Create necessary directories
35   mkdir -p $pkgdir/usr/bin \
36            $pkgdir/usr/share/$pkgname/disks \
37            $pkgdir/usr/share/man/man1 \
38            $pkgdir/usr/share/doc/$pkgname \
39            $pkgdir/usr/share/licenses/$pkgname
40            
41   # Install xtrs using upstream make install
42   make PREFIX=$pkgdir/usr install || return 1
44   # Install sample disk images
45   cp cpmutil.dsk utility.dsk $srcdir/ld4-631.dsk \
46      $pkgdir/usr/share/$pkgname/disks
47   chmod 0444 $pkgdir/usr/share/$pkgname/disks/*
48   ln -s disks/ld4-631.dsk $pkgdir/usr/share/$pkgname/disk4p-0
49   ln -s disks/utility.dsk $pkgdir/usr/share/$pkgname/disk4p-1
51   # Install extra documentation files
52   cp ChangeLog README xtrsrom4p.README cpmutil.html dskspec.html \
53      $pkgdir/usr/share/doc/$pkgname
55   # Install the license text file
56   cp $srcdir/COPYING $pkgdir/usr/share/licenses/$pkgname