1 |
%define name parrot |
2 |
%define version 4.6.0 |
3 |
%define release %mkrel 2 |
4 |
|
5 |
%define libname %mklibname %{name} |
6 |
%define libname_devel %mklibname -d %{name} |
7 |
|
8 |
%define _requires_exceptions perl(Parrot::Pmc2c::.*) |
9 |
%define _provides_exceptions perl(File::Which) |
10 |
|
11 |
Name: %name |
12 |
Version: %version |
13 |
Release: %release |
14 |
|
15 |
Summary: Virtual Machine for dynamic languages |
16 |
License: Artistic 2.0 |
17 |
Group: Development/Perl |
18 |
Url: http://www.parrot.org/ |
19 |
Source0: ftp://ftp.parrot.org/pub/parrot/releases/stable/%{version}/%{name}-%{version}.tar.bz2 |
20 |
BuildRequires: bison |
21 |
BuildRequires: gdbm-devel |
22 |
BuildRequires: gmp-devel |
23 |
BuildRequires: flex |
24 |
BuildRequires: libicu-devel |
25 |
BuildRequires: ncurses-devel |
26 |
BuildRequires: perl-doc |
27 |
BuildRequires: readline-devel |
28 |
|
29 |
%description |
30 |
Parrot is a virtual machine designed to efficiently compile and execute |
31 |
bytecode for interpreted languages. Parrot will be the target for the final |
32 |
Perl 6 compiler, and is already usable as a backend for the Rakudo Perl |
33 |
6 compiler, as well as a variety of other languages |
34 |
|
35 |
#-- |
36 |
|
37 |
%package -n %libname |
38 |
Summary: Parrot Virtual Machine run time library |
39 |
License: Artistic 2.0 |
40 |
Group: Development/Perl |
41 |
Provides: lib%{name} = %{version}-%{release} |
42 |
Requires: %{name} = %{version}-%{release} |
43 |
|
44 |
%description -n %libname |
45 |
Run time library for %{name}. |
46 |
|
47 |
#-- |
48 |
|
49 |
%package -n %{name}-doc |
50 |
Summary: Parrot Virtual Machine documentation |
51 |
License: Artistic 2.0 |
52 |
Group: Development/Perl |
53 |
|
54 |
%description -n %{name}-doc |
55 |
Documentation for %{name}. |
56 |
|
57 |
#-- |
58 |
|
59 |
%package -n %libname_devel |
60 |
Summary: Parrot Virtual Machine development headers and libraries |
61 |
License: Artistic 2.0 |
62 |
Group: Development/Perl |
63 |
Provides: %{name}-devel = %{version}-%{release} |
64 |
Requires: %libname = %{version} |
65 |
|
66 |
%description -n %libname_devel |
67 |
Development files for %{name}. |
68 |
|
69 |
#-- |
70 |
|
71 |
%package -n %{name}-src |
72 |
Summary: Parrot Virtual Machine sources |
73 |
License: Artistic 2.0 |
74 |
Group: Development/Perl |
75 |
Provides: %{name}-src = %{version}-%{release} |
76 |
|
77 |
%description -n %{name}-src |
78 |
Sources of %{name}. |
79 |
|
80 |
|
81 |
%prep |
82 |
%setup -q |
83 |
%{__perl} -pi -e 's,"lib/,"%{_lib}/, if (/CONST_STRING\(interp,/)' \ |
84 |
src/library.c |
85 |
%{__perl} -pi -e "s,'/usr/lib','%{_libdir}',;s,runtime/lib/,runtime/%{_lib}/," \ |
86 |
tools/dev/install_files.pl \ |
87 |
tools/dev/mk_manifest_and_skip.pl |
88 |
|
89 |
%build |
90 |
%{__perl} Configure.pl \ |
91 |
--prefix=%{_usr} \ |
92 |
--libdir=%{_libdir} \ |
93 |
--sysconfdir=%{_sysconfdir} \ |
94 |
--infodir=%{_datadir}/info \ |
95 |
--mandir=%{_mandir} \ |
96 |
--cc="%{__cc}" \ |
97 |
--parrot_is_shared \ |
98 |
--lex=/usr/bin/flex \ |
99 |
--libs='-lcurses -lm -lrt' |
100 |
|
101 |
# the following Configure.pl flag makes the compile goes boom |
102 |
#--optimize="$RPM_OPT_FLAGS -maccumulate-outgoing-args" \ |
103 |
%define _disable_ld_no_undefined 1 |
104 |
make LDFLAGS="%ldflags" |
105 |
export LD_LIBRARY_PATH=$( pwd )/blib/lib |
106 |
make parrot_utils LDFLAGS="%ldflags" |
107 |
make installable LDFLAGS="%ldflags" |
108 |
%make html |
109 |
|
110 |
|
111 |
%install |
112 |
rm -rf $RPM_BUILD_ROOT |
113 |
|
114 |
export LD_LIBRARY_PATH=$( pwd )/blib/lib |
115 |
make install DESTDIR=$RPM_BUILD_ROOT |
116 |
|
117 |
# Drop the docs so rpm can pick them up itself. |
118 |
rm -rf $RPM_BUILD_ROOT/%{_docdir}/parrot |
119 |
|
120 |
# Force permissions on doc directories. |
121 |
find docs examples -type d -exec chmod 755 {} \; |
122 |
find docs examples -type f -exec chmod 644 {} \; |
123 |
|
124 |
# Force permissions on shared libs so they get stripped. |
125 |
find $RPM_BUILD_ROOT%{_libdir} -type f \( -name '*.so' -o -name '*.so.*' \) \ |
126 |
-exec chmod 755 {} \; |
127 |
|
128 |
%check |
129 |
export LD_LIBRARY_PATH=$( pwd )/blib/lib |
130 |
#make test |
131 |
|
132 |
%clean |
133 |
rm -rf $RPM_BUILD_ROOT |
134 |
|
135 |
|
136 |
%files |
137 |
%defattr(-,root,root,-) |
138 |
%doc ChangeLog CREDITS PBC_COMPAT PLATFORMS README.pod |
139 |
%doc RESPONSIBLE_PARTIES TODO |
140 |
%exclude %{_bindir}/parrot_config |
141 |
%exclude %{_bindir}/pbc_* |
142 |
%{_bindir}/* |
143 |
|
144 |
%files -n %{name}-doc |
145 |
%defattr(-,root,root,-) |
146 |
%doc docs examples |
147 |
|
148 |
%files -n %libname |
149 |
%defattr(-,root,root,-) |
150 |
%{_libdir}/parrot |
151 |
%{_libdir}/*.so.* |
152 |
|
153 |
%files -n %libname_devel |
154 |
%defattr(-,root,root,-) |
155 |
%{_bindir}/parrot_config |
156 |
%{_bindir}/pbc_disassemble |
157 |
%{_bindir}/pbc_merge |
158 |
%{_bindir}/pbc_to_exe |
159 |
%{_bindir}/pbc_dump |
160 |
%{_includedir}/* |
161 |
%{_libdir}/*.so |
162 |
%{_libdir}/*.a |
163 |
|
164 |
%files -n %{name}-src |
165 |
%defattr(-,root,root,-) |
166 |
/usr/src/parrot |