%global shortname cura-lulzbot Name: cura-lulzbot Version: 2.6.66 Release: 1%{?dist} Epoch: 1 Summary: 3D printer control software License: AGPLv3+ URL: https://code.alephobjects.com/project/profile/10/ # git clone https://code.alephobjects.com/source/Cura2.git # cd Cura2 # git checkout v2.6.66 # git archive --format=tar.gz --prefix=cura-lulzbot-%%{version}/ v2.6.66 > ../cura-lulzbot-%%{version}.tar.gz Source0: cura-lulzbot-%{version}.tar.gz BuildArch: noarch Patch0: cura-lulzbot-2.6.52-system.patch Patch1: cura-lulzbot-2.6.21-CuraEngine-lulzbot.patch Patch2: cura-lulzbot-2.6.52-version-fix.patch # There are Python plugins in /usr/lib/cura # We need to byte-compile it with Python 3 %global __python %{__python3} BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: dos2unix BuildRequires: gettext BuildRequires: git BuildRequires: python3-devel BuildRequires: python3-pytest BuildRequires: python3-uranium-lulzbot == %{version} Requires: open-sans-fonts Requires: python3-pyserial Requires: python3-savitar >= 2.6 Requires: python3-uranium-lulzbot == %{version} Requires: python3-zeroconf Requires: qt5-qtquickcontrols Requires: CuraEngine-lulzbot >= 1:%{version} # lulzbot package has the materials inside it, does not conflict # Requires: cura-fdm-materials == %%{version} # So that it just works Requires: 3dprinter-udev-rules # Needs this or it segfaults. *shrug* Requires: libglvnd-devel %description Cura is a project which aims to be an single software solution for 3D printing. While it is developed to be used with the Ultimaker 3D printer, it can be used with other RepRap based designs. Cura prepares your model for 3D printing. For novices, it makes it easy to get great results. For experts, there are over 200 settings to adjust to your needs. As it's open source, our community helps enrich it even more. This is the Lulzbot fork of Cura2. %prep %setup -q -n cura-lulzbot-%{version} %patch0 -p1 -b .system %patch1 -p1 -b .cel %patch2 -p1 -b .verfix sed -i 's|2.6|%{version}|g' version.json # The setup.py is only useful for py2exe, remove it, so noone is tempted to use it rm setup.py # fix icon pathing in desktop file sed -i 's|/cura/resources|/cura-lulzbot/resources|g' cura-lulzbot.desktop.in # Upstream installs to lib/python3/dist-packages # We want to install to %%{python3_sitelib} sed -i 's|lib/python${PYTHON_VERSION_MAJOR}/dist-packages|%(echo %{python3_sitelib} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt # Wrong end of line encoding dos2unix docs/How_to_use_the_flame_graph_profiler.md # Wrong shebang sed -i '1s=^#!/usr/bin/\(python\|env python\)3*=#!%{__python3}=' cura_app.py # Invalid locale name ptbr # https://github.com/Ultimaker/Uranium/issues/246 mv resources/i18n/{ptbr,pt_BR} sed -i 's/"Language: ptbr\n"/"Language: pt_BR\n"/' resources/i18n/pt_BR/*.po %build %{cmake} -DCURA_VERSION:STRING=%{version} . make %{?_smp_mflags} # rebuild locales cd resources/i18n rm *.pot for DIR in *; do pushd $DIR for FILE in *.po; do msgfmt $FILE -o LC_MESSAGES/${FILE%po}mo || : done popd done cd - %install make install DESTDIR=%{buildroot} cp -a version.json %{buildroot}%{_datadir}/%{shortname} # Sanitize the location of locale files pushd %{buildroot}%{_datadir} mv %{shortname}/resources/i18n locale ln -s ../../locale %{shortname}/resources/i18n rm locale/*/*.po for i in locale/*/LC_MESSAGES; do pushd $i mv cura.mo %{shortname}.mo if [ -f fdmextruder.def.json.mo ]; then mv fdmextruder.def.json.mo fdmextruder-lulzbot.def.json.mo fi if [ -f fdmprinter.def.json.mo ]; then mv fdmprinter.def.json.mo fdmprinter-lulzbot.def.json.mo fi popd done popd # Unbundle fonts rm -rf %{buildroot}%{_datadir}/%{shortname}/resources/themes/cura/fonts/ ln -s %{_datadir}/fonts/open-sans/ %{buildroot}%{_datadir}/%{shortname}/resources/themes/cura/fonts # mv files to avoid conflict mv %{buildroot}%{_datadir}/appdata/cura.appdata.xml %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml mv %{buildroot}%{_datadir}/mime/packages/cura.xml %{buildroot}%{_datadir}/mime/packages/%{name}.xml %find_lang %{shortname} %find_lang fdmextruder-lulzbot.def.json %find_lang fdmprinter-lulzbot.def.json %check # The lulzbot's uranium (UM) module lives here: export PYTHONPATH=%{python3_sitelib}/CuraLulzbot %{__python3} -m pytest -v desktop-file-validate %{buildroot}%{_datadir}/applications/%{shortname}.desktop %files -f %{shortname}.lang -f fdmextruder-lulzbot.def.json.lang -f fdmprinter-lulzbot.def.json.lang %license LICENSE %doc README.md # CHANGES is not updated since 15.x # things in docs are developer orianted %{python3_sitelib}/CuraLulzbot/cura %{_datadir}/%{shortname} %{_datadir}/applications/%{shortname}.desktop %{_datadir}/appdata/%{shortname}.appdata.xml %{_datadir}/mime/packages/%{shortname}.xml %{_bindir}/cura-lulzbot %{_prefix}/lib/%{shortname} %changelog * Wed Jan 17 2018 Tom Callaway - 1:2.6.66-1 - update to 2.6.66 * Fri Jan 12 2018 Tom Callaway - 1:2.6.63-2 - fix conflicting i18n files * Wed Jan 3 2018 Tom Callaway - 1:2.6.63-1 - update to 2.6.63 * Fri Dec 8 2017 Tom Callaway - 1:2.6.52-1 - update to 2.6.52 * Fri Oct 27 2017 Tom Callaway - 1:2.6.43-1 - update to 2.6.43 * Wed Oct 25 2017 Tom Callaway - 1:2.6.29-1 - update to 2.6.29 * Wed Aug 23 2017 Tom Callaway - 1:2.6.23-2 - fix system patch * Wed Aug 23 2017 Tom Callaway - 1:2.6.23-1 - update to 2.6.23 * Mon Aug 14 2017 Tom Callaway - 1:2.6.22-1 - update to 2.6.22 * Tue Aug 8 2017 Tom Callaway - 1:2.6.21-3 - use CuraEngine-lulzbot * Tue Aug 8 2017 Tom Callaway - 1:2.6.21-2 - fix namespacing to avoid conflicts (thanks to Miro Hrončok) * Tue Aug 8 2017 Tom Callaway - 1:2.6.21-1 - update to 2.6.21 * Thu Jul 27 2017 Tom Callaway - 1:2.6.19-1 - lulzbot version (forked from Miro's spec) * Thu Jul 20 2017 Miro Hrončok - 1:2.6.1-2 - Require cura-fdm-materials * Wed Jun 28 2017 Miro Hrončok - 1:2.6.1-1 - Updated to 2.6.1 * Wed May 10 2017 Miro Hrončok - 1:2.5.0-2 - Require qt5-qtquickcontrols * Wed May 03 2017 Miro Hrončok - 1:2.5.0-1 - Update to modern Cura 2.x (introduce Epoch) (#1393176) * Fri Feb 10 2017 Fedora Release Engineering - 15.04.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Nov 03 2016 Miro Hrončok - 15.04.4-5 - Explicitly run cura on X11 GDK backend (#1388953) * Tue Jul 19 2016 Fedora Release Engineering - 15.04.4-4 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Fri Mar 25 2016 Miro Hrončok - 15.04.4-3 - Require 3dprinter-udev-rules * Wed Feb 03 2016 Fedora Release Engineering - 15.04.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Sat Jan 30 2016 Miro Hrončok - 15.04.4-1 - New version * Wed Jul 08 2015 Miro Hrončok - 15.02.1-4 - No longer depend on pypy - Simplify the launcher * Mon Jul 06 2015 Miro Hrončok - 15.02.1-3 - Patch for #1230281 * Mon Jul 06 2015 Miro Hrončok - 15.02.1-2 - Require latest CuraEngine * Mon Jul 06 2015 Miro Hrončok - 15.02.1-1 - Update to 15.02.1 * Wed Jun 17 2015 Fedora Release Engineering - 14.12.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Fri May 29 2015 Miro Hrončok - 14.12.1-4 - Patch: Open directories with xdg-open (#1217961) * Mon Apr 20 2015 Miro Hrončok - 14.12.1-3 - Handle files from the command line (#1213220) * Mon Mar 30 2015 Miro Hrončok - 14.12.1-2 - Update the no firmware patch according to communication with Cura upstream * Mon Dec 29 2014 Miro Hrončok - 14.12.1-1 - Updated to 14.12.1 - No longer depend on firmware * Sat Oct 25 2014 Miro Hrončok - 14.09-1 - New version 14.09 * Tue Jun 24 2014 Miro Hrončok - 14.06-2 - Require at least the firmware version originally bundled in git * Mon Jun 23 2014 Miro Hrončok - 14.06-1 - New version 14.06 * Sat Jun 07 2014 Fedora Release Engineering - 13.11.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Dec 14 2013 Miro Hrončok - 13.11.2-1 - New version 13.11.2 * Wed Oct 16 2013 Miro Hrončok - 13.10-1 - New upstream release with CuraEngine * Sat Aug 03 2013 Fedora Release Engineering - 13.04-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Tue May 07 2013 Miro Hrončok - 13.04-2 - Remove resources directory before trying to create a symlink there * Sat May 04 2013 Miro Hrončok - 13.04-1 - New upstream release - Fixed missing slice module * Sat Apr 20 2013 Miro Hrončok - 13.03-1 - New upstream release * Tue Feb 19 2013 Miro Hrončok - 12.12-3 - chmod 755 cura-stripper.sh - Use firmware from ultimaker-marlin-firmware package - removed bundling note * Sun Jan 20 2013 Miro Hrončok - 12.12-2 - Launcher is in Python now * Sun Jan 13 2013 Miro Hrončok - 12.12-1 - First version