[Slackbuilds-users] [ANN] New SBo Template Tool

Daniel Prosser dpross1100 at msn.com
Tue Apr 18 03:46:19 UTC 2017


Jeremy,

I just gave it a quick try. It seems like a useful script when preparing
a new submission. My test used the cmake template. Here are a few issues
I noticed:

1. I specified a single requirement using the -r option, but it was
absent from the .info file generated. I tried with and without quotes
around the requirement.

The next two are some inconsistencies between the generated SlackBuild
script and the template from SlackBuilds.org:

2. Compress manpages command. The template on SBo has this:
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

In the generated script:
for i in $( find /usr/man -type l ) ; do ln -s $( readlink  ).gz $i.gz ; rm $i ; done

>From a quick glance at that line, it looks like your script is not
handling variables inside other variables. Possibly need to use an
escape before a $ somewhere.

3. The perllocal.pod removal command doesn't have the "|| true" at the
end like the SBo template.

Thanks for sharing this!

Dan

On Thu, Apr 13, 2017 at 11:01:29PM -0400, Jeremy Hansen wrote:
>    I recently was working on creating a new SlackBuild and found it had
>    several dependencies that were not on SBo, so I had to create those.
>    Whenever I needed to do this, I would always grab the templates from
>    SBo, however, it ends up requiring a lot of adjustments. There's just
>    so much text to remove (comments in the SlackBuild, text in the .info,
>    and adjusting the slack-desc to match the new appname and removing all
>    the text in there).
>    I eventually prepped some local templates, but there's some minor work
>    that needed to be done (moving the files, adding the various info,
>    adjusting slack-desc, etc), so I figured I should just create a script
>    to handle all of this for me.
>    It's pretty easy to use, you just call the script, specify the number
>    that corresponds with the type of SlackBuild you want (autotools,
>    python, cmake, etc), then the PRGNAM and VERSION. Optionally you can
>    add a category at the end to keep things sorted that will be used as a
>    subdirectory for your local repo. You can also use options to fill all
>    the info in the .info (see sbgen.sh -h output for more details). The
>    numbers for the various type of scripts (autotools, python, cmake, etc)
>    correspond with the frequency of their usage on SBo, so it goes
>    autotools, python, cmake, perl, haskell, ruby... 1-6. There is also a 7
>    for those scripts that don't use any of those build systems (make just
>    repackaging a binary).
>    I will be adding an interactive version (like Slackware's adduser
>    script) to allow easier copy/paste and to minimize long complex
>    commands.
>    A simple script for a cmake-based SlackBuild would be:
>    sbgen.sh 3 myprogram 2.6.7
>    But you can also get all of the .info filled using options:
>    sbgen.sh -w [1]https://github.com/project/myprogram \
>      -d
>    [2]https://github.com/project/myprogram/archive/2.6.7/myprogram-2.6.7.t
>    ar.gz \
>      -m f4261584809b70f908a53fad87aa87e1 \
>      -r "program1 program2" \
>      3 program 2.6.7 libraries
>    (You can use a capital D and capital M for the 64bit DOWNLOAD and
>    MD5SUM variables.)
>    Hopefully this can cut down on a lot of the initial prep work when
>    creating a new SlackBuild.
>    You can edit the top of the script to set your name, email, and
>    copyright year, as well as the location to store the SlackBuilds once
>    created. There's checks in place to make sure you don't overwrite
>    existing SlackBuilds (unless you use the -f option to force it).
>    I'd love to hear your thoughts and suggestions as well as any issues
>    you may have if you're willing to test.
>    [3]https://github.com/bassmadrigal/scripts/blob/master/sbgen.sh
>    Thanks for your time
>    Jeremy (aka bassmadrigal on LQ)
> 
> References
> 
>    1. https://github.com/project/myprogram
>    2. https://github.com/project/myprogram/archive/2.6.7/myprogram-2.6.7.tar.gz
>    3. https://github.com/bassmadrigal/scripts/blob/master/sbgen.sh

> _______________________________________________
> SlackBuilds-users mailing list
> SlackBuilds-users at slackbuilds.org
> http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - https://slackbuilds.org/faq/
> 



More information about the SlackBuilds-users mailing list