This is a personal project that some of you may also find helpful.
mkslack is a utility to create SlackBuild scripts along with .info and doinst.sh.
It uses templates and a config file for name, email and tag. Once the settings are made you can simply run 'mkslack somearchive.tar.gz' and it will create the files. It is very simple and can be fooled by some tarballs with unusual names/versions so you should usually check/edit the finished script afterwards, but it's a helpful start. It _will_ overwrite any previous SlackBuild, info and slack-desc so be aware of that.
This version adds support for a /etc/mkslack/mkslack.conf for name, email, and tag to save re-editing the templates on update.
mkslack - a SlackBuild generator script
(C) David Woodfall 2010
This slackbuild generator uses templates stored in /usr/share/mkslack/templates
which you can edit for copyright.
mkslack reads /etc/mkslack/mkslack.conf for name and email address. You
should therefore edit this file.
The slackbuild template is based on the one at slackbuilds.org and
shouldn't be changed too much apart from the aforementioned. In particular
the lines for man and info pages and should not be edited
as the script will look for those lines to be exactly the same, and if not
needed, delete them.
The PRGNAM, VERSION, ARCHIVE recognition is very loosely done. It can find
standard source archives which can be .tar.gz .tar.bz2 or .tgz. If you have
a source archive with a '-' in the version number then mkslack will be
borked. In this case you can still use mkslack to build the slackbuild,
but you must edit it by hand before running it.
Idea for use:
The initial slackbuild and info file are built by this script, and when
a test build/install is done and working, the files should be tweaked by
hand. Especially don't forget to fill in the rest of the details in the
.info. One thing to point out is that mkslack will overwrite these files
if run again!
-h --help Usage.
-r --run Run SlackBuild after creation. Got root?
-i --install Install the package after running.
-l --list Pipe archive contents to /usr/bin/most and exit.
-v --version Version of mkslack.
The documents list in top level of source tree can be adjusted by command:
This will add 'SomeFile' to the list. You can also edit the DOCS list in
this script. Any that it doesn't find will be removed from the list.
Build can be specified by:
Otherwise it defaults to 1.
ARCH can be specified by:
It defaults to i486 the same as a regular SlackBuild.
Download from here: http://www.dawoodfall.net/slackbuilds/13.0/mkslack/
Feedback and ideas welcome :-)