summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorDave Woodfall <dave@dawoodfall.net>2017-11-03 22:05:33 +0000
committerDavid Spencer <idlemoor@slackbuilds.org>2017-11-03 23:18:37 +0000
commit5636f8aece32c3c90f173fa80cb84dd24df06aea (patch)
tree65a52582cec875aa2865c515b07d60c651bafaa3 /system
parentd7a1be93351cba0a2bec8683d904484c8c4c64ea (diff)
downloadslackbuilds-5636f8aece32c3c90f173fa80cb84dd24df06aea.tar.gz
system/mkslack: Added (a SlackBuild generation system).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/mkslack/ChangeLog.txt182
-rw-r--r--system/mkslack/README70
-rw-r--r--system/mkslack/doinst.sh16
-rw-r--r--system/mkslack/mkslack.SlackBuild84
-rw-r--r--system/mkslack/mkslack.info10
-rw-r--r--system/mkslack/slack-desc19
6 files changed, 381 insertions, 0 deletions
diff --git a/system/mkslack/ChangeLog.txt b/system/mkslack/ChangeLog.txt
new file mode 100644
index 0000000000..365b4d14d9
--- /dev/null
+++ b/system/mkslack/ChangeLog.txt
@@ -0,0 +1,182 @@
+Mon 01 Aug 2016 20:22:51 BST
+Version 5.1
+Do not rename python and perl packages.
+Sat 30 Jul 2016 03:27:00 BST
+Version 5.0
+Fix documentation
+Thu 28 Jul 2016 02:25:54 BST
+Version 4.9
+Updated templates for i586
+Mon 04 May 2015 05:48:43 BST
+Version 4.8
+Remove some debugging code
+Sat 11 Apr 2015 23:18:49 BST
+Version 4.7
+Add autotools as the first option.
+Wed 24 Dec 2014 09:32:31 GMT
+Update various build templates and revised documentation line.
+Mon 07 Apr 2014 10:12:35 BST
+Add waf template.
++--------------------------+
+Tue 31 Dec 2013 03:02:59 GMT
+Info file: Remove APPROVED. Add REQUIRES.
++--------------------------+
+Mon 30 Dec 2013 11:22:07 GMT
+Bugfix for missing manpage lines in autotools template.
++--------------------------+
+Fri 22 Nov 2013 08:49:14 GMT
+Updated SlackBuild templates
++--------------------------+
+Sun 30 Oct 2011 00:25:05 BST
+Added --infodir to autotools template
++--------------------------+
+Tue 25 Oct 2011 19:25:35 BST
+Version 4.0
+Minor edit of mkslack.conf
+Added a chmod +x of SlackBuild
++--------------------------+
+Sun 24 Apr 2011 17:30:38 BST
+Version 4.0
+Hmm where did 3.9 go?
+Fixed a problem with repeating additions to doinst.sh
+Removed annoying ... from slack-desc
++--------------------------+
+Tue 08 Feb 2011 22:29:23 GMT
+Version 3.8
+Added support to auto-add year into slackbuilds.
++--------------------------+
+Sun Jan 16 18:55:57 GMT 2011
+Version 3.7
+Added ruby support.
++--------------------------+
+Tue 09 Nov 2010 12:07:36 PM GMT
+Version 3.6
+Bugfix for docmuentation
++--------------------------+
+Tue 21 Sep 2010 18:45:16 BST
+Version 3.5
+Added 'doc' as an option for documentation
++--------------------------+
+Mon 20 Sep 2010 08:28:24 BSTTue 07 Sep 2010 15:24:53 BST
+Version 3.4
+Changed .desktop and mimetype grep to case-insensitive.
+Added stock doinst.sh to templates for convenience.
++--------------------------+
+Version 3.3 finalised
++--------------------------+
+Thu 12 Aug 2010 06:35:28 BST
+Version 3.3rc8
+Small code improvements
++--------------------------+
+Sat 31 Jul 2010 20:59:50 BST
+Version 3.3rc6
+Small bugfix for $PKG with python/perl packages.
++--------------------------+
+Thu 01 Jul 2010 03:14:02 BST
+Version 3.3rc5
+Small bugfix.
++--------------------------+
+Wed 30 Jun 2010 19:39:47 BST
+Version 3.3rc4
+Small bugfix.
++--------------------------+
+Wed 30 Jun 2010 17:28:31 BST
+Version 3.3rc3
+Cleaned up message for usr/share/man pages found.
++--------------------------+
+Wed 30 Jun 2010 09:54:37 BST
+Version 3.3rc2
+Reverted back to not needing an underscore for TAG.
++--------------------------+
+Wed 30 Jun 2010 09:07:19 BST
+Version 3.3rc1
+Incorporated slakmagik's nice, new code.
+-r is now -b (for build)
+A new -V for version check.
+With -b you get the choice of having a failed build fixed and
+rebuilt. Mostly for manpage/info errors. A new config option
+ERRORACTION to do this, which can be PROMPT, AUTO or EXIT.
+Now config file errors are reported back.
+Now TAG _must_ have a preceding underscore, which keeps it in
+line with slackbuilds.
++--------------------------+
+Sun 27 Jun 2010 16:28:32 BST
+Version 3.1
+Fixed ARCH bug.
+Now puts appname into first line of slack-desc.
++--------------------------+
+Wed 23 Jun 2010 23:59:14 BST
+Version 3.0
+Adjusted docs.
++--------------------------+
+Tue 22 Jun 2010 19:47:26 BST
+Version 2.9
+Code improvements.
++--------------------------+
+Tue 22 Jun 2010 19:47:05 BST
+Version 2.8
+???
++--------------------------+
+Tue 22 Jun 2010 17:48:34 BST
+Version 2.7
+Adjusted docs.
++--------------------------+
+Tue 22 Jun 2010 09:30:00 BST
+Version 2.6
+Upgraded to new perl template.
++--------------------------+
+Mon 21 Jun 2010 01:12:41 BST
+Version 2.6
+Fixed python support.
++--------------------------+
+Sun 20 Jun 2010 02:35:23 BST
+Version 2.5
+Improved backups. Added KEEPBACKUPS option to conf.
++--------------------------+
+Sun 20 Jun 2010 01:20:39 BST
+Version 2.4
+Fixed slack-desc.
++--------------------------+
+Sun 20 Jun 2010 00:44:02 BST
+Version 2.3
+Code improvements.
++--------------------------+
+Sun 20 Jun 2010 00:12:41 BST
+Version 2.2
+Improved support for perl modules.
++--------------------------+
+Fri 18 Jun 2010 01:07:52 BST
+Version 2.1
+Added some support for ./autogen.sh or autoreconf in configure
+is missing. YMMV on this.
++--------------------------+
+Thu 17 Jun 2010 22:29:57 BST
+Version 2.0
+Added function to check for latest version.
++--------------------------+
+Sun 13 Jun 2010 21:51:29 BST
+Version 1.9
+Fixed tag error
++--------------------------+
+Sun 13 Jun 2010 19:20:55 BST
+Version 1.8
+Various code improvements
++--------------------------+
+Sun 13 Jun 2010 10:24:38 BST
+Version 1.7
+Fixed _tag bug in package name.
++--------------------------+
+Thu 10 Jun 2010 21:48:12 BST
+Version 1.6
+Updated for all templates on slackbuilds.org
+It _should_ detect the correct template to use.
+YMMV ;-)
++--------------------------+
+Mon 31 May 2010 01:52:00 BST
+Version 1.5
+Minor bugfix.
++--------------------------+
+Sat 29 May 2010 12:35:08 BST
+Version 1.4
+Updated SlackBuild template to the latest on slackbuilds.org
++--------------------------+
diff --git a/system/mkslack/README b/system/mkslack/README
new file mode 100644
index 0000000000..2899a7efdf
--- /dev/null
+++ b/system/mkslack/README
@@ -0,0 +1,70 @@
+mkslack - a SlackBuild generator script
+
+This slackbuild generator uses templates stored in
+/usr/share/mkslack/templates and a config file
+/etc/mkslack/mkslack.conf which you must edit for name, email, tag and
+a few options.
+
+
+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 unless you set KEEPBACKUPS="YES"
+in the conf (default).
+
+This is only a starter kit! You ARE expected to edit the created
+files by hand afterwards to remove unnecesary parts and add extra
+options!
+
+
+Syntax:
+
+mkslack [options] archive
+
+Options:
+-h --help Usage.
+-b --build 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.
+-V --ckver Check for new version.
+
+With no option set, mkslack will generate the SlackBuild and other
+files, print out a small message, and then quit.
+
+
+Config options:
+
+NAME, EMAIL as they should appear in .SlackBuild and .info TAG should
+be your custom tag and defaults to _SBo KEEPBACKUPS="YES|NO" up to 5
+backups of .SlackBuild and other files are kept. The higher the
+number, the older they are. ERRORACTION="PROMPT|AUTO|EXIT" what to
+do on build errors. Using AUTO or answering 'y' to the prompt will
+have the slackbuild adjusted for man and info pages and then rebuilt.
+Waf scripts don't exit on a '1' return code so it scans the end of
+the to see if there is an unrecognised configure option (the most
+frequent error with waf).
+
+
+CLI Options:
+
+The documents list in top level of source tree can be adjusted by
+command:
+DOCS="SomeFile" mkslack archive
+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 archive
+Otherwise it defaults to 1.
+
+ARCH can be specified by:
+ARCH=xxx mkslack archive
+It defaults to whatever is set in the system, or what the SlackBuild
+finds or sets.
+
+TAG can also be specified.
diff --git a/system/mkslack/doinst.sh b/system/mkslack/doinst.sh
new file mode 100644
index 0000000000..16b5983a83
--- /dev/null
+++ b/system/mkslack/doinst.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/mkslack/mkslack.conf.new
+
diff --git a/system/mkslack/mkslack.SlackBuild b/system/mkslack/mkslack.SlackBuild
new file mode 100644
index 0000000000..acb2a66ed5
--- /dev/null
+++ b/system/mkslack/mkslack.SlackBuild
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# Slackware build script for mkslack
+
+# Copyright 2010 David Woodfall <dave@dawoodfall.net>,
+# Modifications copyright slakmagik <slakmagik@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=mkslack
+VERSION=${VERSION:-5.1}
+ARCH=noarch
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+README=$PKG/usr/doc/$PRGNAM-$VERSION/README
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr/bin $PKG/usr/share/mkslack/templates $PKG/etc/mkslack \
+ $PKG/usr/man/man1 $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+gzip mkslack.1
+install -m 644 mkslack.1.gz $PKG/usr/man/man1
+install -m 755 mkslack $PKG/usr/bin
+install -m 644 template* $PKG/usr/share/mkslack/templates
+install -m 644 *SlackBuild $PKG/usr/share/mkslack/templates
+install -m 644 mkslack.conf.new $PKG/etc/mkslack
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+# generate the README from some introductory text and a dump of the manual
+cat << EOF > $README
+mkslack - a SlackBuild generator script
+Copyright 2010 David Woodfall, modification by slakmagik
+mkslack is licensed under a "one-clause BSD/Slackware" license.
+See the script for the full text.
+Homepage: http://www.dawoodfall.net/files/slackbuilds/noversion/mkslack/
+EOF
+man ./mkslack.1.gz | col -b | expand | cat -s | sed '
+ 1d
+ s/\([^[:space:]]\)[[:space:]][[:space:]]*/\1 /g
+ /^$/N;/MKSLACK(1)$/D
+ ' >> $README
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/ChangeLog.txt > $PKG/usr/doc/$PRGNAM-$VERSION/ChangeLog.txt
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/mkslack/mkslack.info b/system/mkslack/mkslack.info
new file mode 100644
index 0000000000..ea452eb793
--- /dev/null
+++ b/system/mkslack/mkslack.info
@@ -0,0 +1,10 @@
+PRGNAM="mkslack"
+VERSION="5.1"
+HOMEPAGE="http://dawoodfall.net/slackbuilds/noversion/mkslack"
+DOWNLOAD="http://www.dawoodfall.net/files/slackbuilds/noversion/mkslack/mkslack-5.1.tar.gz"
+MD5SUM="348b78a27b1cae77ea5d3a671dd92b9a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Dave Woodfall"
+EMAIL="dave@dawoodfall.net"
diff --git a/system/mkslack/slack-desc b/system/mkslack/slack-desc
new file mode 100644
index 0000000000..e6e7f58ff4
--- /dev/null
+++ b/system/mkslack/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+mkslack: mkslack (a SlackBuild generation system)
+mkslack:
+mkslack: mkslack uses templates to generate slackbuilds and .info files.
+mkslack: It fills in various things like PRGNAM, VERSION etc and inspects the
+mkslack: archive for man, info and documentation. It checks md5sum of archive
+mkslack: and writes it into the .info file.
+mkslack:
+mkslack: The config file /etc/mkslack/mkslack.conf should be customised with
+mkslack: your name, email etc. before use.
+mkslack:
+mkslack: http://dawoodfall.net/slackbuilds/noversion/mkslack