Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:voegelas:raku
rakudo
rakudo.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rakudo.spec of Package rakudo
# # spec file for package rakudo # # Copyright (c) 2024 Andreas Vögele <andreas@andreasvoegele.com> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please send bugfixes or comments to the author. # %global year 2024 %global month 04 Name: rakudo Version: %{year}.%{month} Release: 0 Summary: Compiler for the Raku programming language License: Artistic-2.0 URL: https://rakudo.org/ Source: https://github.com/rakudo/rakudo/releases/download/%{version}/rakudo-%{version}.tar.gz BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: make BuildRequires: pkgconfig(moar) >= %{year}.%{month} BuildRequires: nqp >= %{year}.%{month} BuildRequires: perl BuildRequires: perl(Digest::SHA) BuildRequires: perl(IPC::Cmd) Requires: moarvm >= %{year}.%{month} Requires: nqp >= %{year}.%{month} %global __provides_exclude_from ^.*libperl6_ops_moar\\.so.*$ %if 0%{?mageia} > 0 %define debug_package %{nil} %endif %description Rakudo is an implementation of the Raku programming language. %prep %autosetup # Don't try to remove old files from the system. sed -i 's/\$cfg->clean_old_p6_libs;//' Configure.pl # Replace /usr/bin/env with /usr/bin/rakudo. sed -i '1 s|^#!.*|#!%{_bindir}/rakudo|' tools/install-dist.raku sed -i 's|#!/usr/bin/env \+|#!%{_bindir}/|' \ src/core.c/CompUnit/Repository/Installation.rakumod %build perl Configure.pl \ --prefix=%{_usr} \ --backends=moar %{make_build} %check make test %install %{make_install} install -d %{buildroot}%{_mandir}/man1 pod2man -c "Raku Programs" -r "Raku" -s 1 -n %{name} \ docs/running.pod %{buildroot}%{_mandir}/man1/%{name}.1 ln -s %{name}.1 %{buildroot}%{_mandir}/man1/raku.1 install -D tools/install-dist.raku %{buildroot}%{_bindir}/raku-install-dist install -d %{buildroot}%{_rpmconfigdir}/macros.d cat > %{buildroot}%{_rpmconfigdir}/macros.d/macros.raku << EOF # Rakudo-specific RPM build macros. %__raku %{_bindir}/raku %rakudo_rpm_version %{version} %raku_vendor_dir %{_datadir}/perl6/vendor %raku_site_dir %{_datadir}/perl6/site %raku_mod_inst %{_bindir}/raku-install-dist %__perl6 %{__raku} %perl6_vendor_dir %{raku_vendor_dir} %perl6_site_dir %{raku_site_dir} %perl6_mod_inst %{raku_mod_inst} EOF # Move shared objects from the datadir to the libdir. for i in $(find %{buildroot}%{_datadir} -name "*.so"); do src=$(dirname $i) dst=$(echo $src | sed 's|%{_datadir}|%{_libdir}|') rel=$(perl -mFile::Spec -e "print File::Spec->abs2rel('$dst', '$src')") f=$(basename $i) install -d $dst mv $i $dst ln -s $rel/$f $i done # Avoid duplicates by creating symbolic links. if [ -e %{buildroot}%{_bindir}/rakudo-m ]; then ln -sf rakudo-m %{buildroot}%{_bindir}/rakudo fi if [ -e %{buildroot}%{_bindir}/rakudo-debug-m ]; then ln -sf rakudo-debug-m %{buildroot}%{_bindir}/rakudo-debug fi if [ -e %{buildroot}%{_bindir}/rakudo ]; then ln -sf rakudo %{buildroot}%{_bindir}/raku fi if [ -e %{buildroot}%{_bindir}/rakudo-debug ]; then ln -sf rakudo-debug %{buildroot}%{_bindir}/raku-debug fi for i in %{buildroot}%{_bindir}/perl6* %{buildroot}%{_datadir}/perl6/runtime/perl6*; do dir=$(dirname $i) f=$(basename $i | sed 's/perl6/rakudo/') if [ -e $dir/$f ]; then ln -sf $f $i fi done # Create raku.csh and raku.sh in /etc/profile.d. BINDIRS='$HOME/.raku/bin:%{_datadir}/perl6/site/bin:%{_datadir}/perl6/vendor/bin' install -d %{buildroot}%{_sysconfdir}/profile.d cat << EOF > %{buildroot}%{_sysconfdir}/profile.d/raku.csh setenv PATH \${PATH}:$BINDIRS EOF cat << EOF > %{buildroot}%{_sysconfdir}/profile.d/raku.sh export PATH=\$PATH:$BINDIRS EOF %files %defattr(-, root, root) %license LICENSE %doc CREDITS docs/ChangeLog %{_bindir}/perl6 %{_bindir}/perl6-debug %{_bindir}/perl6-debug-m %{_bindir}/perl6-gdb-m %{_bindir}/perl6-lldb-m %{_bindir}/perl6-m %{_bindir}/perl6-valgrind-m %{_bindir}/raku %{_bindir}/raku-debug %{_bindir}/raku-install-dist %{_bindir}/rakudo %{_bindir}/rakudo-debug %{_bindir}/rakudo-debug-m %{_bindir}/rakudo-gdb-m %{_bindir}/rakudo-lldb-m %{_bindir}/rakudo-m %{_bindir}/rakudo-valgrind-m %{_datadir}/perl6 %{_libdir}/perl6 %{_mandir}/man1/raku.1* %{_mandir}/man1/%{name}.1* %{_rpmconfigdir}/macros.d/macros.raku %config %{_sysconfdir}/profile.d/raku.csh %config %{_sysconfdir}/profile.d/raku.sh %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor