freecad/freecad.spec

134 lines
4.1 KiB
RPMSpec
Raw Normal View History

2018-05-22 04:08:47 +03:00
%define oname FreeCAD
2014-06-20 11:23:26 +04:00
Summary: FreeCAD is a general purpose 3D CAD modeler
Name: freecad
2018-05-22 04:08:47 +03:00
Version: 0.17
Release: 1
License: GPLv2+ and LGPLv2+
Group: Graphics
2016-04-17 15:30:43 +03:00
Url: http://www.freecadweb.org/
2018-05-22 04:08:47 +03:00
Source0: https://github.com/FreeCAD/FreeCAD/archive/%{version}.tar.gz?/%{oname}-%{version}.tar.gz
Source1: %{name}.desktop
Source2: %{name}.1
2013-08-02 11:39:04 +04:00
Source3: %{name}.rpmlintrc
2018-05-22 04:08:47 +03:00
BuildRequires: boost-devel >= 1.33.1
2014-06-20 18:52:41 +11:00
BuildRequires: cmake
BuildRequires: eigen3 >= 3.0.1
2014-06-20 18:52:41 +11:00
BuildRequires: gcc-gfortran
2016-04-17 21:07:56 +03:00
BuildRequires: libspnav-devel
2018-05-22 04:08:47 +03:00
BuildRequires: med-devel
BuildRequires: opencascade-devel >= 5.2
2018-05-22 04:08:47 +03:00
BuildRequires: openmpi-devel
BuildRequires: pkgconfig(Coin) >= 2.4.0
2018-05-22 04:08:47 +03:00
BuildRequires: pkgconfig(SoQt) >= 1.2.0
BuildRequires: pkgconfig(freetype2)
2018-05-22 04:08:47 +03:00
BuildRequires: pkgconfig(glu)
2014-06-20 18:52:41 +11:00
BuildRequires: pkgconfig(gstreamer-0.10)
2018-05-22 04:08:47 +03:00
BuildRequires: pkgconfig(jsoncpp)
2014-06-20 18:52:41 +11:00
BuildRequires: pkgconfig(ode)
BuildRequires: pkgconfig(opencv)
2018-05-22 04:08:47 +03:00
BuildRequires: pkgconfig(pyside)
BuildRequires: pkgconfig(python) >= 2.5
2014-09-29 10:34:45 +04:00
BuildRequires: pkgconfig(shiboken)
BuildRequires: pkgconfig(xerces-c) >= 2.6
2018-05-22 04:08:47 +03:00
BuildRequires: pyside-tools
BuildRequires: python-matplotlib
BuildRequires: python-vtk
BuildRequires: qt4-devel
BuildRequires: tcl-vtk
BuildRequires: tcl-vtk-qt
BuildRequires: vtk-devel
BuildRequires: vtk-test-suite
2016-09-19 18:18:57 +04:00
Requires: pyside
%description
FreeCAD will be a general purpose parametric 3D CAD modeler. The development
is completely Open Source. It is a feature based parametric modeler with a
modular software architecture which makes it easy to provide additional
functionality without modifying the core system. As with many modern 3D CAD
modelers it has many 2D component in order to extract design detail from
the 3D model to create 2D production drawings, but direct 2D drawing (e.g.
AutoCAD LT) is not the focus, neither are animation and organic shapes (e.g.
Maya, 3D StudioMAX, Blender and Cinema 4D).
2014-06-20 18:52:41 +11:00
%files
2018-05-22 04:08:47 +03:00
%doc ChangeLog.txt COPYING data/License.txt build/doc/*
2014-06-20 18:52:41 +11:00
%{_bindir}/*
2018-05-22 04:08:47 +03:00
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
2018-05-22 04:08:47 +03:00
%{_libdir}/%{name}/*.so
%{_libdir}/%{name}/Mod/
%{_libdir}/%{name}/bin/
2018-05-22 14:32:18 +03:00
%{_libdir}/%{name}/Ext/
2014-06-20 18:52:41 +11:00
%{_mandir}/man1/*.1*
#----------------------------------------------------------------------------
%package devel
2014-06-20 18:52:41 +11:00
Summary: Devel package for %{name}
2018-05-22 04:08:47 +03:00
Requires: %{name} = %{EVRD}
2014-06-20 18:52:41 +11:00
Group: Development/C++
%description devel
2014-06-20 18:52:41 +11:00
Development files for FreeCAD.
%files devel
2018-05-22 04:08:47 +03:00
%doc ChangeLog.txt COPYING
%{_libdir}/%{name}/include/
2014-06-20 18:52:41 +11:00
#----------------------------------------------------------------------------
%prep
%setup -qn %{oname}-%{version}
#%%apply_patches
# Fix bogus file perms
find ./src -name "*.py*" |xargs chmod 755
find ./src -name "*.h*" |xargs chmod 644
find ./src -name "*.cpp*" |xargs chmod 644
%build
2018-05-22 04:08:47 +03:00
#%%define Werror_cflags %%{nil}
%cmake_qt4 -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} \
-DCMAKE_INSTALL_INCLUDEDIR=%{_libdir}/%{name}/include \
2014-06-20 18:52:41 +11:00
-DCMAKE_INSTALL_DATADIR=%{_datadir}/%{name} \
-DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name} \
-DCMAKE_INSTALL_LIBDIR=%{_libdir}/%{name} \
2014-06-20 18:52:41 +11:00
-DRESOURCEDIR=%{_libdir}/freecad
%make
%install
%makeinstall_std -C build
2013-08-01 17:54:09 +04:00
# Symlink binaries to /usr/bin
mkdir -p %{buildroot}%{_bindir}
pushd %{buildroot}%{_bindir}
ln -s ../%{_lib}/freecad/bin/FreeCAD .
ln -s ../%{_lib}/freecad/bin/FreeCADCmd .
popd
2013-08-01 17:54:09 +04:00
# Fix bogus perms
chmod +x %{buildroot}%{_libdir}/%{name}/Mod/PartDesign/Scripts/*.py
2013-08-02 11:39:04 +04:00
# Install and fix .desktop file
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
2013-08-02 11:39:04 +04:00
sed -i 's,@lib@,%{_lib},g' %{buildroot}%{_datadir}/applications/%{name}.desktop
# Install desktop icon
install -pD -m 0644 src/Gui/Icons/%{name}.svg \
2018-05-22 04:08:47 +03:00
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
2013-08-02 11:39:04 +04:00
# Install man page
install -pD -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/%{name}.1
2013-08-02 11:39:04 +04:00
# Symlink manpage to other binary names
pushd %{buildroot}%{_mandir}/man1
2018-05-22 04:08:47 +03:00
ln -sf %{name}.1.gz FreeCAD.1.gz.
ln -sf %{name}.1.gz FreeCADCmd.1.gz
2013-08-02 11:39:04 +04:00
popd
# FIXME: Apparently there are no more include files to install.
# For now keep the devel package and manually create the needed (empty) dir
2016-04-17 15:30:43 +03:00
mkdir -p %{buildroot}%{_libdir}/%{name}/include