# norootforbuild %define _prefix /opt/FreeCAD Name: FreeCAD Summary: FreeCAD is a general purpose 3D CAD modeler Version: 0.11.4422 Release: 1.1 License: GPL LGPL Group: Productivity/Graphics/3D Editors URL: http://juergen-riegel.net/FreeCAD/Docu/index.php?title=Main_Page Source0: freecad-%version.tar.bz2 Source1: FreeCAD.desktop Source2: FreeCAD.conf Source5: %{name}.rpmlintrc Patch0: FreeCAD_no-return-in-nonvoid-function.patch Patch1: FreeCAD_14filesystem.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make gcc gcc-c++ glibc-devel update-desktop-files gcc-fortran BuildRequires: libqt4-devel Coin-devel libCoin60 libXerces-c-devel libeigen2-devel BuildRequires: swig python-devel python-xml libSoQt20 SoQt-devel libQtWebKit-devel BuildRequires: freeglut-devel libjasper-devel libode-devel BuildRequires: OpenCASCADE-devel cmake BuildRequires: boost-devel >= 1.34.0 BuildRequires: fdupes #unzip is required ONLY because of brp checks BuildRequires: unzip Requires: python-pivy %description FreeCAD will be a general purpose 3D CAD modeler. The development will be completely Open Source. As with many modern 3D CAD modelers it will have a 2D component in order to extract design detail from the 3D model to create 2D production drawings, although 2D (e.g. AutoCAD LT) is not the focus, neither are animation and organic shapes (e.g. Maya, 3D StudioMAX and Cinema 4D). %package devel Group: Development/Libraries/C and C++ Summary: Devel package for %{name} Requires: %{name} = %{version} %description devel FreeCAD will be a general purpose 3D CAD modeler. The development will be completely Open Source. As with many modern 3D CAD modelers it will have a 2D component in order to extract design detail from the 3D model to create 2D production drawings, although 2D (e.g. AutoCAD LT) is not the focus, neither are animation and organic shapes (e.g. Maya, 3D StudioMAX and Cinema 4D). %debug_package %prep %setup -q -n %{name}-%{version} %patch0 -p1 %if %suse_version <= 1140 %patch1 -p1 %endif #Fix eol for f in ChangeLog.txt copying.lib README.Linux; do cp -p ${f} ${f}.eol sed -i 's/\r//' ${f} touch -r ${f}.eol ${f} rm ${f}.eol done # %if %suse_version <= 1110 # sed -i -e 's/boost >= 1.35.0/boost >= 1.34/' acinclude.m4 # %endif %build export SUSE_ASNEEDED=0 export CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-write-strings" ./configure --with-qt4-dir=/usr/%{_lib}/qt4 \ LDFLAGS="-Wl,-z,defs" --prefix=%{_prefix} # Removing Rpath sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %{__make} %{?jobs:-j %jobs} %install %makeinstall %__mkdir -p %{buildroot}/usr/bin %__ln_s %{_bindir}/%{name} %{buildroot}/usr/bin/%{name} %__ln_s %{_bindir}/%{name}Cmd %{buildroot}/usr/bin/%{name}Cmd mkdir -p %buildroot/usr/share/pixmaps mv $RPM_BUILD_ROOT/%_datadir/freecad.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/freecad.xpm %suse_update_desktop_file -c %{name} "%{name}" "%{name} is a general purpose 3D CAD modeler" %{name} "freecad.xpm" Graphics 3DGraphics mkdir -p %buildroot/etc/ld.so.conf.d/ cp %SOURCE2 %buildroot/etc/ld.so.conf.d/ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %fdupes -s %{buildroot} %clean rm -fr %buildroot %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc ChangeLog.txt copying.lib README.Linux /usr/bin/* %{_prefix} /usr/share/pixmaps/freecad.xpm /usr/share/applications/%{name}.desktop %config /etc/ld.so.conf.d/FreeCAD.conf %exclude /opt/%name/include/* %files devel %defattr(-,root,root) %dir /opt/%name/include %dir /opt/%name/include/App %dir /opt/%name/include/Base %dir /opt/%name/include/Gui %dir /opt/%name/include/Mod /opt/%name/include/* /opt/%name/include/App/* /opt/%name/include/Base/* /opt/%name/include/Gui/* /opt/%name/include/Mod/* %changelog * Mon Apr 18 2011 rallazz@gmail.com - 0.11.4422 - new upstream version 0.11.4422 * Thu Sep 2 2010 andrea@links2linux.de - new upstream version 0.10.3247 * Tue Jan 5 2010 andrea@links2linux.de - new upstream version 0.9.2646 * Tue Sep 29 2009 andrea@links2linux.de - new upstream version * Sat Apr 4 2009 Andrea Florio - New upstream version 0.7.2008 * Sat Dec 20 2008 Andrea Florio - New Upstream version 0.7.1779 * Mon Nov 24 2008 Andrea Florio - New Upstream version 0.7.1672 * Mon Oct 13 2008 Andrea Florio - New Upstream version 0.7.1658 * Tue Oct 7 2008 Andrea Florio - 0.pm.svn20081007 - built svn version that build with openCASCADE 6.3.0 * Sat Sep 27 2008 Andrea Florio - 0.7.1514 - new package