From Fedora Project Wiki
(tar files on CPAN)
 
(28 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
== Naming Guidelines ==
 
== Naming Guidelines ==
  
Perl 6 module packages generally follow the nameing scheme of <code>rakudo-<Perl-6-Module-Name>.</code>
+
Perl 6 module packages generally follow the naming scheme of <code>rakudo-<'''''Perl-6-Module-Name'''''>.</code>
 +
 
 +
For example if the code to load a perl 6 module would be:
 +
 
 +
<pre>
 +
use XML::Writer;
 +
</pre>
 +
 
 +
then the <code>Name</code> tag is:
  
 
<pre>
 
<pre>
 
Name: rakudo-XML-Writer
 
Name: rakudo-XML-Writer
 
</pre>
 
</pre>
 +
 +
More examples for package names are: <code>rakudo-LibraryCheck</code>, <code>rakudo-Readline</code>, <code>rakudo-Inline-Perl5</code>
 +
 +
== Macros ==
 +
 +
Starting with Fedora 25, the following macros for packaging Perl 6 modules are provided by the <code>rakudo</code> package:
 +
 +
{|
 +
! Macro !! Description
 +
|-
 +
| <code>%rakudo_rpm_version</code> || rakudo package release number
 +
|-
 +
| <code>%perl6_vendor_dir</code> || vendor directory: <code>%{_libdir}/perl6/vendor</code>
 +
|-
 +
| <code>%perl6_site_dir</code> || site directory: <code>%{_libdir}/perl6/site</code>
 +
|-
 +
| <code>%perl6_mod_inst</code> || A Perl 6 script to install Perl 6 modules
 +
|}
 +
 +
== Directory Ownership ==
 +
 +
The directories and the version file
 +
 +
* %perl6_vendor_dir/*
 +
** %perl6_vendor_dir/bin
 +
** %perl6_vendor_dir/dist
 +
** %perl6_vendor_dir/precomp
 +
** %perl6_vendor_dir/resources
 +
** %perl6_vendor_dir/short
 +
** %perl6_vendor_dir/sources
 +
** %perl6_vendor_dir/version
 +
* %perl6_site_dir/*
 +
** ...
 +
 +
are owned by the rakudo interpreter package. The Perl 6 module packages only own the files and directories underneath the directories <code>%perl6_vendor_dir/*</code>
 +
 +
<pre>
 +
%files
 +
...
 +
%{perl6_vendor_dir}/*/*
 +
</pre>
 +
 +
== tar files on CPAN ==
 +
 +
CPAN has Perl6 directories at the author of Perl 6 modules. In general you can take the sources as tar file from the Perl 6 directories on CPAN. E.g.
 +
 +
<pre>
 +
http://www.cpan.org/authors/id/U/UG/UGEXE/Perl6/zef-0.1.15.tar.gz
 +
http://www.cpan.org/authors/id/N/NI/NINE/Perl6/Inline-Perl5-0.28.tar.gz
 +
</pre>
 +
 +
== Precompiling dependency on rakudo updates ==
 +
 +
Perl 6 module packages depend on the rakudo-compiler-id. Updating the rakudo interpreter needs to rebuild all Perl 6 module packages. It is planned to update the rakudo stack quarterly.

Latest revision as of 09:39, 1 July 2017


Naming Guidelines

Perl 6 module packages generally follow the naming scheme of rakudo-<Perl-6-Module-Name>.

For example if the code to load a perl 6 module would be:

use XML::Writer;

then the Name tag is:

Name: rakudo-XML-Writer

More examples for package names are: rakudo-LibraryCheck, rakudo-Readline, rakudo-Inline-Perl5

Macros

Starting with Fedora 25, the following macros for packaging Perl 6 modules are provided by the rakudo package:

Macro Description
%rakudo_rpm_version rakudo package release number
%perl6_vendor_dir vendor directory: %{_libdir}/perl6/vendor
%perl6_site_dir site directory: %{_libdir}/perl6/site
%perl6_mod_inst A Perl 6 script to install Perl 6 modules

Directory Ownership

The directories and the version file

  • %perl6_vendor_dir/*
    • %perl6_vendor_dir/bin
    • %perl6_vendor_dir/dist
    • %perl6_vendor_dir/precomp
    • %perl6_vendor_dir/resources
    • %perl6_vendor_dir/short
    • %perl6_vendor_dir/sources
    • %perl6_vendor_dir/version
  • %perl6_site_dir/*
    • ...

are owned by the rakudo interpreter package. The Perl 6 module packages only own the files and directories underneath the directories %perl6_vendor_dir/*

%files
...
%{perl6_vendor_dir}/*/*

tar files on CPAN

CPAN has Perl6 directories at the author of Perl 6 modules. In general you can take the sources as tar file from the Perl 6 directories on CPAN. E.g.

http://www.cpan.org/authors/id/U/UG/UGEXE/Perl6/zef-0.1.15.tar.gz
http://www.cpan.org/authors/id/N/NI/NINE/Perl6/Inline-Perl5-0.28.tar.gz

Precompiling dependency on rakudo updates

Perl 6 module packages depend on the rakudo-compiler-id. Updating the rakudo interpreter needs to rebuild all Perl 6 module packages. It is planned to update the rakudo stack quarterly.