rttr/rttr.spec
Marcus Meissner aede2f5189 Accepting request 666367 from home:weatherhead99
- fix incorrect permissions in -devel package installed files 
- update package to new version (0.9.6)
- update patch for buildsystem installation locations
- patch for forcing c++11 mode on gcc4.8 (for openSUSE_Leap_42.3)
- initial package from upstream source (0.9.5)
- patch for correcting buildsystem installation locations

OBS-URL: https://build.opensuse.org/request/show/666367
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/rttr?expand=0&rev=1
2019-01-21 07:09:39 +00:00

117 lines
3.9 KiB
RPMSpec

#
# spec file for package rttr
#
# Copyright (c) 2017 SUSE LINUX 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: rttr
Version: 0.9.6
Release: 0
Summary: An open source library, which adds reflection to C++
License: MIT
Url: http://www.rttr.org/releases/rttr-%{version}-src.tar.gz
Group: Development/Languages/C and C++
Source0: %{name}-%{version}-src.tar.gz
#PATCH-FIX-OPENSUSE cxx11_compiler_flags.patch force c++11 mode on gcc4.8 (for Leap 42.3)
Patch0: cxx11_compiler_flags.patch
#PATCH-FIX-OPENSUSE cmake_install_dir.patch fix cmake installation directories for SUSE standards
Patch1: cmake_install_dir.patch
#PATCH-FIX-OPENSUSE doxygen_remove_date_time.patch remove date and time information from generated documentation
Patch2: doxygen_remove_date_time.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: doxygen
BuildRequires: dos2unix
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
RTTR stands for Run Time Type Reflection. It describes the ability of a computer program to introspect and modify an object at runtime. It is also the name of the library itself, which is written in C++ and released as open source library.
The goal of this project is to provide an easy and intuitive way to use reflection in C++.
%prep
%setup -q -n%{name}-%{version}
%if 0%{?suse_version} < 1500
%patch0 -p1
%endif
%patch1 -p1
%patch2 -p1
%build
%cmake -DBUILD_BENCHMARKS=OFF -DCMAKE_INSTALL_CMAKEDIR=cmake
#make unit tests pass
export LD_LIBRARY_PATH=%{_builddir}/rttr-%{version}/build/lib/
%make_jobs
%install
#make unit tests pass
export LD_LIBRARY_PATH=%{_builddir}/rttr-%{version}/build/lib/
%cmake_install rttr_core
#fix line endings of README.md
dos2unix %{buildroot}%{_datadir}/rttr/README.md
%package -n lib%{name}_core0_9_6
Summary: An open source library, which adds reflection to C++
%description -n lib%{name}_core0_9_6
RTTR stands for Run Time Type Reflection. It describes the ability of a computer program to introspect and modify an object at runtime. It is also the name of the library itself, which is written in C++ and released as open source library.
The goal of this project is to provide an easy and intuitive way to use reflection in C++.
%post -n lib%{name}_core0_9_6 -p /sbin/ldconfig
%postun -n lib%{name}_core0_9_6 -p /sbin/ldconfig
%files -n lib%{name}_core0_9_6
%defattr(644,root,root,-)
%{_libdir}/librttr_core.so.%{version}
%package devel
Summary: Development files necessary for building software that uses rttr
Requires: librttr_core0_9_6
Group: Development/Languages/C and C++
%description devel
RTTR stands for Run Time Type Reflection. It describes the ability of a computer program to introspect and modify an object at runtime. It is also the name of the library itself, which is written in C++ and released as open source library.
The goal of this project is to provide an easy and intuitive way to use reflection in C++.
%files devel
%defattr(644,root,root,-)
%{_includedir}/rttr/
%{_libdir}/librttr_core.so
%{_libdir}/cmake/rttr/
%package doc
Summary: Documentation for rttr
Group: Development/Languages/C and C++
%description doc
API Documentation for rttr
%files doc
%defattr(644,root,root,-)
%docdir %{_datadir}/rttr
%docdir %{_docdir}/rttr/
%{_datadir}/rttr
%{_docdir}/rttr/
%changelog