[Slackbuilds-users] Creating First Slackbuilds and Github

B. Watson urchlay at slackware.uk
Sun Mar 20 17:06:48 UTC 2022



On Sat, 19 Mar 2022, Ruben Schuller wrote:
>
> ZIPVER="1369d247e3d2bc697892795dea8cc1713344749f"
>
> for the version I'd either go with the date like 220319 if there aren't
> multiple commits on that date, or with the short-hash of git:

Recommendations... in fact I'm begging you: if you're going to use
a git commit, *please* include the date in YYMMDD format in your
VERSION number. Example:

VERSION="20220319+1369d24"

Notice the 4-digit year comes first... the point of doing it this way
is that a user can easily tell which version is newer, when looking
at multiple packages. If you use only the git commit hash, those are
effectively random, there's no sense of which is newest.

The SlackBuild can split up the VERSION variable as needed.

Also, while I'm thinking about it: VERSION *must* be a constant that
can be overridden by the environment. Example:

VERSION=${VERSION:-3.4.1}

*Please* don't try to get clever and do stuff like:

COMMIT=1369d247e3d2bc697892795dea8cc1713344749f
VERSION="$( echo $COMMIT | head -c7 )"

The reason for this is that we have scripts that check for consistency,
and VERSION in the SlackBuild has to match VERSION in the .info file
to pass the check.

For the same reason, PRGNAM has to be a constant. Don't do stuff
like this:

SRCNAM="Blah"
PRGNAM="python-$SRCNAM"

I know it looks clever, but it doesn't actually accomplish anything
useful, and it makes life harder for the admins.


More information about the SlackBuilds-users mailing list