Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > 7d4c3134e34b18a05b41117d88dde6fa > files > 5

timezone-2015f-1.mga5.src.rpm

%define epoch	6
%define version	2015f

%define tzdata_version %{version}
%define tzcode_version 2015f

# the zic(8) and zdump(8) manpages are already in man-pages
%define build_manpages 0
%ifarch %mips %arm
%define build_java 0
%else
%define build_java 1
%endif

%define build_java8 0
%ifnarch %mips %arm
%define build_java8 1
%endif

Summary:	Timezone data
Name:		timezone
Epoch:		%{epoch}
Version:	%{version}
Release:	%mkrel 1
License:	GPL
Group:		System/Base
Source0:	ftp://ftp.iana.org/tz/releases/tzdata%{tzdata_version}.tar.gz
Source1:	ftp://ftp.iana.org/tz/releases/tzcode%{tzcode_version}.tar.gz
Source2:	javazic.tar.gz
Source4:	javazic-1.8-37392f2f5d59.tar.xz
Patch1:		tzdata-extra-tz-links.patch
Patch2:		javazic-fixup.patch
Patch3:		javazic-exclusion-fix.patch
Provides:	tzdata = %{version}-%{release}
BuildRequires:	gawk
BuildRequires:	perl

%description
This package contains data files with rules for various timezones
around the world.

%if %{build_java}
%package java
Summary:	Timezone data for Java
Group:		System/Base
Provides:	tzdata-java = %{version}-%{release}
BuildRequires:	javapackages-tools
BuildRequires:  java-devel
%if %{build_java8}
BuildRequires:	java-1.8.0-devel
%endif

%description java
This package contains timezone information for use by Java runtimes.
%endif

%prep
%setup -q -c -a 1
%patch1 -p1 -b .extra-tz-links

%if %{build_java}
mkdir javazic
tar xf %{SOURCE2} -C javazic
pushd javazic
%patch2 -p0 -b .javazic-fixup
%patch3
# Hack alert! sun.tools may be defined and installed in the
# VM. In order to guarantee that we are using IcedTea/OpenJDK
# for creating the zoneinfo files, rebase all the packages
# from "sun." to "rht.". Unfortunately, gcj does not support
# any of the -Xclasspath options, so we must go this route
# to ensure the greatest compatibility.
mv sun rht
for f in `find . -name '*.java'`; do
        sed -i -e 's:sun\.tools\.:rht.tools.:g'\
               -e 's:sun\.util\.:rht.util.:g' $f
done
popd

%if %{build_java8}
tar xf %{SOURCE4}
%endif

echo "tzdata%{tzdata_version}" >> VERSION

# Create zone.info entries for deprecated zone names (#40184)
	chmod +w zone.tab
	echo '# zone info for backward zone names' > zone.tab.new
	while read link cur old x; do
		case $link-${cur+cur}-${old+old}${x:+X} in
		Link-cur-old)
			awk -v cur="$cur" -v old="$old" \
				'!/^#/ && $3 == cur { sub(cur,old); print }' \
				zone.tab || echo ERROR ;;
		Link-*)
			echo 'Error processing backward entry for zone.tab'
			exit 1 ;;
		esac
	done < backward >> zone.tab.new
	if grep -q '^ERROR' zone.tab.new || ! cat zone.tab.new >> zone.tab; then
		echo "Error adding backward entries to zone.tab"
		exit 1
	fi
	rm -f zone.tab.new
%endif

%build

%make TZDIR=%{_datadir}/zoneinfo CFLAGS="%{optflags} -std=gnu99"

grep -v tz-art.htm tz-link.htm > tz-link.html

%if %{build_java}
FILES="africa antarctica asia australasia europe northamerica pacificnew
       southamerica backward etcetera systemv"

# Java 6/7 tzdata
pushd javazic
%{javac} -source 1.5 -target 1.5 -classpath . `find . -name \*.java`
popd
%{java} -classpath javazic/ rht.tools.javazic.Main -V %{version} \
  -d javazi \
  $FILES javazic/tzdata_jdk/gmt javazic/tzdata_jdk/jdk11_backward

%if %{build_java8}
# Java 8 tzdata
pushd javazic-1.8
%{javac} -source 1.7 -target 1.7 -classpath . `find . -name \*.java`
popd

%{java} -classpath javazic-1.8 build.tools.tzdb.TzdbZoneRulesCompiler \
    -srcdir . -dstfile tzdb.dat \
    -verbose \
    $FILES javazic-1.8/tzdata_jdk/gmt javazic-1.8/tzdata_jdk/jdk11_backward
%endif
%endif

%install
make TOPDIR=%{buildroot}/usr \
     TZDIR=%{buildroot}%{_datadir}/zoneinfo \
     ETCDIR=%{buildroot}%{_sbindir} \
     install
rm -f %{buildroot}%{_datadir}/zoneinfo-posix
ln -s . %{buildroot}%{_datadir}/zoneinfo/posix
mv %{buildroot}%{_datadir}/zoneinfo-leaps %{buildroot}%{_datadir}/zoneinfo/right

