|
|
9b263cf |
%global commit1 b35fa09c84303b6fdefa102f05c09b44610e8779
|
|
|
42db162 |
%global name1 cbang
|
|
|
42db162 |
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
|
|
|
42db162 |
# Bundled boost version
|
|
|
42db162 |
%global boostver 1.63.0
|
|
|
42db162 |
|
|
|
42db162 |
Name: camotics
|
|
|
42db162 |
Version: 1.1.1
|
|
|
d33af97 |
Release: 9%{?dist}
|
|
|
42db162 |
Summary: Open-Source Simulation & Computer Aided Machining - A 3-axis CNC GCode simulator
|
|
|
42db162 |
|
|
|
42db162 |
Group: Applications/Engineering
|
|
|
42db162 |
# Licenses in order: camotics / cbang / boost, clipper / libevent
|
|
|
42db162 |
License: GPLv2+ and LGPLv2+ and Boost and BSD
|
|
|
42db162 |
URL: http://camotics.org/
|
|
|
42db162 |
Source0: https://github.com/CauldronDevelopmentLLC/CAMotics/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
42db162 |
Source1: https://github.com/CauldronDevelopmentLLC/cbang/archive/%{commit1}.tar.gz#/%{name1}-%{shortcommit1}.tar.gz
|
|
|
42db162 |
Source2: camotics.xml
|
|
|
42db162 |
Source3: CAMotics.appdata.xml
|
|
|
42db162 |
|
|
|
42db162 |
# https://github.com/CauldronDevelopmentLLC/CAMotics/issues/214
|
|
|
42db162 |
Patch0: camotics-fix-misleading-indentation.patch
|
|
|
42db162 |
# Backported patches to use system libraries
|
|
|
42db162 |
Patch1: camotics-0001-Use-system-cairo-if-present.patch
|
|
|
42db162 |
Patch2: camotics-0002-Allow-using-system-GLEW.patch
|
|
|
42db162 |
Patch3: camotics-0003-Use-system-dxflib-and-move-dxf-to-3rdparty-location.patch
|
|
|
42db162 |
|
|
|
42db162 |
BuildRequires: bzip2-devel
|
|
|
42db162 |
BuildRequires: desktop-file-utils
|
|
|
42db162 |
BuildRequires: gcc-c++
|
|
|
42db162 |
BuildRequires: libappstream-glib
|
|
|
42db162 |
BuildRequires: pkgconfig(cairo)
|
|
|
42db162 |
BuildRequires: pkgconfig(dxflib)
|
|
|
42db162 |
BuildRequires: pkgconfig(glew)
|
|
|
42db162 |
BuildRequires: pkgconfig(re2)
|
|
|
42db162 |
BuildRequires: pkgconfig(QtCore)
|
|
|
42db162 |
BuildRequires: pkgconfig(QtGui)
|
|
|
42db162 |
BuildRequires: pkgconfig(QtOpenGL)
|
|
|
42db162 |
BuildRequires: scons
|
|
|
42db162 |
BuildRequires: sqlite-devel
|
|
|
42db162 |
BuildRequires: v8-314-devel
|
|
|
42db162 |
|
|
|
42db162 |
# Boost currently builds only from cbang sources. Since commit 97e5ae8 no
|
|
|
42db162 |
# longer an option. CAMotics depends on cbang-boost static library.
|
|
|
42db162 |
Provides: bundled(boost-iostreams) = %{boostver}
|
|
|
42db162 |
Provides: bundled(boost-filesystem) = %{boostver}
|
|
|
42db162 |
Provides: bundled(boost-system) = %{boostver}
|
|
|
42db162 |
Provides: bundled(boost-regex) = %{boostver}
|
|
|
42db162 |
# Cbang is currently not designed to be packaged separately. There are several
|
|
|
42db162 |
# issue like static libraries and sharing scons config with CAMotics.
|
|
|
42db162 |
Provides: bundled(cbang)
|
|
|
42db162 |
# cbang requires at least libevent 2.1.2 for event_base_loopcontinue
|
|
|
42db162 |
Provides: bundled(libevent) = 2.1.4
|
|
|
42db162 |
|
|
|
478a1dd |
# No matching package to install: 'v8-314-devel'
|
|
|
478a1dd |
ExcludeArch: aarch64 ppc64le s390x
|
|
|
9b263cf |
# v8-314-devel available for ppc64 starting from Fedora 26
|
|
|
9b263cf |
%if 0%{?fedora} < 26
|
|
|
9b263cf |
ExcludeArch: ppc64
|
|
|
9b263cf |
%endif
|
|
|
478a1dd |
|
|
|
42db162 |
%description
|
|
|
42db162 |
CAMotics is an Open-Source software which can simulate
|
|
|
42db162 |
3-axis NC machining. It is a fast, flexible and user friendly simulation
|
|
|
42db162 |
software for the DIY and Open-Source community.
|
|
|
42db162 |
|
|
|
42db162 |
At home manufacturing is one of the next big technology revolutions. Much like
|
|
|
42db162 |
the PC was 30 years ago. There have been major advances in desktop 3D printing
|
|
|
42db162 |
(e.g. Maker Bot) yet uptake of desktop CNCs has lagged despite the
|
|
|
42db162 |
availability of cheap CNC machines. One of the major reasons for this is a
|
|
|
42db162 |
lack of Open-Source simulation and CAM (model to tool path conversion)
|
|
|
42db162 |
software. CAM and NC machine simulation present some very difficult
|
|
|
42db162 |
programming problems as evidenced by 30+ years of academic papers on these
|
|
|
42db162 |
topics. Whereas 3D printing simulation and tool path generation is much
|
|
|
42db162 |
easier. However, such software is essential to using a CNC.
|
|
|
42db162 |
|
|
|
42db162 |
Being able to simulate is a critical part of creating usable CNC tool paths.
|
|
|
42db162 |
Programming a CNC with out a simulator is cutting with out measuring; it's
|
|
|
42db162 |
both dangerous and expensive. With CAMotics you can preview the results of
|
|
|
42db162 |
your cutting operations before you fire up your machine. This will
|
|
|
42db162 |
save you time and money and open up a world of creative possibilities by
|
|
|
42db162 |
allowing you to rapidly visualize and improve upon designs without wasting
|
|
|
42db162 |
material or breaking tools.
|
|
|
42db162 |
|
|
|
42db162 |
|
|
|
42db162 |
%prep
|
|
|
42db162 |
%setup -T -qb1 -n %{name1}-%{commit1}
|
|
|
42db162 |
|
|
|
42db162 |
# https://github.com/CauldronDevelopmentLLC/cbang/issues/18
|
|
|
42db162 |
%autosetup -n CAMotics-%{version} -p1
|
|
|
42db162 |
for file in $(grep -Rl --include=SConscript -- '-Werror' src/ 2>/dev/null); do
|
|
|
42db162 |
sed -i "s/\.replace('-Werror', '')/\nflags = re.sub(r'-Werro([^\\\s]+|r)', '', flags)/" $file
|
|
|
42db162 |
sed -i '1iimport re' $file
|
|
|
42db162 |
done
|
|
|
42db162 |
|
|
|
42db162 |
|
|
|
42db162 |
%build
|
|
|
42db162 |
export CBANG_HOME=%{_builddir}/%{name1}-%{commit1}
|
|
|
42db162 |
# re2 from system uses c++11 features (GH cbang #22)
|
|
|
42db162 |
%global _scopts cxxstd=c++11 debug=1 disable_local="bzip2 expat re2 sqlite3 zlib" %{?_smp_mflags}
|
|
|
42db162 |
# C! does not work with newer version of v8 that Fedora supplies.
|
|
|
42db162 |
# https://github.com/CauldronDevelopmentLLC/cbang/issues/17
|
|
|
42db162 |
%global _ccflags %{?fedora:-I%{_includedir}/v8-3.14/} %{optflags}
|
|
|
42db162 |
|
|
|
42db162 |
cd %{_builddir}/%{name1}-%{commit1}
|
|
|
42db162 |
# Bundled boost uses auto_ptr (GH cbang #23)
|
|
|
42db162 |
scons ccflags="%{_ccflags} -Wno-deprecated-declarations" %{_scopts}
|
|
|
42db162 |
|
|
|
42db162 |
cd %{_builddir}/CAMotics-%{version}
|
|
|
42db162 |
scons ccflags="%{_ccflags}" %{_scopts}
|
|
|
42db162 |
|
|
|
42db162 |
|
|
|
42db162 |
%install
|
|
|
42db162 |
export CBANG_HOME=%{_builddir}/%{name1}-%{commit1}
|
|
|
42db162 |
scons install ccflags="%{_ccflags}" %{_scopts} install_prefix=%{buildroot}/usr
|
|
|
42db162 |
|
|
|
42db162 |
install -d -m 0755 %{buildroot}%{_datadir}/applications
|
|
|
42db162 |
# https://github.com/CauldronDevelopmentLLC/CAMotics/issues/213
|
|
|
42db162 |
desktop-file-install --add-mime-type="application/x-camotics-project" \
|
|
|
42db162 |
--set-key="Exec" --set-value="camotics %f" \
|
|
|
42db162 |
--add-mime-type="application/x-camotics-nc" CAMotics.desktop
|
|
|
42db162 |
|
|
|
42db162 |
# https://github.com/CauldronDevelopmentLLC/CAMotics/issues/211
|
|
|
42db162 |
install -d -m 0755 %{buildroot}%{_datadir}/mime/packages
|
|
|
42db162 |
install -p -m 0644 %{SOURCE2} %{buildroot}/%{_datadir}/mime/packages
|
|
|
42db162 |
|
|
|
42db162 |
install -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
|
|
|
42db162 |
install -p -m 0644 images/camotics.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
|
|
|
42db162 |
|
|
|
42db162 |
install -d -m 0755 %{buildroot}%{_datadir}/%{name}
|
|
|
42db162 |
cp -pr tpl_lib/ %{buildroot}/%{_datadir}/%{name}
|
|
|
42db162 |
|
|
|
42db162 |
install -d -m 0755 %{buildroot}%{_docdir}/%{name}
|
|
|
42db162 |
cp -pr examples/ %{buildroot}%{_docdir}/%{name}
|
|
|
42db162 |
|
|
|
84fe8e3 |
# https://github.com/CauldronDevelopmentLLC/CAMotics/pull/236
|
|
|
42db162 |
install -d -m 0755 %{buildroot}%{_datadir}/appdata
|
|
|
42db162 |
install -p -m 0644 %{SOURCE3} %{buildroot}/%{_datadir}/appdata
|
|
|
42db162 |
|
|
|
42db162 |
# Convert files with DOS line endings to Unix
|
|
|
42db162 |
find "%{buildroot}%{_datadir}" -not -type d -exec file {} \; \
|
|
|
42db162 |
| grep CRLF | cut -f1 -d: | while read -r dosfile; do
|
|
|
42db162 |
sed -i $'s/\r$//' $dosfile; done
|
|
|
42db162 |
|
|
|
42db162 |
# Remove executable bit from executable files in datadir
|
|
|
42db162 |
find "%{buildroot}%{_datadir}" -executable -type f -exec chmod -x {} \;
|
|
|
42db162 |
|
|
|
42db162 |
|
|
|
42db162 |
%check
|
|
|
42db162 |
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml
|
|
|
42db162 |
|
|
|
42db162 |
|
|
|
42db162 |
%post
|
|
|
42db162 |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
42db162 |
/bin/touch --no-create %{_datadir}/mime/packages &>/dev/null || :
|
|
|
42db162 |
/usr/bin/update-desktop-database &> /dev/null || :
|
|
|
42db162 |
|
|
|
42db162 |
%postun
|
|
|
42db162 |
if [ $1 -eq 0 ] ; then
|
|
|
42db162 |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
|
|
42db162 |
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
42db162 |
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
|
|
|
42db162 |
fi
|
|
|
42db162 |
/usr/bin/update-desktop-database &> /dev/null || :
|
|
|
42db162 |
|
|
|
42db162 |
%posttrans
|
|
|
42db162 |
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
42db162 |
/usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|
|
42db162 |
|
|
|
42db162 |
|
|
|
42db162 |
%files
|
|
|
42db162 |
%{_bindir}/*
|
|
|
42db162 |
%{_datadir}/%{name}
|
|
|
42db162 |
%{_datadir}/appdata/*.appdata.xml
|
|
|
42db162 |
%{_datadir}/applications/*
|
|
|
42db162 |
%{_datadir}/icons/hicolor/128x128/apps/*
|
|
|
42db162 |
%{_datadir}/mime/packages/%{name}.xml
|
|
|
42db162 |
%{_docdir}/%{name}/*
|
|
|
42db162 |
%license COPYING LICENSE
|
|
|
42db162 |
%doc CHANGELOG.md README.md
|
|
|
42db162 |
|
|
|
42db162 |
|
|
|
42db162 |
%changelog
|
|
|
d33af97 |
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-9
|
|
|
d33af97 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
d33af97 |
|
|
|
1f388cd |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-8
|
|
|
1f388cd |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
1f388cd |
|
|
|
646bfb9 |
* Thu Jul 06 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com> 1.1.1-7
|
|
|
9b263cf |
- Upgrade cbang to b35fa09 with ARM fix included
|
|
|
9b263cf |
- Re-enable armv7hl for all platforms and ppc64 for F26 and newer
|
|
|
9b263cf |
|
|
|
478a1dd |
* Wed Jul 05 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com> 1.1.1-6
|
|
|
478a1dd |
- Disable building on aarch64, armv7hl, ppc64, ppc64le and s390x
|
|
|
478a1dd |
|
|
|
84fe8e3 |
* Mon Jun 12 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com>
|
|
|
84fe8e3 |
- Update cbang to aba85ac
|
|
|
84fe8e3 |
- Drop cbang support for OpenSSL since upstream now allows it - not necessary
|
|
|
84fe8e3 |
for CAMotics
|
|
|
84fe8e3 |
|
|
|
42db162 |
* Fri Jun 02 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com> 1.1.1-5
|
|
|
42db162 |
- Add missing bzip2-devel build requirement for epel
|
|
|
42db162 |
- Use desktop object type for AppStream to be compatible with epel
|
|
|
42db162 |
|
|
|
42db162 |
* Thu Jun 01 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com> 1.1.1-4
|
|
|
42db162 |
- Reuse common compiler flags and build options from global variables
|
|
|
42db162 |
- Include AppStream Metadata
|
|
|
42db162 |
|
|
|
42db162 |
* Wed May 31 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com>
|
|
|
42db162 |
- Backport a patch to unbundle dxflib
|
|
|
42db162 |
- Remove boost build dependency, no longer an option
|
|
|
42db162 |
- Unbundle re2
|
|
|
42db162 |
- Make sure bzip2, expat, re2, sqlite3 and zlib are unbundled
|
|
|
42db162 |
- Correct License tag according to bundled libraries
|
|
|
42db162 |
|
|
|
42db162 |
* Fri May 26 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com> 1.1.1-3
|
|
|
42db162 |
- Update cbang to 7f96da9 (GH issues 18, 21)
|
|
|
42db162 |
- Use system Cairo and GLEW
|
|
|
42db162 |
|
|
|
42db162 |
* Wed May 24 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com> 1.1.1-2
|
|
|
42db162 |
- Do not strip binary manually
|
|
|
42db162 |
- Try once more with debug build
|
|
|
42db162 |
- Patch to fix misleading-indentation error with debug build
|
|
|
42db162 |
- Update cbang, fixes compilation error with optflags
|
|
|
42db162 |
- Comment unusual procedures
|
|
|
42db162 |
- Add Provides bundle(cbang)
|
|
|
42db162 |
- Add gcc-c++ build requirement
|
|
|
42db162 |
- Correct license tag
|
|
|
42db162 |
- Fix line-endings and remove executable bit from datadir files
|
|
|
42db162 |
|
|
|
42db162 |
* Fri Mar 17 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com>
|
|
|
42db162 |
- Drop non-required mariadb-devel build dependecy
|
|
|
42db162 |
- Convert qt-devel and openssl-devel build dependecy into pkgconfig modules
|
|
|
42db162 |
|
|
|
42db162 |
* Wed Mar 8 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com> 1.1.1-1
|
|
|
42db162 |
- Initial build
|