Blame SOURCES/create-tarball.sh

3a08a6
#!/bin/bash
3a08a6
3a08a6
if [ $# -ne 1 ]; then
3a08a6
    echo "Usage: ./create-tarball.sh VERSION"
3a08a6
    exit 1
3a08a6
fi
3a08a6
3a08a6
VERSION=${1}
3a08a6
NAME="fop"
3a08a6
3a08a6
wget http://archive.apache.org/dist/xmlgraphics/fop/source/${NAME}-${VERSION}-src.tar.gz
3a08a6
tar xvf ${NAME}-${VERSION}-src.tar.gz
3a08a6
3a08a6
(
3a08a6
  cd ${NAME}-${VERSION}
3a08a6
  # non-free color profile
3a08a6
  find src/java/org/apache/fop/pdf/ -name "*.icm*" -delete
3a08a6
  find ./ -name "*.jar" -delete
3a08a6
  find ./ -name "*.pdf" -delete
3a08a6
  # serialized objects
3a08a6
  find ./${NAME}-${VERSION}/ -name "*.ser" -delete
3a08a6
  # examples, tests, ...
3a08a6
  rm -Rf lib/ examples/ test/ hyph/
3a08a6
  rm -Rf src/documentation/
3a08a6
  mkdir -p lib/build/
3a08a6
)
3a08a6
3a08a6
tar czvf ${NAME}-${VERSION}-clean.tar.gz ${NAME}-${VERSION}
3a08a6
rm -Rf ${NAME}-${VERSION}.tar.gz
3a08a6