aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraaditya <aaditya_gnulinux@zoho.com>2014-02-10 07:25:15 +0700
committerErik Hanson <erik@slackbuilds.org>2014-02-11 12:15:07 -0600
commitf1739bc786336345c6f0680278d5b3a298f29215 (patch)
treef02e15a42cac0e33466ba2e00793e84706e3b51f
parent2037ae7eee4d1f90e07b2e3dcbd0b9ec54aeb305 (diff)
system/asbt: Added (Managing SBo packages in local repository).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/asbt/README29
-rw-r--r--system/asbt/asbt.SlackBuild76
-rw-r--r--system/asbt/asbt.info10
-rw-r--r--system/asbt/doinst.sh16
-rw-r--r--system/asbt/slack-desc19
5 files changed, 150 insertions, 0 deletions
diff --git a/system/asbt/README b/system/asbt/README
new file mode 100644
index 000000000000..5d2fa40fe60d
--- /dev/null
+++ b/system/asbt/README
@@ -0,0 +1,29 @@
+asbt acts like a package manager for your local copy of slackbuilds.
+(usually obtained from slackbuilds.org)
+
+It supports searching (-s), viewing information (-i,-r,-d,-v) ,
+downloading (-g), building (-B), and installing/removing/upgrading packages.
+
+The list of available options is present in the readme and the man page.
+
+The variables used in the script, which you would probably
+adjust according to your wish, are:
+
+1) repodir="/home/$USER/slackbuilds"
+ # Repository for slackbuilds.
+
+2) srcdir="/home/$USER/src"
+ # Where the downloaded source packages are to be placed.
+ # Leave it blank for saving it in the same directory as the slackbuild.
+
+3) outdir="/home/$USER/src"
+ # Where the build package will be placed.
+ # Leave it blank for putting it in /tmp.
+
+4) gitdir="/home/$USER/git/slackbuilds/.git"
+ # Directory where the slackbuilds git repository is present.
+
+5) editor="/usr/bin/vim"
+ # Editor for viewing/editing slackbuilds.
+
+These variables can also be configured via editing /etc/asbt/asbt.conf
diff --git a/system/asbt/asbt.SlackBuild b/system/asbt/asbt.SlackBuild
new file mode 100644
index 000000000000..f46b437c38e2
--- /dev/null
+++ b/system/asbt/asbt.SlackBuild
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# Slackware build script for asbt
+
+# Copyright 2014 Aaditya Bagga <aaditya_gnulinux@zoho.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=asbt
+VERSION=${VERSION:-0.8.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+ARCH=noarch
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+if [ -e $CWD/$VERSION.tar.gz ]; then
+ tar xvf $CWD/$VERSION.tar.gz
+else
+ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+fi
+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 {} \;
+
+make install DESTDIR=$PKG
+
+# Preserve config file
+mv $PKG/etc/asbt/asbt.conf $PKG/etc/asbt/asbt.conf.new
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+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/asbt/asbt.info b/system/asbt/asbt.info
new file mode 100644
index 000000000000..050edf9a804f
--- /dev/null
+++ b/system/asbt/asbt.info
@@ -0,0 +1,10 @@
+PRGNAM="asbt"
+VERSION="0.8.0"
+HOMEPAGE="http://github.com/aadityabagga/asbt"
+DOWNLOAD="http://github.com/aadityabagga/asbt/archive/0.8.0.tar.gz"
+MD5SUM="608d95c1c900b94c02dde267ebbf7a7e"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="aaditya"
+EMAIL="aaditya_gnulinux@zoho.com"
diff --git a/system/asbt/doinst.sh b/system/asbt/doinst.sh
new file mode 100644
index 000000000000..69b1d2d95c7a
--- /dev/null
+++ b/system/asbt/doinst.sh
@@ -0,0 +1,16 @@
+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
+ else
+ # Otherwise, we leave the .new copy for the admin to consider...
+ echo -e "New configuration file /etc/asbt/asbt.conf.new created.\nYou may need to merge changes."
+ fi
+}
+
+config etc/asbt/asbt.conf.new
diff --git a/system/asbt/slack-desc b/system/asbt/slack-desc
new file mode 100644
index 000000000000..fffa92bd7994
--- /dev/null
+++ b/system/asbt/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------------------------------------------------------|
+asbt: asbt (a tool for managing packages in slackbuilds local repository)
+asbt:
+asbt: asbt acts like a package manager for your local copy of slackbuilds.
+asbt:
+asbt:
+asbt: It supports searching, displaying info, getting, building,
+asbt: and installing/removing/upgrading packages.
+asbt:
+asbt: URL- https://github.com/aadityabagga/asbt
+asbt:
+asbt: