%global htmldocdir %{_docdir}/dwgrep/html Name: dwgrep Version: 0.1 Release: 5%{?dist} Summary: A tool for querying Dwarf (debuginfo) graphs Group: Development/Tools License: GPLv3+ and (GPLv2+ or LGPLv3+) URL: http://pmachata.github.io/dwgrep/index.html Source0: https://github.com/pmachata/dwgrep/archive/%{version}/dwgrep-%{version}.tar.gz BuildRequires: bison BuildRequires: cmake BuildRequires: elfutils-devel BuildRequires: flex BuildRequires: gtest-devel BuildRequires: python-sphinx # Sphinx-generated documentation apparently bundles jquery. An # exception is granted for bundling jquery in particular. # https://fedorahosted.org/fpc/ticket/408 Provides: bundled(jquery) %description Dwgrep is a tool, an associated language (called Zwerg) and a library (libzwerg) for querying Dwarf (debuginfo) graphs. You can think of dwgrep expressions as instructions describing a path through a graph, with assertions about the type of nodes along the way: that a node is of given type, that it has a given attribute, etc. There are also means of expressing sub-conditions, i.e. assertions that a given node is acceptable if a separate expression matches (or does not match) a different path through the graph. %package -n libzwerg Summary: Library for querying Dwarf (debuginfo) graphs Group: Development/Libraries %description -n libzwerg Libzwerg contains implementation of the Zwerg query engine as well as individual words of both Core and Dwarf vocabularies. %post -n libzwerg -p /sbin/ldconfig %postun -n libzwerg -p /sbin/ldconfig %package -n libzwerg-devel Summary: Headers and shared development libraries for libzwerg Group: Development/Libraries Requires: libzwerg%{?_isa} = %{version}-%{release} Requires: elfutils-devel%{?_isa} %description -n libzwerg-devel Headers and shared object symbolic links for the Boost C++ libraries. %package doc Summary: HTML documentation for dwgrep and libzwerg Group: Documentation BuildArch: noarch %description doc This package contains dwgrep-related documentation in the HTML format. The documentation provides the same content as that on the Boost web page (http://pmachata.github.io/dwgrep/). %prep %setup -q -n dwgrep-%{version} %build mkdir build pushd build %cmake .. make %{?_smp_mflags} make doc %{?_smp_mflags} popd %install pushd build make install DESTDIR=$RPM_BUILD_ROOT # We carry HTML documentation in a separate -doc subpackage. However, # we would still like the documentation to be installed to # /usr/share/dwgrep as opposed to /usr/shared/dwgrep-doc. So install # it here by hand, and below in %%files, have HTML be owned by the doc # subpacke and exclude it from the main package. mkdir -p $RPM_BUILD_ROOT%{htmldocdir} cp -Rp doc/html/* $RPM_BUILD_ROOT%{htmldocdir} popd %check pushd build make test popd %files %doc NEWS README %exclude %{htmldocdir} %license COPYING COPYING-LGPLV3 %{_bindir}/dwgrep %{_mandir}/man1/dwgrep.1* %files doc # Both -doc subpackage and main package should own the documentation # package, because both put files in there. %dir %{_docdir}/dwgrep %{htmldocdir} %files -n libzwerg %license COPYING COPYING-LGPLV3 %{_libdir}/libzwerg.so.0.1 %files -n libzwerg-devel # N.B.: COPYING* brought in by the libzwerg dependency. %dir %{_includedir}/libzwerg %{_includedir}/libzwerg/libzwerg.h %{_includedir}/libzwerg/libzwerg-dw.h %{_libdir}/libzwerg.so %changelog * Fri Jan 2 2015 Petr Machata - 0.1-5 - Per the review (BZ 1172800): - Move HTML documentation to main package's docdir instead of doc subpackage's docdir, but still have doc subpackage own it. * Fri Dec 19 2014 Petr Machata - 0.1-4 - Per the review (BZ 1172800): - Just use %%{version} instead of %%{hash} - Use %%license to install license files - Fix overly specific dependency of elfutils-devel - Provide bundled(jquery) * Thu Dec 11 2014 Petr Machata - 0.1-3 - Per the review (BZ 1172800): - Drop %%defattr which rpmbuild handles automatically - Likewise with rm -rf $BUILDROOT in %%install - Split BR's to individual lines - Own the directory /usr/include/libzwerg * Wed Dec 10 2014 Petr Machata - 0.1-2 - Add BR cmake, flex, bison. * Mon Dec 8 2014 Petr Machata - 0.1-1 - Initial package.