[Slackbuilds-users] request for building perl modules

Tonus tonus1 at gmail.com
Sat Dec 26 02:16:01 UTC 2020


Just a small addition.
I wrote a small script as an exercise to modify all the perl module 
slackbuilds based on a queue file.

It works well for the following packages and build fine even on my 
system :

perl-Canary-Stability,nishant at mnspace.net,Nishant Limbachia
perl-common-sense,chytraeu at sdf.org,Donald Cooley
perl-Types-Serialiser,chytraeu at sdf.org,Donald Cooley
perl-JSON-XS,chytraeu at sdf.org,Donald Cooley
perl-JSON,dsomero at hotmail.com,David Somero
perl-AnyEvent,emmanueln at gmail.com,Emmanuel N. Millan
perl-local-lib,andreas.guldstrand at gmail.com,Andreas Guldstrand
perl-http-tiny,tonus1 at gmail.com,Tonus
perl-Try-Tiny,dsomero at hotmail.com,David Somero
perl-http-date,lukenshiro at ngi.it,LukenShiro
perl-Config-Simple,mmoeller at faircomputer.ch,Marcus Moeller
perl-data-section-simple,tonus1 at gmail.com,Tonus
perl-Test-Warnings,dsomero at hotmail.com,David Somero
perl-YAML-Tiny,mab974 at gmail.com,Michel A. BEGUE
perl-PAR-Dist,edps.mundognu at gmail.com,Edinaldo P. Silva
perl-Module-Build,edps.mundognu at gmail.com,Edinaldo P. Silva
perl-File-Remove,mab974 at gmail.com,Michel A. BEGUE
perl-Test-Requires,dsomero at hotmail.com,David Somero
perl-inc-module-install,tonus1 at gmail.com,Tonus
perl-data-messagepack,tonus1 at gmail.com,Tonus
perl-file-slurper,tonus1 at gmail.com,Tonus
perl-ExtUtils-Config,willysr at slackbuilds.org,Willy Sudiarto Raharjo
perl-ExtUtils-InstallPaths,willysr at slackbuilds.org,Willy Sudiarto Raharjo
perl-ExtUtils-Helpers,willysr at slackbuilds.org,Willy Sudiarto Raharjo
perl-Test-Harness,willysr at slackbuilds.org,Willy Sudiarto Raharjo
perl-Module-Build-Tiny,willysr at slackbuilds.org,Willy Sudiarto Raharjo
perl-net-mpd,tonus1 at gmail.com,Tonus

Only one have failed due to options on one line :

perl-IPC-Run,nishant at mnspace.net,Nishant Limbachia

I will try to have this case managed. Till this time, here is my script :


# Choose the SlackBuilds to check from the queue file of perl modules
perl_modules=$(cat /var/lib/sbopkg/queues/My-Perl-Modules.sqf)
# Find paths from current repo
slackbuilds_perl=$(for i in $perl_modules; do find /var/lib/sbopkg/SBo-git/ -name "$i.SlackBuild"; done)

for x in $slackbuilds_perl; do

      if [ $(grep "perl Makefile.PL" $x | wc -l) -gt 0 ] && [ $(grep "INSTALL_BASE=" $x | wc -l) -eq 0 ]; then

#           "-------------- SlackBuild is type 1 --------------"
            sed -i.bak '/^  PREFIX=\/usr \\/a \ \ INSTALL_BASE= \\' "$x"

      elif [ $(grep "./Build install" $x | wc -l) -gt 0 ] && [ $(grep "\-\-install_base" $x | wc -l) -eq 0 ]; then

#           "-------------- SlackBuild is type 2 --------------"
            sed -i.bak '/^  --destdir\ \$PKG/i \ \ --prefix \/usr \\\n\ \ --install_base \\' "$x"

            echo "SlackBuild is already up to date, skip $x"


On Fri, Dec 25, 2020 at 02:35:08AM +0100, Tonus wrote:
> Hi list,
> I've encountered problems while building some perl modules on my daily 
> system, even with those I maintain the slackbuilds for.
> Everything build fine on a genuine system. On mine the error is :
> Only one of PREFIX or INSTALL_BASE can be given.  Not both.
> This would fix it on my system without any harm on genuine :
>  perl Makefile.PL \
>    PREFIX=/usr \
>    INSTALLDIRS=vendor \
>    INSTALLVENDORMAN3DIR=/usr/man/man3
>  make
> Alternativly it might be :
>  ./Build
>  ./Build test
>  ./Build install \
> +  --install_base /usr \
>    --destdir $PKG
> Do you think it could be adviced to other maintainers of perl scripts ? 
> Or should I better keep that on a personnal branch ?
> Anyway, I plan to add this to my perl-* slackbuilds if there is no 
> objection. (perl-data-messagepack,perl-data-section-simple, 
> perl-file-slurper,perl-http-tiny,perl-inc-module-install,perl-local-lib, 
> perl-net-mpd)
> I could take perl-Modules-ScanDeps that is ORPHANED.
> Let me know.
> Merry Christmas, solstice or whatever :)
> Enjoy a better new year (easy one no ?)
> -- 
> Regards,
> Tonus



More information about the SlackBuilds-users mailing list