From 33733ef3fb784cb3bce836243d69951585fc3647 Mon Sep 17 00:00:00 2001 From: rhatto Date: Mon, 16 Feb 2009 18:21:09 +0000 Subject: secure-delete: adding secure-delete git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2105 370017ae-e619-0410-ac65-c121f96126d4 --- app/misc/wipe/wipe.SlackBuild | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'app/misc/wipe/wipe.SlackBuild') diff --git a/app/misc/wipe/wipe.SlackBuild b/app/misc/wipe/wipe.SlackBuild index 21def4f3..0471c851 100755 --- a/app/misc/wipe/wipe.SlackBuild +++ b/app/misc/wipe/wipe.SlackBuild @@ -10,13 +10,14 @@ # 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 +# 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 wipe, by Silvio Rhatto # requires: # tested: wipe-2.2.0 +# model: generic.mkSlackBuild $Rev: 784 $ # # Look for slackbuildrc @@ -47,9 +48,9 @@ NUMJOBS=${NUMJOBS:=""} 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 @@ -57,6 +58,7 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi # Set error codes (used by createpkg) @@ -64,6 +66,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 @@ -86,27 +89,24 @@ 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 $8 }'`" +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" cd "$PKG_SRC" # Patch source -patches=" +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 - fi -done - -if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then - for patch_url in [[PATCH URLS]]; do - patch="`basename $patch_url`" - if [ ! -s "$SRC_DIR/$patch" ]; then - wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET - fi + 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 @@ -114,8 +114,8 @@ if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then else patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH fi - done -fi + fi +done # Configure autoheader @@ -152,9 +152,9 @@ done 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 +# 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 +# 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 ':'. @@ -177,6 +177,6 @@ cd "$PKG" makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG # Delete source and build directories if requested -if [ "$CLEANUP" == "yes" ]; then +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then rm -rf "$PKG_WORK" "$PKG" fi -- cgit v1.2.3