summaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
Diffstat (limited to 'development')
-rw-r--r--development/bsdiff/Makefile.diff26
-rw-r--r--development/bsdiff/README22
-rwxr-xr-xdevelopment/bsdiff/bsdiff.SlackBuild88
-rw-r--r--development/bsdiff/bsdiff.info10
-rw-r--r--development/bsdiff/slack-desc19
5 files changed, 165 insertions, 0 deletions
diff --git a/development/bsdiff/Makefile.diff b/development/bsdiff/Makefile.diff
new file mode 100644
index 0000000000..393f0803b7
--- /dev/null
+++ b/development/bsdiff/Makefile.diff
@@ -0,0 +1,26 @@
+diff -Naur bsdiff-4.3.orig/Makefile bsdiff-4.3/Makefile
+--- bsdiff-4.3.orig/Makefile 2005-08-17 00:14:10.000000000 +0200
++++ bsdiff-4.3/Makefile 2010-02-19 13:58:05.568018203 +0100
+@@ -1,15 +1,16 @@
+ CFLAGS += -O3 -lbz2
+
+ PREFIX ?= /usr/local
+-INSTALL_PROGRAM ?= ${INSTALL} -c -s -m 555
+-INSTALL_MAN ?= ${INSTALL} -c -m 444
++INSTALL_PROGRAM ?= ${INSTALL} -m 0755
++INSTALL_DIR ?= ${INSTALL} -d
++INSTALL_MAN ?= ${INSTALL} -m 0644
+
+ all: bsdiff bspatch
+ bsdiff: bsdiff.c
+ bspatch: bspatch.c
+
+ install:
+- ${INSTALL_PROGRAM} bsdiff bspatch ${PREFIX}/bin
+-.ifndef WITHOUT_MAN
+- ${INSTALL_MAN} bsdiff.1 bspatch.1 ${PREFIX}/man/man1
+-.endif
++ ${INSTALL_DIR} $(DESTDIR)/${PREFIX}/bin
++ ${INSTALL_DIR} $(DESTDIR)/${PREFIX}/man/man1
++ ${INSTALL_PROGRAM} bsdiff bspatch $(DESTDIR)/${PREFIX}/bin
++ ${INSTALL_MAN} bsdiff.1 bspatch.1 $(DESTDIR)/${PREFIX}/man/man1
diff --git a/development/bsdiff/README b/development/bsdiff/README
new file mode 100644
index 0000000000..8b4167b91e
--- /dev/null
+++ b/development/bsdiff/README
@@ -0,0 +1,22 @@
+bsdiff and bspatch are tools for building and applying patches to binary
+files. By using suffix sorting (specifically, Larsson and Sadakane's qsufsort)
+and taking advantage of how executable files change, bsdiff routinely produces
+binary patches 50-80% smaller than those produced by Xdelta, and 15% smaller
+than those produced by .RTPatch (a $2750/seat commercial patch tool).
+
+These programs were originally named bdiff and bpatch, but the large number of
+other programs using those names lead to confusion; I'm not sure if the "bs"
+in refers to "binary software" (because bsdiff produces exceptionally small
+patches for executable files) or "bytewise subtraction" (which is the key to
+how well it performs). Feel free to offer other suggestions.
+
+bsdiff is quite memory-hungry. It requires max(17*n,9*n+m)+O(1) bytes of
+memory, where n is the size of the old file and m is the size of the new
+file. bspatch requires n+m+O(1) bytes.
+
+bsdiff runs in O((n+m) log n) time; on a 200MHz Pentium Pro, building a binary
+patch for a 4MB file takes about 90 seconds. bspatch runs in O(n+m) time; on
+the same machine, applying that patch takes about two seconds.
+
+Providing that off_t is defined properly, bsdiff and bspatch support files of
+up to 2^61-1 = 2Ei-1 bytes.
diff --git a/development/bsdiff/bsdiff.SlackBuild b/development/bsdiff/bsdiff.SlackBuild
new file mode 100755
index 0000000000..036ad3c915
--- /dev/null
+++ b/development/bsdiff/bsdiff.SlackBuild
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+# Slackware build script for bsdiff.
+#
+# Copyright 2010-2011 Marco Bonetti <sid77@slackware.it>
+# 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=bsdiff
+VERSION=${VERSION:-4.3}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+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"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+
+# fix Makefile
+patch -p1 --verbose < $CWD/Makefile.diff
+
+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 {} \;
+
+# bsdiff needs to be linked against bzip2 libraries
+SLKCFLAGS="$SLKCFLAGS -lbz2"
+make CFLAGS="$SLKCFLAGS"
+make install INSTALL=install PREFIX=/usr DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+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
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/bsdiff/bsdiff.info b/development/bsdiff/bsdiff.info
new file mode 100644
index 0000000000..22cee38104
--- /dev/null
+++ b/development/bsdiff/bsdiff.info
@@ -0,0 +1,10 @@
+PRGNAM="bsdiff"
+VERSION="4.3"
+HOMEPAGE="http://www.daemonology.net/bsdiff/"
+DOWNLOAD="http://www.daemonology.net/bsdiff/bsdiff-4.3.tar.gz"
+MD5SUM="e6d812394f0e0ecc8d5df255aa1db22a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Marco Bonetti"
+EMAIL="sid77@slackware.it"
+APPROVED="Erik Hanson"
diff --git a/development/bsdiff/slack-desc b/development/bsdiff/slack-desc
new file mode 100644
index 0000000000..2809c57445
--- /dev/null
+++ b/development/bsdiff/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+bsdiff: bsdiff (binary diff/patch utility)
+bsdiff:
+bsdiff: bsdiff and bspatch are tools for building and applying patches to
+bsdiff: binary files. By using suffix sorting (specifically, Larsson and
+bsdiff: Sadakane's qsufsort) and taking advantage of how executable files
+bsdiff: change, bsdiff routinely produces binary patches 50-80% smaller than
+bsdiff: those produced by Xdelta, and 15% smaller than those produced by
+bsdiff: .RTPatch (a $2750/seat commercial patch tool).
+bsdiff:
+bsdiff:
+bsdiff: