[Slackbuilds-users] Slackbuild with Two Executables
B. Watson
urchlay at slackware.uk
Wed Mar 23 20:16:09 UTC 2022
On Wed, 23 Mar 2022, Brandon Pribula wrote:
> Well for the environment variable approach I wanted to give the option of
> installing both, so in that case the executables would have to have
> different names. So in terms of the script I thought it would make sense to
> just have distinct names for the executables no matter which option they
> chose.
Yes, but... if you're going to have 2 separate executables,
with different names. Why bother with the environment variable
at all? Just include both executables (e.g. /usr/bin/appname and
/usr/bin/appname-posix) in your package, and mention in README that
there are two, and give both their names. Users who prefer the -posix
version can just type "appname-posix" to use it, and users who don't
care can just type "appname"...
It'd be different if they were mutually exclusive, a compiled program
that either has or does not have some option built in. Or if your
programs were huge and took up a lot of disk space, so a user might
care about not installing the one he doesn't need.
In the absence of such concerns, go with simplicity: don't force a
user to make a choice if it's trivial to avoid it. If I were a new
user of your app that you're packaging, I'd have no idea whether
I wanted the regular or -posix version, so I'd either go with the
default (most people do), or have to spend time & effort researching
the alternative.
Slackware for instance includes two emacs executables (emacs-with-X11
and emacs-no-X11), and two strings commands (strings-BSD and
strings-GNU)... although those are more complex examples, using
symlinks. You won't need symlinks, it doesn't sound like.
> I didn't realize there were that many slackbuilds. That's impressive!
They sorta grew beyond expectations, but that just means we're doing
something right.
More information about the SlackBuilds-users
mailing list