+#
+# Conditional build:
+%bcond_without tests # unit tests
+
Summary: An XMP metadata support library
Summary(pl.UTF-8): Biblioteka obsługująca metadane XMP
Name: exempi
-Version: 2.2.0
-Release: 2
+Version: 2.5.1
+Release: 1
License: BSD
Group: Libraries
-Source0: http://libopenraw.freedesktop.org/download/%{name}-%{version}.tar.gz
-# Source0-md5: cb789ba2b6ed78b864cc18cdc87f3b72
-URL: http://libopenraw.freedesktop.org/wiki/Exempi
-BuildRequires: boost-devel >= 1.33.1
+#Source0Download: https://libopenraw.freedesktop.org/exempi/
+Source0: https://libopenraw.freedesktop.org/download/%{name}-%{version}.tar.bz2
+# Source0-md5: c32bcd9feed5a0c1523d5652ef1804b0
+URL: https://libopenraw.freedesktop.org/exempi/
+%{?with_tests:BuildRequires: boost-devel >= 1.48.0}
BuildRequires: expat-devel >= 1.95
-BuildRequires: libstdc++-devel
+BuildRequires: libstdc++-devel >= 6:4.4
BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: expat-devel >= 1.95
-Requires: libstdc++-devel
+Requires: libstdc++-devel >= 6:4.4
Requires: zlib-devel
%description devel
%build
# configure fails on boost linking check
%configure \
- ax_cv_boost_unit_test_framework=no \
- --disable-silent-rules
+ --disable-silent-rules \
+ %{!?with_tests:--disable-unittest}
%{__make}
+%if %{with tests}
+%{__make} check
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_bindir}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libexempi.la
+
install samples/source/{dumpmainxmp,dumpxmp,xmpcoverage,xmpfilescoverage} $RPM_BUILD_ROOT%{_bindir}
%clean
%files
%defattr(644,root,root,755)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
+%attr(755,root,root) %{_bindir}/exempi
%attr(755,root,root) %{_libdir}/libexempi.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libexempi.so.3
+%attr(755,root,root) %ghost %{_libdir}/libexempi.so.8
+%{_mandir}/man1/exempi.1*
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libexempi.so
-%{_libdir}/libexempi.la
%{_includedir}/exempi-2.0
%{_pkgconfigdir}/exempi-2.0.pc
%files samples
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_bindir}/dumpmainxmp
+%attr(755,root,root) %{_bindir}/dumpxmp
+%attr(755,root,root) %{_bindir}/xmpcoverage
+%attr(755,root,root) %{_bindir}/xmpfilescoverage