# Maintainer: Erich Eckner # Contributor: L # Contributor: Sergej Pupykin # Contributor: Valeriy Lyasotskiy # Contributor: Jan Willemson # Contributor: Hugo Ideler # Contributor: BlackIkeEagle # Original PKGBUILD: Andre Naumann # See http://bbs.archlinux.org/viewtopic.php?t=9318&highlight=fpc pkgname='fpc-src-svn' pkgver=3.3.1.r14158.6fda6f79 _pkgver="${pkgver%.r*}" _commit="${pkgver##*.}" pkgrel=1 arch=('i486' 'i686' 'pentium4' 'x86_64') url='http://www.freepascal.org/' license=('GPL' 'LGPL' 'custom') depends=() makedepends=('git') pkgdesc='Sources for the Free Pascal Compiler (required by the Lazarus IDE)' options=('!strip') conflicts=('fpc-src') provides=("fpc-src=${pkgver}") source=('git+https://gitlab.com/freepascal.org/fpc/source.git#commit='"${_commit}") sha512sums=('SKIP') pkgver() { cd "${srcdir}"/source last_version=$( git tag \ | grep '^[0-9.]\+$' \ | sort -V \ | tail -n1 ) _commit=$( git rev-parse "${_commit}" \ | cut -c1-8 ) revision=$( git rev-list --count "${_commit}" "^${last_version}" ) printf '%s.r%s.%s' \ "${last_version}" \ "${revision}" \ "${_commit}" } package() { install -dm755 "${pkgdir}"/usr/lib/fpc/src mv "${srcdir}"/source/* "${pkgdir}"/usr/lib/fpc/src/ }