<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I was going to say do something like Pat does with Firefox but
      that looks like it</p>
    <pre>cd $(dirname $0) ; CWD=$(pwd)

PKGNAM=mozilla-firefox
VERSION=$(basename $(ls firefox-*.tar.?z | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)
RELEASEVER=$(echo $VERSION | cut -f 1 -d r | cut -f 1 -d b | cut -f 1 -d e)
BUILD=${BUILD:-1}

<a class="moz-txt-link-freetext" href="https://ftp.ussg.indiana.edu/linux/slackware/slackware64-current/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild">https://ftp.ussg.indiana.edu/linux/slackware/slackware64-current/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild</a>

</pre>
    <div class="moz-cite-prefix">On 1/10/22 17:17, Konrad J Hambrick
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CANBHt+MkJLdqUha3WYNDYRx1uRjCV_=d0tJKaFEXJDCNrObBeg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:monospace,monospace">Klaatu --<br>
          <br>
        </div>
        <div class="gmail_default"
          style="font-family:monospace,monospace">That's pretty much
          what I do ( source $PROGRAM.info ) in my do-SlackBuild.$PRGNAM
          scripts.<br>
          <br>
        </div>
        <div class="gmail_default"
          style="font-family:monospace,monospace">But I do that in a
          wrapper-script that invokes the standard SlackBuild.<br>
          <br>
        </div>
        <div class="gmail_default"
          style="font-family:monospace,monospace">The Code below is
          auto-generated by a get-SB-pkg script ( example:  get-SB-pkg
          intel-microcode )<br>
          <br>
        </div>
        <div class="gmail_default"
          style="font-family:monospace,monospace">As you can see, the
          $PRGNAM.info File is sourced by the wrapper script but <span
            class="gmail_default"
            style="font-family:monospace,monospace"></span>I can still
          override the VERSION as expected:  <br>
        </div>
        <div class="gmail_default"
          style="font-family:monospace,monospace"><br>
             VERSION=1.2.3.4 ./do-SlackBuild.intel-microcode <br>
        </div>
        <div class="gmail_default"
          style="font-family:monospace,monospace"><br>
        </div>
        <div class="gmail_default"
          style="font-family:monospace,monospace">One can also set TAG=
          to append a TAG ( like say, TAG=_kjh )<br>
          <br>
        </div>
        <div class="gmail_default"
          style="font-family:monospace,monospace">As a bonus, the
          do-wrapper logs all the output to
          $PRGNAM-SlackBuild-$VERSION$TAG.log<br>
          <br>
        </div>
        <div class="gmail_default"
          style="font-family:monospace,monospace">Anyhow ... my $0.02
          ... no need to change the SlackBuilds ( PLEASE don't change
          the SlackBuilds :)<br>
        </div>
        <div class="gmail_default"
          style="font-family:monospace,monospace"><br>
          -- kjh<br>
          <br>
        </div>
        <div class="gmail_default"
          style="font-family:monospace,monospace">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">#!/bin/sh<br>
            <br>
            DoName="intel-microcode.SlackBuild"<br>
            <br>
            MyVersion="$VERSION"<br>
            <br>
            . ./<a href="http://intel-microcode.info"
              moz-do-not-send="true">intel-microcode.info</a><br>
            <br>
            [ "$MyVersion" = "" ] && MyVersion="$VERSION"<br>
            <br>
            LogNam="$DoName-$MyVersion$TAG.log"<br>
            <br>
            unset PRGNAM<br>
            unset VERSION<br>
            unset HOMEPAGE<br>
            unset DOWNLOAD<br>
            unset MD5SUM<br>
            unset DOWNLOAD_x86_64<br>
            unset MD5SUM_x86_64<br>
            unset REQUIRES<br>
            unset MAINTAINER<br>
            unset EMAIL<br>
            #<br>
            # set and export any extra variables here<br>
            #<br>
            export TAG<br>
            export VERSION="$MyVersion"<br>
          </blockquote>
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex"># do the deed<br>
            #<br>
            echo "$DoName startup  at `date`"  |tee    $LogNam<br>
            ./$DoName 2>&1                     |tee -a $LogNam<br>
            #<br>
            RetCode=${PIPESTATUS[0]}<br>
            #<br>
            [ "$RetCode" = "0" ] && RetStr="complete" ||
            RetStr="FAILED  "<br>
            #<br>
            # optional pre-installation instructions  here<br>
            #<br>
            #<br>
            # optional pre-installation instructions there<br>
            #<br>
            # log your results<br>
            #<br>
            echo "$DoName $RetStr at `date` ... RetCode = $RetCode" |tee
            -a $LogNam<br>
            exit $RetCode<br>
          </blockquote>
          <div> </div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, Jan 4, 2022 at 3:11 PM
          Klaatu <<a href="mailto:klaatu@mixedsignals.ml"
            moz-do-not-send="true" class="moz-txt-link-freetext">klaatu@mixedsignals.ml</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div style="font-family:"Noto
            Sans";font-size:10pt;font-weight:400;font-style:normal">
            <p style="margin:0px;text-indent:0px">Why do we define the
              VERSION for a package in two separate files?</p>
            <p style="margin:0px;text-indent:0px"> </p>
            <p style="margin:0px;text-indent:0px">What if we replaced
              this line in foo.SlackBuild:</p>
            <p style="margin:0px;text-indent:0px">VERSION={VERSION:-0.0.1}</p>
            <p style="margin:0px;text-indent:0px"> </p>
            <p style="margin:0px;text-indent:0px">with this instead:</p>
            <p style="margin:0px;text-indent:0px">. ./$PRGNAM.info</p>
            <p style="margin:0px;text-indent:0px"> </p>
            <p style="margin:0px;text-indent:0px">The VERSION variable
              would get imported from a consolidated location (the .info
              file).</p>
            <p style="margin:0px;text-indent:0px"> </p>
            <p style="margin:0px;text-indent:0px">It seems to make more
              sense to me, and it makes trivial upgrades (the ones where
              I go in and just bump a version number to something I want
              to build) a one-file task.</p>
            <p style="margin:0px;text-indent:0px"> </p>
            <p style="margin:0px;text-indent:0px">Thoughts?</p>
          </div>
          _______________________________________________<br>
          SlackBuilds-users mailing list<br>
          <a href="mailto:SlackBuilds-users@slackbuilds.org"
            target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">SlackBuilds-users@slackbuilds.org</a><br>
          <a
            href="https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users"
            rel="noreferrer" target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a><br>
          Archives - <a
            href="https://lists.slackbuilds.org/pipermail/slackbuilds-users/"
            rel="noreferrer" target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">https://lists.slackbuilds.org/pipermail/slackbuilds-users/</a><br>
          FAQ - <a href="https://slackbuilds.org/faq/" rel="noreferrer"
            target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">https://slackbuilds.org/faq/</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
SlackBuilds-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:SlackBuilds-users@slackbuilds.org">SlackBuilds-users@slackbuilds.org</a>
<a class="moz-txt-link-freetext" href="https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users">https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a>
Archives - <a class="moz-txt-link-freetext" href="https://lists.slackbuilds.org/pipermail/slackbuilds-users/">https://lists.slackbuilds.org/pipermail/slackbuilds-users/</a>
FAQ - <a class="moz-txt-link-freetext" href="https://slackbuilds.org/faq/">https://slackbuilds.org/faq/</a>

</pre>
    </blockquote>
  </body>
</html>