desktop/lazarus/PKGBUILD
2012-10-21 13:16:44 +00:00

64 lines
2.7 KiB
Bash

#
# Apps Packages for Chakra, part of chakra-project.org
#
# Contributor (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# Mantainer: Fabian Kosmale <0inkane@googlemail.com>
pkgname=lazarus
pkgver=1.0.2
pkgrel=1
pkgdesc='Delphi-like IDE for FreePascal'
url='http://www.lazarus.freepascal.org/'
license=('GPL2' 'MPL' 'custom:LGPL')
arch=('i686' 'x86_64')
depends=('fpc' 'fpc-src' 'fpc-qtbindings' 'qt') #'gdk-pixbuf' 'gtk2'
options=('!emptydirs' '!makeflags')
categories=('programming')
source=(http://downloads.sourceforge.net/project/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${pkgver}/${pkgname}-${pkgver}-0.tar.gz)
#source=("http://downloads.sourceforge.net/project/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%201.0/lazarus-1.0-0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flazarus%2Ffiles%2FLazarus%2520Zip%2520_%2520GZip%2FLazarus%25201.0%2F&ts=1346353410&use_mirror=ignum")
md5sums=('738ee29686de71cd599b468eabf034e8')
build() {
cd $srcdir/${pkgname}
make FPC=/usr/bin/fpc LCL_PLATFORM=qt bigide
}
package() {
cd $srcdir/${pkgname}
# skip the 'make install' mess completely and do everything manually
mkdir -p $pkgdir/usr/lib/lazarus $pkgdir/usr/bin $pkgdir/usr/share/man/man1 $pkgdir/usr/share/doc
rsync -a \
--exclude="CVS" --exclude=".cvsignore" \
--exclude="*.ppw" --exclude="*.ppl" \
--exclude="*.ow" --exclude="*.a"\
--exclude="*.rst" --exclude=".#*" \
--exclude="*.~*" --exclude="*.bak" \
--exclude="*.orig" --exclude="*.rej" \
--exclude=".xvpics" \
--exclude="killme*" --exclude=".gdb_hist*" \
--exclude="debian" --exclude="COPYING*" \
--exclude="*.app" --exclude="tools/install" \
. "$pkgdir"/usr/lib/lazarus
ln -s /usr/lib/lazarus/lazbuild $pkgdir/usr/bin/lazbuild
cp -R install/man/man1/* $pkgdir/usr/share/man/man1/
mv $pkgdir/usr/lib/lazarus/docs $pkgdir/usr/share/doc/lazarus
rm -r $pkgdir/usr/lib/lazarus/install
# license files: /usr/lib/lazarus/COPYING*
install -D -m644 COPYING.modifiedLGPL.txt $pkgdir/usr/share/licenses/${pkgname}/COPYING.modifiedLGPL
# install qt binaries
install -Dm755 lazarus $pkgdir/usr/lib/lazarus/lazarus
install -Dm755 startlazarus $pkgdir/usr/lib/lazarus/startlazarus
install -dm755 $pkgdir/usr/bin
ln -s /usr/lib/lazarus/lazarus $pkgdir/usr/bin/lazarus
ln -s /usr/lib/lazarus/startlazarus $pkgdir/usr/bin/startlazarus
# make 'desktop-file-validate' happy and fix missing .png icon
sed -e 's|\(Categories\).*|\1=IDE;Development;|' \
-e 's|\.png|\.xpm|' -i install/lazarus.desktop
install -Dm644 install/lazarus.desktop $pkgdir/usr/share/applications/lazarus.desktop
install -Dm644 images/ide_icon48x48.png $pkgdir/usr/share/pixmaps/lazarus.png
}