File OpenVSP.spec of Package OpenVSP
#
# spec file for package OpenVSP
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: OpenVSP
Version: 20130403
Release: 0
Summary: NASA open source parametric geometry
License: NASA-1.3
Group: Productivity/Scientific/Other
Url: http://www.openvsp.org/
Source0: %{name}-git%{version}.tar.bz2
# PATCH-FIX-OPENSUSE OpenVSP-no-date-and-time.patch
Patch0: OpenVSP-no-date-and-time.patch
# PATCH-FIX-OPENSUSE OpenVSP-link-fix.patch
Patch1: OpenVSP-link-fix.patch
BuildRequires: Mesa-devel
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: fltk-devel
BuildRequires: freeglut-devel
BuildRequires: gcc-c++
BuildRequires: libjpeg-devel
BuildRequires: libxml2-devel
BuildRequires: opennurbs-devel
BuildRequires: update-desktop-files
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
OpenVSP is a parametric aircraft geometry tool. OpenVSP allows the user to create
a 3D model of an aircraft defined by common engineering parameters. This model
can be processed into formats suitable for engineering analysis.
%prep
%setup -q -n %{name}
%patch0 -p1
%if 0%{?suse_version} <= 1210
%patch1 -p1
%endif
mkdir build
%build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} \
-DFLTK_INCLUDE_DIR=%{_includedir}/FL \
-DCMAKE_CXX_FLAGS="-I%{_includedir}/opennurbs" \
../src/
make %{?_smp_mflags}
%install
cd build
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_bindir}
ln -s %{_libdir}/%{name}/vsp %{buildroot}%{_bindir}/vsp
%suse_update_desktop_file -c %{name} %{name} "Vehicule Sketch Pad" %{name} "" Education Engineering
%fdupes -s %{buildroot}%{_libdir}/%{name}
%files
%defattr(-,root,root)
%doc
%{_datadir}/applications/%{name}.desktop
%{_bindir}/vsp
%{_libdir}/%{name}
%changelog