%global shortname curalulzbot Name: cura-lulzbot Version: 4.13.4 Release: %autorelease Epoch: 1 Summary: 3D printer control software License: AGPL-3.0-or-later URL: https://gitlab.com/lulzbot3d/ Source0: https://gitlab.com/lulzbot3d/cura-le/cura-lulzbot/-/archive/%{version}/cura-lulzbot-%{version}.tar.bz2 BuildArch: noarch Conflicts: cura # There are Python plugins in /usr/lib/uranium, which we need to byte-compile # 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 BuildRequires: CuraEngine-lulzbot Requires: CuraEngine-lulzbot Requires: open-sans-fonts Requires: python3-numpy-stl Requires: python3-pynest2d Requires: python3-pyserial Requires: python3-savitar >= 2.6 Requires: python3-sentry-sdk Requires: python3-shapely Requires: python3-uranium-lulzbot >= 3.6.21 Requires: python3-zeroconf Requires: qt5-qtquickcontrols2, qt5-qtquickcontrols # -12 has the M175 firmware needed for cura-le 3.6.22. Requires: lulzbot-marlin-firmware >= 1:1.1.9.34-12 Requires: lulzbot-marlin-firmware-pro >= 1:2.0.0.144-12 Requires: lulzbot-marlin-firmware-bio >= 1:2.0.0.174 # 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 Cura. %prep %setup -q -n cura-lulzbot-%{version} %autopatch -p1 # Upstream installs to lib/python3/dist-packages, but 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 # Nuke weird invalid locales. rm -r resources/i18n/jp resources/i18n/ptbr %build %cmake %cmake_build # 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 %cmake_install #rm -r %{buildroot}%{_libdir}/cura/plugins/OctoPrintPlugin # Sanitize the location of locale files. pushd %{buildroot}%{_datadir} mv cura/resources/i18n locale ln -s ../../locale cura/resources/i18n rm locale/*/*.po for i in locale/*/LC_MESSAGES; do pushd $i if [ -f cura.mo ]; then mv cura.mo %{name}.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 fi popd done popd # Bytecompile the plugins. %py_byte_compile %{__python3} %{buildroot}%{_prefix}/lib64/%{shortname} %find_lang %{name} %find_lang uranium %find_lang fdmextruder-lulzbot.def.json %find_lang fdmprinter-lulzbot.def.json %check %files -f %{name}.lang -f uranium.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_sitearch}/cura %{_datadir}/cura %{_datadir}/applications/cura-lulzbot.desktop %{_datadir}/metainfo/cura.appdata.xml %{_datadir}/mime/packages/cura.xml %{_bindir}/cura %{_prefix}/lib64/cura %{_datadir}/icons/hicolor/128x128/apps/cura-icon.png %changelog %autochangelog