summaryrefslogtreecommitdiff
path: root/manualPorts/lazarus/Pkgfile
blob: 081e958f42c6e5045fdfbd84060b538735416a43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Description: Delphi-like IDE for fpc.
# URL: http://www.lazarus-ide.org/
# Maintainer: Erich Eckner, crux at eckner dot net
# Depends on: fpc fpc-src gdb

name=lazarus
version=3.6
release=1
source=(https://downloads.sourceforge.net/project/$name/Lazarus%20Zip%20_%20GZip/Lazarus%20$version/$name-$version-0.tar.gz)

build() {
    cd $name
    MAKEFLAGS="$(echo "$MAKEFLAGS" | sed "s/-j[[:digit:]]\+\s\?//")" make LCL_PLATFORM=gtk2 bigide
    mkdir -p "$PKG"/usr/lib/lazarus "$PKG"/usr/bin "$PKG"/usr/share/man/man1 "$PKG"/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" \
      . "$PKG"/usr/lib/lazarus
    for s in "$PKG"/usr/lib/lazarus/*laz*; do
      [ ! -d "$s" ] || continue
      [ -x "$s" ] || continue
      ln -s "../lib/lazarus/${s##*/}" "${PKG}/usr/bin/${s##*/}"
    done
    cp -R install/man/man1/* "$PKG"/usr/share/man/man1/
    mv "$PKG"/usr/lib/lazarus/docs "$PKG"/usr/share/doc/lazarus
    mkdir -p "$PKG"/usr/lib/lazarus/docs
    ln -s /usr/share/doc/lazarus/chm "$PKG"/usr/lib/lazarus/docs/html
    ln -s /usr/share/doc/lazarus/lazdoc.css "$PKG"/usr/lib/lazarus/docs/lazdoc.css

    rm -r "$PKG"/usr/lib/lazarus/install
}