updated on Fri Jan 20 12:03:34 UTC 2012
[aur-mirror.git] / fsharp / PKGBUILD
blobf002145da9aeb53f08e9fe43c8c5277d6a56459f
1 # Contributors: Chris Schwaab christopher.schwaab gmail
2 #               fixje, nosami
3 pkgname=fsharp
4 pkgver=2.0.0.0
5 pkgrel=10
6 pkgdesc="An ML based functional language integrated with the .NET platform including the PowerPack extensions."
7 arch=('i686' 'x86_64')
8 url="http://research.microsoft.com/fsharp/fsharp.aspx"
9 license=('custom')
10 depends=('mono>=2' 'unzip')
11 source=("http://www.microsoft.com/downloads/info.aspx?na=46&SrcFamilyId=EFFC5BC4-C3DF-4172-AD1C-BC62935861C5&SrcDisplayLang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f4%2f5%2fB%2f45BD9FBC-22BA-4B45-84B7-17D1AD0122A1%2ffsharp.zip"
12         "http://download.codeplex.com/Download?ProjectName=fsharppowerpack&DownloadId=122711&FileTime=129367247874000000&Build=18337")
13 md5sums=('0e79601a6211191f6a86c31d5c0948f7'
14          '2ec4adc12c2dc1ed80015fbb0ecb117a')
15 install=fsharp.install
17 _powerpkgver=2.0.0.0
18 build() {
19         mkdir -p $pkgdir/usr/bin
20         mkdir -p $pkgdir/opt/fsharp/bin
21         mkdir $pkgdir/opt/fsharp/lib
22         mkdir $pkgdir/opt/fsharp/doc
24         # FSharp
25         cd FSharp-$pkgver
26         cat > fsc <<__EOF__
27 #!/bin/sh
28 mono /opt/fsharp/bin/fsc.exe \$*
29 __EOF__
30         cat > fsi <<__EOF__
31 #!/bin/sh
32 mono /opt/fsharp/bin/fsi.exe --readline+ \$*
33 __EOF__
35         wget --no-check-certificate -O mono.snk 'http://github.com/mono/mono/raw/master/mcs/class/mono.snk'
36         mv mono.snk $pkgdir/opt/fsharp || return 1
38         cp -r bin $pkgdir/opt/fsharp/ || return 1
39         cp -r lib $pkgdir/opt/fsharp/ || return 1
40         cp -r doc $pkgdir/opt/fsharp/ || return 1
42         # fsc is taken by another package
43         install -m755 fsc $pkgdir/usr/bin/fsharpc || return 1
44         install -m755 fsi $pkgdir/usr/bin/fsharpi || return 1
45         install -Dm644 LICENSE-fsharp.txt \
46                        $pkgdir/usr/share/licenses/fsharp/license || return 1
48         # PowerPack
49         cd $srcdir/FSharpPowerPack-$_powerpkgver
50         chmod a+rx,u+rwx bin/*.dll
52         cat > bin/fslex <<__EOF__
53 #!/bin/sh
54 mono /opt/fsharp/bin/fslex.exe \$*
55 __EOF__
56         cat > bin/fsyacc <<__EOF__
57 #!/bin/sh
58 mono /opt/fsharp/bin/fsyacc.exe \$*
59 __EOF__
60         cat > bin/fshtmldoc <<__EOF__
61 #!/bin/sh
62 mono /opt/fsharp/bin/fshtmldoc.exe \$*
63 __EOF__
65         install $srcdir/FSharp-$pkgver/bin/FSharp.Core.dll \
66                 $pkgdir/opt/fsharp/bin || return 1
68         # pdb2mdb was exploding on the debug files so I just skip them
69         install -Dm755 bin/FSharp.Compiler.CodeDom.dll \
70                        bin/FSharp.PowerPack.Build.Tasks.dll \
71                        bin/FSharp.PowerPack.Compatibility.dll \
72                        bin/FSharp.PowerPack.dll \
73                        bin/FSharp.PowerPack.Linq.dll \
74                        bin/FSharp.PowerPack.Metadata.dll \
75                        bin/FSharp.PowerPack.Parallel.Seq.dll \
76                        bin/FSharp.PowerPack.targets \
77                        $pkgdir/opt/fsharp/lib || return 1
79         install -Dm755 bin/fshtmldoc.exe bin/fslex.exe bin/fsyacc.exe \
80                        $pkgdir/opt/fsharp/bin/ || return 1
82         install -m755 bin/fshtmldoc bin/fsyacc bin/fslex \
83                       $pkgdir/usr/bin/ || return 1
84         install -Dm644 $srcdir/FSharpPowerPack-$_powerpkgver/License.rtf \
85           $pkgdir/usr/share/licenses/fsharp/powerpack-license || return 1