diff --git a/.gitignore b/.gitignore index 358096d..3ff268f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ mtr-0.79.tar.gz /mtr-0.83.tar.gz /mtr-0.84.tar.gz /mtr-0.85.tar.gz +/mtr-0.85.tar.xz diff --git a/generate-tarball.sh b/generate-tarball.sh new file mode 100755 index 0000000..76df58c --- /dev/null +++ b/generate-tarball.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env sh + +name="mtr" +version=$(grep -e '\s*Version\s*:' $name.spec | head -n 1 | sed -e 's/Version:\s*\(.*\)/\1/') +repo="ftp://ftp.bitwizard.nl/mtr/" + +if [ -z $version ]; then + echo "err: couldn't determine version of mtr, spec file must be present in the current directory?" + exit 1 +fi + +rm -rf $name-$version{,.tar.gz,.tar.xz} + +curl -s -O $repo$name-$version.tar.gz >/dev/null 2>&1 + +if [ $? != 0 ]; then + echo "err: couldn't get upstream tarball" + exit 1 +fi + +tar -xzf $name-$version.tar.gz >/dev/null 2>&1 + +rm -f $name-$version.tar.gz + +if [ $? != 0 ]; then + echo "err: couldn't extract archive" + exit 1 +fi + +find $name-$version -type f -name '*.o' -delete + +tar -cJf $name-$version.tar.xz $name-$version diff --git a/mtr.spec b/mtr.spec index 79f8de7..6750248 100644 --- a/mtr.spec +++ b/mtr.spec @@ -1,15 +1,17 @@ Summary: A network diagnostic tool Name: mtr Version: 0.85 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 Group: Applications/Internet License: GPLv2+ URL: http://www.BitWizard.nl/mtr -Source: ftp://ftp.bitwizard.nl/mtr/%{name}-%{version}.tar.gz +Source: %{name}-%{version}.tar.xz Source1: xmtr.consolehelper Source2: xmtr.pam Source3: net-x%{name}.desktop +# script will remove all object files from upstream tarball +Source4: generate-tarball.sh Patch1: mtr-crash-in-xml-mode.patch Patch2: mtr-xml-format-fixes.patch @@ -95,6 +97,9 @@ desktop-file-install \ %{_datadir}/pixmaps/mtr_icon.xpm %changelog +* Mon Aug 05 2013 Michal Sekletar - 2:0.85-2 +- add generate-tarball.sh script + * Sun Aug 04 2013 Michal Sekletar - 2:0.85-1 - update to 0.85 - fix bogus dates in changelog diff --git a/sources b/sources index 51223d6..5e4017f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6bc6d1cf1532e32510911d32b69c8851 mtr-0.85.tar.gz +14fd16f69514c70ff646c529794f5d98 mtr-0.85.tar.xz