mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-28 23:21:53 +00:00
50 lines
1.6 KiB
Bash
50 lines
1.6 KiB
Bash
# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $
|
|
# Maintainer: Allan McRae <allan@archlinux.org>
|
|
# Contributor: Andrzej Zbrzezny <a.zbrzezny@gmail.pl>
|
|
|
|
pkgname=crafty
|
|
pkgver=23.0
|
|
pkgrel=1
|
|
pkgdesc="A chess playing/analysis program written by Dr. Robert Hyatt"
|
|
arch=('i686' 'x86_64')
|
|
url="http://www.cis.uab.edu/hyatt/hyatt.html"
|
|
license=('custom')
|
|
source=(ftp://ftp.cis.uab.edu/pub/hyatt/source/${pkgname}-${pkgver}.zip \
|
|
ftp://ftp.cis.uab.edu/pub/hyatt/book/book.bin \
|
|
ftp://ftp.cis.uab.edu/pub/hyatt/book/books.bin \
|
|
crafty.sh
|
|
crafty.copyright)
|
|
md5sums=('c0fe0ad318f313a1bf6ac4cb7427ec73'
|
|
'085e207bd19bd974d511e77fbef36507'
|
|
'6d7abc20944720986086ff6569fe35ec'
|
|
'f996a5aed840808617928d61fb10e1f3'
|
|
'd47dc2d7c826909c342d32684fda554f')
|
|
|
|
build(){
|
|
cd ${srcdir}/$pkgname-$pkgver
|
|
|
|
sed -i -e '/-o crafty/s/CC/CXX/' \
|
|
-e "s:CXFLAGS:CXXFLAGS:g" \
|
|
-e "s:=\$(CFLAGS):=\'\$(CFLAGS)\':" \
|
|
-e "s:DCPUS=2:DCPUS=8:" Makefile
|
|
sed -i "s:\"crafty.hlp\":\"/usr/share/crafty/crafty.hlp\":" option.c
|
|
|
|
if [ "$CARCH" == "x86_64" ]; then
|
|
sed -i -e "s:-march=i686:-march=x86-64:" \
|
|
-e "s:boundary=2:boundary=4:" \
|
|
-e "s:-DINLINE32:-DINLINE64:" Makefile
|
|
fi
|
|
|
|
make linux || return 1
|
|
install -Dm755 crafty ${pkgdir}/usr/bin/crafty
|
|
install -Dm644 crafty.hlp ${pkgdir}/usr/share/crafty/crafty.hlp
|
|
|
|
cd ${srcdir}
|
|
install -m644 book.bin ${pkgdir}/usr/share/crafty/
|
|
install -m644 books.bin ${pkgdir}/usr/share/crafty/
|
|
|
|
install -Dm755 crafty.sh ${pkgdir}/etc/profile.d/crafty.sh
|
|
|
|
install -Dm644 crafty.copyright \
|
|
${pkgdir}/usr/share/licenses/$pkgname/crafty.copyright
|
|
}
|