diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/libs/libfaketime/Manifest | 24 | ||||
-rw-r--r-- | sys/libs/libfaketime/libfaketime-0.8.diff | 26 | ||||
-rw-r--r-- | sys/libs/libfaketime/libfaketime.SlackBuild | 242 |
3 files changed, 292 insertions, 0 deletions
diff --git a/sys/libs/libfaketime/Manifest b/sys/libs/libfaketime/Manifest new file mode 100644 index 00000000..ebaf862d --- /dev/null +++ b/sys/libs/libfaketime/Manifest @@ -0,0 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST libfaketime-0.8.tar.gz 21188 MD5 c83e12a80ca85486bc904905d325d01e RMD160 1fba8d16f6b252dbe6b6c590fee08920b54149bb SHA1 7053ba5984a94d24cbe63bb7f285a9d1c5418e31 SHA256 e115120ab4d199f7fd2ecdb87ae2963523d6e8a5314c2e914573afd7d5c704c3 SHA512 09ca64fe704e375aa9467a39980a4074e1cb2b2f4aae5a673a3daf9da81943f2ca53d4c14aa6268cfd274c4462667ba357ad1f223ee2067557961dad79c9c56a +MKBUILD libfaketime.mkbuild 4964 MD5 661d1a96683e93616b59e40ab03650d3 RMD160 6bcfdb3a54ae1110f5e8fc4e7b8e9511de3ff3a4 SHA1 4e6535c3e3bd183a5f8e3bff8f67e67630eed4f9 SHA256 8cf5cad8b60498b25f30950b5b908844e1e2acff1133b8aad121a7ac362fb1ab SHA512 b7efdff0681f4468c40a35eb3373cf7c06754777b9bcf513ccb7d1c28083f763bf5ba4e677906bd0e40fd68d3e90cb98d8af8bc79dac2ca96e1f18bd3e87d87f +PATCH libfaketime-0.8.diff 1139 MD5 b8a3d42efc6734a49ae349bac5b6bef1 RMD160 1aeefb8bb420fb311e39a3398384146a598f1008 SHA1 03df7a0cf8a2211e9d5918c11dc6fafeb983654c SHA256 89dd78b9332a540dbd700a2a7865207573f5acf8ceef2ad8821e3531a6ee0908 SHA512 bc1030b3c603645266d55fc146b5731b5316d2a3aa4a0f34f33c2d0300e739807988385c8cbf917594e28285f41644778d2f4eea1cf4d068e58e440a8f6b6a2e +SLACKBUILD libfaketime.SlackBuild 7773 MD5 3e90f403d5558d79abeabe6ed7c00da5 RMD160 8596bdaa817e81f6ac12db2ce8311b5d69141c4b SHA1 e768b8d60fbd6532efcceb6ee13c2f1b2b2a8164 SHA256 560f459359e86838c659233b59a6d030488142a3b41a69cca37bc5064af045ef SHA512 0a3f6e352857439409fcb7105c857d45ebbf99a3dbda4a84c66214634d69b3d3c4b02b01f474acee1a91a0b0d40d3aee2dc473578b5b88e483b185c853f0eb34 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ2hG+AAoJEEHL93ESzgeii04QAJuIzds8jsFOvxtp6YRt9RiK +EZhur+r86/SNigVUp5rvE/Y1xa4IEGd0pFVfUXGHlKewNRkhXAzO+bul1QaX2omz +eeICew3mSRjBAPYEDIyqfs8+XydpL4eRk++BvHfGi8yDILxiKYbe6hjc+MM9Tcxf +CM2CsOQZZZl+3UEkkOWR8iYiLfuL+RLQLNNEwrNgQG0HolMx0CJBUhVB7C7rMbC2 +hDgOaGNgaSa6mL1R6G4R/cfXBA6rmkHqipEDNWSk1WBWxauhXNxtM5JhRbG5dLcW +UGOgs5gD6YBLNRRkiC8lhZFkE91BntW08uYpmsDLMO1jPtu/xuff6W2sNmffjoIZ +qUnLy1tJU4Im8i+yGBLvZXEXK/1viTVDx++T74CqSg8ZVyKTYJvHJ7lRIs7EIuyg +/wm5p9XEP8eoMoLapVSBa07M9oj0y7X24JVzd6JcRZWvf4coSzBBrjUZNZLhZa9i +Q6NwWBeXUH+O9+6NlaX9/JamDtHf4YzUJInNIEjPJuXPztcRTcovFJUInqpnpv/5 +Y7TaFrUehQ0rpR/MzSYi3L16fdbQYPylALtZWmdcZ0njuVCEkh+Aiu7iXCPfFEhL +RGf6cWQhtQsAuIxUg03G1v5SZ73ohUCrYZ4XmnE2F3i0PLA9SH6XZKgMz/Ak5/uD +mqD/y6g0NNcMbDDRXi2i +=kcGk +-----END PGP SIGNATURE----- diff --git a/sys/libs/libfaketime/libfaketime-0.8.diff b/sys/libs/libfaketime/libfaketime-0.8.diff new file mode 100644 index 00000000..bc0bb748 --- /dev/null +++ b/sys/libs/libfaketime/libfaketime-0.8.diff @@ -0,0 +1,26 @@ +diff -Naur libfaketime-0.8.orig/Makefile libfaketime-0.8/Makefile +--- libfaketime-0.8.orig/Makefile 2008-08-24 10:11:06.000000000 -0300 ++++ libfaketime-0.8/Makefile 2009-04-06 11:15:55.000000000 -0300 +@@ -70,13 +70,13 @@ + + install: libs + @echo +- @echo "Copying the libraries to /usr/lib/faketime and the wrapper script to /usr/bin ..." +- -mkdir -p /usr/lib/faketime +- cp libfaketime.so.1 libfaketimeMT.so.1 /usr/lib/faketime +- cp faketime /usr/bin +- cp faketime.1 /usr/share/man/man1/faketime.1 +- gzip /usr/share/man/man1/faketime.1 +- -mkdir -p /usr/share/doc/faketime +- cp README /usr/share/doc/faketime/README +- cp Changelog /usr/share/doc/faketime/Changelog ++ @echo "Copying the libraries to ${DESTDIR}/usr/lib/faketime and the wrapper script to /usr/bin ..." ++ -mkdir -p ${DESTDIR}/usr/lib/faketime ++ cp libfaketime.so.1 libfaketimeMT.so.1 ${DESTDIR}/usr/lib/faketime ++ -mkdir -p ${DESTDIR}/usr/bin ++ cp faketime ${DESTDIR}/usr/bin ++ -mkdir -p ${DESTDIR}/usr/share/man/man1/ ++ cp faketime.1 ${DESTDIR}/usr/share/man/man1/faketime.1 ++ gzip ${DESTDIR}/usr/share/man/man1/faketime.1 ++ -mkdir -p ${DESTDIR}/usr/share/doc/faketime + diff --git a/sys/libs/libfaketime/libfaketime.SlackBuild b/sys/libs/libfaketime/libfaketime.SlackBuild new file mode 100644 index 00000000..fade2787 --- /dev/null +++ b/sys/libs/libfaketime/libfaketime.SlackBuild @@ -0,0 +1,242 @@ +#!/bin/bash +# +# libfaketime.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# libfaketime.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for libfaketime, by Silvio Rhatto +# requires: +# tested: libfaketime-0.8 +# model: generic.mkSlackBuild $Rev: 805 $ +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="libfaketime" +PKG_NAME="libfaketime" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.8} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +SLACKBUILD_PATH=${SLACKBUILD_PATH:="sys/libs/libfaketime"} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mtune=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +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 +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://www.code-wizards.com/projects/libfaketime/$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 +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" [[PATCH URLS]] + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + patch="`basename $patch`" + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$SRC_DIR/$patch" ]; then + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + fi +done + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="COPYING Changelog README" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# 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--------------------------------------------------| +libfaketime: libfaketime +libfaketime: +libfaketime: libfaketime (FakeTime Preload Library) - report faked system time +libfaketime: to programs without having to change the system-wide time +libfaketime: +libfaketime: +libfaketime: +libfaketime: +libfaketime: +libfaketime: +libfaketime: +EODESC + +# Build the package +cd "$PKG" +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 + rm -rf "$PKG_WORK" "$PKG" +fi |