diff options
Diffstat (limited to 'dev/libs/libdaemon')
-rw-r--r-- | dev/libs/libdaemon/Manifest | 24 | ||||
-rw-r--r-- | dev/libs/libdaemon/libdaemon.SlackBuild | 84 |
2 files changed, 101 insertions, 7 deletions
diff --git a/dev/libs/libdaemon/Manifest b/dev/libs/libdaemon/Manifest new file mode 100644 index 00000000..bd35e7d6 --- /dev/null +++ b/dev/libs/libdaemon/Manifest @@ -0,0 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST libdaemon-0.13.tar.gz 368119 MD5 ae9113fcd825d5a7f07e5ddccb3c3102 RMD160 7fc41dc7a147d969b29e5a359442716859de7e0e SHA1 2c67eedf0dfe303a86bee64feba3e40d21abbd01 SHA256 bd949d459d2da54f1cdfbd1f4592e32541e8a195aca56fa7a8329ed79836d709 SHA512 eca6f99c87f33a48c097a9d3f1aac80b16951b3460fc6258cd26044bbd1c87973397eda27ef70c77ce3b48ccfaaf459cf1e770f782d7cdbd31e5fa206b502bea +MKBUILD libdaemon.mkbuild 4180 MD5 9dba3d21e90203dae6b8db8177239abb RMD160 ce91e1bf2a1d75f37b7586d3fbc6298bd6e67f0e SHA1 249da12ca2949db6dfab4e01085b5099ceadf7f1 SHA256 2def35f64d02f48099d5ff5eb1f557e510d5d137962c6cc8e46d1c8388a53a2f SHA512 5c75e83130e9bd89f7dd0fd5c94e5f89c85bfefdf146af0cab85b0ff21935d09a3f5c7cdf5e02dcd32a0d6c4834dad284865c293beb2664f3a07b7c74ebc40c2 +SLACK-REQUIRED slack-required 86 MD5 5a1df0e2493926f9757c291ce4192864 RMD160 5e54359f4d875cd5e9d9891c8118d9abfe0b012e SHA1 b090fe004db80dd3ef9c42050f1e12a1a0509f06 SHA256 e3a1906ec64055f4b48eb68d4f09a4d451a58febfe7a1720ac3f6d46a561efda SHA512 487f4ae74b1f18410478eeb9d7ed80a549ee5bfb459c7585bf0356d446f6aa00a29424f9c55134a5bfe81bc4495b8cec07c0e3d432de024ba49f965f59e9e35e +SLACKBUILD libdaemon.SlackBuild 7427 MD5 178d7ea9f75f319e1805a07e862d8fce RMD160 fd7fab26686ce0ca43cc9c1a214fe64c39344245 SHA1 7af4ecf62d32a1b097097d8e058cd291d1cd8a07 SHA256 fed70a851c94515126752231ca04787c52bec206c3c7c665eef23edd56d8565d SHA512 fe17f71d077f2c6f2d7f8435570b09eadf4171f27d79125879937955dbe5d677257a24c04c33d9ca3d6ddfb658f31417e566bdf9f0b44492de068826c8464475 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJyappAAoJEEHL93ESzgeiuY0P/0H7G0mkh+fvbQbJIR+7+5T8 +eWUcwYJjy6vJbuC+uUQTMZWeP3PsG1RR1XqI6zULboYgAiFUcb077fXErTROuCdl +pmDxQFXjp8i2SVNypospx+L6fzYjFzePg2fnh0zF5ZzQ4knFApnpxcLM6uBPs4GW +GOfx1yGzEsAZY2Hvsv+PmGqFzbYzCsq61v4VgpkCwuZz7+aOaJUcTenuZx0U4MXt +OUEl87lKypGDDElscyOVZvkdx38mR67/a/F8VwJmCyfB6w4/b/GVJyf89mkeq8wY +MVGI3wg6nAEQJL3IL2iwQDKvhsAl0ocasa/yjOZsVn1RdwTi0ZPwpaX6XmqMd2ni +Pp2VveqBMIkh8ns2eqWgzPpWEgbfVV4RSOBGiQZ+pqCweirUHPDAExFV6C1GCSzJ +++ajI3tjZC1ISk8loBiqkBuKLBBPeuWT/eoxnmHyXzzEVR2fbduqwHHtF9/TAYFj +0uOTAg2Jp0D4QtjFygN4AmgLVk/Rae2AgrrhO/neKNq0YsCTrF69LEQXn3OvS2kX +00JSVUfPmtW+jeD/crsAsU/D4G1Ul38yUV1/bD2/tsefoSwi+Jgu6N5cXVHVnC68 +1n8bEb6GKJVNlra6t8nS7s9uTS+xNxsdFktlIRT35A13R6II4oW9j+SFtxC0PE36 +EpVWju3urArF95Xxurui +=FXkd +-----END PGP SIGNATURE----- diff --git a/dev/libs/libdaemon/libdaemon.SlackBuild b/dev/libs/libdaemon/libdaemon.SlackBuild index c3825f3a..6244a144 100644 --- a/dev/libs/libdaemon/libdaemon.SlackBuild +++ b/dev/libs/libdaemon/libdaemon.SlackBuild @@ -15,8 +15,9 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # slackbuild for libdaemon, by Rudson R. Alves -# requires: glibc-solibs -# tested: libdaemon-0.12 +# requires: +# tested: libdaemon-0.13 +# model: generic.mkSlackBuild $Rev: 796 $ # # Look for slackbuildrc @@ -31,13 +32,14 @@ CWD="$(pwd)" SRC_NAME="libdaemon" PKG_NAME="libdaemon" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=0.12} +SRC_VERSION=${VERSION:=0.13} PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rra} SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} +SLACKBUILD_PATH=${SLACKBUILD_PATH:="dev/libs/libdaemon"} PREFIX=${PREFIX:=/usr} PKG_WORK="$TMP/$SRC_NAME" CONF_OPTIONS=${CONF_OPTIONS:="--disable-static --program-prefix= --program-suffix= --build=$ARCH-slackware-linux"} @@ -47,9 +49,9 @@ NUMJOBS=${NUMJOBS:="-j4"} LIBDIR="$PREFIX/lib" if [ "$ARCH" = "i386" ]; then - SLKCFLAGS="-O2 -march=i386 -mcpu=i686" + SLKCFLAGS="-O2 -march=i386 -mtune=i686" elif [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mcpu=i686" + SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686" elif [ "$ARCH" = "s390" ]; then @@ -65,6 +67,7 @@ ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 +ERROR_MANIFEST=43; # Clean up any leftovers of previous builds rm -rf "$PKG_WORK" 2> /dev/null @@ -78,12 +81,78 @@ mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR # Dowload source if necessary SRC="$SRC_NAME-$VERSION.tar.gz" -URL="http://freshmeat.net/redir/libdaemon/41781/url_tgz/$SRC" +URL="http://0pointer.de/lennart/projects/libdaemon/$SRC" if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi +# Check Manifest file +if [ -e "$CWD/Manifest" ]; then + + # Manifest signature checking + if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then + echo "Checking Manifest signature..." + gpg --verify $CWD/Manifest + if [ "$?" != "0" ]; then + exit $ERROR_MANIFEST + fi + fi + + MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`" + + for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do + + MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`" + MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`" + MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`" + + if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then + MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE" + else + MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`" + fi + + if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then + continue + fi + + echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..." + + SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`" + SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`" + + # Check source code size + if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then + echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC" + exit $ERROR_MANIFEST + else + echo "Size match." + fi + + # Check source code integrity + for ALGO in md5 rmd160 sha1 sha256 sha512; do + if [ $ALGO = "rmd160" ]; then + ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`" + else + ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`" + fi + ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`" + ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }') + if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then + echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC" + exit $ERROR_MANIFEST + else + echo "$ALGO match." + fi + done + + done + +else + exit $ERROR_MANIFEST +fi + # Untar cd "$PKG_WORK" tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR @@ -151,7 +220,8 @@ fi # Build the package cd "$PKG" -makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +mkdir -p $REPOS/$SLACKBUILD_PATH +makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG # Delete source and build directories if requested if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then |