|
 |
4090bef |
Name: cura-lulzbot
|
|
 |
45bbe1c |
%global aver 15.02.1
|
|
 |
45bbe1c |
%global bver 1.03
|
|
 |
45bbe1c |
# upstream uses dash, let's keep it with dot
|
|
 |
45bbe1c |
Version: %{aver}.%{bver}
|
|
 |
e953866 |
Release: 3%{?dist}
|
|
 |
4090bef |
Summary: Cura LulzBot Edition, 3D printer control software
|
|
 |
4090bef |
|
|
 |
4090bef |
# Code is AGPLv3
|
|
 |
4090bef |
# Example models are CC-BY-SA
|
|
 |
4090bef |
License: AGPLv3 and CC-BY-SA
|
|
 |
4090bef |
|
|
 |
4090bef |
URL: https://www.lulzbot.com/cura
|
|
 |
4090bef |
|
|
 |
45bbe1c |
Source0: https://github.com/alephobjects/Cura/archive/lulzbot-%{aver}-%{bver}.tar.gz
|
|
 |
4090bef |
Source1: %{name}
|
|
 |
4090bef |
Source2: %{name}.desktop
|
|
 |
4090bef |
|
|
 |
4090bef |
# Use system paths and make it parallel installable with cura
|
|
 |
4090bef |
Patch1: %{name}-system-paths.patch
|
|
 |
4090bef |
|
|
 |
4090bef |
# Rework the logic of determining the version (didn't work)
|
|
 |
4090bef |
Patch2: %{name}-version.patch
|
|
 |
4090bef |
|
|
 |
4090bef |
# Disable installation of firmwares Fedora doesn't ship
|
|
 |
4090bef |
Patch3: %{name}-no-firmware.patch
|
|
 |
4090bef |
|
|
 |
e5e577e |
# Open directories with xdg-open
|
|
 |
e5e577e |
# https://bugzilla.redhat.com/show_bug.cgi?id=1217961
|
|
 |
e5e577e |
Patch4: %{name}-xdg-open.patch
|
|
 |
e5e577e |
|
|
 |
44034f6 |
# Fix endless loop of wizards
|
|
 |
44034f6 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1231624
|
|
 |
44034f6 |
# https://github.com/alephobjects/Cura/issues/133
|
|
 |
44034f6 |
Patch5: %{name}-wizard.patch
|
|
 |
44034f6 |
|
|
 |
4090bef |
BuildArch: noarch
|
|
 |
4090bef |
BuildRequires: python2-devel
|
|
 |
4090bef |
BuildRequires: dos2unix
|
|
 |
4090bef |
BuildRequires: desktop-file-utils
|
|
 |
4090bef |
BuildRequires: gettext
|
|
 |
4090bef |
Requires: PyOpenGL
|
|
 |
4090bef |
Requires: wxPython
|
|
 |
4090bef |
Requires: pyserial
|
|
 |
4090bef |
Requires: numpy
|
|
 |
4090bef |
Requires: python-power
|
|
 |
45bbe1c |
Requires: CuraEngine >= 15.04
|
|
 |
4090bef |
|
|
 |
4090bef |
%description
|
|
 |
4090bef |
The default software for the LulzBot Mini 3D printer is called Cura LulzBot
|
|
 |
4090bef |
Edition. Cura is a Free Software program that both prepares your files for
|
|
 |
4090bef |
printing (by converting your model into GCODE), and also allows you to control
|
|
 |
4090bef |
the operation of your LulzBot 3D printer.
|
|
 |
4090bef |
|
|
 |
4090bef |
|
|
 |
4090bef |
%prep
|
|
 |
45bbe1c |
%setup -qn Cura-lulzbot-%{aver}-%{bver}
|
|
 |
4090bef |
%patch1 -p1
|
|
 |
4090bef |
%patch2 -p1
|
|
 |
4090bef |
%patch3 -p1
|
|
 |
e5e577e |
%patch4 -p1
|
|
 |
44034f6 |
%patch5 -p1
|
|
 |
4090bef |
|
|
 |
45bbe1c |
# invalid locale not able to compile
|
|
 |
45bbe1c |
rm resources/locale/zh -rf
|
|
 |
45bbe1c |
|
|
 |
4090bef |
dos2unix resources/example/Attribution.txt
|
|
 |
4090bef |
|
|
 |
0f200e3 |
sed -i 's/REPLACE_THIS_IN_SPEC/%{aver}-%{bver}/' Cura/util/version.py
|
|
 |
4090bef |
|
|
 |
4090bef |
# remove shebang
|
|
 |
4090bef |
sed -i '1d' Cura/cura.py
|
|
 |
4090bef |
sed -i '1d' Cura/util/pymclevel/mce.py
|
|
 |
4090bef |
|
|
 |
4090bef |
# Remove firmware
|
|
 |
4090bef |
rm resources/firmware/*
|
|
 |
4090bef |
|
|
 |
4090bef |
# Rename icon
|
|
 |
4090bef |
mv resources/cura{,-lulzbot}.ico
|
|
 |
4090bef |
|
|
 |
4090bef |
# Relocate imports - don't write patch for this, as this sed needs no rebasing ;)
|
|
 |
4090bef |
find -name \*.py -exec sed -i \
|
|
 |
4090bef |
-e 's/from Cura import/from CuraLulzbot import/g' \
|
|
 |
4090bef |
-e 's/from Cura\./from CuraLulzbot./g' \
|
|
 |
1b93c64 |
-e 's/Cura.serialCommunication/CuraLulzbot.serialCommunication/g' \
|
|
 |
4090bef |
-e 's/import Cura/import CuraLulzbot/g' {} \;
|
|
 |
4090bef |
|
|
 |
4090bef |
%build
|
|
 |
4090bef |
# rebuild locales
|
|
 |
4090bef |
cd resources/locale
|
|
 |
4090bef |
mv po pl # polish code was wrong
|
|
 |
4090bef |
rm *.in *.pot
|
|
 |
4090bef |
for FILE in *; do
|
|
 |
4090bef |
rm $FILE/LC_MESSAGES/Cura.mo
|
|
 |
4090bef |
msgfmt $FILE/LC_MESSAGES/Cura.po -o $FILE/LC_MESSAGES/CuraLulzbot.mo
|
|
 |
4090bef |
rm $FILE/LC_MESSAGES/Cura.po
|
|
 |
4090bef |
done
|
|
 |
4090bef |
cd -
|
|
 |
4090bef |
|
|
 |
4090bef |
%install
|
|
 |
4090bef |
mkdir -p %{buildroot}%{python_sitelib}/CuraLulzbot
|
|
 |
4090bef |
mkdir -p %{buildroot}%{_datadir}/%{name}
|
|
 |
4090bef |
mkdir -p %{buildroot}%{_datadir}/pixmaps
|
|
 |
4090bef |
mkdir -p %{buildroot}%{_datadir}/locale
|
|
 |
4090bef |
mkdir -p %{buildroot}%{_bindir}
|
|
 |
4090bef |
|
|
 |
4090bef |
cp -apr Cura/* %{buildroot}%{python_sitelib}/CuraLulzbot
|
|
 |
4090bef |
rm -rf %{buildroot}%{python_sitelib}/CuraLulzbot/LICENSE
|
|
 |
4090bef |
cp -apr resources/* %{buildroot}%{_datadir}/%{name}
|
|
 |
4090bef |
cp -apr plugins %{buildroot}%{_datadir}/%{name}
|
|
 |
4090bef |
cp -ap %{SOURCE1} %{buildroot}%{_bindir}
|
|
 |
4090bef |
ln -s %{_datadir}/%{name} %{buildroot}%{python_sitelib}/CuraLulzbot/resources
|
|
 |
4090bef |
ln -s %{_datadir}/%{name}/%{name}.ico %{buildroot}%{_datadir}/pixmaps
|
|
 |
4090bef |
|
|
 |
4090bef |
# locales
|
|
 |
4090bef |
cp -ar %{buildroot}%{_datadir}/%{name}/locale/* %{buildroot}%{_datadir}/locale
|
|
 |
4090bef |
rm -rf %{buildroot}%{_datadir}/%{name}/locale
|
|
 |
4090bef |
ln -s -f %{_datadir}/locale/ %{buildroot}%{_datadir}/%{name}/ # the app expects the locale folder in here
|
|
 |
4090bef |
|
|
 |
4090bef |
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2}
|
|
 |
4090bef |
|
|
 |
4090bef |
%{find_lang} CuraLulzbot
|
|
 |
4090bef |
|
|
 |
4090bef |
%files -f CuraLulzbot.lang
|
|
 |
4090bef |
%license Cura/LICENSE resources/example/Attribution.txt
|
|
 |
4090bef |
%{python_sitelib}/CuraLulzbot
|
|
 |
4090bef |
%{_datadir}/%{name}
|
|
 |
4090bef |
%{_datadir}/pixmaps/%{name}.ico
|
|
 |
4090bef |
%{_datadir}/applications/%{name}.desktop
|
|
 |
4090bef |
%{_bindir}/%{name}
|
|
 |
4090bef |
|
|
 |
4090bef |
%changelog
|
|
 |
e953866 |
* Wed Jul 08 2015 Miro Hrončok <mhroncok@redhat.com> - 15.02.1.1.03-3
|
|
 |
e953866 |
- No longer depend on pypy
|
|
 |
e953866 |
|
|
 |
44034f6 |
* Wed Jul 08 2015 Miro Hrončok <mhroncok@redhat.com> - 15.02.1.1.03-2
|
|
 |
44034f6 |
- Fix endless loop of wizards (#1231624)
|
|
 |
0f200e3 |
- Fix version string in version.py
|
|
 |
44034f6 |
|
|
 |
45bbe1c |
* Mon Jul 06 2015 Miro Hrončok <mhroncok@redhat.com> - 15.02.1.1.03-1
|
|
 |
45bbe1c |
- Update to 15.02.1-1.03
|
|
 |
45bbe1c |
|
|
 |
aa7a075 |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.12-6
|
|
 |
aa7a075 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
 |
aa7a075 |
|
|
 |
e5e577e |
* Fri May 29 2015 Miro Hrončok <mhroncok@redhat.com> - 14.12-5
|
|
 |
e5e577e |
- Patch: Open directories with xdg-open (#1217961)
|
|
 |
e5e577e |
|
|
 |
c5fe418 |
* Mon Apr 20 2015 Miro Hrončok <mhroncok@redhat.com> - 14.12-4
|
|
 |
c5fe418 |
- Handle files from the command line (#1213220)
|
|
 |
c5fe418 |
|
|
 |
812839c |
* Wed Apr 01 2015 Miro Hrončok <mhroncok@redhat.com> - 14.12-3
|
|
 |
812839c |
- Update the no firmware patch according to communication with Cura upstream
|
|
 |
812839c |
|
|
 |
1b93c64 |
* Wed Mar 25 2015 Tom Callaway <spot@fedoraproject.org> - 14.12-2
|
|
 |
1b93c64 |
- fix one missing CuraLulzbot invoke
|
|
 |
1b93c64 |
|
|
 |
4090bef |
* Wed Feb 04 2015 Miro Hrončok <mhroncok@redhat.com> - 14.12-1
|
|
 |
4090bef |
- Initial package (started as cura.spec fork)
|
|
 |
4090bef |
|