# # spec file for package slic3r # # Copyright (c) 2014 SUSE LINUX Products 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: slic3r Version: 1.2.9+1125+ga54ca922 Release: 0 Summary: G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.) License: AGPL-3.0 and CC-BY-3.0 Group: Applications/Engineering # Images are CC-BY, code is AGPLv3 Url: http://slic3r.org/ # see _service file Source0: https://github.com/alexrj/Slic3r/archive/master.zip Source1: %{name}.desktop Source2: %{name}.appdata.xml Source100: README.md Patch0: slic3r-buildpl.patch Patch1: slic3r-nowarn-datadir.patch Patch2: threads.patch BuildRequires: libboost_thread-devel BuildRequires: libboost_system-devel BuildRequires: libboost_filesystem-devel BuildRequires: desktop-file-utils BuildRequires: perl(Boost::Geometry::Utils) >= 0.06 BuildRequires: perl(Class::XSAccessor) BuildRequires: perl(Devel::CheckLib) BuildRequires: perl(File::Spec) BuildRequires: perl(Growl::GNTP) BuildRequires: perl(IO::Scalar) BuildRequires: perl(List::Util) BuildRequires: perl(local::lib) BuildRequires: perl(Math::Clipper) >= 1.17 BuildRequires: perl(Math::ConvexHull) >= 1.0.4 BuildRequires: perl(Math::ConvexHull::MonotoneChain) BuildRequires: perl(Math::Geometry::Voronoi) BuildRequires: perl(Math::PlanePath) BuildRequires: perl(Module::Build) BuildRequires: perl(Moo) >= 0.091009 BuildRequires: perl(Net::DBus) BuildRequires: perl(SVG) BuildRequires: perl(Scalar::Util) BuildRequires: perl(Test::More) BuildRequires: perl(Wx) BuildRequires: perl(XML::SAX) BuildRequires: perl(XML::SAX::ExpatXS) BuildRequires: perl(parent) BuildRequires: perl(Encode::Locale) BuildRequires: perl(ExtUtils::MakeMaker) >= 6.80 BuildRequires: perl(ExtUtils::ParseXS) >= 3.22 BuildRequires: perl(Module::Build::WithXSpp) >= 0.14 BuildRequires: perl(ExtUtils::Typemap) BuildRequires: perl(ExtUtils::Typemaps::Default) BuildRequires: ImageMagick BuildRequires: unzip ExcludeArch: ppc64 ppc s390 s390x Requires: perl(Class::XSAccessor) Requires: perl(Growl::GNTP) Requires: perl(local::lib) Requires: perl(Net::DBus) Requires: perl(XML::SAX) Requires: perl(Moo) >= 0.091009 Requires: perl(Boost::Geometry::Utils) Requires: perl(Encode::Locale) Requires: perl(Math::Geometry::Voronoi) Requires: perl(Math::PlanePath::ArchimedeanChords) Requires: perl(Math::ConvexHull::MonotoneChain) Recommends: %{name}-gui %description Slic3r is a G-code generator for 3D printers. It's compatible with RepRaps, Makerbots, Ultimakers and many more machines. See the project homepage at slic3r.org and the documentation on the Slic3r wiki for more information. %package gui Summary: G-code generator for 3D printers GUI Requires: perl(Wx) Requires: perl(Wx::GLCanvas) Requires: perl(OpenGL) %description gui The desktop files and dependencies for unning Slic3r gui. %prep %setup -qn Slic3r-master %patch0 -p1 %patch1 -p1 %patch2 -p1 %build export SLIC3R_NO_AUTO=1 cd xs perl Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS" ./Build cd - # prepare pngs in mutliple sizes for res in 16 32 48 128 256; do mkdir -p hicolor/${res}x${res}/apps done cd hicolor convert ../var/Slic3r.ico %{name}.png cp %{name}-0.png 256x256/apps/%{name}.png cp %{name}-1.png 128x128/apps/%{name}.png cp %{name}-2.png 48x48/apps/%{name}.png cp %{name}-3.png 32x32/apps/%{name}.png cp %{name}-4.png 16x16/apps/%{name}.png rm %{name}-*.png cd - %install cd xs ./Build install destdir=%{buildroot} create_packlist=0 find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; # I see no way of installing slic3r with it's build script # So I copy the files around manually mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{perl_vendorlib} mkdir -p %{buildroot}%{_datadir}/%{name} mkdir -p %{buildroot}%{_datadir}/icons mkdir -p %{buildroot}%{_datadir}/appdata cd - cp -a %{name}.pl %{buildroot}%{_bindir}/%{name} cp -ar lib/* %{buildroot}%{perl_vendorlib} cp -a var/* %{buildroot}%{_datadir}/%{name} cp -r hicolor %{buildroot}%{_datadir}/icons # delete MacOS/Windows and some unused icons rm %{buildroot}%{_datadir}/%{name}/{Slic3r.icns,Slic3r.ico,joystick.png,package_green.png} desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} %check cd xs ./Build test cd - SLIC3R_NO_AUTO=1 perl Build.PL installdirs=vendor # the --gui runs no tests, it only checks requires %files %doc README.md LICENSE %{_bindir}/%{name} %{perl_vendorlib}/Slic3r* %{_datadir}/%{name} %{perl_vendorarch}/Slic3r* %{perl_vendorarch}/auto/Slic3r* %files gui %{_datadir}/icons/hicolor/*/apps/slic3r.png %{_datadir}/applications/%{name}.desktop %changelog