aboutsummaryrefslogtreecommitdiff
path: root/system/slackyd
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2012-09-08 10:55:41 +0200
committerRobby Workman <rworkman@slackbuilds.org>2012-09-08 17:28:33 -0500
commitf4e6a0b62818a787eec9c1637de246979e6fb942 (patch)
tree183ead636186ba223b8154244495294f4007ac55 /system/slackyd
parent7316445ee3cd818b6974b881cf53a30e02a4f3a9 (diff)
system/slackyd: Added (slacky downloader).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system/slackyd')
-rw-r--r--system/slackyd/README9
-rw-r--r--system/slackyd/doinst.sh14
-rw-r--r--system/slackyd/slack-desc19
-rw-r--r--system/slackyd/slackyd.SlackBuild95
-rw-r--r--system/slackyd/slackyd.conf88
-rw-r--r--system/slackyd/slackyd.info10
6 files changed, 235 insertions, 0 deletions
diff --git a/system/slackyd/README b/system/slackyd/README
new file mode 100644
index 0000000000000..35c43da926740
--- /dev/null
+++ b/system/slackyd/README
@@ -0,0 +1,9 @@
+slackyd (slacky downloader)
+
+slackyd is a tool that let you download packages from a repository
+(checking integrity by their md5) and perform other tasks like showing
+package informations (description, size, dependencies and so on),
+check for updates, search for official or unofficial installed
+packages. It can build packages from source or just download the
+files needed for building. It can resolve needed dependencies using
+required and reccomended fields in PACKAGES.TXT
diff --git a/system/slackyd/doinst.sh b/system/slackyd/doinst.sh
new file mode 100644
index 0000000000000..455e41c588009
--- /dev/null
+++ b/system/slackyd/doinst.sh
@@ -0,0 +1,14 @@
+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/slackyd/slackyd.conf.new
diff --git a/system/slackyd/slack-desc b/system/slackyd/slack-desc
new file mode 100644
index 0000000000000..10d6b66ac6342
--- /dev/null
+++ b/system/slackyd/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------------------------------------------------------|
+slackyd: slackyd (slacky downloader)
+slackyd:
+slackyd: slackyd is a tool that let you download packages from a repository
+slackyd: (checking integrity by their md5) and perform other tasks like showing
+slackyd: package informations (description, size, dependencies and so on),
+slackyd: check for updates, search for official or unofficial installed
+slackyd: packages. It can build packages from source or just download the
+slackyd: files needed for building. It can resolve needed dependencies using
+slackyd: required and reccomended fields in PACKAGES.TXT
+slackyd: homepage: http://slacky.eu/~dani/slackyd/
+slackyd:
diff --git a/system/slackyd/slackyd.SlackBuild b/system/slackyd/slackyd.SlackBuild
new file mode 100644
index 0000000000000..92761bad7746c
--- /dev/null
+++ b/system/slackyd/slackyd.SlackBuild
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+# Slackware build script for slackyd
+# Copyright Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy, 2012
+# 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=slackyd
+VERSION=${VERSION:-1.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+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/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+DOCS="AUTHORS BUGS CHANGELOG INSTALL THANKS"
+
+set -e # Exit on most errors
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+make "CFLAGS=$SLKCFLAGS -lcrypto"
+make install DESTDIR=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+rm -f $PKG/etc/slackyd/slackyd.conf
+install -m 0644 -D $CWD/slackyd.conf $PKG/etc/slackyd/slackyd.conf.new
+if [ "$ARCH" = "x86_64" ]; then
+ sed -i "s|^slackware64\ .*|slackware64 = yes|" $PKG/etc/slackyd/slackyd.conf.new
+ sed -i "s|slackware-|slackware64-|" $PKG/etc/slackyd/slackyd.conf.new
+fi
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $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/slackyd/slackyd.conf b/system/slackyd/slackyd.conf
new file mode 100644
index 0000000000000..5305370631308
--- /dev/null
+++ b/system/slackyd/slackyd.conf
@@ -0,0 +1,88 @@
+#
+# Slacky Downloader Config File.
+#
+# Case insensitive.
+# Comment: '#' or '!'
+#
+
+#
+# Slackyd cache
+#
+cache = /var/slackyd
+
+#
+# Connection timeout, in seconds.
+# Set to 0 for use Linux default value (very long).
+#
+timeout = 15
+
+#
+# Upgrade slackware packages with unofficial packages.
+#
+upgrade_replacing_official = yes
+
+#
+# Using Slackware64 official mirror
+#
+slackware64 = no
+
+#
+# Download with wget (proxy workaround)
+#
+wget = no
+
+#
+# Repository syntax:
+#
+# KEYWORD NAME ADDRESS
+#
+# - "KEYWORD" Must always be "REPOSITORY" and must always be at start of line !
+#
+# - "NAME" Is a string (only characters, numbers, underscores or '-') to identify repository.
+# If not specified slackyd consider repository as official slackware mirror.
+# In this case only first of the list will be used, if don't work slackyd try with second etc...
+#
+# - "ADDRESS" Is repository.
+#
+# - Only FILE/HTTP/FTP protocols are implemented yet.
+#
+
+# Slackware repositories:
+
+# To use a directory as slackware mirror:
+!repository = file://your/mirror/
+# To use a directory as extra mirror:
+!repository mirrorname = file://your/mirror/
+
+# Official mirror is too slow...
+!repository ftp://ftp.slackware.com/pub/slackware/slackware-13.37/
+
+repository = http://www.slackware.at/data/slackware-current/
+
+
+#Extra repositories:
+# Slacky.eu
+!repository slacky = http://darkstar.ist.utl.pt/slackware/addon/slacky/slackware-13.37/
+# GSlacky
+!repository gslacky http://darkstar.ist.utl.pt/slackware/addon/slacky/gnome-slacky-13.37/
+
+# Blacklist syntax:
+#
+# blacklist package1 package2 package3 ...
+#
+# `blacklist' keyword must be at start of line.
+# Packages can be tab, white space or comma separated.
+#
+# Examples:
+# 1) Blacklist all packages 'xine-lib':
+# blacklist ^xine-lib-.*
+# 2) Blacklist _exactly_ package xine-lib
+# blacklist ^xine-lib-[^-]+-[^-]+-[^-]
+# 3) Blacklist xine-lib-1, xine-lib-2 and xine-lib3:
+# blacklist ^xine-lib-[123]
+# 4) Blacklist firefox 3 and all kernel smp:
+# blacklist ^mozilla-firefox-en-us-3 ^kernel-.*_smp
+#
+# Use -x option to disable blacklist on run-time, and -X option to see
+# all packages blacklisted.
+#
diff --git a/system/slackyd/slackyd.info b/system/slackyd/slackyd.info
new file mode 100644
index 0000000000000..c7d387dfff49b
--- /dev/null
+++ b/system/slackyd/slackyd.info
@@ -0,0 +1,10 @@
+PRGNAM="slackyd"
+VERSION="1.0"
+HOMEPAGE="http://slacky.eu/~dani/slackyd/"
+DOWNLOAD="http://slacky.eu/~dani/slackyd/sources/slackyd-1.0.tar.bz2"
+MD5SUM="577b97cc9116f5c21ca7b86ab945a737"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Matteo Bernardini"
+EMAIL="ponce@slackbuilds.org"