Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > ed2c9e830f318a8e8d289ec91e56c1cc > files > 3

pure-0.36-2.fc13.src.rpm

%if %($(pkg-config emacs) ; echo $?)
# This will get overridden by pkg-config; defaulting to the version in F-10
%define emacs_version 22.3
%define emacs_lispdir %{_datadir}/emacs/site-lisp
%define emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d
%else
%define emacs_version %(pkg-config emacs --modversion)
%define emacs_lispdir %(pkg-config emacs --variable sitepkglispdir)
%define emacs_startdir %(pkg-config emacs --variable sitestartdir)
%endif

Name:           pure
Version:        0.36
Release:        2%{?dist}
Summary:        A term-rewriting functional programming language

Group:          Development/Languages
License:        GPLv3+
URL:            http://code.google.com/p/pure-lang/
Source0:        http://pure-lang.googlecode.com/files/pure-%{version}.tar.gz
Source1:        pure-init.el
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  gmp-devel readline-devel gsl-devel
# Not checked by configure
BuildRequires:  llvm-static llvm-devel >= 2.4 flex bison
# For compiling emacs mode
BuildRequires:  emacs emacs-el

# LLVM is not supported on ppc64
ExcludeArch:    ppc64

%description
Pure is a modern-style functional programming language based on term
rewriting. It offers equational definitions with pattern matching,
full symbolic rewriting capabilities, dynamic typing, eager and lazy
evaluation, lexical closures, built-in list and matrix support and an
easy-to-use C interface. The interpreter uses LLVM as a backend to
JIT-compile Pure programs to fast native code.


%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%package        doc
Summary:        Examples for %{name}
Group:          Documentation
Requires:       %{name} = %{version}-%{release}
BuildArch:      noarch

%description    doc
The %{name}-doc package contains examples for programming in %{name}.

%package -n emacs-pure
Summary:        Vala mode for Emacs
Group:          Applications/Editors
Requires:       emacs(bin) >= %{emacs_version}
BuildArch:      noarch

%description -n emacs-pure
An Emacs mode for editing Pure source code.


%prep
%setup -q


%build
%ifarch ppc
# http://code.google.com/p/pure-lang/issues/detail?id=13#c47
%configure --disable-fastcc
%else
%configure
%endif

make %{?_smp_mflags}
# Compile emacs module
cd etc && emacs -batch -f batch-byte-compile pure-mode.el


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# Emacs mode files
rm etc/*.el.in
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}
mkdir -p $RPM_BUILD_ROOT%{emacs_startdir}
mv etc/*.el* $RPM_BUILD_ROOT%{emacs_lispdir}
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{emacs_startdir}


%check
%ifnarch ppc
make check
%else
(make check 2>&1 | tee testlog.txt ; true)
%endif


%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig



%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING NEWS README TODO etc
%ifarch ppc
%doc testlog.txt test/test020.*
%endif
%{_bindir}/pure*
%{_libdir}/libpure*.so.*
%exclude %{_libdir}/pure/pure_main.c
%{_libdir}/pure*
%{_mandir}/man1/*

%files devel
%defattr(-,root,root,-)
%{_includedir}/pure*
%{_libdir}/*.so
%{_libdir}/pure/pure_main.c

%files doc
%defattr(-,root,root,-)
%doc examples

%files -n emacs-pure
%defattr(-,root,root,-)
%{emacs_lispdir}/*.el*
%{emacs_startdir}/*



%changelog
* Tue Dec  8 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 0.36-2
- Explicitly BR llvm-static in accordance with the Packaging
  Guidelines (llvm-devel is still static-only).

* Fri Oct 23 2009 Michel Salim <salimma@fedoraproject.org> - 0.36-1
- Update to 0.36

* Thu Sep 24 2009 Michel Salim <salimma@fedoraproject.org> - 0.35-1
- Update to 0.35
- Reenable PPC tests

* Tue Sep  8 2009 Michel Salim <salimma@fedoraproject.org> - 0.34-2
- Make tests advisory on ppc for now

* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 0.34-1
- Update to 0.34

* Tue Sep  1 2009 Michel Salim <salimma@fedoraproject.org> - 0.33-1
- Update to 0.33

* Thu Aug 27 2009 Michel Salim <salimma@fedoraproject.org> - 0.32-1
- Update to 0.32
- Split out -devel and -doc subpackages
- Disable ppc build on Rawhide; massive testcase failures

* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 0.30-1
- Update to 0.30

* Fri Aug 21 2009 Michel Salim <salimma@fedoraproject.org> - 0.29-1
- Update to 0.29

* Sun Mar 15 2009 Michel Salim <salimma@fedoraproject.org> - 0.19-1
- Update to 0.19
- Add build dependencies that configure does not check: llvm-devel, flex

* Wed Mar  4 2009 Michel Salim <salimma@fedoraproject.org> - 0.18a-1
- Initial package