Name: linuxcnc Version: 2.7.12 Release: 1%{?dist} Summary: LinuxCNC License: GPLv2+ and LGPLv2 URL: http://linuxcnc.org/ Source0: https://github.com/LinuxCNC/%{name}/archive/v%{version}.tar.gz Patch1: fix_install-alt.patch BuildRequires: automake procps psmisc kmod ImageMagick gettext tkimg tclx BuildRequires: tcl-devel tk-devel bwidget readline-devel python2-tkinter pygtk2 intltool BuildRequires: boost-python-devel python-devel libGLU-devel libXmu-devel BuildRequires: pkgconfig(libudev) pkgconfig(libusb-1.0) pkgconfig(glib-2.0) pkgconfig(gtk+-2.0) Requires: tcl-%{name} = %{version} Requires: python-%{name} = %{version} Requires: %{name}-data = %{version} Requires: bwidget, python2-tkinter, boost-python, tkimg AutoReqProv: no %description LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel Development files for %{name} %package data Summary: Data files for %{name} Buildarch: noarch %description data Data files for %{name} %package doc Summary: Documementation for %{name} Buildarch: noarch %description doc Documementation for %{name} %package -n tcl-%{name} Summary: Tcl files for %{name} Provides: tcl(Hal) tcl(Linuxcnc) tcl(Ngcgui) %description -n tcl-%{name} Tcl files for %{name} %package -n python-%{name} Summary: Python files for %{name} %description -n python-%{name} Python files for %{name} %prep %setup -q %patch1 -p1 %build cd src autoreconf -ifv %configure --disable-build-documentation \ --enable-non-distributable=yes \ --without-libmodbus \ --with-realtime=uspace %make_build %install cd src %make_install SITEPY=%python_sitelib %ifarch x86_64 mv %buildroot/usr/lib/python* %buildroot/usr/lib64/ %endif cd .. cp scripts/realtime %buildroot%_sysconfdir/init.d/ install -d -m755 %buildroot%_datadir/applications cp debian/extras/usr/share/applications/linuxcnc.desktop %buildroot%_datadir/applications cp debian/extras/usr/share/applications/linuxcnc-latency.desktop %buildroot%_datadir/applications cp debian/extras/usr/share/applications/linuxcnc-pncconf.desktop %buildroot%_datadir/applications cp debian/extras/usr/share/applications/linuxcnc-stepconf.desktop %buildroot%_datadir/applications #fix desktop categories sed 's/X-CNC/Development;Engineering/' -i %buildroot%_datadir/applications/* ### == desktop file documentation cat > %buildroot%_datadir/applications/%{name}-documentation.desktop << END [Desktop Entry] Name=LinuxCNC Documentation Comment=LinuxCNC Documentation Exec=%_bindir/xdg-open %_docdir/%{name} Icon=linuxcncicon Terminal=false Type=Application Categories=Development;Engineering; END #install rules install -d -m755 %buildroot%_udevrulesdir cp debian/extras/lib/udev/rules.d/* %buildroot%_udevrulesdir for x in 16 32 48; do mkdir -p %buildroot%_datadir/icons/hicolor/$x'x'$x/apps convert linuxcncicon.png -resize $x'x'$x \ %buildroot%_datadir/icons/hicolor/$x'x'$x/apps/linuxcncicon.png done %find_lang %{name} %find_lang gmoccapy %files -f %{name}.lang %_bindir/* %_usr/lib/%{name} %_sysconfdir/%{name} %_sysconfdir/init.d/realtime %_udevrulesdir/*.rules %_datadir/applications/%{name}*.desktop %exclude %_datadir/applications/%{name}-documentation.desktop %_sysconfdir/X11/app-defaults/* %_datadir/axis/tcl %_datadir/%{name}/hallib %_datadir/%{name}/ncfiles %_libdir/*.so.* %exclude %_libdir/*.a %files data -f gmoccapy.lang %_datadir/%{name} %exclude %_datadir/%{name}/hallib %exclude %_datadir/%{name}/ncfiles %dir %_datadir/axis %_datadir/axis/images %_datadir/glade3 %_datadir/gmoccapy %_datadir/gscreen %_datadir/gtksourceview-2.0/* %_datadir/icons/hicolor/*/* %_mandir/man?/* %files doc %_datadir/applications/%{name}-documentation.desktop %_docdir/%{name} %files -n tcl-%{name} /usr/lib/tcltk/%{name} %files -n python-%{name} %python_sitearch/* %files devel %_includedir/%{name} %_libdir/*.so %changelog * Fri Jan 26 2018 spike 2.7.12-1 - Updated to new upstream release 2.7.12 * Fri Sep 1 2017 spike 2.7.11-5 - Added dependencies for python2-tkinter, boost-python and tkimg * Fri Sep 1 2017 spike 2.7.11-4 - Added bwidget dependency * Fri Aug 25 2017 spike 2.7.11-3 - Minor spec file updates * Fri Aug 25 2017 spike 2.7.11-2 - Updated to build on Fedora 26