Blame cura-lulzbot.spec

620cea4
%global shortname cura-lulzbot
e5e577e
620cea4
Name:           cura-lulzbot
5cd332e
Version:        3.2.21
0e730a0
Release:        2%{?dist}
620cea4
Epoch:		1
620cea4
Summary:        3D printer control software
620cea4
License:        AGPLv3+
620cea4
URL:            https://code.alephobjects.com/project/profile/10/
5cd332e
# git clone https://code.alephobjects.com/source/cura-lulzbot.git
5cd332e
# cd cura-lulzbot
5cd332e
# git checkout v3.2.21
5cd332e
## CANNOT use git archive here, need git hash for version
5cd332e
# cd ..
5cd332e
# mv cura-lulzbot cura-lulzbot-3.2.21
5cd332e
# tar cvfz cura-lulzbot-3.2.21.tar.gz cura-lulzbot-3.2.21/
620cea4
Source0:	cura-lulzbot-%{version}.tar.gz
4090bef
BuildArch:      noarch
5cd332e
Patch0:		cura-lulzbot-3.2.17-system.patch
620cea4
Patch1:		cura-lulzbot-2.6.21-CuraEngine-lulzbot.patch
620cea4
Patch2:		cura-lulzbot-2.6.52-version-fix.patch
620cea4
620cea4
# There are Python plugins in /usr/lib/cura
620cea4
# We need to byte-compile it with Python 3
620cea4
%global __python %{__python3}
620cea4
620cea4
BuildRequires:  cmake
4090bef
BuildRequires:  desktop-file-utils
620cea4
BuildRequires:  dos2unix
4090bef
BuildRequires:  gettext
620cea4
BuildRequires:  git
620cea4
BuildRequires:  python3-devel
620cea4
BuildRequires:  python3-pytest
620cea4
BuildRequires:  python3-uranium-lulzbot == %{version}
5cd332e
BuildRequires:  CuraEngine-lulzbot >= 1:%{version}
620cea4
620cea4
Requires:       open-sans-fonts
5cd332e
Requires:	python3-numpy-stl
620cea4
Requires:       python3-pyserial
620cea4
Requires:       python3-savitar >= 2.6
620cea4
Requires:       python3-uranium-lulzbot == %{version}
620cea4
Requires:       python3-zeroconf
5cd332e
Requires:       qt5-qtquickcontrols2
620cea4
Requires:       CuraEngine-lulzbot >= 1:%{version}
5cd332e
Requires:	lulzbot-marlin-firmware >= 1:1.1.8.59
620cea4
# lulzbot package has the materials inside it, does not conflict
620cea4
# Requires:       cura-fdm-materials == %%{version}
620cea4
2b42460
# So that it just works
620cea4
Requires:       3dprinter-udev-rules
620cea4
# Needs this or it segfaults. *shrug*
620cea4
Requires:	libglvnd-devel
4090bef
4090bef
%description
620cea4
Cura is a project which aims to be an single software solution for 3D printing.
620cea4
While it is developed to be used with the Ultimaker 3D printer, it can be used
620cea4
with other RepRap based designs.
4090bef
620cea4
Cura prepares your model for 3D printing. For novices, it makes it easy to get
620cea4
great results. For experts, there are over 200 settings to adjust to your
620cea4
needs. As it's open source, our community helps enrich it even more.
4090bef
620cea4
This is the Lulzbot fork of Cura2.
45bbe1c
620cea4
%prep
620cea4
%setup -q -n cura-lulzbot-%{version}
620cea4
%patch0 -p1 -b .system
620cea4
%patch1 -p1 -b .cel
620cea4
%patch2 -p1 -b .verfix
5cd332e
sed -i 's|3.2|%{version}|g' version.json
5cd332e
5cd332e
ENGINEVER=`cat /usr/share/CuraEngine-lulzbot/version.json |grep engine`
5cd332e
URANIUMVER=`cat /usr/share/uranium-lulzbot/version.json | grep uranium`
5cd332e
CURAVER=`cat version.json |grep cura_version`
5cd332e
CURAGITVER=`git rev-parse HEAD`
5cd332e
5cd332e
cat > version.json.generated << EOF
5cd332e
{
5cd332e
$CURAVER,
5cd332e
  "cura": "$CURAGITVER",
5cd332e
$URANIUMVER,
5cd332e
$ENGINEVER,
5cd332e
  "libarcus": "Fedora system package",
5cd332e
  "libsavitar": "Fedora system package",
5cd332e
  "binarydata": "Built from source",
5cd332e
  "build": "$CURAGITVER"
5cd332e
}
5cd332e
EOF
5cd332e
mv version.json version.json.old
5cd332e
mv version.json.generated version.json
4090bef
620cea4
# The setup.py is only useful for py2exe, remove it, so noone is tempted to use it
620cea4
rm setup.py
4090bef
620cea4
# fix icon pathing in desktop file
620cea4
sed -i 's|/cura/resources|/cura-lulzbot/resources|g' cura-lulzbot.desktop.in
4090bef
620cea4
# Upstream installs to lib/python3/dist-packages
620cea4
# We want to install to %%{python3_sitelib}
620cea4
sed -i 's|lib/python${PYTHON_VERSION_MAJOR}/dist-packages|%(echo %{python3_sitelib} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt
4090bef
620cea4
# Wrong end of line encoding
620cea4
dos2unix docs/How_to_use_the_flame_graph_profiler.md
4090bef
620cea4
# Wrong shebang
620cea4
sed -i '1s=^#!/usr/bin/\(python\|env python\)3*=#!%{__python3}=' cura_app.py
4090bef
5cd332e
# nuke weird invalid locales
5cd332e
rm -rf resources/i18n/jp resources/i18n/ptbr
5cd332e
5cd332e
%if 0
620cea4
# Invalid locale name ptbr
620cea4
# https://github.com/Ultimaker/Uranium/issues/246
620cea4
mv resources/i18n/{ptbr,pt_BR}
620cea4
sed -i 's/"Language: ptbr\n"/"Language: pt_BR\n"/' resources/i18n/pt_BR/*.po
b60f64f
# also jp
b60f64f
mv resources/i18n/{jp,ja}
b60f64f
sed -i 's/"Language: jp\n"/"Language: ja\n"/' resources/i18n/ja/*.po
5cd332e
%endif
4a00ff9
4090bef
%build
620cea4
%{cmake} -DCURA_VERSION:STRING=%{version} .
620cea4
make %{?_smp_mflags}
620cea4
4090bef
# rebuild locales
620cea4
cd resources/i18n
620cea4
rm *.pot
620cea4
for DIR in *; do
620cea4
  pushd $DIR
620cea4
  for FILE in *.po; do
620cea4
    msgfmt $FILE -o LC_MESSAGES/${FILE%po}mo || :
620cea4
  done
620cea4
  popd
4090bef
done
4090bef
cd -
4090bef
4090bef
%install
620cea4
make install DESTDIR=%{buildroot}
620cea4
620cea4
cp -a version.json %{buildroot}%{_datadir}/%{shortname}
620cea4
620cea4
# Sanitize the location of locale files
620cea4
pushd %{buildroot}%{_datadir}
620cea4
mv %{shortname}/resources/i18n locale
620cea4
ln -s ../../locale %{shortname}/resources/i18n
620cea4
rm locale/*/*.po
f960834
for i in locale/*/LC_MESSAGES; do
f960834
	pushd $i
f960834
	mv cura.mo %{shortname}.mo
f960834
	if [ -f fdmextruder.def.json.mo ]; then
f960834
		mv fdmextruder.def.json.mo fdmextruder-lulzbot.def.json.mo
f960834
	fi
f960834
	if [ -f fdmprinter.def.json.mo ]; then
f960834
		mv fdmprinter.def.json.mo fdmprinter-lulzbot.def.json.mo
f960834
	fi
f960834
	popd
f960834
done
f960834
620cea4
popd
620cea4
620cea4
# mv files to avoid conflict
620cea4
mv %{buildroot}%{_datadir}/appdata/cura.appdata.xml %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
620cea4
mv %{buildroot}%{_datadir}/mime/packages/cura.xml %{buildroot}%{_datadir}/mime/packages/%{name}.xml
620cea4
b60f64f
# remove git files
b60f64f
rm -rf %{buildroot}/usr/lib/%{shortname}/plugins/OctoPrintPlugin/.gitignore
b60f64f
f960834
%find_lang %{shortname}
f960834
%find_lang fdmextruder-lulzbot.def.json
f960834
%find_lang fdmprinter-lulzbot.def.json
620cea4
620cea4
620cea4
%check
5cd332e
%if 0
620cea4
# The lulzbot's uranium (UM) module lives here:
620cea4
export PYTHONPATH=%{python3_sitelib}/CuraLulzbot
620cea4
%{__python3} -m pytest -v
620cea4
desktop-file-validate %{buildroot}%{_datadir}/applications/%{shortname}.desktop
5cd332e
%endif
620cea4
620cea4
f960834
%files -f %{shortname}.lang -f fdmextruder-lulzbot.def.json.lang -f fdmprinter-lulzbot.def.json.lang
620cea4
%license LICENSE
620cea4
%doc README.md
620cea4
# CHANGES is not updated since 15.x
620cea4
# things in docs are developer orianted
620cea4
%{python3_sitelib}/CuraLulzbot/cura
620cea4
%{_datadir}/%{shortname}
620cea4
%{_datadir}/applications/%{shortname}.desktop
620cea4
%{_datadir}/appdata/%{shortname}.appdata.xml
620cea4
%{_datadir}/mime/packages/%{shortname}.xml
620cea4
%{_bindir}/cura-lulzbot
620cea4
%{_prefix}/lib/%{shortname}
4090bef
4090bef
%changelog
0e730a0
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1:3.2.21-2
0e730a0
- Rebuilt for Python 3.7
0e730a0
5cd332e
* Wed May 23 2018 Tom Callaway <spot@fedoraproject.org> - 1:3.2.21-1
5cd332e
- update to 3.2.21
5cd332e
5cd332e
* Wed May 23 2018 Tom Callaway <spot@fedoraproject.org> - 1:3.2.20-1
5cd332e
- update to 3.2.20
5cd332e
5cd332e
* Wed May  9 2018 Tom Callaway <spot@fedoraproject.org> - 1:3.2.19-1
5cd332e
- update to 3.2.19
5cd332e
5cd332e
* Mon Apr 23 2018 Tom Callaway <spot@fedoraproject.org> - 1:3.2.18-1
5cd332e
- update to 3.2.18
5cd332e
5cd332e
* Mon Apr 16 2018 Tom Callaway <spot@fedoraproject.org> - 1:3.2.17-1
5cd332e
- update to 3.2.17
5cd332e
a4ae3ed
* Mon Apr 16 2018 Tom Callaway <spot@fedoraproject.org> - 1:2.6.69-2
a4ae3ed
- add PostProcessingPlugin
a4ae3ed
f79f699
* Wed Mar 14 2018 Tom Callaway <spot@fedoraproject.org> - 1:2.6.69-1
f79f699
- update to 2.6.69
f79f699
e0ce994
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.6.66-3
e0ce994
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e0ce994
b60f64f
* Thu Jan 18 2018 Tom Callaway <spot@fedoraproject.org> - 1:2.6.66-2
b60f64f
- fix japanese locale
b60f64f
6861c93
* Wed Jan 17 2018 Tom Callaway <spot@fedoraproject.org> - 1:2.6.66-1
6861c93
- update to 2.6.66
6861c93
f960834
* Fri Jan 12 2018 Tom Callaway <spot@fedoraproject.org> - 1:2.6.63-2
f960834
- fix conflicting i18n files
f960834
620cea4
* Wed Jan  3 2018 Tom Callaway <spot@fedoraproject.org> - 1:2.6.63-1
620cea4
- update to 2.6.63
a01ec8e
620cea4
* Fri Dec  8 2017 Tom Callaway <spot@fedoraproject.org> - 1:2.6.52-1
620cea4
- update to 2.6.52
98f2683
620cea4
* Fri Oct 27 2017 Tom Callaway <spot@fedoraproject.org> - 1:2.6.43-1
620cea4
- update to 2.6.43
689ee23
620cea4
* Wed Oct 25 2017 Tom Callaway <spot@fedoraproject.org> - 1:2.6.29-1
620cea4
- update to 2.6.29
62a91d9
620cea4
* Wed Aug 23 2017 Tom Callaway <spot@fedoraproject.org> - 1:2.6.23-2
620cea4
- fix system patch
cd14a6b
620cea4
* Wed Aug 23 2017 Tom Callaway <spot@fedoraproject.org> - 1:2.6.23-1
620cea4
- update to 2.6.23
1254f6a
620cea4
* Mon Aug 14 2017 Tom Callaway <spot@fedoraproject.org> - 1:2.6.22-1
620cea4
- update to 2.6.22
4a00ff9
620cea4
* Tue Aug  8 2017 Tom Callaway <spot@fedoraproject.org> - 1:2.6.21-3
620cea4
- use CuraEngine-lulzbot
09bbb17
620cea4
* Tue Aug  8 2017 Tom Callaway <spot@fedoraproject.org> - 1:2.6.21-2
620cea4
- fix namespacing to avoid conflicts (thanks to Miro Hrončok)
a96008e
620cea4
* Tue Aug  8 2017 Tom Callaway <spot@fedoraproject.org> - 1:2.6.21-1
620cea4
- update to 2.6.21
b2be6d9
620cea4
* Thu Jul 27 2017 Tom Callaway <spot@fedoraproject.org> - 1:2.6.19-1
620cea4
- lulzbot version (forked from Miro's spec)
2c23611
620cea4
* Thu Jul 20 2017 Miro Hrončok <mhroncok@redhat.com> - 1:2.6.1-2
620cea4
- Require cura-fdm-materials
1fc097a
620cea4
* Wed Jun 28 2017 Miro Hrončok <mhroncok@redhat.com> - 1:2.6.1-1
620cea4
- Updated to 2.6.1
d9141d6
620cea4
* Wed May 10 2017 Miro Hrončok <mhroncok@redhat.com> - 1:2.5.0-2
620cea4
- Require qt5-qtquickcontrols
af7b765
620cea4
* Wed May 03 2017 Miro Hrončok <mhroncok@redhat.com> - 1:2.5.0-1
620cea4
- Update to modern Cura 2.x (introduce Epoch) (#1393176)
e9dcf8b
620cea4
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.04.4-6
620cea4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
48a30d7
620cea4
* Thu Nov 03 2016 Miro Hrončok <mhroncok@redhat.com> - 15.04.4-5
620cea4
- Explicitly run cura on X11 GDK backend (#1388953)
2b42460
620cea4
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.04.4-4
620cea4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
50d579d
620cea4
* Fri Mar 25 2016 Miro Hrončok <mhroncok@redhat.com> - 15.04.4-3
620cea4
- Require 3dprinter-udev-rules
04dfabd
620cea4
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 15.04.4-2
620cea4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
620cea4
620cea4
* Sat Jan 30 2016 Miro Hrončok <mhroncok@redhat.com> - 15.04.4-1
620cea4
- New version
e904ee3
620cea4
* Wed Jul 08 2015 Miro Hrončok <mhroncok@redhat.com> - 15.02.1-4
e953866
- No longer depend on pypy
c37376a
- Simplify the launcher
e953866
620cea4
* Mon Jul 06 2015 Miro Hrončok <mhroncok@redhat.com> - 15.02.1-3
620cea4
- Patch for #1230281
620cea4
620cea4
* Mon Jul 06 2015 Miro Hrončok <mhroncok@redhat.com> - 15.02.1-2
620cea4
- Require latest CuraEngine
44034f6
620cea4
* Mon Jul 06 2015 Miro Hrončok <mhroncok@redhat.com> - 15.02.1-1
620cea4
- Update to 15.02.1
45bbe1c
620cea4
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.12.1-5
aa7a075
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
aa7a075
620cea4
* Fri May 29 2015 Miro Hrončok <mhroncok@redhat.com> - 14.12.1-4
e5e577e
- Patch: Open directories with xdg-open (#1217961)
e5e577e
620cea4
* Mon Apr 20 2015 Miro Hrončok <mhroncok@redhat.com> - 14.12.1-3
c5fe418
- Handle files from the command line (#1213220)
c5fe418
620cea4
* Mon Mar 30 2015 Miro Hrončok <mhroncok@redhat.com> - 14.12.1-2
812839c
- Update the no firmware patch according to communication with Cura upstream
812839c
620cea4
* Mon Dec 29 2014 Miro Hrončok <mhroncok@redhat.com> - 14.12.1-1
620cea4
- Updated to 14.12.1
620cea4
- No longer depend on firmware
620cea4
620cea4
* Sat Oct 25 2014 Miro Hrončok <mhroncok@redhat.com> - 14.09-1
620cea4
- New version 14.09
620cea4
620cea4
* Tue Jun 24 2014 Miro Hrončok <mhroncok@redhat.com> - 14.06-2
620cea4
- Require at least the firmware version originally bundled in git
620cea4
620cea4
* Mon Jun 23 2014 Miro Hrončok <mhroncok@redhat.com> - 14.06-1
620cea4
- New version 14.06
620cea4
620cea4
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 13.11.2-2
620cea4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
620cea4
620cea4
* Sat Dec 14 2013 Miro Hrončok <mhroncok@redhat.com> - 13.11.2-1
620cea4
- New version 13.11.2
620cea4
620cea4
* Wed Oct 16 2013 Miro Hrončok <mhroncok@redhat.com> - 13.10-1
620cea4
- New upstream release with CuraEngine
620cea4
620cea4
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 13.04-3
620cea4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
620cea4
620cea4
* Tue May 07 2013 Miro Hrončok <mhroncok@redhat.com> - 13.04-2
620cea4
- Remove resources directory before trying to create a symlink there
620cea4
620cea4
* Sat May 04 2013 Miro Hrončok <mhroncok@redhat.com> - 13.04-1
620cea4
- New upstream release
620cea4
- Fixed missing slice module
620cea4
620cea4
* Sat Apr 20 2013 Miro Hrončok <mhroncok@redhat.com> - 13.03-1
620cea4
- New upstream release
620cea4
620cea4
* Tue Feb 19 2013 Miro Hrončok <mhroncok@redhat.com> - 12.12-3
620cea4
- chmod 755 cura-stripper.sh
620cea4
- Use firmware from ultimaker-marlin-firmware package
620cea4
- removed bundling note
620cea4
620cea4
* Sun Jan 20 2013 Miro Hrončok <mhroncok@redhat.com> - 12.12-2
620cea4
- Launcher is in Python now
1b93c64
620cea4
* Sun Jan 13 2013 Miro Hrončok <mhroncok@redhat.com> - 12.12-1
620cea4
- First version
4090bef