File OpenSCAD.spec of Package OpenSCAD
#
# spec file for package openscad-nightly
#
# Copyright (c) 2025 SUSE LLC
#
# 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/
#
%global debug_package %{nil}
Name: openscad-nightly
Version: 20250121T084250.git7edc1df95
Release: 0
Summary: The Programmers Solid 3D CAD Modeller
License: GPL-2.0-or-later
Source: https://github.com/openscad/openscad/archive/HEAD/openscad-%{version}.tar.gz
BuildRequires: (curl or curl-minimal)
BuildRequires: bison
BuildRequires: boost-devel
BuildRequires: cairo-devel
BuildRequires: ccache
BuildRequires: double-conversion-devel
BuildRequires: flex
BuildRequires: fontconfig-devel
BuildRequires: freetype-devel
BuildRequires: gcc-c++
BuildRequires: gettext
BuildRequires: glew-devel
BuildRequires: harfbuzz-devel
BuildRequires: libxml2-devel
BuildRequires: libzip-devel
BuildRequires: make
BuildRequires: opencsg-devel
BuildRequires: pkgconfig
%if 0%{?suse_version}
BuildRequires: Mesa-devel
BuildRequires: libQt5OpenGL-devel
BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_program_options-devel
BuildRequires: libboost_regex-devel
BuildRequires: libboost_system-devel
BuildRequires: libboost_thread-devel
BuildRequires: libcgal-devel
BuildRequires: libeigen3-devel
BuildRequires: libqscintilla-qt5-devel
BuildRequires: libqt5-qtbase-devel
BuildRequires: libqt5-qtmultimedia-devel
BuildRequires: libqt5-qtsvg-devel
BuildRequires: tbb-devel
BuildRequires: update-desktop-files
%endif
%if 0%{?fedora_version}
BuildRequires: CGAL-devel
BuildRequires: eigen3-devel
BuildRequires: glib2-devel
BuildRequires: gmp-devel
BuildRequires: libXmu-devel
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: mpfr-devel
BuildRequires: qscintilla-qt5-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtmultimedia-devel
BuildRequires: qt5-qtsvg-devel
BuildRequires: tbb-devel
%endif
%description
OpenSCAD is a software for creating solid 3D CAD models. It is
free software and available for Linux/UNIX, Windows and Mac OS X.
Unlike most free software for creating 3D models (such as Blender)
it does not focus on the artistic aspects of 3D modelling but
instead on the CAD aspects. Thus it might be the application you
are looking for when you are planning to create 3D models of machine
parts but pretty sure is not what you are looking for when you are
more interested in creating computer-animated movies.
%prep
%setup -q -c -T
gzip -dc /home/abuild/rpmbuild/SOURCES/openscad-%{version}.tar.gz | tar -x --strip-components=1 -f -
if [ $? -ne 0 ]; then
exit $?
fi
%build
OPENSCAD_VERSION=`echo "%{version}" | sed -e 's/^\(....\)\(..\)\(..\).*/\1.\2.\3.nightly/'`
OPENSCAD_COMMIT=`echo "%{version}" | cut -b 20-26`
mkdir build
cd build
# FIXME: you should use the %%cmake macros
cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEXPERIMENTAL=ON -DSNAPSHOT=ON -DSUFFIX=nightly -DOPENSCAD_VERSION="$OPENSCAD_VERSION" -DOPENSCAD_COMMIT="$OPENSCAD_COMMIT"
%make_build
%install
cd build
%make_install
%if 0%{?suse_version}
%suse_update_desktop_file openscad-nightly Graphics 3DGraphics
%endif
%files
%dir %{_datadir}/metainfo
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/48x48
%dir %{_datadir}/icons/hicolor/48x48/apps
%dir %{_datadir}/icons/hicolor/64x64
%dir %{_datadir}/icons/hicolor/64x64/apps
%dir %{_datadir}/icons/hicolor/128x128
%dir %{_datadir}/icons/hicolor/128x128/apps
%dir %{_datadir}/icons/hicolor/256x256
%dir %{_datadir}/icons/hicolor/256x256/apps
%dir %{_datadir}/icons/hicolor/512x512
%dir %{_datadir}/icons/hicolor/512x512/apps
%license COPYING
%doc README.md RELEASE_NOTES.md doc/*.pdf
%{_bindir}/openscad-nightly
%{_mandir}/man1/*
%{_datadir}/openscad-nightly/
%{_datadir}/applications/openscad-nightly.desktop
%{_datadir}/icons/hicolor/48x48/apps/openscad-nightly.png
%{_datadir}/icons/hicolor/64x64/apps/openscad-nightly.png
%{_datadir}/icons/hicolor/128x128/apps/openscad-nightly.png
%{_datadir}/icons/hicolor/256x256/apps/openscad-nightly.png
%{_datadir}/icons/hicolor/512x512/apps/openscad-nightly.png
%{_datadir}/mime/packages/openscad-nightly.xml
%{_datadir}/metainfo/org.openscad.OpenSCAD-nightly.appdata.xml
%changelog