package created using the webbuild interface [release 7.0.2-1mamba;Thu Sep 01 2022]
This commit is contained in:
parent
1920dd72a0
commit
3617ac9525
@ -1,2 +1,4 @@
|
||||
# sweethome3d
|
||||
|
||||
An interior design application to draw the plan of your house in a 3D environment.
|
||||
|
||||
|
11
sweethome3d.desktop
Normal file
11
sweethome3d.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=Sweet Home 3D
|
||||
Comment=An interior design application
|
||||
TryExec=sweethome3d
|
||||
Exec=sweethome3d %f
|
||||
Icon=sweethome3d
|
||||
Categories=Office;Java;
|
||||
StartupWMClass=com-eteks-sweethome3d-SweetHome3D
|
||||
MimeType=application/x-sweethome3d
|
75
sweethome3d.sh
Normal file
75
sweethome3d.sh
Normal file
@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
|
||||
APP_CLASSPATH=""
|
||||
JAVA_EXEC=""
|
||||
JAVA_OPTS="${JAVA_OPTS} -Xmx1024m"
|
||||
|
||||
if [ -n "${JAVA_HOME}" ]
|
||||
then
|
||||
if [ -x "${JAVA_HOME}/bin/java" ]
|
||||
then
|
||||
JAVA_EXEC="${JAVA_HOME}/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVA_EXEC="$(which java)"
|
||||
fi
|
||||
|
||||
if [ -z "${JAVA_EXEC}" ]
|
||||
then
|
||||
echo "No 'java' executable can be found, please set JAVA_HOME variable or"
|
||||
echo "use the 'archlinux-java' script to set the Java version."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Find Java version
|
||||
JAVA_VERSION="$(${JAVA_EXEC} -version 2>&1 | grep ' version ' | head -1 | cut -d' ' -f 3 | tr -d '"')"
|
||||
JAVA_VERSION_MAJ=${JAVA_VERSION/.*}
|
||||
|
||||
# Skip Java versions higher than 16 as Sweethome3D actually is not yet compatible
|
||||
# Fallback to any previous version available
|
||||
# https://bugs.archlinux.org/task/72623
|
||||
if [ ${JAVA_VERSION_MAJ} -ge 17 ]
|
||||
then
|
||||
echo "Warning: Sweethome 3D actually is not compatible with Java version > 16"
|
||||
_PREVIOUS_JAVA_VERSION="$(archlinux-java status | tail -n +2 | sort | cut -d ' ' -f 3 | sort -nr -k 2 -t '-' | grep -vE '17-|18-' -m 1)"
|
||||
if [ -z "${_PREVIOUS_JAVA_VERSION}" ]
|
||||
then
|
||||
echo "No others Java version are available, please install a Java version < 17"
|
||||
exit 1
|
||||
else
|
||||
echo "Falling back to ${_PREVIOUS_JAVA_VERSION}"
|
||||
export JAVA_HOME="/usr/lib/jvm/${_PREVIOUS_JAVA_VERSION}"
|
||||
export JAVA_EXEC="${JAVA_HOME}/bin/java"
|
||||
export JAVA_VERSION="$(${JAVA_EXEC} -version 2>&1 | grep ' version ' | head -1 | cut -d' ' -f 3 | tr -d '"')"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Fix for Java 16 compatibility
|
||||
# https://bugs.archlinux.org/task/71255
|
||||
# https://sourceforge.net/p/sweethome3d/bugs/1021/
|
||||
if [ ${JAVA_VERSION_MAJ} -ge 11 ]
|
||||
then
|
||||
# Add illegal-access=permit argument
|
||||
JAVA_OPTS="${JAVA_OPTS} --illegal-access=permit"
|
||||
fi
|
||||
|
||||
# Build classpath
|
||||
APP_CLASSPATH="SweetHome3D.jar:Furniture.jar:Textures.jar:Examples.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:jeksparser-calculator.jar:jnlp.jar"
|
||||
if [ "${SWEETHOME3D_JAVA3D}" = "1.6" ]
|
||||
then
|
||||
JAVA_OPTS="${JAVA_OPTS} -Djava.library.path=/usr/lib/sweethome3d/java3d-1.6 -Djogamp.gluegen.UseTempJarCache=false"
|
||||
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-all.jar"
|
||||
else
|
||||
JAVA_OPTS="${JAVA_OPTS} -Djava.library.path=/usr/lib/sweethome3d/java3d-1.5"
|
||||
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"
|
||||
fi
|
||||
|
||||
cd "/usr/share/java/sweethome3d"
|
||||
|
||||
exec "${JAVA_EXEC}" \
|
||||
-classpath "${APP_CLASSPATH}" \
|
||||
${JAVA_OPTS} \
|
||||
-Dcom.eteks.sweethome3d.applicationId=SweetHome3D#Installer \
|
||||
com.eteks.sweethome3d.SweetHome3D \
|
||||
-open "$1"
|
||||
|
89
sweethome3d.spec
Normal file
89
sweethome3d.spec
Normal file
@ -0,0 +1,89 @@
|
||||
Name: sweethome3d
|
||||
Version: 7.0.2
|
||||
Release: 1mamba
|
||||
Summary: An interior design application to draw the plan of your house in a 3D environment
|
||||
Group: Graphical Desktop/Applications/Graphics
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: http://www.sweethome3d.com
|
||||
Source: https://downloads.sourceforge.net/sweethome3d/SweetHome3D-%{version}-src.zip
|
||||
Source1: sweethome3d.desktop
|
||||
Source2: sweethome3d.sh
|
||||
Source3: sweethome3d.xml
|
||||
License: GPL, Custom
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: java-openjdk11
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libXext-devel
|
||||
BuildRequires: libXrender-devel
|
||||
BuildRequires: libXxf86vm-devel
|
||||
BuildRequires: libglvnd-devel
|
||||
BuildRequires: libnsl-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRequires: javapackages
|
||||
BuildRequires: apache-ant
|
||||
Requires: java-openjdk11-runtime
|
||||
|
||||
%description
|
||||
An interior design application to draw the plan of your house in a 3D environment.
|
||||
|
||||
%debug_package
|
||||
|
||||
%prep
|
||||
%setup -q -n SweetHome3D-%{version}-src
|
||||
|
||||
%build
|
||||
ant application textures furniture examples help java3dLibraries
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
# Desktop and launchers
|
||||
install -m 755 -D %{SOURCE2} %{buildroot}%{_bindir}/%{name}
|
||||
install -m 755 -D %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
|
||||
install -m 644 -D %{SOURCE3} %{buildroot}%{_datadir}/mime/packages/%{name}.xml
|
||||
|
||||
# Install icon
|
||||
install -m 644 -D deploy/SweetHome3DIcon48x48.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
||||
|
||||
# Install main program and libraries
|
||||
install -m 755 -d %{buildroot}%{_javadir}/%{name}
|
||||
install -m 644 -t %{buildroot}%{_javadir}/%{name} build/*.jar
|
||||
install -m 644 -t %{buildroot}%{_javadir}/%{name} libtest/jnlp.jar
|
||||
cd lib
|
||||
install -m 644 -t %{buildroot}%{_datadir}/java/%{name} *.jar
|
||||
|
||||
# Java3D 1.5 libraries
|
||||
install -m 755 -d %{buildroot}%{_prefix}/lib/%{name}/java3d-1.5
|
||||
mv -t %{buildroot}%{_prefix}/lib/%{name}/java3d-1.5 \
|
||||
%{buildroot}%{_javadir}/%{name}/{j3dcore.jar,j3dutils.jar,vecmath.jar}
|
||||
install -m 755 -t %{buildroot}%{_prefix}/lib/%{name}/java3d-1.5 linux/x64/libj3dcore-ogl.so
|
||||
|
||||
# Java3D 1.6 libraries
|
||||
install -m 755 -d %{buildroot}%{_prefix}/lib/%{name}/java3d-1.6
|
||||
install -m 644 -t %{buildroot}%{_prefix}/lib/%{name}/java3d-1.6 java3d-1.6/*.jar
|
||||
install -m 755 -t %{buildroot}%{_prefix}/lib/%{name}/java3d-1.6 java3d-1.6/linux/amd64/*.so
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/sweethome3d
|
||||
%dir %{_prefix}/lib/sweethome3d
|
||||
%dir %{_prefix}/lib/sweethome3d/java3d-1.5
|
||||
%{_prefix}/lib/sweethome3d/java3d-1.5/*
|
||||
%dir %{_prefix}/lib/sweethome3d/java3d-1.6
|
||||
%{_prefix}/lib/sweethome3d/java3d-1.6/*
|
||||
%{_datadir}/applications/sweethome3d.desktop
|
||||
%dir %{_datadir}/java/sweethome3d
|
||||
%{_datadir}/java/sweethome3d/*
|
||||
%{_datadir}/mime/packages/sweethome3d.xml
|
||||
%{_datadir}/pixmaps/sweethome3d.png
|
||||
%doc COPYING.TXT LICENSE.TXT THIRDPARTY-LICENSE-*
|
||||
|
||||
%changelog
|
||||
* Thu Sep 01 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 7.0.2-1mamba
|
||||
- package created using the webbuild interface
|
7
sweethome3d.xml
Normal file
7
sweethome3d.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/x-sweethome3d">
|
||||
<comment>Sweet Home 3D project</comment>
|
||||
<glob pattern="*.sh3d"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
Loading…
Reference in New Issue
Block a user