# nuke unpackaged files
rm -f %{buildroot}%{_datadir}/zoneinfo/localtime
rm -f %{buildroot}%{_sbindir}/tzselect
rm -rf %{buildroot}/usr/{lib,man}

%if %{build_java}
cp -a javazi %{buildroot}%{_datadir}/javazi
%if %{build_java8}
mkdir -p %{buildroot}%{_datadir}/javazi-1.8
install -p -m 644 tzdb.dat %{buildroot}%{_datadir}/javazi-1.8/
%endif
%endif

# install man pages
%if %{build_manpages}
mkdir -p %{buildroot}%{_mandir}/man8
for f in zic zdump; do
install -m 644 $f.8 %{buildroot}%{_mandir}/man8/
done
%endif

%triggerun -- %{name} < 6:2015a-3
# (cg) Transition to symlinked localtime file
if [ ! -L %{_sysconfdir}/localtime -a -f %{_sysconfdir}/sysconfig/clock ]; then
	# Read zone info from (now legacy sysconfig/clock)
	# (the symlink destination is now the canonical way of finding out which
	# timezone we are in)
	unset ZONE
	. %{_sysconfdir}/sysconfig/clock

	if [ -z "$ZONE" ]; then
		ZONE=UTC
	fi

	if [ -f %{_datadir}/zoneinfo/$ZONE ]; then
		ln -sf %{_datadir}/zoneinfo/$ZONE %{_sysconfdir}/localtime
	fi
fi

