%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} # Prevent unwanted bytecode stripping by RPM. %define __strip /bin/true Name: ocaml-cil Version: 1.3.6 Release: 11%{?dist} Summary: CIL - Infrastructure for C Program Analysis and Transformation Group: Development/Libraries License: BSD URL: http://cil.sourceforge.net/ Source0: http://hal.cs.berkeley.edu/cil/distrib/cil-1.3.6.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: ppc64 ExcludeArch: ppc Patch0: cil-1.3.6-output-obj.patch BuildRequires: ocaml, ocaml-findlib-devel, ocaml-ocamldoc %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh %define __find_provides /usr/lib/rpm/ocaml-find-provides.sh %description CIL (C Intermediate Language) is a high-level representation along with a set of tools that permit easy analysis and source-to-source transformation of C programs. CIL is both lower-level than abstract-syntax trees, by clarifying ambiguous constructs and removing redundant ones, and also higher-level than typical intermediate languages designed for compilation, by maintaining types and a close relationship with the source program. The main advantage of CIL is that it compiles all valid C programs into a few core constructs with a very clean semantics. Also CIL has a syntax-directed type system that makes it easy to analyze and manipulate C programs. Furthermore, the CIL front-end is able to process not only ANSI-C programs but also those using Microsoft C or GNU C extensions. If you do not use CIL and want instead to use just a C parser and analyze programs expressed as abstract-syntax trees then your analysis will have to handle a lot of ugly corners of the language (let alone the fact that parsing C itself is not a trivial task). In essence, CIL is a highly-structured, "clean" subset of C. CIL features a reduced number of syntactic and conceptual forms. For example, all looping constructs are reduced to a single form, all function bodies are given explicit return statements, syntactic sugar like "->" is eliminated and function arguments with array types become pointers. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %package doc Summary: Documentation for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description doc The %{name}-doc package contains documentation for users of %{name}. %package cilly Summary: Support programs for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} Provides: perl(CilConfig) = %{version} Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description cilly The %{name}-cilly package contains the 'cilly' wrapper/replacement for gcc. %prep %setup -q -n cil %patch0 -p1 ./configure --libdir=%{_libdir} %build make make quicktest cat > META < bin/CilConfig.pm < $DESTDIR/etc/prelink.conf.d/ocaml-cil-cilly.conf %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc README LICENSE %{_libdir}/ocaml/cil %if %opt %exclude %{_libdir}/ocaml/cil/*.a %exclude %{_libdir}/ocaml/cil/*.cmxa %exclude %{_libdir}/ocaml/cil/*.cmx %endif %exclude %{_libdir}/ocaml/cil/*.mli %exclude %{_libdir}/ocaml/cil/*.ml %files devel %defattr(-,root,root,-) %doc README LICENSE %if %opt %{_libdir}/ocaml/cil/*.a %{_libdir}/ocaml/cil/*.cmxa %{_libdir}/ocaml/cil/*.cmx %endif %{_libdir}/ocaml/cil/*.mli %{_libdir}/ocaml/cil/*.ml %files doc %defattr(-,root,root,-) %doc README LICENSE doc/* %files cilly %defattr(-,root,root,-) %doc README LICENSE %{perl_vendorlib}/CilConfig.pm %{perl_vendorlib}/Cilly.pm %{perl_vendorlib}/KeptFile.pm %{perl_vendorlib}/OutputFile.pm %{perl_vendorlib}/TempFile.pm %{_bindir}/cilly %{_libexecdir}/cil %config(noreplace) /etc/prelink.conf.d/ocaml-cil-cilly.conf %changelog * Wed Feb 25 2009 Fedora Release Engineering - 1.3.6-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Jan 21 2009 Richard W.M. Jones - 1.3.6-10 - Fix prelink configuration file. * Fri Dec 5 2008 Richard W.M. Jones - 1.3.6-9 - Patch to fix stricter -output-obj checks in OCaml 3.11.0. * Wed Nov 19 2008 Richard W.M. Jones - 1.3.6-8 - Rebuild for OCaml 3.11.0 * Tue Sep 2 2008 Richard W.M. Jones - 1.3.6-7 - Prevent unwanted bytecode stripping by RPM and prelink. - Place *.ml files into the -devel subpackage. * Mon Jul 7 2008 Richard W.M. Jones - 1.3.6-6 - Fix Perl paths (rhbz#453759). * Wed Apr 23 2008 Richard W.M. Jones - 1.3.6-5 - Rebuild for OCaml 3.10.2 * Wed Nov 7 2007 Richard W.M. Jones - 1.3.6-4 - ExcludeArch ppc - CIL doesn't build on PPC as it turns out. * Wed Nov 7 2007 Richard W.M. Jones - 1.3.6-3 - Change upstream URL. - perl(CilConfig) set to package version - Split out documentation into a separate -doc package. * Mon Aug 20 2007 Richard W.M. Jones - 1.3.6-2 - Initial RPM release.