Name: openscad Version: 2011.02.22 Release: 1.20110222.git%{?dist} Summary: Creates solid 3D CAD objects Group: Applications/Engineering # XXX GPLv2+ with CGAL exceptions License: GPLv2+ URL: http://www.openscad.org # https://github.com/openscad/openscad.git # To generate tarball, run: # git archive --format=tar --prefix=openscad-2011.02.22/ HEAD Source0: %{name}-%{version}.tar.bz2 Source1: openscad.pro Source2: openscad.desktop Source3: openscad-48.png Source4: openscad-128.png BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: hicolor-icon-theme BuildRequires: qt-devel, eigen2-devel, opencsg-devel, CGAL-devel, byacc, flex BuildRequires: desktop-file-utils, glew-devel %description OpenSCAD is software for creating solid 3D CAD objects. Unlike most free software for creating 3D models (such as the famous application Blender) it does not focus on the artistic aspects of 3D modeling but instead on the CAD aspects. OpenSCAD provides two main modeling techniques: First there is constructive solid geometry (aka CSG) and second there is extrusion of 2D outlines. As data exchange format format for this 2D outlines Autocad DXF files are used. Besides DXF files OpenSCAD can read and create 3D models in the STL and OFF file formats. %prep %setup -q # They currently link in -lboost_thread. Fedora needs -lboost_thread-mt sed -i 's/boost_thread/boost_thread-mt/g' cgal.pri # No debug (byacc doesn't support bison extensions?) sed -i 's/^%debug//g' src/parser.y # Don't install to /usr/local cp -p %{SOURCE1} openscad.pro %build QT4DIR=%{_qt4_libdir} QMAKE=%{_qt4_qmake} %{_qt4_qmake} make %{?_smp_mflags} %install rm -rf %{buildroot} # XXX Uses INSTALL_ROOT not DESTDIR make install INSTALL_ROOT=%{buildroot} # .desktop file mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ %{SOURCE2} # icons mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps install -p -m 644 %{SOURCE3} \ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/%{name}.png install -p -m 644 %{SOURCE4} \ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/%{name}.png %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ $1 -eq 0 ] ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc COPYING RELEASE_NOTES README doc/*.pdf doc/TODO.txt %{_datadir}/%{name}/ %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/48x48/apps/%{name}.png %{_datadir}/icons/hicolor/128x128/apps/%{name}.png %changelog * Sat Feb 26 2011 Jeff Moe - 2011.02.22-1.20110222.git - Use latest 420c36603b commit. - Drop git hash from Version number. - Fix Release. - Change license to GPLv2+. - Drop Requires desktop-file-utils and opencsg. - Add Require hicolor-icon-theme - No --vendor for desktop-file-util - Update icon cache - Fix /usr/share/openscad ownership in %%files * Tue Feb 22 2011 Jeff Moe - 2011.02.22git-0 - Update License to GPLv2 with exceptions. - Bump release. - Add BuildRequires: glew-devel * Mon Feb 21 2011 Jeff Moe - 2011.02.20git-3 - Add .desktop file - Add icons * Mon Feb 21 2011 Jeff Moe - 2011.02.20git-2 - Add .pdf docs, TODO.txt * Mon Feb 21 2011 Jeff Moe - 2011.02.20git-1 - Minor cleanup of .spec * Sun Feb 20 2011 Jeff Moe - 2011.02.20git-0 - Initial spec