forked from pool/gsoap
Jan Engelhardt
c7083c7199
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gsoap?expand=0&rev=50
40 lines
1.1 KiB
Bash
40 lines
1.1 KiB
Bash
#!/bin/sh -ex
|
|
#
|
|
# Shrink the gsoap archive from 20 MB -> 6 MB.
|
|
#
|
|
# Requires: fdupes, hxtools
|
|
|
|
if ! which fdupes >/dev/null; then
|
|
echo "fdupes not installed.";
|
|
exit 1;
|
|
fi;
|
|
if ! which hardlink >/dev/null; then
|
|
echo "The \"hardlink\" utility (package: hardlink) is not installed.";
|
|
exit 1;
|
|
fi;
|
|
|
|
version="2.8.28";
|
|
shortver="2.8"; # agh...
|
|
|
|
rm -Rf "gsoap-$shortver" "gsoap-$version";
|
|
unzip "gsoap_$version.zip";
|
|
|
|
# Someone failed at sane version number tagging.
|
|
mv "gsoap-$shortver" "gsoap-$version";
|
|
|
|
# Remove executables, backups, cache files, non-Linux parts...
|
|
rm -Rf "gsoap-$version/gsoap/bin" \
|
|
"gsoap-$version/samples/link++/xmas" \
|
|
"gsoap-$version"/*.old \
|
|
"gsoap-$version/autom4te.cache";
|
|
find "gsoap-$version" -type d -name "*.pbxindex" -exec rm -Rf "{}" "+"
|
|
rm -Rf "gsoap-$version/gsoap/ios_plugin";
|
|
find "gsoap-$version" -type f "(" \
|
|
-iname "*.exe" -o -iname "*.dll" -o -name "*.o" -o \
|
|
-name "*~" -o -name .DS_Store ")" -delete;
|
|
hardlink "gsoap-$version";
|
|
echo Now...
|
|
find "gsoap-$version" -print0 | sort -z | \
|
|
tar -T- --null --owner=root --group=root --no-recur --use=xz \
|
|
-cvf "gsoap-$version.tar.xz";
|