2020-10-15 12:14:59 +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
|
2021-06-08 18:17:56 +00:00
|
|
|
pushd tarball-tmp
|
2020-10-15 12:14:59 +00:00
|
|
|
tar xf "../${name}-${version}.orig.tar.gz"
|
|
|
|
|
|
|
|
# CLEAN TARBALL
|
|
|
|
rm -r */lib */*/lib
|
|
|
|
find -name '*.jar' -delete
|
|
|
|
find -name '*.class' -delete
|
|
|
|
|
2021-06-08 18:17:56 +00:00
|
|
|
tar -czf "../${name}-${version}.tar.gz" *
|
|
|
|
popd
|
2020-10-15 12:14:59 +00:00
|
|
|
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"
|