summaryrefslogtreecommitdiff
path: root/community/fpc/PKGBUILD
blob: e3d154b45c114da4639e47e70aa8c9a917ac5616 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# $Id: PKGBUILD 48312 2011-05-31 09:49:30Z 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.4.4
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' 'mips64el')
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=('d069dfd3412bd0d26dcd1b81ac998305')

build() {
  cd ${srcdir}/fpcbuild-$pkgver
  make NOGDB=1 build
}

package() {
  cd ${srcdir}/fpcbuild-$pkgver
  make -j1 NOGDB=1 PREFIX=${pkgdir}/usr install

  # install package license
  install -m 755 -d ${pkgdir}/usr/share/licenses/${pkgname}
  install -m 644 fpcsrc/rtl/COPYING.FPC ${pkgdir}/usr/share/licenses/${pkgname}/

  # create symlink for compiler
  [ "$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/

  # install sample config file
  mkdir -p ${pkgdir}/etc
  ${pkgdir}/usr/lib/fpc/${pkgver}/samplecfg /usr/lib/fpc/${pkgver} ${pkgdir}/etc

  mv $pkgdir/usr/man $pkgdir/usr/share/
}