1 # Maintainer: cuihao <cuihao.leo@gmail.com>
2 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: Valeriy Lyasotskiy <onestep@ukr.net>
4 # Contributor: Jan Willemson <janwil@hot.ee>
5 # Contributor: Hugo Ideler <hugoideler@dse.nl>
6 # Contributor: Kandu <1123monkey+arch@gmail.com>
7 # Original PKGBUILD: Andre Naumann <anaumann@SPARCed.org>
8 # See http://bbs.archlinux.org/viewtopic.php?t=9318&highlight=fpc
10 pkgbase=fpc-bugfixes-svn
11 pkgname=fpc-bugfixes-svn
12 true && pkgname=('fpc-bugfixes-svn-src' 'fpc-bugfixes-svn')
16 pkgdesc='The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit Pascal Compiler. It comes with fully TP 7.0 compatible run-time library. This is the latest version of the fixes branch. Source package included.'
17 arch=('i686' 'x86_64')
18 url="http://www.freepascal.org/"
19 license=('GPL' 'LGPL' 'custom')
22 _svntrunk=http://svn.freepascal.org/svn/fpcbuild/branches/fixes_2_6/
28 msg "Connecting to SVN server..."
29 if [[ -d $_svnmod/.svn ]]; then
30 (cd $_svnmod && svn up)
32 svn co "$_svntrunk" --config-dir ./ -r $pkgver ${_svnmod}
35 msg "SVN checkout done or server timeout"
37 rm -rf "${_svnmod}-build"
38 cp -r $_svnmod "${_svnmod}-build"
41 package_fpc-bugfixes-svn-src() {
42 provides=(fpc-src=$_pkgver)
46 mkdir -p "$pkgdir/usr/lib/fpc/src"
47 cp -R "$srcdir/${_svnmod}/fpcsrc" "$pkgdir/usr/lib/fpc/src"
48 find "$pkgdir/usr/lib/fpc/src" -type d -name .svn
49 find "$pkgdir/usr/lib/fpc/src" -type d -name .svn | xargs rm -rf
52 package_fpc-bugfixes-svn() {
54 provides=(fpc=$_pkgver)
56 backup=("etc/fpc.cfg")
59 cd "$srcdir/${_svnmod}-build"
60 msg "Starting make..."
62 make NOGDB=1 build || return 1
63 make NOGDB=1 PREFIX=${pkgdir}/usr install || return 1
65 # install package license
66 install -m 755 -d $pkgdir/usr/share/licenses/$pkgbase
67 install -m 644 fpcsrc/rtl/COPYING.FPC $pkgdir/usr/share/licenses/$pkgname/
69 # create symlink for compiler
70 [ "$CARCH" = "i686" ] && ln -s /usr/lib/fpc/$_pkgver/ppc386 $pkgdir/usr/bin/
71 [ "$CARCH" = "x86_64" ] && ln -s /usr/lib/fpc/$_pkgver/ppcx64 $pkgdir/usr/bin/
73 # install sample config file
75 HOME="/dev/null" $pkgdir/usr/lib/fpc/$_pkgver/samplecfg /usr/lib/fpc/$_pkgver $pkgdir/etc
77 mv $pkgdir/usr/man $pkgdir/usr/share/