diff --git a/uriparser.spec b/uriparser.spec index 0f8008d..cc2eb92 100644 --- a/uriparser.spec +++ b/uriparser.spec @@ -1,103 +1,98 @@ %global _hardened_build 1 -%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} - Name: uriparser Version: 0.8.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: URI parsing library - RFC 3986 -Group: System Environment/Libraries License: BSD URL: http://%{name}.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 -BuildRequires: doxygen, graphviz, cpptest-devel -Requires: cpptest + +BuildRequires: automake autoconf libtool +BuildRequires: doxygen +BuildRequires: graphviz +BuildRequires: cpptest-devel %description Uriparser is a strictly RFC 3986 compliant URI parsing library written in C. uriparser is cross-platform, fast, supports Unicode and is licensed under the New BSD license. -%package devel + +%package devel Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} -%description devel +%description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. -%package doc -Summary: HTML documentation for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -%description doc +%package doc +Summary: HTML documentation for %{name} +BuildArch: noarch + +%description doc The %{name}-doc package contains HTML documentation files for %{name}. + %prep %setup -q -sed -i 's/\r//' THANKS + +# Fix line endings and encoding sed -i 's/\r//' COPYING -iconv -f iso-8859-1 -t utf-8 -o THANKS{.utf8,} -mv THANKS{.utf8,} +iconv -f iso8859-1 -t utf-8 THANKS > THANKS.conv && mv -f THANKS.conv THANKS # Remove qhelpgenerator dependency by commenting Doxygen.in: -# sed -i 's/GENERATE_QHP\ =\ yes/GENERATE_QHP\ =\ no/g' Doxyfile.in sed -i 's/GENERATE_QHP\ =\ yes/GENERATE_QHP\ =\ no/g' doc/Doxyfile.in # fix installation errors -sed -i -e 's,html/\*.map\ ,,g' doc/Makefile.in -sed -i -e 's,-\$(INSTALL_DATA) \*.qch "$(DESTDIR)\$(docdir)/",,g' doc/Makefile.in +sed -i -e 's,html/\*.map\ ,,g' doc/Makefile.am %build +autoreconf -ifv %configure --disable-static -# disable rpath -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool - -# Generate docs first -cd doc; -make %{?_smp_mflags} -cd .. -# Build make %{?_smp_mflags} -%check -LD_LIBRARY_PATH=".libs" make check %install -make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" +%make_install +find %{buildroot} -name '*.la' -delete -find $RPM_BUILD_ROOT -name '*.la' -delete -# fcami - update for https://fedoraproject.org/wiki/Changes/UnversionedDocdirs -if [ ${RPM_BUILD_ROOT}%{_datadir}/doc/%{name} != ${RPM_BUILD_ROOT}%{_pkgdocdir} ] - then mv ${RPM_BUILD_ROOT}%{_datadir}/doc/%{name}/html ${RPM_BUILD_ROOT}%{_pkgdocdir} -fi +%check +LD_LIBRARY_PATH=".libs" make check %post -p /sbin/ldconfig %postun -p /sbin/ldconfig + %files -%doc THANKS AUTHORS COPYING ChangeLog +%doc THANKS AUTHORS ChangeLog +%license COPYING %{_bindir}/uriparse %{_libdir}/*.so.* -%files doc -%doc %{_docdir}/%{name}/html - %files devel %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc +%files doc +%license COPYING +%doc %{_docdir}/%{name}/html + + %changelog +* Tue May 10 2016 Sandro Mani - 0.8.4-3 +- Drop unused requires on cpptest +- Modernize spec + * Sun Mar 27 2016 François Cami - 0.8.4-2 - Add -doc subpackage.