Remove bundled code from SRPM (rhbz#991356)
This commit is contained in:
parent
3669b6adb2
commit
a3ce466ca7
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ jna-3.2.7.tar.bz2
|
||||
/jna-4.0.tar.gz
|
||||
/jna-4.0.0.tar.gz
|
||||
/jna-4.1.0.tar.gz
|
||||
/jna-4.1.0-clean.tar.xz
|
||||
|
28
generate-tarball.sh
Executable file
28
generate-tarball.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
version=`grep Version: *spec | sed -e 's/Version:\s*\(.*\)/\1/'`
|
||||
|
||||
|
||||
wget https://github.com/twall/jna/tarball/${version} -O jna-${version}.tar.gz
|
||||
rm -rf jna-${version}
|
||||
tar xf jna-${version}.tar.gz
|
||||
mv twall-jna-* jna-${version}
|
||||
# remove bundled things with unknown licensing
|
||||
rm -rvf jna-${version}/{dist/*,www,native/libffi}
|
||||
# jars in lib/native subdir need to be present in tarball so
|
||||
# that final jar can be built. They can be empty and then have no
|
||||
# effect on resulting jar. One jar (depending on architecture) will
|
||||
# be replaced with full content (containing libjnidispatch.so)
|
||||
for njar in jna-${version}/lib/native/*.jar; do
|
||||
rm -v $njar
|
||||
touch empty
|
||||
jar cf $njar empty
|
||||
rm -f empty
|
||||
done
|
||||
|
||||
find jna-${version} -iname '*jar' -size +1b -delete
|
||||
find jna-${version} -name '*.class' -delete
|
||||
|
||||
tar cf jna-${version}-clean.tar jna-${version}
|
||||
xz -9 jna-${version}-clean.tar
|
21
jna.spec
21
jna.spec
@ -7,15 +7,10 @@ Summary: Pure Java access to native libraries
|
||||
# which is pure Apache License 2.0.
|
||||
License: (LGPLv2 or ASL 2.0) and ASL 2.0
|
||||
URL: https://github.com/twall/jna
|
||||
# The source for this package was pulled from upstream's vcs. Use the
|
||||
# following commands to generate the tarball:
|
||||
# https://github.com/twall/jna/tarball/%{version}
|
||||
# tar xzf twall-jna-%{version}*.tar.gz
|
||||
# mv twall-jna-* jna-%{version}
|
||||
# rm -rf jna-%{version}/{dist/*,www}
|
||||
# tar cjf ~/rpm/SOURCES/jna-%{version}.tar.gz jna-%{version}
|
||||
Source0: https://github.com/twall/jna/archive/%{name}-%{version}.tar.gz
|
||||
Source1: package-list
|
||||
# ./generate-tarball.sh
|
||||
Source0: %{name}-%{version}-clean.tar.xz
|
||||
Source1: package-list
|
||||
Source2: generate-tarball.sh
|
||||
Patch0: jna-3.5.0-build.patch
|
||||
# This patch is Fedora-specific for now until we get the huge
|
||||
# JNI library location mess sorted upstream
|
||||
@ -82,14 +77,6 @@ chmod -Rf a+rX,u+w,g-w,o-w .
|
||||
%patch6 -p1 -b .ffi
|
||||
%patch7 -p1
|
||||
|
||||
# all java binaries must be removed from the sources
|
||||
#find . -name '*.jar' -delete
|
||||
rm lib/junit.jar
|
||||
find . -name '*.class' -delete
|
||||
|
||||
# remove internal copy of libffi
|
||||
rm -rf native/libffi
|
||||
|
||||
# clean LICENSE.txt
|
||||
sed -i 's/\r//' LICENSE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user