2018-07-23 12:05:36 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
name=jdom2
|
|
|
|
version="$(sed -n 's/Version:\s*//p' *.spec)"
|
|
|
|
|
|
|
|
# RETRIEVE
|
|
|
|
wget "https://github.com/hunterhacker/jdom/archive/JDOM-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
|
|
|
|
|
|
|
|
rm -rf tarball-tmp
|
|
|
|
mkdir tarball-tmp
|
2020-01-27 15:27:17 +00:00
|
|
|
pushd tarball-tmp
|
2018-07-23 12:05:36 +00:00
|
|
|
tar xf "../${name}-${version}.orig.tar.gz"
|
|
|
|
|
|
|
|
# CLEAN TARBALL
|
|
|
|
rm -r */lib */*/lib
|
|
|
|
find -name '*.jar' -delete
|
|
|
|
find -name '*.class' -delete
|
|
|
|
|
2020-01-27 15:27:17 +00:00
|
|
|
tar -czf "../${name}-${version}.tar.gz" *
|
|
|
|
popd
|
2018-07-23 12:05:36 +00:00
|
|
|
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"
|