LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   mkslack 0.7 release (https://www.linuxquestions.org/questions/slackware-14/mkslack-0-7-release-801630/)

dive 04-12-2010 05:23 PM

mkslack 0.7 release
 
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.

README:

Code:

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!

Syntax:

mkslack [options]

Options:
-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:
DOCS="SomeFile" mkslack
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:
BUILD=2 mkslack
Otherwise it defaults to 1.

ARCH can be specified by:
ARCH=xxx mkslack
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 :-)

brianL 04-13-2010 02:15 AM

Looks like Eric beat you to it?

http://alien.slackbook.org/AST/

samac 04-13-2010 02:19 AM

Thanks I have downloaded and will try it out. Although Eric has AST it is useful to have something local.

samac

brianL 04-13-2010 03:03 AM

Quote:

Originally Posted by samac (Post 3933735)
Although Eric has AST it is useful to have something local.

Yeah, agreed. It's always good to have a choice.

dive 04-13-2010 04:05 AM

Quote:

Originally Posted by brianL (Post 3933727)
Looks like Eric beat you to it?

http://alien.slackbook.org/AST/

Yes I knew about Erics and some other scripts like src2slack but I wanted 1) Something that I didn't need to keep entering details and 2) Something that was easier to configure.

Mine also generates a .info with md5sum, maintainer and email.

*Edit: One thing I need to do is make a tag option in the conf. Will do that now.

*Edit: Done. Thread updated.


All times are GMT -5. The time now is 01:18 PM.