%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Summary: A semantic grep for the C language Name: coccigrep Version: 1.13 Release: 1 License: GPLv3 Group: Applications/Text URL: http://home.regit.org/software/coccigrep/ Source0: http://home.regit.org/wp-content/uploads/2011/08/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: coccinelle python python-sphinx BuildArch: noarch %description Coccigrep is a semantic grep for the C language based on coccinelle. It can be used to find where a given structure is used in code files. Coccigrep depends on the 'spatch' program which comes with coccinelle. %prep %setup -q %build python ./setup.py build %install rm -rf $RPM_BUILD_ROOT python ./setup.py install --root=%{buildroot} --install-lib=%{python_sitelib} mkdir -p %{buildroot}%{_mandir}/man1/ install coccigrep.1 %{buildroot}%{_mandir}/man1/ chmod 0644 editors/* chmod 0644 README.rst cd doc make text cd .. %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc LICENSE README.rst editors/* doc/_build/text/coccigrep.txt %attr(0755,root,root) %{_bindir}/coccigrep %dir %{python_sitelib}/%{name} %{python_sitelib}/%{name}/* %{python_sitelib}/%{name}*.egg-info %attr(0644,root,root) %{_mandir}/man1/* %changelog * Mon Feb 10 2014 Steve Grubb 1.13-1 - New upstream bugfix release * Sun Dec 23 2012 Steve Grubb 1.12-1 - New upstream bugfix release * Sun Dec 09 2012 Steve Grubb 1.11-1 - New upstream release * Mon Nov 14 2011 Steve Grubb 1.6-1 - Initial package