瀏覽代碼

new package: parrot 0.1.0 (Parrot Virtual Machine)

Ralf S. Engelschall 21 年之前
父節點
當前提交
bc64899f21
共有 1 個文件被更改,包括 114 次插入0 次删除
  1. 114 0
      parrot/parrot.spec

+ 114 - 0
parrot/parrot.spec

@@ -0,0 +1,114 @@
+##
+##  parrot.spec -- OpenPKG RPM Specification
+##  Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
+##  Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
+##  Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
+##
+##  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:     The OpenPKG Project
+Distribution: OpenPKG
+Class:        EVAL
+Group:        Language
+License:      Artistic/GPL
+Version:      0.1.0
+Release:      20040724
+
+#   list of sources
+Source0:      ftp://ftp.cpan.org/pub/CPAN/authors/id/L/LT/LTOETSCH/parrot-%{version}.tar.gz
+
+#   build information
+Prefix:       %{l_prefix}
+BuildRoot:    %{l_buildroot}
+BuildPreReq:  OpenPKG, openpkg >= 20040130, perl, gcc, flex, bison
+PreReq:       OpenPKG, openpkg >= 20040130
+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
+
+%build
+    #   configure program
+    %{l_prefix}/bin/perl Configure.pl \
+        --debugging=0 \
+        --optimize \
+        --cc="%{l_cc}" \
+        --ccflags="%{l_cflags -O} %{l_cppflags}" \
+        --link="%{l_cc}" \
+        --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} \
+        EXEC_PREFIX=%{l_prefix} \
+        BINDIR=%{l_prefix}/bin \
+        LIBDIR=%{l_prefix}/lib \
+        INCLUDEDIR=%{l_prefix}/include
+
+    #   install headers (are not installed by default)
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/include/parrot
+    cp -rp include/parrot/* $RPM_BUILD_ROOT%{l_prefix}/include/parrot/
+
+    #   strip down and adjust installation
+    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
+    rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin/languages
+    mv $RPM_BUILD_ROOT%{l_prefix}/lib/blib/lib/libparrot.a \
+       $RPM_BUILD_ROOT%{l_prefix}/lib/libparrot.a
+    rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/blib
+
+    #   determine installation files
+    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+
+%files -f files
+
+%clean
+    rm -rf $RPM_BUILD_ROOT
+