2016-02-03 10:56:00 +01:00
|
|
|
#!/bin/sh -ex
|
2011-07-10 21:38:59 +02:00
|
|
|
#
|
2013-06-27 08:46:00 +02:00
|
|
|
# Shrink the gsoap archive from 20 MB -> 6 MB.
|
2011-07-10 21:38:59 +02:00
|
|
|
#
|
2013-02-28 23:51:41 +01:00
|
|
|
# Requires: fdupes, hxtools
|
2011-07-10 21:38:59 +02:00
|
|
|
|
|
|
|
if ! which fdupes >/dev/null; then
|
|
|
|
echo "fdupes not installed.";
|
|
|
|
exit 1;
|
|
|
|
fi;
|
2015-01-15 19:39:17 +01:00
|
|
|
if ! which hardlink >/dev/null; then
|
|
|
|
echo "The \"hardlink\" utility (package: hardlink) is not installed.";
|
2011-07-10 21:38:59 +02:00
|
|
|
exit 1;
|
|
|
|
fi;
|
|
|
|
|
2016-02-03 10:56:00 +01:00
|
|
|
version="2.8.28";
|
2011-07-10 21:38:59 +02:00
|
|
|
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";
|
|
|
|
|
2013-06-27 08:46:00 +02:00
|
|
|
# Remove executables, backups, cache files, non-Linux parts...
|
2011-07-10 21:38:59 +02:00
|
|
|
rm -Rf "gsoap-$version/gsoap/bin" \
|
|
|
|
"gsoap-$version/samples/link++/xmas" \
|
|
|
|
"gsoap-$version"/*.old \
|
|
|
|
"gsoap-$version/autom4te.cache";
|
2013-06-27 08:46:00 +02:00
|
|
|
find "gsoap-$version" -type d -name "*.pbxindex" -exec rm -Rf "{}" "+"
|
|
|
|
rm -Rf "gsoap-$version/gsoap/ios_plugin";
|
2011-07-10 21:38:59 +02:00
|
|
|
find "gsoap-$version" -type f "(" \
|
|
|
|
-iname "*.exe" -o -iname "*.dll" -o -name "*.o" -o \
|
2013-06-27 08:46:00 +02:00
|
|
|
-name "*~" -o -name .DS_Store ")" -delete;
|
2015-01-15 19:39:17 +01:00
|
|
|
hardlink "gsoap-$version";
|
2011-07-10 21:38:59 +02:00
|
|
|
echo Now...
|
|
|
|
find "gsoap-$version" -print0 | sort -z | \
|
|
|
|
tar -T- --null --owner=root --group=root --no-recur --use=xz \
|
|
|
|
-cvf "gsoap-$version.tar.xz";
|