summaryrefslogtreecommitdiff
path: root/community/lazarus
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-04 00:01:57 +0000
committerroot <root@rshg054.dnsready.net>2012-05-04 00:01:57 +0000
commit0a24fb835cac4007388213ad0afb15257b035b14 (patch)
tree799a160f6daeb40ccbb6f1d06e7ef3ea0caaf660 /community/lazarus
parent5520a8b04cecf4af812cbf2285e9ab6efabe147f (diff)
Fri May 4 00:01:56 UTC 2012
Diffstat (limited to 'community/lazarus')
-rw-r--r--community/lazarus/ChangeLog6
-rw-r--r--community/lazarus/PKGBUILD113
-rw-r--r--community/lazarus/lazarus-ide.install34
3 files changed, 130 insertions, 23 deletions
diff --git a/community/lazarus/ChangeLog b/community/lazarus/ChangeLog
index 79ed3b287..0a843b0ec 100644
--- a/community/lazarus/ChangeLog
+++ b/community/lazarus/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-30 BlackIkeEagle
+ * split pkgbuild
+ * lazarus (can be used for compiling)
+ * lazarus-qt (qt ide)
+ * lazarus-gtk (gtk ide)
+
2008-01-21 JJDaNiMoTh <jjdanimoth.aur@gmail.com>
* PKGBUILD: moved man pages to /usr/share
diff --git a/community/lazarus/PKGBUILD b/community/lazarus/PKGBUILD
index 515f5551c..6b3e8d720 100644
--- a/community/lazarus/PKGBUILD
+++ b/community/lazarus/PKGBUILD
@@ -1,52 +1,119 @@
-# $Id: PKGBUILD 67923 2012-03-16 10:10:35Z spupykin $
+# $Id: PKGBUILD 70224 2012-05-02 13:40:21Z idevolder $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Jens Adam (byte/jra) <j_adam@web.de>
+# Contributor: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
-pkgname=lazarus
+pkgbase=lazarus
+pkgname=('lazarus' 'lazarus-gtk2' 'lazarus-qt')
pkgver=0.9.30.4
-pkgrel=1
-pkgdesc='Delphi-like IDE for FreePascal'
+pkgrel=2
url='http://www.lazarus.freepascal.org/'
license=('GPL2' 'MPL' 'custom:LGPL')
arch=('i686' 'x86_64')
-depends=('fpc' 'fpc-src' 'gtk2')
-#makedepends=(rpmextract)
+makedepends=('fpc' 'fpc-src' 'gtk2' 'qt4pas' 'rsync')
options=('!emptydirs' '!makeflags')
source=(http://downloads.sourceforge.net/project/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20$pkgver/lazarus-$pkgver-src.tar.bz2)
md5sums=('ebd40cdfdfc4b66d1ced7a0d48d6da84')
build() {
- cd $srcdir/${pkgname}
- make FPC=/usr/bin/fpc clean bigide
+ cd $srcdir/${pkgbase}
+
+ # build gtk2 ide
+ make FPC=/usr/bin/fpc LCL_PLATFORM=gtk2 clean bigide
+ # move gtk binaries
+ mv lazarus lazarus-gtk2
+ mv startlazarus startlazarus-gtk2
+
+ # build qt ide
+ make FPC=/usr/bin/fpc LCL_PLATFORM=qt bigide
+ # move qt binaries
+ mv lazarus lazarus-qt
+ mv startlazarus startlazarus-qt
}
-package() {
- cd $srcdir/${pkgname}
+package_lazarus() {
+ pkgdesc='Delphi-like IDE for FreePascal common files'
+ depends=('fpc' 'fpc-src')
+ optdepends=(
+ 'perl: to run some scirpts in the tools directory'
+ 'gtk2: to compile gtk2 apps'
+ 'qt4pas: to compile qt apps'
+ )
+
+ cd $srcdir/${pkgbase}
# 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
- rm -r debian
- cp -R . $pkgdir/usr/lib/lazarus
+ 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="*.compiled" \
+ --exclude="killme*" --exclude=".gdb_hist*" \
+ --exclude="debian" --exclude="COPYING*" \
+ --exclude="*.app" --exclude="Makefile*" \
+ --exclude="tools/install" \
+ . "$pkgdir"/usr/lib/lazarus
- ln -s /usr/lib/lazarus/lazarus $pkgdir/usr/bin/lazarus
- ln -s /usr/lib/lazarus/startlazarus $pkgdir/usr/bin/startlazarus
- ln -s /usr/lib/lazarus/lazbuild $pkgdir/usr/bin/lazbuild
+ #remove some stuff, not needed or for in other package
+ pushd $pkgdir/usr/lib/lazarus
+ rm lazarus-*
+ rm startlazarus-*
+ popd
+ 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/$pkgbase/COPYING.modifiedLGPL
+}
+
+package_lazarus-gtk2() {
+ pkgdesc='Delphi-like IDE for FreePascal gtk2 version'
+ depends=('lazarus' 'desktop-file-utils' 'gtk2')
+ conflicts=('lazarus-qt')
+ install='lazarus-ide.install'
+
+ cd $srcdir/${pkgbase}
+
+ # install gtk binaries
+ install -Dm755 lazarus-gtk2 $pkgdir/usr/lib/lazarus/lazarus
+ install -Dm755 startlazarus-gtk2 $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
+ -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
- 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
+package_lazarus-qt() {
+ pkgdesc='Delphi-like IDE for FreePascal qt version'
+ depends=('lazarus' 'qt4pas')
+ conflicts=('lazarus-gtk2')
+ install='lazarus-ide.install'
+
+ cd $srcdir/${pkgbase}
- # strip
- find $pkgdir -perm /ugo+x -type f -exec strip {} \;
- find $pkgdir -name \*.so -type f -exec strip {} \;
+ # install qt binaries
+ install -Dm755 lazarus-qt $pkgdir/usr/lib/lazarus/lazarus
+ install -Dm755 startlazarus-qt $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
}
+# vim:set ts=2 sts=2 sw=2 et:
diff --git a/community/lazarus/lazarus-ide.install b/community/lazarus/lazarus-ide.install
new file mode 100644
index 000000000..40d56528f
--- /dev/null
+++ b/community/lazarus/lazarus-ide.install
@@ -0,0 +1,34 @@
+update_icons() {
+
+ # Setup Menus
+ if which update-desktop-database
+ then
+ update-desktop-database -q /usr/share/applications
+ fi
+
+ # Setup MIME types
+ if which update-mime-database
+ then
+ update-mime-database /usr/share/mime >/dev/null
+ fi
+
+ # Setup Icons
+ touch -c /usr/share/icons/hicolor
+ if which gtk-update-icon-cache
+ then
+ gtk-update-icon-cache -tq /usr/share/icons/hicolor
+ fi
+
+}
+
+post_install() {
+ update_icons
+}
+
+post_upgrade() {
+ update_icons
+}
+
+post_remove() {
+ update_icons
+}