diff --git a/SPECS/lsof-4.93.2-rh.tar.xz b/SPECS/lsof-4.93.2-rh.tar.xz new file mode 100644 index 0000000..68161e3 Binary files /dev/null and b/SPECS/lsof-4.93.2-rh.tar.xz differ diff --git a/SPECS/upstream2downstream.sh b/SPECS/upstream2downstream.sh new file mode 100755 index 0000000..0dd7b87 --- /dev/null +++ b/SPECS/upstream2downstream.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# +# This script removes non-linux dialects from upstream source package before +# release. There is a problem with copyrights for some UN*Xes ... also .. this +# script merges all to the one normal tarball and rename all to lsof_X.XX-rh. +# +# Usage: ./upstream2downstream +# +# This code is in the public domain; do with it what you wish. +# +# Copyright (C) 2007 Karel Zak +# + +UPSTREAM="$1" +NAME=$(basename $UPSTREAM .tar.gz) +MYPWD=$(pwd) +TMP=$(mktemp -d) + +echo +echo -n "Extracting upstream code..." +tar -xf $UPSTREAM -C $TMP +cd $TMP/$NAME +echo " done." + +echo -n "Removing non-Linux dialects..." +rm -rf ./dialects/{aix,darwin,du,freebsd,hpux,n+obsd,n+os,osr,sun,uw} +echo " done." + +echo -n "Removing unused distribution scripts..." +rm -rf ./support +echo " done." + +echo -n "Creating final downstream tarball..." +cd .. +mv $NAME $NAME-rh +tar Jcf $MYPWD/"$NAME"-rh.tar.xz "$NAME"-rh +echo " done." + +rm -rf $TMP +cd $MYPWD + +echo +echo "Linux-only tarball: $MYPWD/"$NAME"-rh.tar.xz" +echo +