[ . . . ] How, in laymens terms, do I figure out the version info, in other words how, for example, do I rewrite "version 8 build 45"?
One of the things you should have by now is jre.SlackBuild, in <somehomedir>/vabs/jre/src/. Let's look at that. Most SlackBuilds we use were generated by sbbuilder, and have a format we can come to be familiar with. Not the case here, as seen by the license info that heads the file. Past that, we have:# Note that the slack-desc file mentions the JRE version (edit when upgrading)!
NAME? Heh. MAJOR? Duh. Past that, take the time to get it right. We have the terms: 7u51 b13 1.7.0_51
There's a relation between DVER=1.7.0_51 and VERSION=7u51. As for "b13", that seems to stand alone. By now, you should have manually downloaded the jre .tar.gz file and placed it in <somehomedir>/vabs/jre/src/. All the answers are probably within those files, but it would be nice if we didn't have to extract them yet. Let's see what files are there without unpacking:tar tf jre-<tab> | less # <tab> should complete to a filename ending in .tar.gz
(By the way, you can cutpaste this. When selecting, stay on the same line and sweep to the end. After pasting, move the cursor back to the end of "<tab>" and erase it. Tab completion will work, even when there's more text that follows.)
Two things jump out right away. The filename that <tab> completed to contains8u45
. . . and the top-level directory in the archive is:jre1.8.0_45
So VERSION=8u45, DVER=1.8.0_45.
JRE_BUILD? Hmm. Ya know, first place to look would be in the files in the top-level directory. Quit "less" (q). We can list only the top-level files:tar tf jre-<tab> | grep '^[^/]*/[^/]*$' | less
I'll tack a bit of info about what's after "grep" onto the end of all this.
Only file that looks promising is "release". So:tar xOf jre-<tab> jre1.8.0_45/release
# Writes the file to your screen without creating new files
Nifty command, but there's no help there
OK, read the whole jre.SlackBuild to see how it's used.
JRE_BUILD is set by JRE_BUILD=b15, but that variable isn't referenced again in the script!
Before we assume that's just a relic of versions past, read the installation instructions offered by the site where you downloaded the file, java.com. BTW, don't do the instructions. They'll have you put it in the wrong place. And not a hint of what JRE_BUILD or "b15" might be.
Trial and error is the last resort, but speaking of resorts we need to finish this and take a vacation. To keep the line from being used in error by something in the source that might ask for it, we'll leave it as a reminder, but comment it out. Hopefully, if anything needs it, it'll scream for it.
One last thing is left. The comment that was already there:# Note that the slack-desc file mentions the JRE version (edit when upgrading)!
There's nothing in the slack-desc that mentions versions. Ghost of SlackBuilds past. We wanna use the SlackBuild, not sign up to maintain the package; so just ignore. Pardon me a moment:
Everyone's really busy right now, so would "someone else" try starting fresh with a run of sbbuilder, please? Feel free to ask or rant in "Packager Training and Help". Bear in mind that there are odd licensing issues with this package. Thanks.
We now return to your program. The relevant portion of the SlackBuild now looks like this:# Note that the slack-desc file mentions the JRE version (edit when upgrading)!
When you're done, save the file. We'll look at the actual build and install in the next post.
Oops, almost forgot.^[^/]*/[^/]*$
First off,man 7 regex
man 1 grep
and websearch: regular expression.
But I'll break this one down. It says "find lines that look like this:"
Start at the beginning of the line (^). Allow as many, or none (*), of characters that are not
(^ first inside a [ ]) a "/", then find exactly one "/". After that, none or more non-/ characters ([^/]*) to the end of the line ($).
Lines with only one "/", thus in the top-level directory, if we call "jre1.8.0_45" the top level.