summaryrefslogtreecommitdiff
path: root/community-testing/fpc/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community-testing/fpc/PKGBUILD')
-rw-r--r--community-testing/fpc/PKGBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/community-testing/fpc/PKGBUILD b/community-testing/fpc/PKGBUILD
new file mode 100644
index 000000000..16a70055a
--- /dev/null
+++ b/community-testing/fpc/PKGBUILD
@@ -0,0 +1,51 @@
+# $Id: PKGBUILD 61547 2012-01-02 19:53:55Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Valeriy Lyasotskiy <onestep@ukr.net>
+# Contributor: Jan Willemson <janwil@hot.ee>
+# Contributor: Hugo Ideler <hugoideler@dse.nl>
+# Original PKGBUILD: Andre Naumann <anaumann@SPARCed.org>
+# See http://bbs.archlinux.org/viewtopic.php?t=9318&highlight=fpc
+
+pkgname=fpc
+pkgver=2.6.0
+pkgrel=1
+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."
+arch=('i686' 'x86_64')
+url="http://www.freepascal.org/"
+license=('GPL' 'LGPL' 'custom')
+backup=("etc/fpc.cfg")
+depends=(ncurses)
+makedepends=(fpc)
+options=(zipman)
+source=(ftp://ftp.freepascal.org/pub/fpc/dist/$pkgver/source/fpcbuild-$pkgver.tar.gz)
+md5sums=('17375e665a4e1311f85812fe2754f609')
+
+build() {
+ cd ${srcdir}/fpcbuild-$pkgver
+ pushd fpcsrc/compiler
+ fpcmake -Tall
+ popd
+ make NOGDB=1 build
+}
+
+package() {
+ cd ${srcdir}/fpcbuild-$pkgver
+
+ export HOME=$srcdir
+
+ make -j1 NOGDB=1 PREFIX=${pkgdir}/usr install
+
+ export PATH=$pkgdir/usr/bin:$PATH
+
+ install -Dm0644 fpcsrc/rtl/COPYING.FPC ${pkgdir}/usr/share/licenses/${pkgname}/COPYING.FPC
+
+ [ "$CARCH" = "i686" ] && ln -s /usr/lib/fpc/${pkgver}/ppc386 ${pkgdir}/usr/bin/
+ [ "$CARCH" = "x86_64" ] && ln -s /usr/lib/fpc/${pkgver}/ppcx64 ${pkgdir}/usr/bin/
+
+ mkdir -p ${pkgdir}/etc
+ ${pkgdir}/usr/lib/fpc/${pkgver}/samplecfg $pkgdir/usr/lib/fpc/${pkgver} ${pkgdir}/etc
+
+ mv $pkgdir/usr/man $pkgdir/usr/share/
+
+ find $pkgdir/etc/ -type f -exec sed -i "s|$pkgdir||g" {} \;
+}