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
28 msg "SVN checkout done or server timeout"
30 msg "Starting make..."
31 rm -rf ${srcdir}/$_svnmod-build
32 cp -r $_svnmod $_svnmod-build
35 # don't 'make examples' or you'll end up with a 100MB pkg
36 make FPC=/usr/bin/fpc LCL_PLATFORM=gtk2 clean all || return 1
37 # skip the 'make install' mess completely and do everything manually
38 mkdir -p ${pkgdir}/usr/lib/lazarus ${pkgdir}/usr/bin
40 cp -R . ${pkgdir}/usr/lib/lazarus
41 ln -s /usr/lib/lazarus/lazarus ${pkgdir}/usr/bin/lazarus
42 ln -s /usr/lib/lazarus/startlazarus ${pkgdir}/usr/bin/startlazarus
43 ln -s /usr/lib/lazarus/lazbuild ${pkgdir}/usr/bin/lazbuild
44 install -Dm644 install/man/man1/lazbuild.1 ${pkgdir}/usr/share/man/man1/lazbuild.1
45 # make 'desktop-file-validate' happy and fix missing .png icon
46 sed -e 's|\(Categories\).*|\1=IDE;Development;|' -i install/lazarus.desktop
47 install -Dm644 install/lazarus.desktop ${pkgdir}/usr/share/applications/lazarus.desktop
48 convert ${pkgdir}/usr/lib/lazarus/images/mainicon.ico ${pkgdir}/usr/share/pixmaps/lazarus.png
49 rm -r ${pkgdir}/usr/lib/lazarus/install
50 #remove the single .svn folder
51 rm -rf ${pkgdir}/usr/lib/lazarus/.svn
52 #allow to recompile lazarus from lazarus options (need chmod 777)
53 chmod -R 777 ${pkgdir}/usr/lib/lazarus/
54 # license files: /usr/lib/lazarus/COPYING*
55 install -D -m644 COPYING.modifiedLGPL.txt ${pkgdir}/usr/share/licenses/$pkgname/COPYING.modifiedLGPL.txt