File SweetHome3D.spec of Package SweetHome3D
#
# spec file for package SweetHome3D
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2016 Michiel van der Wulp
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: SweetHome3D
Version: 7.5
Release: 0
Summary: An application for placing your furniture on a house 2D plan, with a 3D preview
License: GPL-2.0-or-later
Group: Productivity/Graphics/3D Editors
URL: https://www.sweethome3d.com/
Source0: https://downloads.sourceforge.net/project/sweethome3d/SweetHome3D-source/%{name}-%{version}-src/%{name}-%{version}-src.zip
Source1: %{name}.png
Source2: %{name}.desktop
Source3: %{name}.sh.in
BuildRequires: ant
BuildRequires: dos2unix
BuildRequires: java-3d
BuildRequires: java-devel
BuildRequires: jpackage-utils
BuildRequires: unzip
BuildRequires: xerces-j2
BuildRequires: xml-apis
BuildRequires: xml-resolver
Requires: java
Requires: java-3d
BuildArch: noarch
%description
Sweet Home 3D is a free application that helps you placing your
furniture on a house 2D plan, with a 3D preview.
%prep
%setup -q -n %{name}-%{version}-src
rm -r lib/linux
rm -r lib/macosx
rm -r lib/windows
rm lib/j3d*.jar
rm lib/vecmath*.jar
ln -s %{_javadir}/java-3d/*.jar lib/
dos2unix *.TXT
chmod 644 *.TXT
# Generate launcher script from template
sed 's|@DATADIR@|%{_datadir}|g' %{SOURCE3} > %{name}.sh
%build
%{ant} application furniture textures help
%install
# jars
install -Dpm 644 build/%{name}.jar %{buildroot}%{_javadir}/%{name}/%{name}-%{version}.jar
pushd %{buildroot}%{_javadir}/%{name}
for jar in *-%{version}*; do
ln -sf ${jar} `echo $jar | sed "s|-%{version}||g"`
done
popd
for i in Furniture Textures Help; do
install -pm 644 build/$i.jar %{buildroot}%{_javadir}/%{name}
done
# remove java3d links
rm lib/j3d*.jar lib/vecmath.jar
# copy other unpackaged libs
install -pm 644 lib/*.jar %{buildroot}%{_javadir}/%{name}
install -pm 644 libtest/jnlp.jar %{buildroot}%{_javadir}/%{name}
# startscript
install -D -m 755 %{name}.sh -t %{buildroot}%{_bindir}
# icon and menu-entry
install -D -m 644 %{SOURCE1} -t %{buildroot}%{_datadir}/pixmaps
install -D -m 644 %{SOURCE2} -t %{buildroot}%{_datadir}/applications
%files
%license COPYING.TXT
%{_bindir}/%{name}.sh
%dir %{_javadir}/%{name}
%{_javadir}/%{name}/*.jar
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%changelog