Hi,
About five years ago I started writing a few ruby scripts to help me
compile software from source, typically for GNU autoconfigure based
systems.
Basically the idea was quite simple. For instance, do:
compile htop
And with this you would compile the program called htop.
compile htop /usr/local
To compile with /usr/local prefix. (The --prefix options and so
on are also available.)
compile htop non_traditional
compile htop ntrad
Compile into standalone directory (Default scheme for this right
now is via the $PROGRAMS variable, which for me points at /Programs.
This would compile Htop into /Programs/Htop/0.9.4 for instance but
can be easily changed to use other prefixes like /pkg and other
convention schematas as well))
compile htop with_dependencies
compile htop wdeps
Would compile htop with the dependencies (the long name
“with_dependencies” is the real “action” and “wdeps” is
just an alias to this “action”, for convenience.)
compile htop url
Would feedback the main url used for compilation (colourized on a
terminal) like this:
=> URL for htop points at:
=> http://dfn.dl.sourceforge.net/sourceforge/htop/htop-0.9.tar.gz
=> htop download | SourceForge.net
Would use the URL
http://dfn.dl.sourceforge.net/sourceforge/htop/htop-0.9.tar.gz
If the program htop would not be available locally, these scripts
would try to download it, extract it, compile it.
Over the years this has grown a bit.
For example, one idea was to generate valid standalone shell scripts for
compilation (“compile htop generate_shellscript”) that would write a
valid shell script which can be used to compile and extract something.
Generation of valid ebuilds/PKGBUILD/RPMs etc… would also be possible
(partially buggy or incomplete right now though.)
And use binaries too, when available.
It should also work with cmake, scons and so forth.
Compiled files will be tracked and stored in a yaml file right now (this
I will have to change soon, my current yaml file has 5 MB in size and
78600 file entries and this seems to become a bit too slow for my daily
use.)
Now the thing is, my scripts work quite ok for my own use cases.
There are a few bugs here and there, especially when I change behaviour
or feature set. Plus, the style of these scripts is a bit strange … 5
years ago my Ruby knowledge wasn’t really that great. It still isn’t
great, but I got somewhat better. If I were to start from scratch, I
would rewrite this all very, very differently.
But the main point of this here is:
- Is there anyone else out there who may have a use case for something
like this, even if there are bugs and countless things that could be
improved?
If there is some interest, I will try to improve things in a way that
others can use these scripts too. For my own use, it is ok. I can live
with some bugs and fix them every once in a while when it is fun. But
for a general release, it would require more time invested into it and
before I do this I would like to know if there is anyone else who could
actually have a use for this too.
Otherwise, I’ll stay lazy, which isn’t so bad either.