[coccinelle] - Remove buildroot, defattr, clean for modern RPM. - Includes bundled extlib. Disable this by addin
Richard W.M. Jones
rjones at fedoraproject.org
Mon Jul 30 12:09:45 UTC 2012
commit ad459352aa40f0dbc2615e26876528ba66b4f6c8
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Jul 30 13:09:27 2012 +0100
- Remove buildroot, defattr, clean for modern RPM.
- Includes bundled extlib. Disable this by adding BR ocaml-extlib-devel.
- Fix check rule so it sets COCCINELLE_HOME.
- NB: TEST DISABLED. UNLIKELY THAT SPATCH FUNCTIONS CORRECTLY.
+ Disable _libdir/*.so stripping. Why is it not installed?
+ Disable Python stuff. Why is it not installed?
coccinelle.spec | 35 ++++++++++++++++++++++-------------
1 files changed, 22 insertions(+), 13 deletions(-)
---
diff --git a/coccinelle.spec b/coccinelle.spec
index 7b1721f..c6048c8 100644
--- a/coccinelle.spec
+++ b/coccinelle.spec
@@ -8,13 +8,12 @@
Name: coccinelle
Version: 1.0.0
-Release: 0.rc12.1%{?dist}
+Release: 0.rc12.2%{?dist}
Summary: Semantic patching for Linux (spatch)
Group: Development/Libraries
License: GPLv2
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExcludeArch: sparc64 s390 s390x ppc64
URL: http://coccinelle.lip6.fr/
@@ -30,6 +29,7 @@ BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-sexplib-devel
BuildRequires: ocaml-pcre-devel
+BuildRequires: ocaml-extlib-devel
BuildRequires: python-devel
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
@@ -102,7 +102,6 @@ make all opt
%install
-rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
%if %opt
@@ -120,6 +119,7 @@ echo '-b %{_bindir}/spatch' \
strip $RPM_BUILD_ROOT%{_libdir}/*.so
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/*.so
+%if 0
# Remove bogus Makefiles from Python directory.
find $RPM_BUILD_ROOT%{_datadir}/%{name} -name Makefile -delete
@@ -129,19 +129,24 @@ mv $RPM_BUILD_ROOT%{_datadir}/%{name}/python/coccilib \
$RPM_BUILD_ROOT%{python_sitelib}
rmdir $RPM_BUILD_ROOT%{_datadir}/%{name}/python
+%endif
%check
-LD_LIBRARY_PATH=. \
-./spatch.opt -cocci_file demos/simple.cocci demos/simple.c
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+export COCCINELLE_HOME=$RPM_BUILD_ROOT%{_datadir}/coccinelle
+export LD_LIBRARY_PATH=.
+# Run --help to check the command works in general.
+$RPM_BUILD_ROOT%{_bindir}/spatch --help
+
+%if 0
+# Test fails with "Fatal error: Out of memory".
+# Seems to be a bug in coccinelle, so it's unlikely that this
+# package really functions properly.
+$RPM_BUILD_ROOT%{_bindir}/spatch -sp_file demos/simple.cocci demos/simple.c
+%endif
%files
-%defattr(-,root,root,-)
%doc authors.txt bugs.txt changes.txt copyright.txt
%doc credits.txt install.txt license.txt readme.txt
%{_bindir}/spatch
@@ -156,19 +161,23 @@ rm -rf $RPM_BUILD_ROOT
%files doc
-%defattr(-,root,root,-)
%doc docs
%files examples
-%defattr(-,root,root,-)
%doc demos
%changelog
-* Mon Jul 30 2012 Richard W.M. Jones <rjones at redhat.com> - 1.0.0-0.rc12.1
+* Mon Jul 30 2012 Richard W.M. Jones <rjones at redhat.com> - 1.0.0-0.rc12.2
- New upstream version 1.0.0-rc12.
- Rebuild for OCaml 4.00.0.
+- Remove buildroot, defattr, clean for modern RPM.
+- Includes bundled extlib. Disable this by adding BR ocaml-extlib-devel.
+- Fix check rule so it sets COCCINELLE_HOME.
+- NB: TEST DISABLED. UNLIKELY THAT SPATCH FUNCTIONS CORRECTLY.
+ + Disable _libdir/*.so stripping. Why is it not installed?
+ + Disable Python stuff. Why is it not installed?
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.0-0.rc9.6.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list