%global _with_samples 0 %global sover 2 Name: libalvar Version: 2.2.1 Release: 1%{?dist} Summary: Library for creating AR applications License: LGPLv2+ URL: http://virtual.vtt.fi/virtual/proj2/multimedia/alvar/desktop/index.html Source0: https://github.com/morxa/alvar/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: chrpath BuildRequires: cmake BuildRequires: doxygen BuildRequires: eigen3-devel BuildRequires: freeglut-devel BuildRequires: gcc-c++ BuildRequires: libglvnd-devel BuildRequires: opencv-devel BuildRequires: OpenSceneGraph-devel BuildRequires: tinyxml-devel %if ! 0%{?_with_samples} Patch0: alvar.nosamples.patch %endif %description ALVAR is a software library for creating virtual and augmented reality (AR) applications. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package doc Summary: Documentation for %{name} BuildArch: noarch %description doc The %{name}-doc package contains documentation for %{name}. %prep %autosetup -p1 -n alvar-%{version} rm -rf 3rdparty %if ! 0%{?_with_samples} rm -rf sample demo %endif %build export CXXFLAGS="%{optflags} -Wl,--as-needed" %cmake \ -DALVAR_PLUGIN_PATH=%{_libdir}/alvar/plugins/ %cmake_build %install %cmake_install mkdir -p %{buildroot}/%{_libdir} #install -p -m 0644 -D src/Alvar.h %{buildroot}/%{_includedir}/alvar/Alvar.h #install -p -m 0644 ../src/*.h %{buildroot}/%{_includedir}/alvar/ %if 0%{?_with_samples} pushd %{_vpath_builddir}/sample for file in sample* ; do install -p $file %{buildroot}%{_bindir}/alvar$file done popd %endif rm -f %{buildroot}/%{_bindir}/*.{xml,png,osg} rm -f %{buildroot}/%{_prefix}/LICENSE rm -rf %{buildroot}/%{_prefix}/doc find %{buildroot}/%{_libdir} -type f -name "*.so*" -exec chrpath -d '{}' \; if [ -d %{buildroot}/%{_bindir} ] ; then find %{buildroot}/%{_bindir} -type f -exec chrpath -d '{}' \; fi %files %license LICENSE %doc README %doc doc/ALVAR.pdf %if 0%{?_with_samples} %{_bindir}/alvar* %endif %{_libdir}/*.so.%{sover}* %{_datadir}/alvar %files devel %{_includedir}/alvar %{_libdir}/*.so %{_libdir}/pkgconfig/alvar.pc %files doc %{_docdir}/alvar %changelog * Mon Jun 21 2021 Till Hofmann - 2.2.1-1 - Update to 2.2.1 * Wed Jun 09 2021 Till Hofmann - 2.2.0-1 - Update to 2.2.0 * Fri Sep 06 2019 Till Hofmann - 2.1.1-2 - Split doc into separate sub-package - Remove obsolete scriptlets * Thu Jul 25 2019 Till Hofmann - 2.1.1-1 - Update to 2.1.1 * Mon May 29 2017 Till Hofmann - 2.1.0-2 - BR: tinyxml-devel * Mon May 29 2017 Till Hofmann - 2.1.0-1 - Update to 2.1.0 * Thu May 18 2017 Till Hofmann - 2.0.1-1 - Update to 2.0.1 * Tue May 02 2017 Till Hofmann - 2.0.0-8 - Do not move alvar plugins to libdir, but keep them in bindir * Sun Apr 30 2017 Till Hofmann - 2.0.0-7 - Also install sample programs * Sat Apr 29 2017 Till Hofmann - 2.0.0-6 - Fix install dir for header files * Sat Apr 29 2017 Till Hofmann - 2.0.0-5 - Add patch to build with opencv3 * Thu Apr 27 2017 Till Hofmann - 2.0.0-4 - Add missing BRs * Thu Apr 27 2017 Till Hofmann - 2.0.0-3 - Remove non-binary files from _bindir * Thu Apr 27 2017 Till Hofmann - 2.0.0-2 - Install all headers from src/*.h * Thu Apr 27 2017 Till Hofmann - Initial package