Questions of a newbie Debian package developer working on an Icon 9.0package.
I'm almost done building an Icon 9.0 package for Debian, and I'd have
some questions...
(No, Icon has nothing to do with these little pictures that grow on GUIs.
It's a programming language, good at doing string processing, etc. The
successor to SNOBOL 4 -- but don't ask me what *that* is.)
The general, generic question is: when a software package can be configured
at compile-time to support X or no to support it, how do you handle that in
Debian packages?
Now in more details... First a paragraph of background. Icon provides both
a compiler and an interpreter. The compiler is named iconc and isn't used
that much since it is rather slow and inefficient. The interpreter comes in
two parts. There's icont, which translates Icon source into bytecode. And
there's iconx, which executes the bytecode. Most people use the interpreter
most of the time.
Since version 9, you can now compile Icon with X support. The X
extensions are used *that* much, partly since they're new. I'd still want
to provide them in my icon .deb package, but I wouldn't want to leave the
people who don't have X11 installed in the cold.
So... My question is, how do I do that?
As far as I can tell, the only file that is different between the version
of Icon with "X11 extensions" and the one without is the "iconx"
file. (Well... at least that's the only file which uses libX11.so.) So it
seems kinda of a waste (and it's a bit inconvenient) to make two different
packages.
Can I put two files, iconx.x11 and iconx.nox11 and use update-alternatives
to select between the two? (Is that what "update-alternatives" is for? I'm
not quite sure what it does. Could anyone enlighten me?) But then users
would have to manually run update-alternatives when they install X... Or is
there a way to tell dpkg my postinst file shouuld be rerun every time the
user installs/deinstalls X11? If not, wouldn't this kind of mechanism be
something useful to have?
Or do I require elf-x11r6libs and ship only the X version of Icon? It
doesn't seem very "elegant" either...
Any insight or suggestions would be appreciated... Has, say, the emacs
package maintainer given any thought to this issue? (Since emacs is another
package where you can most of the functionality without using X11.)
And while I'm here...
iconc seems to assume /usr/X11R6/lib is in the compiler's standard search
path for libraries... And it's not on my system. Is it just me, or is it
like that for other Debian/Linux people too? If it's not just me, wouldn't
it be a good idea to have /usr/X11R6/{lib,include} in gcc's standard search
path? Or, put another way, *any reason* why they're not in gcc's search
path by 5~default?
Oh... and a small detail... What's the procedure for uploading Debian
packages?
*And* a general question... What's the difference between "Depends:" and
"Pre-depends:" exactly?
Sorry if I was a bit <ahem> long-winded. I'll shut up now... well, for
today. :-)
Thanks in advance for your help...
Christian
Reply to: