talimat 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # Tanım: Evinizin planını 3D ortamda çizmek için bir iç mekan tasarımı uygulaması
  2. # URL: http://www.sweethome3d.com/
  3. # Paketçi: Oltulu
  4. # Gerekler: shared-mime-info desktop-file-utils xorg-libxext xorg-libxrender openjdk
  5. # Grup: tasarım
  6. isim=sweethome3d
  7. surum=5.6
  8. devir=1
  9. kaynak=(http://downloads.sourceforge.net/${isim}/SweetHome3D-${surum}-linux-x64.tgz::SweetHome3D-${surum}-linux-x64.tgz)
  10. derle() {
  11. cd $SRC
  12. # Başlatıcı
  13. mkdir -pv $PKG/usr/share/applications &&
  14. cat > $PKG/usr/share/applications/$isim.desktop << "EOF" &&
  15. [Desktop Entry]
  16. Version=1.0
  17. Type=Application
  18. Name=Sweet Home 3D
  19. Comment=Bir iç tasarım uygulaması
  20. TryExec=sweethome3d
  21. Exec=sweethome3d %f
  22. Icon=sweethome3d
  23. Categories=Graphics;Office;Java;
  24. StartupWMClass=com-eteks-sweethome3d-SweetHome3D
  25. MimeType=application/x-sweethome3d
  26. EOF
  27. # SH
  28. mkdir -pv $PKG/usr/bin &&
  29. cat > $PKG/usr/bin/$isim << "EOF" &&
  30. #!/bin/sh
  31. APP_CLASSPATH=""
  32. JAVA_EXEC=""
  33. JAVA_OPTS="${JAVA_OPTS} -Xmx1024m"
  34. if [ -n "${JAVA_HOME}" ]
  35. then
  36. if [ -x "${JAVA_HOME}/bin/java" ]
  37. then
  38. JAVA_EXEC="${JAVA_HOME}/bin/java"
  39. fi
  40. else
  41. JAVA_EXEC="$(which java)"
  42. fi
  43. if [ -z "${JAVA_EXEC}" ]
  44. then
  45. echo "No 'java' executable can be found, please set JAVA_HOME variable or"
  46. echo "use the 'archlinux-java' script to set the Java version."
  47. exit 1
  48. fi
  49. # Build classpath
  50. APP_CLASSPATH="SweetHome3D.jar:Furniture.jar:Textures.jar:Help.jar:iText-2.1.7.jar:freehep-vectorgraphics-svg-2.1.1b.jar:sunflow-0.07.3i.jar:jmf.jar:batik-svgpathparser-1.7.jar"
  51. if [ "${SWEETHOME3D_JAVA3D}" = "1.5" ]
  52. then
  53. JAVA_OPTS="${JAVA_OPTS} -Djava.library.path=/usr/lib/sweethome3d/java3d-1.5"
  54. APP_CLASSPATH="${APP_CLASSPATH}:/usr/lib/sweethome3d/java3d-1.5/j3dcore.jar:/usr/lib/sweethome3d/java3d-1.5/j3dutils.jar:/usr/lib/sweethome3d/java3d-1.5/vecmath.jar"
  55. else
  56. JAVA_OPTS="${JAVA_OPTS} -Djava.library.path=/usr/lib/sweethome3d/java3d-1.6 -Djogamp.gluegen.UseTempJarCache=false"
  57. APP_CLASSPATH="${APP_CLASSPATH}:/usr/lib/sweethome3d/java3d-1.6/j3dcore.jar:/usr/lib/sweethome3d/java3d-1.6/j3dutils.jar:/usr/lib/sweethome3d/java3d-1.6/vecmath.jar:/usr/lib/sweethome3d/java3d-1.6/gluegen-rt.jar:/usr/lib/sweethome3d/java3d-1.6/jogl-java3d.jar"
  58. fi
  59. APP_CLASSPATH="${APP_CLASSPATH}:javaws.jar"
  60. cd "/usr/share/java/sweethome3d"
  61. exec "${JAVA_EXEC}" \
  62. -classpath "${APP_CLASSPATH}" \
  63. ${JAVA_OPTS} \
  64. -Dcom.eteks.sweethome3d.applicationId=SweetHome3D#Installer \
  65. com.eteks.sweethome3d.SweetHome3D \
  66. -open "$1"
  67. EOF
  68. # Xml
  69. mkdir -pv $PKG/usr/share/mime/packages &&
  70. cat > $PKG/usr/share/mime/packages/$isim.xml << "EOF" &&
  71. <?xml surum="1.0" encoding="UTF-8"?>
  72. <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  73. <mime-type type="application/x-sweethome3d">
  74. <comment>Sweet Home 3D project</comment>
  75. <glob pattern="*.sh3d"/>
  76. </mime-type>
  77. </mime-info>
  78. EOF
  79. # Lisansları kur
  80. cd "SweetHome3D-${surum}"
  81. install -m 755 -d "${PKG}/usr/share/licenses/${isim}"
  82. install -m 755 -t "${PKG}/usr/share/licenses/${isim}" THIRDPARTY-LICENSE-*
  83. # Install icon
  84. install -m 644 -D "SweetHome3DIcon.png" "${PKG}/usr/share/pixmaps/${isim}.png"
  85. # Install javaws.jar from jre8
  86. install -m 755 -d "${PKG}/usr/share/java/${isim}"
  87. install -m 644 -t "${PKG}/usr/share/java/${isim}" jre8/lib/javaws.jar
  88. # Install main program and libraries
  89. cd "lib"
  90. install -m 644 -t "${PKG}/usr/share/java/${isim}" *.jar
  91. # Java3D 1.5 kütüphanesi
  92. install -m 755 -d "${PKG}/usr/lib/${isim}/java3d-1.5"
  93. mv -t "${PKG}/usr/lib/${isim}/java3d-1.5" \
  94. "${PKG}"/usr/share/java/${isim}/{j3dcore.jar,j3dutils.jar,vecmath.jar}
  95. install -m 755 -t "${PKG}/usr/lib/${isim}/java3d-1.5" libj3dcore-ogl.so
  96. # Java3D 1.6 kütüphanesi
  97. install -m 755 -d "${PKG}/usr/lib/${isim}/java3d-1.6"
  98. install -m 644 -t "${PKG}/usr/lib/${isim}/java3d-1.6" java3d-1.6/*.jar
  99. install -m 755 -t "${PKG}/usr/lib/${isim}/java3d-1.6" java3d-1.6/*.so
  100. chmod 755 $PKG/usr/share/applications/$isim.desktop
  101. chmod 644 ${PKG}/usr/share/mime/packages/${isim}.xml
  102. chmod 755 ${PKG}/usr/bin/$isim
  103. chmod +x ${PKG}/usr/bin/$isim
  104. }