Author: chromatic
Date: Sat May 26 17:08:52 2007
New Revision: 18647

Modified:
   trunk/parrot.spec

Log:
[Packaging] Upgraded parrot.spec to David Fetter's and Steven Pritchard's 
version.

Modified: trunk/parrot.spec
==============================================================================
--- trunk/parrot.spec   (original)
+++ trunk/parrot.spec   Sat May 26 17:08:52 2007
@@ -1,172 +1,160 @@
-%define version 0.4.12
-%define devel -devel
-%define prefix /usr/local/parrot/%{version}
-%define exec_prefix %{prefix}
-%define bindir %{exec_prefix}/bin
-%define libdir %{exec_prefix}/lib
-%define includedir %{exec_prefix}/include
-
-Summary: Parrot
-Name: parrot
-Version: %{version}
-Release: 1
-Source0: %{name}-%{version}%{devel}.tar.gz
-License: Artistic/GPL
-Group: Development/Languages
-BuildRoot: %{_tmppath}/%{name}-root
+Name:           parrot
+Version:        0.4.12
+Release:        1%{?dist}
+Summary:        Parrot Virtual Machine
+License:        GPL or Artistic
+Group:          Development/Libraries
+URL:            http://www.parrotcode.org/
+Source0:        
http://www.cpan.org/authors/id/M/MD/MDIEP/parrot-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires:  readline-devel
+BuildRequires:  ncurses-devel
+BuildRequires:  gmp-devel
+BuildRequires:  gdbm-devel
+BuildRequires:  /usr/bin/perldoc
+BuildRequires:  bc
+BuildRequires:  m4
+BuildRequires:  libicu-devel
+BuildRequires:  perl-SVK
+
+%package devel
+Summary:        Parrot Virtual Machine development headers and libraries
+License:        GPL or Artistic
+Group:          Development/Libraries
+Requires:       %{name} = %{version}-%{release}
+Requires:       %{_libdir}/pkgconfig
 
 %description
+Parrot is a virtual machine designed to efficiently compile and
+execute bytecode for interpreted languages. Parrot will be a target
+for the Perl 6 compiler, and is already usable as a backend for
+Pugs, as well as variety of other languages.
+
+%description devel
+Parrot Virtual Machine development headers and libraries.
 
 %prep
-%setup -q -n %{name}-%{version}%{devel}
+%setup -q
+
+%{__perl} -pi -e 's,"lib/,"%{_lib}/, if (/CONST_STRING\(interp,/)' \
+    src/library.c
+%{__perl} -pi -e "s,'/usr/lib','%{_libdir}',;s,runtime/lib/,runtime/%{_lib}/," 
\
+    tools/dev/install_files.pl \
+    tools/dev/mk_manifests.pl
 
 %build
-perl Configure.pl --optimize
-make CC="ccache gcc" parrot pdb pdump
-make -C imcc
-perl tools/dev/mk_manifests.pl --prefix=%{prefix} --exec-prefix=%{exec_prefix} 
--bindir=%{bindir} --libdir=%{libdir} --includedir=%{includedir} 
MANIFEST.detailed
+%{__perl} Configure.pl \
+    --prefix=%{_usr} \
+    --libdir=%{_libdir} \
+    --sysconfdir=%{_sysconfdir} \
+    --infodir=%{_datadir}/info \
+    --mandir=%{_mandir} \
+    --cc=%{__cc} \
+    --cxx=%{__cxx} \
+    --optimize="$RPM_OPT_FLAGS -maccumulate-outgoing-args" \
+    --parrot_is_shared \
+    --lex=/usr/bin/flex \
+    --yacc=/usr/bin/yacc \
+    --libs='-lcurses -lm'
+
+export LD_LIBRARY_PATH=$( pwd )/blib/lib
+make
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-make install BUILDPREFIX=$RPM_BUILD_ROOT PREFIX=%{prefix} 
EXEC_PREFIX=%{exec_prefix} BINDIR=%{bindir} LIBDIR=%{libdir} 
INCLUDEDIR=%{includedir} MANIFEST.detailed
+export LD_LIBRARY_PATH=$( pwd )/blib/lib
+make reallyinstall DESTDIR=$RPM_BUILD_ROOT
 
-# Create directories
-#perl -MFile::Basename=dirname -lne 'next if /\[\]/; 
my($meta,$src,$dest)=split(/\s+/); $dest ||= $src; print "install -d 
".dirname("$ENV{RPM_BUILD_ROOT}%{prefix}/$dest")' MANIFEST.detailed | sort -u | 
sh
+# Drop the docs so rpm can pick them up itself.
+rm -rf $RPM_BUILD_ROOT/%{_docdir}/parrot
 
