File rapcad.spec of Package rapcad

#
# spec file for package rapcad
#
# Copyright (c) 2023 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/
#


Name:           rapcad
Version:        1.0.2
Release:        0
Summary:        Rapid prototyping CAD IDE for 3D printing machines
License:        GPL-3.0-or-later
Group:          Productivity/Graphics/CAD
URL:            https://rapcad.org/
Source:         https://github.com/GilesBathgate/RapCAD/archive/v%{version}.tar.gz#/RapCAD-%{version}.tar.gz
BuildRequires:  bison
BuildRequires:  boost-devel
BuildRequires:  flex
BuildRequires:  gcc-c++
BuildRequires:  glu-devel
BuildRequires:  gmp-devel
BuildRequires:  hicolor-icon-theme
BuildRequires:  libcgal-devel
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  readline-devel

%description
RapCAD is the Rapid prototyping CAD IDE for RepRap and RepStrap 3D printing machines.

%prep
%setup -q -n RapCAD-%{version}

%build
%qmake5 "CONFIG+=official"
%make_build

%install
make INSTALL_ROOT=%{buildroot} install

# Create desktop file
mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}/%{_datadir}/applications/%{name}.desktop <<'EOF'
[Desktop Entry]
Name=RapCAD
Categories=Graphics;
Comment=Rapid prototyping CAD IDE for 3D printing machines
Exec=%{name}
Icon=%{name}
Type=Application
Terminal=false
StartupNotify=true
EOF

# Install icon for .desktop file
install -Dm 0644 icons/AppIcon.iconset/icon_256x256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png

%files
%license COPYING
%doc README.asciidoc
%{_bindir}/rapcad
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png

%changelog
openSUSE Build Service is sponsored by