Repack the tarball without binaries

This commit is contained in:
Michael Simacek 2018-07-30 20:41:45 +02:00
parent 8eb90452c6
commit ebaf1ede54
4 changed files with 33 additions and 7 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
bsh-1.3.0-src.tar.bz2 bsh-1.3.0-src.tar.bz2
/2.0b6.tar.gz /2.0b6.tar.gz
/bsh-2.0-b6.tar.gz

View File

@ -33,7 +33,7 @@
Name: bsh Name: bsh
Version: 2.0 Version: 2.0
Release: 10.%{reltag}%{?dist} Release: 11.%{reltag}%{?dist}
Epoch: 0 Epoch: 0
Summary: Lightweight Scripting for Java Summary: Lightweight Scripting for Java
URL: http://www.beanshell.org/ URL: http://www.beanshell.org/
@ -41,8 +41,11 @@ URL: http://www.beanshell.org/
# bsf/src/bsh/util/BeanShellBSFEngine.java is public-domain # bsf/src/bsh/util/BeanShellBSFEngine.java is public-domain
License: ASL 2.0 and BSD and Public Domain License: ASL 2.0 and BSD and Public Domain
BuildArch: noarch BuildArch: noarch
Source0: https://github.com/beanshell/beanshell/archive/%{version}%{reltag}.tar.gz # ./generate-tarball.sh
Source0: %{name}-%{version}-%{reltag}.tar.gz
Source1: %{name}-desktop.desktop Source1: %{name}-desktop.desktop
# Remove bundled jars which cannot be easily verified for licensing
Source2: generate-tarball.sh
BuildRequires: javapackages-local BuildRequires: javapackages-local
BuildRequires: ant BuildRequires: ant
@ -102,10 +105,6 @@ This package provides %{summary}.
%prep %prep
%setup -q -n beanshell-%{version}%{reltag} %setup -q -n beanshell-%{version}%{reltag}
rm -r lib
find -name '*.jar' -delete
find -name '*.class' -delete
# those are now included in JDK itself # those are now included in JDK itself
rm -r engine/javax-src rm -r engine/javax-src
@ -169,6 +168,9 @@ cat scripts/bshdoc.bsh >> %{buildroot}%{_bindir}/bshdoc
%license LICENSE NOTICE %license LICENSE NOTICE
%changelog %changelog
* Mon Jul 30 2018 Michael Simacek <msimacek@redhat.com> - 0:2.0-11.b6
- Repack the tarball without binaries
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0-10.b6 * Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0-10.b6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

23
generate-tarball.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
name=bsh
version="$(sed -n 's/Version:\s*//p' *.spec)"
reltag="$(sed -n 's/%global\s*reltag\s*//p' *.spec)"
# RETRIEVE
wget "https://github.com/beanshell/beanshell/archive/${version}${reltag}.tar.gz" -O "${name}-${version}-${reltag}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
cd tarball-tmp
tar xf "../${name}-${version}-${reltag}.orig.tar.gz"
# CLEAN TARBALL
rm -r */lib
find -name '*.jar' -delete
find -name '*.class' -delete
tar cf "../${name}-${version}-${reltag}.tar.gz" *
cd ..
rm -r tarball-tmp "${name}-${version}-${reltag}.orig.tar.gz"

View File

@ -1 +1 @@
b2cc737a850d49c2eb94567de33135cc 2.0b6.tar.gz SHA512 (bsh-2.0-b6.tar.gz) = ac65c24fefc9bd46b821b6292f9db35766fc1ad46091baac96c77f131950e6605dee9bf80d9faf1488fd837a0bccab31c466040474805f2bb4b1839acfd2148c