-# Copy over files
-#perl -lne 'next if /\[\]/; my($meta,$src,$dest)=split(/\s+/); $dest ||= $src; 
print "install -c $src $ENV{RPM_BUILD_ROOT}%{prefix}/$dest"' MANIFEST.detailed 
| sh
+# Force permissions on doc directories.
+find LICENSES docs examples -type d -exec chmod 755 {} \;
+find LICENSES docs examples -type f -exec chmod 644 {} \;
+
+# Force permissions on shared libs so they get stripped.
+find $RPM_BUILD_ROOT%{_libdir} -type f \( -name '*.so' -o -name '*.so.*' \) \
+    -exec chmod 755 {} \;
+
+# These files *probably* aren't needed.
+rm -rf $RPM_BUILD_ROOT%{_usr}/compilers \
+    $RPM_BUILD_ROOT%{_usr}/config \
+    $RPM_BUILD_ROOT%{_includedir}/src \
+    $RPM_BUILD_ROOT%{_usr}/src
+
+%check
+export LD_LIBRARY_PATH=$( pwd )/blib/lib
+# make test < /dev/null
+# %{?_with_fulltest:make fulltest < /dev/null}
+# make test || :
+# %{?_with_fulltest:make fulltest || :}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%package devel
-Summary: Parrot devel package
-Group: unknown
-
-%description devel
-Parrot sub-package
-
-%package BASIC
-Summary: Parrot BASIC package
-Group: unknown
-
-%description BASIC
-Parrot sub-package
-
-%package befunge
-Summary: Parrot befunge package
-Group: unknown
-
-%description befunge
-Parrot sub-package
-
-%package bf
-Summary: Parrot bf package
-Group: unknown
-
-%description bf
-Parrot sub-package
-
-%package cola
-Summary: Parrot cola package
-Group: unknown
-
-%description cola
-Parrot sub-package
-
-%package forth
-Summary: Parrot forth package
-Group: unknown
-
-%description forth
-Parrot sub-package
-
-%package jako
-Summary: Parrot jako package
-Group: unknown
-
-%description jako
-Parrot sub-package
-
-%package ook
-Summary: Parrot ook package
-Group: unknown
+%post -p /sbin/ldconfig
 
-%description ook
-Parrot sub-package
+%postun -p /sbin/ldconfig
 
-%package perl6
-Summary: Parrot perl6 package
-Group: unknown
+%files
+%defattr(-,root,root,-)
+%doc ABI_CHANGES ChangeLog CREDITS NEWS PBC_COMPAT PLATFORMS README
+%doc RESPONSIBLE_PARTIES TODO
+%doc LICENSES docs examples
+%exclude %{_bindir}/parrot-config
+%{_bindir}/*
+%{_libdir}/parrot
+%{_libdir}/libparrot.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%{_bindir}/parrot-config
+%{_includedir}/parrot
+%{_libdir}/libparrot.so
+%{_libdir}/libparrot.a
+%{_libdir}/pkgconfig/*
 
-%description perl6
-Parrot sub-package
-
-%package regex
-Summary: Parrot regex package
-Group: unknown
-
-%description regex
-Parrot sub-package
-
-%package ruby
-Summary: Parrot ruby package
-Group: unknown
-
-%description ruby
-Parrot sub-package
-
-%package scheme
-Summary: Parrot scheme package
-Group: unknown
-
-%description scheme
-Parrot sub-package
-
-
-%files -f MANIFEST.main
-%defattr(-,root,root)
-
-%files -f MANIFEST.devel devel
-%defattr(-,root,root)
-
-%files -f MANIFEST.BASIC BASIC
-%defattr(-,root,root)
-
-%files -f MANIFEST.befunge befunge
-%defattr(-,root,root)
-
-%files -f MANIFEST.bf bf
-%defattr(-,root,root)
-
-%files -f MANIFEST.cola cola
-%defattr(-,root,root)
-
-%files -f MANIFEST.forth forth
-%defattr(-,root,root)
-
-%files -f MANIFEST.jako jako
-%defattr(-,root,root)
-
-%files -f MANIFEST.ook ook
-%defattr(-,root,root)
-
-%files -f MANIFEST.perl6 perl6
-%defattr(-,root,root)
-
-%files -f MANIFEST.regex regex
-%defattr(-,root,root)
-
-%files -f MANIFEST.ruby ruby
-%defattr(-,root,root)
+%changelog
+* Fri May 25 2007 David Fetter <[EMAIL PROTECTED]> 0.4.12-1
+- Update to 0.4.12.
 
-%files -f MANIFEST.scheme scheme
-%defattr(-,root,root)
+* Wed Apr 18 2007 Steven Pritchard <[EMAIL PROTECTED]> 0.4.11-1
+- Update to 0.4.11.
 
+* Wed Mar 21 2007 Steven Pritchard <[EMAIL PROTECTED]> 0.4.10-1
+- Update to 0.4.10.
 
-%changelog
-* Tue Mar 18 2003  <[EMAIL PROTECTED]>
-- Initial build.
+* Sat Mar 10 2007 Steven Pritchard <[EMAIL PROTECTED]> 0.4.9-1
+- Update to 0.4.9.
+- BR ncurses-devel.
+- For some reason now I need to force -lm too.
+- Remove some files/directories that shouldn't be included.
+
+* Wed Jan 17 2007 Steven Pritchard <[EMAIL PROTECTED]> 0.4.8-1
+- Attempt update to 0.4.8.
+
+* Fri Jun 30 2006 Steven Pritchard <[EMAIL PROTECTED]> 0.4.5-5
+- Override lib_dir and make various substitutions to try to fix multilib.
+- Remove rpath use from Makefile.
+- Fix a pod error in src/ops/experimental.ops.
+- Enable "make test" since t/doc/pod.t won't fail now.
+
+* Wed Jun 28 2006 Steven Pritchard <[EMAIL PROTECTED]> 0.4.5-4
+- Force permissions on shared libraries so rpmbuild strips them.
+
+* Wed Jun 28 2006 Steven Pritchard <[EMAIL PROTECTED]> 0.4.5-3
+- Fix URL, description, summary, etc.
+- Add post/postun.
+- Move parrot-config to the devel sub-package.
+- Force permissions on the doc directories.
+
+* Tue Jun 27 2006 Steven Pritchard <[EMAIL PROTECTED]> 0.4.5-2
+- Add -lcurses to get readline detection to work.
+- BR libicu-devel.
 
+* Tue Jun 27 2006 Steven Pritchard <[EMAIL PROTECTED]> 0.4.5-1
+- Initial packaging attempt.
 
+* Tue Mar 18 2003 Steve Fink <[EMAIL PROTECTED]> 0.0.11
+- first .spec file created

Reply via email to