Blob Blame History Raw
%global year 2009
%global month 11
%global parrot_version 1.8.0

%define parrot_dynext %{_libdir}/parrot/%{parrot_version}/dynext
%define par_lang_perl6 %{_libdir}/parrot/%{parrot_version}/languages/perl6

Name:           rakudo
Version:        0.0.%{year}.%{month}_%{parrot_version}
Release:        1%{?dist}
Summary:        A Perl compiler on Parrot
License:        Artistic 2.0
Group:          Development/Languages
URL:            http://www.rakudo.org/

Source0:        http://cloud.github.com/downloads/rakudo/rakudo/rakudo-%{year}-%{month}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# This librarys are needed while "pbc_to_exe" include them
BuildRequires:  ncurses-devel
BuildRequires:  readline-devel
BuildRequires:  gmp-devel
BuildRequires:  gdbm-devel
BuildRequires:  libicu-devel

BuildRequires:  parrot >= %{parrot_version}
BuildRequires:  parrot-devel >= %{parrot_version}
BuildRequires:  parrot-tools >= %{parrot_version}

%description
Rakudo Perl 6, or just Rakudo, is a Perl 6 compiler for the Parrot virtual
machine. Rakudo is an implementation of the Perl 6 specification that runs
on the Parrot VM. More information about Perl 6 is available from:
http://perl6-projects.org

%prep
%setup -q -n %{name}-%{year}-%{month}
exit 0

%build
%{__perl} Configure.pl
make


%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

# Force executable permission on shared objects so they get stripped
%{__chmod} 755 $RPM_BUILD_ROOT%{parrot_dynext}/perl6*.so

# Creating man-page
%{__install} -d $RPM_BUILD_ROOT%{_mandir}/man1
pod2man --section=1 --name=perl6 docs/running.pod | %{__gzip} -c > $RPM_BUILD_ROOT%{_mandir}/man1/perl6.1.gz


%check
%{?!_without_tests: make test}
exit 0

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc CREDITS LICENSE README
%{_bindir}/perl6
%{parrot_dynext}/perl6_group.so
%{parrot_dynext}/perl6_ops.so
%{parrot_dynext}/perl6_ops_switch.so
%{par_lang_perl6}/lib/Safe.pm
%{par_lang_perl6}/lib/Test.pm
%{par_lang_perl6}/perl6.pbc
%{_mandir}/man1/perl6.1.gz


%changelog
* Mon Oct 26 2009 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2009.11_1.8.0-1
- update to rakudo 2009-11 on parrot 1.8.0

* Sun Aug 9 2009 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2009.07_1.4.0-4
- force executable permission on shared objects so they get stripped

* Thu Aug 6 2009 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2009.07_1.4.0-2
- add a perl6 man page

* Fri Jul 31 2009 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2009.07_1.4.0-1
- fix versioning
- use 'ExcludeArch:ppc' for now
- provide full SourceURL
- strip binary
- first .spec file created

* Fri Jul 31 2009 wayland <wayland@wayland.id.au> 0.0.2009.07_1.4.0-1
- Tim Nelson also created an initial .spec file some things are taken from it