%files
%doc README
%doc Theory
%doc tz-link.html
%{_sbindir}/zdump
%{_sbindir}/zic
%if %{build_manpages}
%{_mandir}/man8/zdump.8*
%{_mandir}/man8/zic.8*
%endif
%dir %{_datadir}/zoneinfo
%{_datadir}/zoneinfo/*

%if %{build_java}
%files java
%{_datadir}/javazi
%if %{build_java8}
%{_datadir}/javazi-1.8
%endif
%endif


%changelog
* Wed Sep 23 2015 luigiwalser <luigiwalser> 6:2015f-1.mga5
+ Revision: 882504
- tzcode2015f
- tzdata2015f

* Mon May 04 2015 luigiwalser <luigiwalser> 6:2015d-1.mga5
+ Revision: 821242
- tzcode2015d
- tzdata2015d

* Fri Apr 17 2015 luigiwalser <luigiwalser> 6:2015c-1.mga5
+ Revision: 820377
- tzcode2015c
- tzdata2015c

* Wed Apr 08 2015 luigiwalser <luigiwalser> 6:2015b-1.mga5
+ Revision: 819928
- tzcode2015b
- tzdata2015b

* Tue Feb 10 2015 colin <colin> 6:2015a-3.mga5
+ Revision: 814526
- One-time triggered transition to symlink when sysconfig/clock exits (mga#14888)

* Tue Feb 10 2015 colin <colin> 6:2015a-2.mga5
+ Revision: 814469
- One-time transition to symlink (no need to continually update mga#14888)

  + sander85 <sander85>
    - Use symlinking instead of copying (mga#14888)

  + luigiwalser <luigiwalser>
    - tzcode2015a
    - tzdata2015a

* Thu Nov 20 2014 luigiwalser <luigiwalser> 6:2014j-1.mga5
+ Revision: 798022
- tzcode2014j
- tzdata2014j

* Fri Oct 31 2014 luigiwalser <luigiwalser> 6:2014i-1.mga5
+ Revision: 795027
- tzcode2014i
- tzdata2014i

* Wed Oct 15 2014 umeabot <umeabot> 6:2014h-2.mga5
+ Revision: 741892
- Second Mageia 5 Mass Rebuild

* Tue Oct 14 2014 luigiwalser <luigiwalser> 6:2014h-1.mga5
+ Revision: 738654
- tzcode2014h
- tzdata2014h

* Thu Oct 09 2014 luigiwalser <luigiwalser> 6:2014g-4.mga5
+ Revision: 737751
- remove things not needed when upgrading from mga4 (only when from mga3):
  - pretrans scriplet
  - conflicts with older version of timezone

* Thu Oct 09 2014 tv <tv> 6:2014g-3.mga5
+ Revision: 737744
- do not use %%pretrans when %%pre is enough;
  this add a "interp,pretrans: /bin/sh" dep which breaks installer first transaction

* Tue Sep 16 2014 umeabot <umeabot> 6:2014g-2.mga5
+ Revision: 689890
- Mageia 5 Mass Rebuild

* Sat Sep 06 2014 luigiwalser <luigiwalser> 6:2014g-1.mga5
+ Revision: 672501
- tzcode2014g
- tzdata2014g

* Sun Aug 17 2014 luigiwalser <luigiwalser> 6:2014f-1.mga5
+ Revision: 664527
- tzcode2014f
- tzdata2014f

* Tue Aug 05 2014 luigiwalser <luigiwalser> 6:2014e-2.mga5
+ Revision: 659854
- fix spec file bugs to enable java 1.8 support to build (and enable it now)

* Thu Jul 10 2014 luigiwalser <luigiwalser> 6:2014e-1.mga5
+ Revision: 651078
- tzcode2014e
- tzdata2014e
- add Java 8 support from fedora (disabled currently because it doesn't build)

* Wed Jun 11 2014 luigiwalser <luigiwalser> 6:2014d-1.mga5
+ Revision: 635603
- tzcode2014d
- tzdata2014d

* Fri May 16 2014 luigiwalser <luigiwalser> 6:2014c-1.mga5
+ Revision: 623088
- tzcode2014c
- tzdata2014c

* Sat Mar 29 2014 luigiwalser <luigiwalser> 6:2014b-1.mga5
+ Revision: 609715
- tzcode2014b
- tzdata2014b

* Sat Mar 15 2014 luigiwalser <luigiwalser> 6:2014a-1.mga5
+ Revision: 604016
- tzcode2014a
- tzdata2014a

* Thu Jan 09 2014 luigiwalser <luigiwalser> 6:2013i-2.mga4
+ Revision: 565963
- check for existence of posix link before deleting it (mga#12160)

* Sun Dec 22 2013 luigiwalser <luigiwalser> 6:2013i-1.mga4
+ Revision: 559720
- tzcode2013i
- tzdata2013i

* Thu Nov 07 2013 luigiwalser <luigiwalser> 6:2013h-1.mga4
+ Revision: 549903
- tzcode2013h
- tzdata2013h

* Mon Oct 21 2013 umeabot <umeabot> 6:2013g-2.mga4
+ Revision: 539197
- Mageia 4 Mass Rebuild

* Fri Oct 04 2013 luigiwalser <luigiwalser> 6:2013g-1.mga4
+ Revision: 491573
- tzcode2013g
- tzdata2013g

* Wed Oct 02 2013 tv <tv> 6:2013f-3.mga4
+ Revision: 490439
- fix posix symlink pointing to /usr/share, thus causing libreoffice to loop
  over /usr/share content
- readd conflict
- kill useless self conflict

* Thu Sep 26 2013 luigiwalser <luigiwalser> 6:2013f-2.mga4
+ Revision: 486921
- /usr/share/zoneinfo/posix is now a symlink, fix symlink and conflict

* Thu Sep 26 2013 luigiwalser <luigiwalser> 6:2013f-1.mga4
+ Revision: 486778
- tzcode2013f
- tzdata2013f

* Thu Jul 11 2013 oden <oden> 6:2013d-1.mga4
+ Revision: 453026
- 2013d

* Fri Apr 26 2013 luigiwalser <luigiwalser> 6:2013c-1.mga3
+ Revision: 411309
- tzcode2013c
- tzdata2013c

* Thu Mar 14 2013 luigiwalser <luigiwalser> 6:2013b-1.mga3
+ Revision: 403194
- tzcode2013b
- tzdata2013b

* Mon Jan 14 2013 umeabot <umeabot> 6:2012j-2.mga3
+ Revision: 384582
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sat Jan 05 2013 luigiwalser <luigiwalser> 6:2012j-1.mga3
+ Revision: 338915
- tzcode2012j
- tzdata2012j

* Wed Oct 24 2012 luigiwalser <luigiwalser> 6:2012g-1.mga3
+ Revision: 309653
- tzcode2012f
- tzdata2012f
- adapt to new Makefile (based on fedora)

* Mon Sep 17 2012 luigiwalser <luigiwalser> 6:2012f-1.mga3
+ Revision: 295474
- tzcode2012f
- tzdata2012f

* Sat Sep 01 2012 luigiwalser <luigiwalser> 6:2012e-1.mga3
+ Revision: 287052
- tzcode2012e
- tzdata2012e
- update tzdata-base-0.tar.bz2 (from fedora)
- update source URLs (from opensuse)
- add hack to make version.h

* Sun Apr 15 2012 luigiwalser <luigiwalser> 6:2012c-1.mga2
+ Revision: 230826
- tzcode2012b
- tzdata2012c

* Sun Feb 26 2012 luigiwalser <luigiwalser> 6:2011n-3.mga2
+ Revision: 215055
- fix release to be newer than mga1

* Sun Dec 25 2011 gil <gil> 6:2011n-0.mga2
+ Revision: 187530
- tzdata 2011n

* Tue Nov 01 2011 dmorgan <dmorgan> 6:2011m-0.mga2
+ Revision: 160965
- New version 2011m

* Sat Oct 22 2011 gil <gil> 6:2011l-0.mga2
+ Revision: 157440
- update to 2011l

* Tue Apr 26 2011 ahmad <ahmad> 6:2011g-1.mga1
+ Revision: 91850
- Update tzdata/tzcode to 2011g

* Wed Apr 20 2011 ahmad <ahmad> 6:2011f-1.mga1
+ Revision: 89247
- Update tzcode to 2011e
- Update tzdata to 2011f
- Rediff the extra-tz-links patch

* Sun Jan 09 2011 ahmad <ahmad> 6:2010o-1.mga1
+ Revision: 4459
- drop old conflicts and old macros
- imported package timezone