Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 5f9133102287b156825181d8d04ff70b > files > 5

pure-0.47-1.fc13.src.rpm

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

Group:          Development/Languages
License:        LGPLv3+ with exceptions
URL:            http://code.google.com/p/pure-lang/
Source0:        http://pure-lang.googlecode.com/files/pure-%{version}.tar.gz
Source1:	http://pure-lang.googlecode.com/files/pure-docs-%{version}.tar.gz
Source2:        pure-init.el
Patch0:         pure-0.47-pc_mode.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  gmp-devel libedit-devel
BuildRequires:  llvm-devel >= 2.4 flex bison
BuildRequires:  clang
# For compiling emacs mode
BuildRequires:  emacs emacs-el
# For integrated help in the interpreter
Requires:       w3m

# 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 back-end 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
# Libor Spacek's examples are under GPLv3
License:        BSD and GPLv3
Requires:       %{name} = %{version}-%{release}
BuildArch:      noarch

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

%package -n emacs-pure
Summary:        Pure mode for Emacs
Group:          Development/Languages
Requires:       emacs(bin) >= %{_emacs_version}
Requires:       emacs-w3m
BuildArch:      noarch

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

%package -n emacs-pure-el
Summary:        Elisp source file for the Pure mode for Emacs
Group:          Development/Languages
BuildArch:      noarch
Requires:       emacs-pure = %{version}-%{release}

%description -n emacs-pure-el
This package contains the elisp source file for the Pure mode for Emacs.


%prep
%setup -q
cp -p %{SOURCE1} .
%patch0 -p1 -b .pc_mode


%build
# TODO
#export CC=clang
#export CXX=clang++
%ifarch ppc
# http://code.google.com/p/pure-lang/issues/detail?id=13#c47
%configure --enable-release --disable-fastcc
%else
%configure --enable-release
%endif

make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# trick the docs installation to go to %{_datadir} so it can be
# shared among different arches
make install-docs DESTDIR=$RPM_BUILD_ROOT \
     libdir=%{_datadir} docs=%{name}-docs-%{version}.tar.gz
(cd $RPM_BUILD_ROOT%{_libdir}/pure && ln -s %{_datadir}/pure/docs .)

# Emacs init file
mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir}
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_emacs_sitestartdir}


%check
make check


%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
%{_bindir}/pure*
%{_libdir}/libpure*.so.*
%exclude %{_libdir}/pure/pure_main.c
%{_libdir}/pure*
# own these to avoid dangling symlinks
# in case -doc is not installed
%dir %{_datadir}/pure
%dir %{_datadir}/pure/docs
%{_mandir}/man1/*

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

%files doc
%defattr(-,root,root,-)
%doc examples
%doc %{_datadir}/pure/docs/*

%files -n emacs-pure
%defattr(-,root,root,-)
%{_emacs_sitelispdir}/*.elc
%{_emacs_sitestartdir}/*

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



%changelog
* Tue Apr  5 2011 Michel Salim <salimma@fedoraproject.org> - 0.47-1
- Update to 0.47

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.45-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Nov 12 2010 Michel Salim <salimma@fedoraproject.org> - 0.45-3
- Add w3m dependency for built-in help
- Drop gsl build dependency
- Update licensing information for examples

* Fri Nov 12 2010 Michel Salim <salimma@fedoraproject.org> - 0.45-2
- Switch to libedit so the whole package can be shipped under LGPL
- Include additional license texts

* Thu Nov 11 2010 Michel Salim <salimma@fedoraproject.org> - 0.45-1
- Update to 0.45

* Thu Oct 14 2010 Michel Salim <salimma@fedoraproject.org> - 0.44-1
- Update to 0.44

* Fri Jul  9 2010 Michel Salim <salimma@fedoraproject.org> - 0.43-3
- Emacs subpackages now adhere to packaging guidelines

* Sat Jun  5 2010 Michel Salim <salimma@fedoraproject.org> - 0.43-2
- Fix emacs-pure summary

* Mon May  3 2010 Michel Salim <salimma@fedoraproject.org> - 0.43-1
- Update to 0.43

* 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