updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / minizinc / PKGBUILD
blob1283a6ed9d2b00613fc33aac0820429bb3b98cfb
1 # $Id: PKGBUILD 167 2009-06-29 10:11:22Z shtrom $
2 # Contributor: Olivier Mehani <shtrom-aur@ssji.net>
3 pkgname=minizinc
4 pkgver=1.0
5 pkgrel=1
6 pkgdesc="MiniZinc is a modelling language for constraint programming problems"
7 arch=(i686 x86_64)
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
18 build() {
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/ \;
21   
22   cat > ${pkgdir}/usr/bin/mzn2fzn << EOF
23 #!/bin/sh
25 export MZN_STDLIB_DIR="/usr/lib/minizinc"
26 exec "/usr/bin/mzn2fzn-actual" "\$@"
27 EOF
28   cat > ${pkgdir}/usr/bin/minizinc << EOF
29 #!/bin/sh
31 export MZN_STDLIB_DIR="/usr/lib/minizinc"
32 exec "/usr/bin/minizinc-actual" "\$@"
33 EOF
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: