##
## parrot.spec -- OpenPKG RPM Package Specification
## Copyright (c) 2000-2005 OpenPKG Foundation e.V.
## Copyright (c) 2000-2005 Ralf S. Engelschall
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package information
Name: parrot
Summary: Parrot Virtual Machine
URL: http://www.parrotcode.org/
Vendor: Leo Tötsch et al.
Packager: OpenPKG
Distribution: OpenPKG
Class: EVAL
Group: Language
License: Artistic/GPL
Version: 0.3.1
Release: 20051108
# list of sources
Source0: ftp://ftp.cpan.org/pub/CPAN/authors/id/L/LT/LTOETSCH/parrot-%{version}.tar.gz
Patch0: parrot.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20040130, perl, gcc, flex, bison, make
PreReq: OpenPKG, openpkg >= 20040130
BuildPreReq: gmp, icu
PreReq: gmp, icu
AutoReq: no
AutoReqProv: no
%description
Parrot is a virtual machine designed to execute bytecode for
interpreted languages efficiently. Parrot will be the target for the
Perl 6 compiler.
%track
prog parrot = {
version = %{version}
url = ftp://ftp.cpan.org/pub/CPAN/authors/id/L/LT/LTOETSCH/
regex = parrot-(__VER__)\.tar\.gz
}
%prep
%setup -q
%patch -p0
%build
# configure program
%{l_prefix}/bin/perl Configure.pl \
--icu-config=%{l_prefix}/bin/icu-config \
--debugging=0 \
--optimize \
--cc="%{l_cc}" \
--cxx="%{l_cxx}" \
--ccflags="%{l_cflags -O} %{l_cppflags icu .}" \
--link="%{l_cxx}" \
--linkflags="%{l_ldflags}" \
--ld="%{l_cc}" \
--ldflags="%{l_ldflags}" \
--lex="flex" \
--yacc="bison -y" \
--libs=""
# build program
%{l_make} %{l_mflags} \
parrot pdb pdump
%install
# install program
rm -rf $RPM_BUILD_ROOT
%{l_make} %{l_mflags} install \
BUILDPREFIX=$RPM_BUILD_ROOT \
PREFIX=%{l_prefix}/share/parrot \
EXEC_PREFIX=%{l_prefix}/share/parrot \
BIN_DIR=%{l_prefix}/bin \
LIB_DIR=%{l_prefix}/lib \
INCLUDE_DIR=%{l_prefix}/include
# install headers (are not installed by default)
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/lib \
$RPM_BUILD_ROOT%{l_prefix}/include/parrot
cp -rp include/parrot/* $RPM_BUILD_ROOT%{l_prefix}/include/parrot/
# strip down and adjust installation
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/parrot/blib
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
%{l_shtool} install -c -m 644 \
blib/lib/libparrot.a $RPM_BUILD_ROOT%{l_prefix}/lib/
# determine installation files
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
%files -f files
%clean
rm -rf $RPM_BUILD_ROOT