78 lines
2 KiB
RPMSpec
78 lines
2 KiB
RPMSpec
Name: tzdata-java
|
|
Version: 2007k
|
|
Release: 0.3%{?dist}
|
|
# To make sure the release is smaller than one of tzdata
|
|
# so that it has precedence, increment only the seocond digit
|
|
Summary: Time zone data for Java language
|
|
|
|
Group: System Environment/Base
|
|
License: Public Domain
|
|
# The compiler is GPLv2
|
|
URL: ftp://elsie.nci.nih.gov/pub/
|
|
Source0: javazic.tar.gz
|
|
Source1: ftp://elsie.nci.nih.gov/pub/tzdata%{version}.tar.gz
|
|
Patch0: tzdata-java-2007k-chile.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
BuildRequires: java-devel >= 1.5
|
|
BuildArch: noarch
|
|
|
|
|
|
%description
|
|
Compiled time zone data files for use with Java
|
|
programming language.
|
|
|
|
%prep
|
|
# Unpack compiler files
|
|
%setup -q -c
|
|
# Unpack tzdata into subdirectory
|
|
%setup -q -D -T -b 1 -c -n %{name}-%{version}/tzdata
|
|
# Just reset the build directory name
|
|
%setup -q -D -T
|
|
|
|
%patch0 -p1 -b .chile
|
|
|
|
# Replace 'sun' with 'rht' so that namespaces won't clash
|
|
mv sun rht
|
|
find . -name "*.java" |
|
|
while read F
|
|
do
|
|
sed -r 's,sun\.(tools|util),rht.\1,g' -i $F
|
|
done
|
|
|
|
%build
|
|
# Build compiler
|
|
find rht -name "*.java" |xargs javac -source 1.5 -target 1.5
|
|
|
|
# Build zone files
|
|
mkdir javazi
|
|
java -classpath . rht.tools.javazic.Main -d javazi \
|
|
tzdata_jdk/gmt tzdata_jdk/jdk11_backward \
|
|
$(find tzdata |egrep '^tzdata/[a-z0-9]*$' |grep -v factory)
|
|
# The grep above filters out non-zone files and one that won't compile
|
|
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
install -d $RPM_BUILD_ROOT%{_datadir}
|
|
cp -a javazi $RPM_BUILD_ROOT%{_datadir}
|
|
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{_datadir}/javazi
|
|
|
|
|
|
%changelog
|
|
* Mon Apr 14 2008 Lubomir Kundrak <lkundrak@redhat.com> - 2007k-0.3
|
|
- Build noarch, also for ppc this time
|
|
|
|
* Sun Apr 06 2008 Lubomir Kundrak <lkundrak@redhat.com> - 2007k-0.2
|
|
- Temporarily build arch-dependent, so we can omit ppc
|
|
|
|
* Wed Mar 19 2008 Lubomir Kundrak <lkundrak@redhat.com> - 2007k-0.1
|
|
- Initial packaging attempt for Fedora EPEL
|