1 # $Id: PKGBUILD 167 2009-06-29 10:11:22Z shtrom $
2 # Contributor: Olivier Mehani <shtrom-aur@ssji.net>
6 pkgdesc="MiniZinc is a modelling language for constraint programming problems"
8 url="http://www.g12.cs.mu.oz.au/minizinc/"
9 license=('custom:BSD-Nicta')
10 optdepends=('vim: a versatile editor (for which Zinc support files are provided)')
11 _targetspec=i686-pc-linux-gnu
12 if [ $CARCH = x86_64 ]; then
13 _targetspec=x86_64-unknown-linux-gnu
15 source=(http://www.g12.cs.mu.oz.au/minizinc/downloads/release-0.10/${pkgname}-${pkgver}-${_targetspec}.tar.gz)
16 md5sums=() #intentionnaly left blank to work for both architectures
19 mkdir -p ${pkgdir}/usr/{bin,lib,share/{vim/syntax/,{,doc/,licenses/}${pkgname}}}
20 find ${srcdir}/${pkgname}-${pkgver}/bin -type f -exec install -D -m 0755 {} ${pkgdir}/usr/bin/ \;
22 cat > ${pkgdir}/usr/bin/mzn2fzn << EOF
25 export MZN_STDLIB_DIR="/usr/lib/minizinc"
26 exec "/usr/bin/mzn2fzn-actual" "\$@"
28 cat > ${pkgdir}/usr/bin/minizinc << EOF
31 export MZN_STDLIB_DIR="/usr/lib/minizinc"
32 exec "/usr/bin/minizinc-actual" "\$@"
34 chmod 0755 ${pkgdir}/usr/bin/{mzn2fzn,minizinc}
36 cp -R ${srcdir}/${pkgname}-${pkgver}/lib/minizinc/ ${pkgdir}/usr/lib/
38 cp -R ${srcdir}/${pkgname}-${pkgver}/{benchmarks,examples,fcts,scripts,tests,xml} \
39 ${pkgdir}/usr/share/${pkgname}
41 cp -R ${srcdir}/${pkgname}-${pkgver}/doc ${pkgdir}/usr/share/doc/${pkgname}
43 install -D -m 0644 ${srcdir}/${pkgname}-${pkgver}/tools/vim/zinc.vim \
44 ${pkgdir}/usr/share/vim/syntax/
45 install -D -m 0644 ${srcdir}/${pkgname}-${pkgver}/COPYING \
46 ${pkgdir}/usr/share/license/${pkgname}/
50 # vim:set ts=2 sw=2 et: