Repack the tarball without binaries

This commit is contained in:
Michael Simacek 2018-07-24 15:36:48 +02:00
parent 26b42ab4b8
commit 0f47217938
4 changed files with 36 additions and 4 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
antlr-2.7.7.tar.gz antlr-2.7.7.tar.gz
/antlr-2.7.7.pom

View File

@ -7,14 +7,17 @@
Summary: ANother Tool for Language Recognition Summary: ANother Tool for Language Recognition
Name: antlr Name: antlr
Version: 2.7.7 Version: 2.7.7
Release: 54%{?dist} Release: 55%{?dist}
Epoch: 0 Epoch: 0
License: ANTLR-PD License: ANTLR-PD
URL: http://www.antlr2.org/ URL: http://www.antlr2.org/
Source0: http://www.antlr2.org/download/antlr-%{version}.tar.gz # ./generate-tarball.sh
Source0: antlr-%{version}.tar.gz
Source1: %{name}-build.xml Source1: %{name}-build.xml
Source2: %{name}-script Source2: %{name}-script
Source3: http://repo2.maven.org/maven2/antlr/antlr/%{version}/%{name}-%{version}.pom Source3: http://repo2.maven.org/maven2/antlr/antlr/%{version}/%{name}-%{version}.pom
# Repack the tarball without prebuilt binaries of unknown origin
Source4: generate-tarball.sh
Patch1: %{name}-%{version}-newgcc.patch Patch1: %{name}-%{version}-newgcc.patch
# see BZ#848662 # see BZ#848662
Patch2: antlr-examples-license.patch Patch2: antlr-examples-license.patch
@ -204,6 +207,9 @@ cd ../..
%endif %endif
%changelog %changelog
* Tue Jul 24 2018 Michael Simacek <msimacek@redhat.com> - 0:2.7.7-55
- Repack the tarball without binaries
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.7.7-54 * Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.7.7-54
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

25
generate-tarball.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
set -e
name=antlr
version="$(sed -n 's/Version:\s*//p' *.spec)"
# RETRIEVE
wget "http://www.antlr2.org/download/antlr-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
cd tarball-tmp
tar xf "../${name}-${version}.orig.tar.gz"
# CLEAN TARBALL
# contain questionable things, such as csflex.exe
find -name '*.jar' -delete
find -name '*.class' -delete
find -name '*.exe' -delete
find -name '*.dll' -delete
find -name '*.so' -delete
tar cf "../${name}-${version}.tar.gz" *
cd ..
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"

View File

@ -1,2 +1,2 @@
01cc9a2a454dd33dcd8c856ec89af090 antlr-2.7.7.tar.gz SHA512 (antlr-2.7.7.tar.gz) = 7e05d440513663dab1960974ac61694552583bdd20d6eac2bff27f5142b118a26022d910b44312cdac9164b087c7cd4d1c8325e1ec914f9704b3cdd5f4b2b166
78af3de823003f6d8dded39c70bc30ae antlr-2.7.7.pom SHA512 (antlr-2.7.7.pom) = 4a34de18bee216852f43efddcd3bced1708548ebff7372b4ec4ecb6c289b36190b4d0d5588b86f9b65b3bc64756290b66bf1d6d9ed49d0cb8b972921829cba9e