#
# Conditional build
+%bcond_without doc # disable generated documentation
%bcond_without tests # disable 'make check'
#
Summary: A strictly RFC 3986 compliant URI parsing library
Summary(pl.UTF-8): Biblioteka analizująca URI ściśle zgodne z RFC 3986
Name: uriparser
-Version: 0.7.7
+Version: 0.8.6
Release: 1
License: BSD
Group: Libraries
-Source0: http://downloads.sourceforge.net/uriparser/%{name}-%{version}.tar.bz2
-# Source0-md5: 2da950ef006be5a842dcc383cbbeaa78
-URL: http://uriparser.sourceforge.net/
+#Source0Download: https://github.com/uriparser/uriparser/releases
+Source0: https://github.com/uriparser/uriparser/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
+# Source0-md5: ce2507966df78e36ccf71782fc598a59
+Patch0: %{name}-doxygen.patch
+URL: https://uriparser.github.io/
BuildRequires: autoconf >= 2.61
BuildRequires: automake >= 1:1.10.1
%{?with_tests:BuildRequires: cpptest-devel >= 1.1.0}
+%if %{with doc}
BuildRequires: doxygen
-BuildRequires: graphviz-devel
-BuildRequires: libtool
-BuildRequires: pkgconfig >= 0.9.0
+BuildRequires: graphviz
+%endif
+BuildRequires: libstdc++-devel
+BuildRequires: libtool >= 2:1.5
+BuildRequires: pkgconfig >= 1:0.9.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%prep
%setup -q
-#lzma -dc %{SOURCE0} | tar xf - -C ..
+%patch0 -p1
%build
-# configure first in doc, in order to create regular Doxyfile
%{__libtoolize}
%{__aclocal}
%{__automake}
-#%%{__autoheader}
%{__autoconf}
%configure \
+ %{!?with_doc:--disable-doc} \
%{!?with_tests:--disable-test}
%{__make}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+%if %{with doc}
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/uriparser
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS COPYING ChangeLog doc/{*.{htm,txt},html}
+%doc AUTHORS COPYING ChangeLog THANKS
+%attr(755,root,root) %{_bindir}/uriparse
%attr(755,root,root) %{_libdir}/liburiparser.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liburiparser.so.1
%files devel
%defattr(644,root,root,755)
+%if %{with doc}
+%doc doc/html
+%endif
%attr(755,root,root) %{_libdir}/liburiparser.so
%{_libdir}/liburiparser.la
%{_includedir}/uriparser