Fix brp-java-repack-jars to work with builddirs that aren't %name-%version
This commit is contained in:
parent
83a5b2cc39
commit
de9ce505bb
@ -42,15 +42,22 @@ if [ ! -z "$JARS" ]; then
|
|||||||
|
|
||||||
# Get the modtime from the newest ChangeLog. If the project
|
# Get the modtime from the newest ChangeLog. If the project
|
||||||
# doesn't have a ChangeLog, Jan 1, 1970 will be used.
|
# doesn't have a ChangeLog, Jan 1, 1970 will be used.
|
||||||
CHANGELOGS=`find $RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION -type f -name ChangeLog`
|
|
||||||
DATE="1970-01-01 UTC"
|
DATE="1970-01-01 UTC"
|
||||||
if [ ! -z "$CHANGELOGS" ]; then
|
|
||||||
for c in $CHANGELOGS; do
|
if [ -z $_PACKAGE_BUILD_DIR ]; then
|
||||||
TMPDATE=`stat -c %y $c | cut -d " " -f 1-2`
|
_PACKAGE_BUILD_DIR=$RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION
|
||||||
if [ `date --date="$TMPDATE" +%s` -gt `date --date="$DATE" +%s` ]; then
|
fi
|
||||||
DATE="$TMPDATE"
|
|
||||||
fi
|
if [ -d $_PACKAGE_BUILD_DIR ]; then
|
||||||
done
|
CHANGELOGS=`find $_PACKAGE_BUILD_DIR -type f -name ChangeLog`
|
||||||
|
if [ ! -z "$CHANGELOGS" ]; then
|
||||||
|
for c in $CHANGELOGS; do
|
||||||
|
TMPDATE=`stat -c %y $c | cut -d " " -f 1-2`
|
||||||
|
if [ `date --date="$TMPDATE" +%s` -gt `date --date="$DATE" +%s` ]; then
|
||||||
|
DATE="$TMPDATE"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# move the contents over to the a new directory in order and set
|
# move the contents over to the a new directory in order and set
|
||||||
@ -66,7 +73,13 @@ if [ ! -z "$JARS" ]; then
|
|||||||
|
|
||||||
# make the jar
|
# make the jar
|
||||||
pushd $JARDIR > /dev/null
|
pushd $JARDIR > /dev/null
|
||||||
find . -type f -print | LC_ALL=C sort | /usr/bin/zip -q -X -9 $j -@
|
|
||||||
|
if [ -n "`find -type f`" ]; then
|
||||||
|
find -type f -print | LC_ALL=C sort | /usr/bin/zip -q -X -9 $j -@
|
||||||
|
else
|
||||||
|
# Put the empty jar back
|
||||||
|
touch $j
|
||||||
|
fi
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Red Hat specific rpm configuration files.
|
Summary: Red Hat specific rpm configuration files.
|
||||||
Name: redhat-rpm-config
|
Name: redhat-rpm-config
|
||||||
Version: 8.0.45
|
Version: 8.0.45
|
||||||
Release: 5
|
Release: 6
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Development/System
|
Group: Development/System
|
||||||
Source: redhat-rpm-config-%{version}.tar.gz
|
Source: redhat-rpm-config-%{version}.tar.gz
|
||||||
@ -40,6 +40,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{_prefix}/lib/rpm/redhat
|
%{_prefix}/lib/rpm/redhat
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 12 2006 Deepak Bhole <dbhole@redhat.com> 8.0.45-6
|
||||||
|
- Fix brp-java-repack-jars to work with builddirs that aren't %name-%version
|
||||||
|
|
||||||
* Mon Sep 11 2006 Fernando Nasser <fnasser@redhat.com> - 8.0.45-5
|
* Mon Sep 11 2006 Fernando Nasser <fnasser@redhat.com> - 8.0.45-5
|
||||||
- Fix order of tokens in find command (thanks mikeb@redhat.com)
|
- Fix order of tokens in find command (thanks mikeb@redhat.com)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user