PKGBUILD 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. # Maintainer (aur): Jan Dolinar <dolik.rce@gmail.com>
  2. pkgbase=upp
  3. pkgname=(upp theide umk)
  4. pkgver=2018.1
  5. _revision=11873
  6. pkgrel=1
  7. pkgdesc="Radical and innovative multiplatform C++ framework (known as U++)"
  8. arch=('i686' 'x86_64')
  9. url="http://www.ultimatepp.org"
  10. license=('BSD')
  11. groups=()
  12. depends=('gtk2' 'libnotify' 'libpng' 'gcc-libs' 'libxft' 'desktop-file-utils')
  13. makedepends=()
  14. optdepends=('libnotify: Enables compiling gtk-styled apps' 'sox: Enables playing notification sounds')
  15. replaces=()
  16. backup=()
  17. options=(!makeflags emptydirs !strip)
  18. source=("http://downloads.sourceforge.net/project/upp/upp/$pkgver/upp-x11-src-$_revision.tar.gz"
  19. 'GCC.bm'
  20. 'license.txt'
  21. 'https://raw.githubusercontent.com/ultimatepp/mirror/master/uppbox/lpbuild2/theide.1'
  22. 'https://raw.githubusercontent.com/ultimatepp/mirror/master/uppbox/lpbuild2/umk.1'
  23. 'https://raw.githubusercontent.com/ultimatepp/mirror/master/uppbox/lpbuild2/mkfile')
  24. noextract=()
  25. sha256sums=('0231b768830db96257ebf7a9cc1aaff05017aa40a2ea6dfa577de7232c1cd07b'
  26. '5c0955ef99bc08d4c79b96a470bc17eb2ae3bed5f0d66d86eff7fb726629ae79'
  27. '880ad22b3a7cef8adc2750553e5b7b785ec926168f50e01bacddcae52c07e71a'
  28. 'cdb98e08996a809c9a323f83768edde6a22a6aad73d9ed6a193f70ac78a8b123'
  29. 'ce881f93471bcb65a7cc4cb4d539579fda67c783b810289ab45a02113146f645'
  30. '45be7a52fb5db25c09b3851c708f2d21022240667e3d2cf39b4f614c9ad01078')
  31. # uncomment this to true to build theide with simpler GUI (with no GTK dependecies)
  32. #USE_NOGTK=false
  33. build() {
  34. cd "$srcdir/upp-x11-src-$_revision"
  35. FLAGS="GCC GUI MT STACKTRACE"
  36. USE_NOGTK="${USE_NOGTK:-false}"
  37. if [ "$USE_NOGTK" == "true" ]; then
  38. SUFFIX="-nogtk"
  39. FLAGS="$FLAGS NOGTK"
  40. fi
  41. # set the version string
  42. echo "#define IDE_VERSION \"$pkgver-Parabola-$CARCH-$SUFFIX\"" > "uppsrc/ide/version.h"
  43. # build
  44. msg2 "Building umk..."
  45. make -f "$srcdir/mkfile" PKG=umk FLAGS="GCC STACKTRACE" NESTS="uppsrc" TIME= COLOR=0 USEMAINCFG=0 JOBS=5 ECHO=0 TARGET="$srcdir/umk"
  46. msg2 "Building theide..."
  47. make -f "$srcdir/mkfile" PKG=ide FLAGS="$FLAGS" NESTS="uppsrc" TIME= COLOR=0 USEMAINCFG=0 JOBS=5 ECHO=0 TARGET="$srcdir/theide"
  48. }
  49. package_theide(){
  50. # theide specific settings
  51. pkgdesc="Modern IDE designed for developping large U++/C++ applications"
  52. if [ "$USE_NOGTK" = true ]; then
  53. depends=('libpng' 'gcc-libs' 'libxft' 'libxinerama' 'desktop-file-utils')
  54. optdepends=('sox: Enables notification sounds')
  55. else
  56. depends=('gtk2' 'libnotify' 'desktop-file-utils')
  57. optdepends=('sox: Enables notification sounds')
  58. fi
  59. options=(!makeflags emptydirs)
  60. # license
  61. install -D "$srcdir/license.txt" "$pkgdir/usr/share/licenses/$pkgname/license.txt"
  62. # man pages
  63. install -D "$srcdir/theide.1" "$pkgdir/usr/share/man/man1/theide.1"
  64. install -D "$srcdir/umk.1" "$pkgdir/usr/share/man/man1/umk.1"
  65. # desktop entry
  66. install -D "$srcdir/upp-x11-src-$_revision/uppsrc/ide/theide.desktop" "$pkgdir/usr/share/applications/theide.desktop"
  67. # icon
  68. install -D "$srcdir/upp-x11-src-$_revision/uppsrc/ide/theide-48.png" "$pkgdir/usr/share/pixmaps/theide.png"
  69. # fix permissions
  70. find "$pkgdir/usr/" -print0 | xargs -0 chown root:root
  71. find "$pkgdir/usr/" -type f -print0 | xargs -0 chmod 644
  72. find "$pkgdir/usr/" -type d -print0 | xargs -0 chmod 755
  73. # install applications
  74. install -D "$srcdir/theide" "$pkgdir/usr/bin/theide"
  75. }
  76. package_umk(){
  77. # theide specific settings
  78. pkgdesc="Command line builder for U++ applications"
  79. depends=('gcc-libs' 'desktop-file-utils')
  80. options=(!makeflags emptydirs)
  81. # license
  82. install -D "$srcdir/license.txt" "$pkgdir/usr/share/licenses/$pkgname/license.txt"
  83. # man pages
  84. install -D "$srcdir/umk.1" "$pkgdir/usr/share/man/man1/umk.1"
  85. # fix permissions
  86. find "$pkgdir/usr/" -print0 | xargs -0 chown root:root
  87. find "$pkgdir/usr/" -type f -print0 | xargs -0 chmod 644
  88. find "$pkgdir/usr/" -type d -print0 | xargs -0 chmod 755
  89. # install applications
  90. install -D "$srcdir/umk" "$pkgdir/usr/bin/umk"
  91. }
  92. package_upp() {
  93. pkgdesc="Radical and innovative multiplatform C++ framework (known as U++)"
  94. depends=('theide')
  95. optdepends=('libnotify: Enables compiling gtk-styled apps')
  96. options=(emptydirs !strip)
  97. #copy source files
  98. mkdir -p "$pkgdir/usr/share/upp"
  99. msg2 "Moving the source codes..."
  100. cp -r "$srcdir/upp-x11-src-$_revision/"{bazaar,examples,reference,tutorial,uppsrc} "$pkgdir/usr/share/upp/"
  101. echo "#define IDE_VERSION \"$pkgver-Parabola\"" > "$pkgdir/usr/share/upp/uppsrc/ide/version.h"
  102. msg2 "Copying additional files..."
  103. #license
  104. mkdir -p "$pkgdir/usr/share/licenses/upp"
  105. cp "$srcdir/license.txt" "$pkgdir/usr/share/licenses/upp"
  106. #build method
  107. cp "$srcdir/GCC.bm" "$pkgdir/usr/share/upp"
  108. #fix permissions
  109. msg2 "Setting permissions..."
  110. find "$pkgdir/usr/" -print0 | xargs -0 chown root:root
  111. find "$pkgdir/usr/" -type f -print0 | xargs -0 chmod 644
  112. find "$pkgdir/usr/" -type d -print0 | xargs -0 chmod 755
  113. }