4 pkgdesc="IDE for FreePascal (Development version, GTK)"
6 url="http://www.lazarus.freepascal.org/"
7 license=('GPL2' 'MPL' 'custom:LGPL')
8 depends=('fpc' 'fpc-src' 'gdk-pixbuf')
9 makedepends=('imagemagick' 'subversion')
12 options=('!emptydirs' '!makeflags')
16 _svntrunk=http://svn.freepascal.org/svn/lazarus/trunk/
20 mkdir -p ${pkgdir}/usr/share/pixmaps/
23 if [ -d $_svnmod/.svn ]; then
24 (cd $_svnmod && svn up -r $pkgver)
26 svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
29 msg "SVN checkout done or server timeout"
30 msg "Starting make..."
32 rm -rf $srcdir/$_svnmod-build
33 cp -r $_svnmod $_svnmod-build
40 # don't 'make examples' or you'll end up with a 100MB pkg
41 make FPC=/usr/bin/fpc LCL_PLATFORM=gtk2 clean all || return 1
42 # skip the 'make install' mess completely and do everything manually
43 mkdir -p ${pkgdir}/usr/lib/lazarus ${pkgdir}/usr/bin
45 cp -R . ${pkgdir}/usr/lib/lazarus
46 ln -s /usr/lib/lazarus/lazarus ${pkgdir}/usr/bin/lazarus
47 ln -s /usr/lib/lazarus/startlazarus ${pkgdir}/usr/bin/startlazarus
48 ln -s /usr/lib/lazarus/lazbuild ${pkgdir}/usr/bin/lazbuild
49 install -Dm644 install/man/man1/lazbuild.1 ${pkgdir}/usr/share/man/man1/lazbuild.1
50 # make 'desktop-file-validate' happy and fix missing .png icon
51 sed -e 's|\(Categories\).*|\1=IDE;Development;|' -i install/lazarus.desktop
52 install -Dm644 install/lazarus.desktop ${pkgdir}/usr/share/applications/lazarus.desktop
53 convert ${pkgdir}/usr/lib/lazarus/images/mainicon.ico ${pkgdir}/usr/share/pixmaps/lazarus.png
54 rm -r ${pkgdir}/usr/lib/lazarus/install
55 #remove the single .svn folder
56 rm -rf ${pkgdir}/usr/lib/lazarus/.svn
57 #allow to recompile lazarus from lazarus options (need chmod 777)
58 chmod -R 777 ${pkgdir}/usr/lib/lazarus/
59 # license files: /usr/lib/lazarus/COPYING*
60 install -D -m644 COPYING.modifiedLGPL.txt ${pkgdir}/usr/share/licenses/$pkgname/COPYING.modifiedLGPL.txt