ocaml-cil/ocaml-cil.spec

277 lines
8.5 KiB
RPMSpec
Raw Normal View History

2008-03-01 12:31:25 +00:00
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}
# Prevent unwanted bytecode stripping by RPM.
%define __strip /bin/true
2008-03-01 12:31:25 +00:00
Name: ocaml-cil
Version: 1.4.0
2012-06-10 22:47:38 +00:00
Release: 3%{?dist}
2008-03-01 12:31:25 +00:00
Summary: CIL - Infrastructure for C Program Analysis and Transformation
Group: Development/Libraries
License: BSD
URL: http://cil.sourceforge.net/
Source0: http://downloads.sourceforge.net/cil/cil-%{version}.tar.gz
2008-03-01 12:31:25 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExcludeArch: ppc64
ExcludeArch: ppc
ExcludeArch: sparc64
ExcludeArch: s390 s390x
2008-03-01 12:31:25 +00:00
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
2012-06-08 07:37:47 +00:00
# Run-time for tests
BuildRequires: perl(Carp)
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(File::Spec)
BuildRequires: perl(lib)
BuildRequires: perl(Text::ParseWords)
2008-03-01 12:31:25 +00:00
Requires: %{name} = %{version}-%{release}
Provides: perl(CilConfig) = %{version}
2008-07-07 10:51:25 +00:00
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
2012-06-08 07:37:47 +00:00
# Explicit requires because system-wide dependency generator is overriden in
# this package
Requires: perl(Carp)
Requires: perl(Data::Dumper)
Requires: perl(File::Spec)
Requires: perl(lib)
Requires: perl(Text::ParseWords)
2008-03-01 12:31:25 +00:00
%description cilly
The %{name}-cilly package contains the 'cilly' wrapper/replacement
for gcc.
%prep
%setup -q -n cil-%{version}
2008-03-01 12:31:25 +00:00
%build
./configure --libdir=%{_libdir}
make RELEASE=1
2008-03-01 12:31:25 +00:00
make quicktest
archos=`ls obj`
rm -f bin/CilConfig.pm
cat > bin/CilConfig.pm <<EOF
\$::archos = "$archos";
\$::cc = "gcc";
\$::cilhome = "%{_libexecdir}/cil";
\$::default_mode = "GNUCC";
EOF
#strip obj/$archos/cilly.byte.exe - NO! It removes the bytecode :-(
%if %opt
strip obj/$archos/cilly.asm.exe
%endif
%install
rm -rf $RPM_BUILD_ROOT
# This sets $archos to something like 'x86_LINUX':
archos=`ls obj`
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
# CIL's make install rule is totally borked.
2008-07-07 10:51:25 +00:00
mkdir -p $DESTDIR%{perl_vendorlib}
install -m 0644 lib/*.pm bin/CilConfig.pm $DESTDIR%{perl_vendorlib}
2008-03-01 12:31:25 +00:00
mkdir -p $OCAMLFIND_DESTDIR
ocamlfind install cil META obj/$archos/*.{ml,mli,cmi,cmo,cmx,cma,cmxa,o,a} \
src/*.mli
2008-03-01 12:31:25 +00:00
mkdir -p $DESTDIR%{_bindir}
install -m 0755 bin/cilly $DESTDIR%{_bindir}
mkdir -p $DESTDIR%{_libexecdir}/cil/obj/$archos
install -m 0755 obj/$archos/cilly.*.exe $DESTDIR%{_libexecdir}/cil/obj/$archos
mkdir -p $DESTDIR/etc/prelink.conf.d
2009-01-21 20:56:56 +00:00
echo '-b /usr/libexec/cil' > $DESTDIR/etc/prelink.conf.d/ocaml-cil-cilly.conf
2008-03-01 12:31:25 +00:00
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README.md LICENSE
2008-03-01 12:31:25 +00:00
%{_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
2008-03-01 12:31:25 +00:00
%files devel
%defattr(-,root,root,-)
%doc README.md LICENSE
2008-03-01 12:31:25 +00:00
%if %opt
%{_libdir}/ocaml/cil/*.a
%{_libdir}/ocaml/cil/*.cmxa
%{_libdir}/ocaml/cil/*.cmx
%endif
%{_libdir}/ocaml/cil/*.mli
%{_libdir}/ocaml/cil/*.ml
2008-03-01 12:31:25 +00:00
%files doc
2008-07-07 10:51:25 +00:00
%defattr(-,root,root,-)
%doc README.md LICENSE doc/*
2008-03-01 12:31:25 +00:00
%files cilly
%defattr(-,root,root,-)
%doc README.md LICENSE
2008-07-07 10:51:25 +00:00
%{perl_vendorlib}/CilConfig.pm
%{perl_vendorlib}/Cilly.pm
%{perl_vendorlib}/KeptFile.pm
%{perl_vendorlib}/OutputFile.pm
%{perl_vendorlib}/TempFile.pm
2008-03-01 12:31:25 +00:00
%{_bindir}/cilly
%{_libexecdir}/cil
%config(noreplace) /etc/prelink.conf.d/ocaml-cil-cilly.conf
2008-03-01 12:31:25 +00:00
%changelog
2012-06-10 22:47:38 +00:00
* Sun Jun 10 2012 Richard W.M. Jones <rjones@redhat.com> - 1.4.0-3
- Rebuild for OCaml 4.00.0.
2012-06-07 21:22:13 +00:00
* Thu Jun 07 2012 Petr Pisar <ppisar@redhat.com> - 1.4.0-2
- Perl 5.16 rebuild
2012-06-08 07:37:47 +00:00
- Specify all Perl dependencies
2012-06-07 21:22:13 +00:00
* Fri Jan 6 2012 Richard W.M. Jones <rjones@redhat.com> - 1.4.0-1
- New upstream version 1.4.0.
- Rebuild for OCaml 3.12.1.
2011-06-20 14:10:18 +00:00
* Mon Jun 20 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.3.7-10
- Perl mass rebuild
2011-06-09 15:02:23 +00:00
* Thu Jun 09 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.3.7-9
- Perl 5.14 mass rebuild
* Fri Jan 07 2011 Richard W.M. Jones <rjones@redhat.com> - 1.3.7-8
2011-01-07 15:05:44 +00:00
- Rebuild for OCaml 3.12 (http://fedoraproject.org/wiki/Features/OCaml3.12).
- Patch: Remove '-lstr' option.
- Move configure into %%build section.
2011-01-07 15:05:44 +00:00
2010-06-01 20:10:38 +00:00
* Tue Jun 01 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.3.7-6
- Mass rebuild with perl-5.12.0
2009-12-30 13:48:33 +00:00
* Wed Dec 30 2009 Richard W.M. Jones <rjones@redhat.com> - 1.3.7-5
- Rebuild for OCaml 3.11.2.
2009-12-07 16:42:28 +00:00
* Mon Dec 7 2009 Stepan Kasal <skasal@redhat.com> - 1.3.7-4
- rebuild against perl 5.10.1
* Fri Oct 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.3.7-3
- Include natively compiled files and *.mli files (RHBZ#521324).
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue May 26 2009 Richard W.M. Jones <rjones@redhat.com> - 1.3.7-1
- New upstream version 1.3.7.
- Rebuild for OCaml 3.11.1.
* Thu Apr 16 2009 S390x secondary arch maintainer <fedora-s390x@lists.fedoraproject.org>
- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs
(added sparc64 per request from the sparc maintainer)
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.6-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2009-01-21 20:56:56 +00:00
* Wed Jan 21 2009 Richard W.M. Jones <rjones@redhat.com> - 1.3.6-10
- Fix prelink configuration file.
* Fri Dec 5 2008 Richard W.M. Jones <rjones@redhat.com> - 1.3.6-9
- Patch to fix stricter -output-obj checks in OCaml 3.11.0.
2008-12-04 19:00:06 +00:00
* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 1.3.6-8
- Rebuild for OCaml 3.11.0
* Tue Sep 2 2008 Richard W.M. Jones <rjones@redhat.com> - 1.3.6-7
- Prevent unwanted bytecode stripping by RPM and prelink.
- Place *.ml files into the -devel subpackage.
2008-07-07 10:51:25 +00:00
* Mon Jul 7 2008 Richard W.M. Jones <rjones@redhat.com> - 1.3.6-6
- Fix Perl paths (rhbz#453759).
2008-04-23 11:10:37 +00:00
* Wed Apr 23 2008 Richard W.M. Jones <rjones@redhat.com> - 1.3.6-5
- Rebuild for OCaml 3.10.2
2008-03-01 12:31:25 +00:00
* Wed Nov 7 2007 Richard W.M. Jones <rjones@redhat.com> - 1.3.6-4
- ExcludeArch ppc - CIL doesn't build on PPC as it turns out.
* Wed Nov 7 2007 Richard W.M. Jones <rjones@redhat.com> - 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 <rjones@redhat.com> - 1.3.6-2
- Initial RPM release.