summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e2b2fb4714c72138fec6ae1e5b1e2a86455c94e6 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Maintainer: Fabrizio del Tin <fdt@university.pub>
# Contributor: Frederic Bezies <fredbezies at gmail dot com>
# Contributor: Jan Dolinar <dolik.rce@gmail.com>

pkgbase=upp
pkgname=(upp theide umk)
yearver=2022.3
pkgver=16660
pkgrel=1
pkgdesc="Radical and innovative multiplatform C++ framework (known as U++)"
arch=('any')
url="http://www.ultimatepp.org"
license=('BSD')
depends=('gcc' 'make' 'zlib' 'bzip2' 'gtk3' 'libnotify' 'openssl' 'clang' 'pkgconfig' 'gdb')
conflicts=(upp-nightly theide-nightly umk-nightly)
options=(!makeflags emptydirs !strip)
source=("http://downloads.sourceforge.net/${pkgbase}/${pkgbase}/${yearver}/upp-posix-${pkgver}.tar.xz")

prepare() {
  cd "$srcdir/upp"
  ./configure
  make -f umkMakefile -j 4
}

build() {
  cd "$srcdir/upp"
  UMK="./umk"
  $UMK ./uppsrc ide CLANG -brs ./theide
  $UMK ./uppsrc umk CLANG -brs ./umk
}

package_theide(){
  # theide specific settings
  pkgdesc="Modern IDE designed for developing large U++/C++ applications"
  # man pages
  install -D "$srcdir/upp/uppsrc/ide/theide.1" "$pkgdir/usr/share/man/man1/theide.1"
  # desktop entry
  install -D "$srcdir/upp/uppsrc/ide/theide.desktop" "$pkgdir/usr/share/applications/theide.desktop"
  # icon
  install -D "$srcdir/upp/uppsrc/ide/theide-48.png" "$pkgdir/usr/share/pixmaps/theide.png"
  # fix permissions
  find "$pkgdir/usr/" -print0 | xargs -0 chown root:root
  find "$pkgdir/usr/" -type f -print0 | xargs -0 chmod 644
  find "$pkgdir/usr/" -type d -print0 | xargs -0 chmod 755
  # install applications
  install -D "$srcdir/upp/theide" "$pkgdir/usr/bin/theide"
}

package_umk(){
  # umk specific settings
  pkgdesc="Command line builder for U++ applications"
  # man pages
  install -D "$srcdir/upp/uppsrc/umk/umk.1" "$pkgdir/usr/share/man/man1/umk.1"
  # fix permissions
  find "$pkgdir/usr/" -print0 | xargs -0 chown root:root
  find "$pkgdir/usr/" -type f -print0 | xargs -0 chmod 644
  find "$pkgdir/usr/" -type d -print0 | xargs -0 chmod 755
  # install applications
  install -D "$srcdir/upp/umk" "$pkgdir/usr/bin/umk"
}

package_upp() {
  # upp specific settings
  pkgdesc="Radical and innovative multiplatform C++ framework (known as U++)"
  depends=('theide')
  #copy source files
  mkdir -p "$pkgdir/usr/share/upp"
  msg2 "Moving the source codes..."
  cp -r "$srcdir/upp/"{examples,reference,tutorial,uppsrc} "$pkgdir/usr/share/upp/"
  echo "#define IDE_VERSION \"$pkgver-Arch\"" > "$pkgdir/usr/share/upp/uppsrc/ide/version.h"
  #fix permissions
  msg2 "Setting permissions..."
  find "$pkgdir/usr/" -print0 | xargs -0 chown root:root
  find "$pkgdir/usr/" -type f -print0 | xargs -0 chmod 644
  find "$pkgdir/usr/" -type d -print0 | xargs -0 chmod 755
}
sha256sums=('e118bce3427ca595557a35f67ec9ca52f913407607c76be7da705f8ba1dadd9b')