LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File openscad.spec of Package openscad (Project graphics)

#
# spec file for package openscad
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


Name:           openscad
Version:        2015.03
Release:        0
Summary:        Programmers Solid 3D CAD Modeller
License:        GPL-3.0+
Group:          Productivity/Graphics/CAD
Url:            http://openscad.org/
Source:         http://files.openscad.org/%{name}-%{version}-2.src.tar.gz
#PATCH-FIX-UPSTREAM openscad-git4fa5f0340a.patch -- Fix Build with Qt 5.7.1 
Patch0:         openscad-git4fa5f0340a.patch
BuildRequires:  flex
BuildRequires:  gcc-c++
BuildRequires:  glew-devel
BuildRequires:  harfbuzz-devel
BuildRequires:  libcgal-devel
BuildRequires:  opencsg-devel
%if 0%{?suse_version}
BuildRequires:  Mesa-devel
BuildRequires:  bison
BuildRequires:  libeigen3-devel
BuildRequires:  libqscintilla-qt5-devel
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5OpenGL)
BuildRequires:  pkgconfig(Qt5Widgets)
%endif
%if 0%{?fedora_version}
BuildRequires:  byacc
BuildRequires:  eigen3-devel
BuildRequires:  mesa-libGL-devel
BuildRequires:  mesa-libGLU-devel
BuildRequires:  qscintilla-devel
BuildRequires:  qt-devel
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
OpenSCAD is a software for creating solid 3D CAD objects. It does not
focus on the artistic aspects of 3D modelling and does not target the
creation of, say, computer-animated movies, but instead on the CAD
aspects, e.g. modelling of machine parts.

%prep
%setup -q -n %{name}-%{version}-2
%patch0 -p1

%build
%if 0%{?suse_version}
qmake-qt5 PREFIX=%{_prefix} QMAKE_CXXFLAGS="%{optflags}" CONFIG+=qopenglwidget
%endif
%if 0%{?fedora_version}
qmake-qt4 PREFIX=%{_prefix}
%endif
make # %{?_smp_mflags} # don't use parallel build

%install
make INSTALL_ROOT=%{buildroot} install
install -D -m 0644 doc/openscad.1 %{buildroot}%{_mandir}/man1/openscad.1
%find_lang %{name}

%files -f %{name}.lang
%defattr(-,root,root)
%doc COPYING README.md RELEASE_NOTES doc/*.pdf
%{_bindir}/openscad
%{_datadir}/openscad/
%{_datadir}/applications/openscad.desktop
%{_datadir}/pixmaps/openscad.png
%{_mandir}/man1/*
%dir %{_datadir}/appdata
%{_datadir}/appdata/openscad.appdata.xml
%{_datadir}/mime/packages/openscad.xml

%changelog