Advertisement
Guest User

structuresynth PKGBUILD -- arch linux

a guest
Jun 24th, 2014
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.22 KB | None | 0 0
  1. # Maintainer: Kyle Keen <keenerd@gmail.com>
  2. # Contributor: Adrian Carpenter <adriatic.c@gmail.com>
  3. #  (patch: Hayato Hashimoto <hayato.hashimoto@gmail.com>)
  4. pkgname=structuresynth
  5. pkgver=1.5.0
  6. pkgrel=3
  7. pkgdesc="Graphics tool to make 3D structures from sets of rules, similar to Context Free."
  8. arch=('i686' 'x86_64')
  9. url="http://structuresynth.sourceforge.net"
  10. license=('GPL')
  11. depends=('qt5-base' 'qt5-script')
  12. source=("http://downloads.sourceforge.net/structuresynth/StructureSynth-Source-v${pkgver}.zip")
  13. md5sums=('862705c5bc9e778094046399f44d6c26')
  14. install=${pkgname}.install
  15.  
  16. build() {
  17.   cd "$srcdir/Structure Synth Source Code/"
  18.  
  19.   _patches=("s|loose|lose|"
  20.             "s|\.\./\.\./Misc|/usr/share/$pkgname/Misc|"
  21.             "s|\.\./\.\./Examples|/usr/share/$pkgname/Examples|")
  22.   _patches_2=("s|QtGui/||" "s|\, QApplication::UnicodeUTF8||" )
  23.   for _i in "${_patches[@]}"; do
  24.     #echo "${_i}"
  25.     sed -ie "$_i" StructureSynth/GUI/MainWindow.cpp
  26.   done
  27.   for _i in "${_patches_2[@]}"; do
  28.     echo "sed -ie ${_i} StructureSynth/GUI/TemplateExportDialog.h"
  29.     sed -ie "$_i" StructureSynth/GUI/TemplateExportDialog.h
  30.     sed -ie "$_i" StructureSynth/GUI/TemplateExportDialog.cpp
  31.   done
  32.   sed -i "2i #include <GL/glu.h>" SyntopiaCore/GLEngine/{Sphere.h,Raytracer/RayTracer.cpp}
  33.  
  34.   qmake -project -after "CONFIG+=opengl" -after "QT+=widgets xml opengl script" -after "unix:LIBS+=-lGLU -L/usr/lib64"
  35.   qmake
  36.   make
  37. }
  38.  
  39. package() {
  40.   cd "$srcdir/Structure Synth Source Code/"
  41.   mkdir -p "$pkgdir/usr/share/applications"
  42.   cp structure-synth.desktop "$pkgdir/usr/share/applications"
  43.   mkdir -p "$pkgdir/usr/share/icons"
  44.   cp images/fileicons/StructureSynth-256.png "$pkgdir/usr/share/icons/structure-synth.png"
  45.  
  46.   mkdir -p "$pkgdir/usr/share/$pkgname"
  47.   cp -rv Examples Misc "$pkgdir/usr/share/$pkgname"
  48.   #rm -r "${pkgdir}/usr/share/${pkgname}/Examples/DontDeploy"
  49.   chmod -R 0644 "$pkgdir/usr/share/$pkgname"
  50.   chmod 0755 "$pkgdir/usr/share/$pkgname"
  51.   chmod 0755 "$pkgdir/usr/share/$pkgname/Examples"
  52.   chmod 0755 "$pkgdir/usr/share/$pkgname/Examples/Tutorials"
  53.   chmod 0755 "$pkgdir/usr/share/$pkgname/Misc"
  54.   install -Dm0755 "Structure Synth Source Code" "$pkgdir/usr/bin/structure-synth"
  55. }
  56.  
  57. # vim:set ts=2 sw=2 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement