2015-03-03 12:18:05 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Source0 is prepared by
|
2018-03-27 08:33:45 +00:00
|
|
|
# svn checkout https://svn.code.sf.net/p/netpbm/code/advanced netpbm-%{version}
|
|
|
|
# svn checkout https://svn.code.sf.net/p/netpbm/code/userguide netpbm-%{version}/userguide
|
|
|
|
# svn checkout https://svn.code.sf.net/p/netpbm/code/trunk/test netpbm-%{version}/test
|
2015-03-03 12:18:05 +00:00
|
|
|
# and removing the .svn directories ( find -name "\.svn" -type d -print0 | xargs -0 rm -rf )
|
|
|
|
# and removing the ppmtompeg code, due to patents ( rm -rf netpbm-%{version}/converter/ppm/ppmtompeg/ )
|
|
|
|
|
|
|
|
VERSION=$1
|
|
|
|
if [[ -z $VERSION ]]; then
|
|
|
|
echo "Version is missing as argument"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
NETPBM_NAME="netpbm-$VERSION"
|
|
|
|
TEMP_DIR="/var/tmp/netpbm"
|
2015-08-11 08:11:35 +00:00
|
|
|
TARBALL="$TEMP_DIR/$NETPBM_NAME.tar.xz"
|
2015-03-03 12:18:05 +00:00
|
|
|
mkdir -p $TEMP_DIR
|
|
|
|
pushd $TEMP_DIR
|
2018-03-27 08:33:45 +00:00
|
|
|
svn checkout https://svn.code.sf.net/p/netpbm/code/advanced $NETPBM_NAME
|
|
|
|
svn checkout https://svn.code.sf.net/p/netpbm/code/userguide $NETPBM_NAME/userguide
|
|
|
|
svn checkout https://svn.code.sf.net/p/netpbm/code/trunk/test $NETPBM_NAME/test
|
2015-03-03 12:18:05 +00:00
|
|
|
find -name '\.svn' -type d -print0 | xargs -0 rm -rf
|
|
|
|
rm -rf $NETPBM_NAME/converter/ppm/ppmtompeg/
|
2015-08-11 08:11:35 +00:00
|
|
|
tar -cJvf $NETPBM_NAME.tar.xz $NETPBM_NAME
|
2015-03-03 12:18:05 +00:00
|
|
|
rm -rf $NETPBM_NAME/
|
|
|
|
popd
|
|
|
|
if [[ -f "$TARBALL" ]]; then
|
|
|
|
cp $TARBALL .
|
|
|
|
rm $TARBALL
|
|
|
|
fi
|
|
|
|
exit 0
|