X-Git-Url: http://git.pld-linux.org/?p=packages%2Ftzdata.git;a=blobdiff_plain;f=tzdata.spec;h=10f03fe2db81d2840256f761925d234b0a4f8f4e;hp=23c93a7fe3848afdb57d55bd78491fa1f60a3360;hb=56d3337;hpb=8d9e5073d907517e184e070ee43f6142d33a5a7c diff --git a/tzdata.spec b/tzdata.spec index 23c93a7..10f03fe 100644 --- a/tzdata.spec +++ b/tzdata.spec @@ -9,8 +9,8 @@ %endif %endif -%define tzcode_ver 2011i -%define tzdata_ver 2011l +%define tzcode_ver 2016c +%define tzdata_ver 2016c Summary: Timezone data Summary(pl.UTF-8): Dane o strefach czasowych Name: tzdata @@ -26,28 +26,30 @@ Source0: %{name}-base-0.tar.bz2 # Source0-md5: e36d2f742c22f8c8dbf0686ac9769b55 # ftp://elsie.nci.nih.gov/pub/ has been shut down because of lawsuit #Source1Download: http://www.iana.org/time-zones/ -Source1: http://www.iana.org/time-zones/repository/releases/%{name}%{tzdata_ver}.tar.gz -# Source1-md5: bae1b93673e1aef80186c90dfd493f1c +Source1: ftp://ftp.iana.org/tz/releases/%{name}%{tzdata_ver}.tar.gz +# Source1-md5: 0330ccd16140d3b6438a18dae9b34b93 #Source2Download: http://www.iana.org/time-zones/ -Source2: http://www.iana.org/time-zones/repository/releases/tzcode%{tzcode_ver}.tar.gz -# Source2-md5: cf7f4335b7c8682899fa2814e711c1b2 +Source2: ftp://ftp.iana.org/tz/releases/tzcode%{tzcode_ver}.tar.gz +# Source2-md5: ffb82ab0b588138759902b4627a6a80d Source3: timezone.init Source4: timezone.sysconfig Source5: javazic.tar.gz # Source5-md5: 6a3392cd5f1594d13c12c1a836ac8d91 -Source6: timezone.upstart +Patch0: %{name}-test-update.patch Patch1: javazic-fixup.patch Patch2: install.patch URL: http://www.twinsun.com/tz/tz-link.htm BuildRequires: rpm >= 4.4.9-56 -BuildRequires: rpmbuild(macros) >= 1.300 +BuildRequires: rpmbuild(macros) >= 1.623 %if %{with java} BuildRequires: jdk BuildRequires: jpackage-utils BuildRequires: rpm-javaprov %endif -Requires(post,preun): /sbin/chkconfig +Requires(post,preun,postun): systemd-units >= 38 +Requires: /sbin/chkconfig Requires: rc-scripts >= 0.4.3.0 +Requires: systemd-units >= 38 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -104,7 +106,12 @@ Plik nagłówkowy bazy danych stref czasowych. %prep %setup -qc mv tzdata/* . +%patch0 -p1 + %{__tar} xzf %{SOURCE1} -C tzdata +# don't override Makefile from base tar +%{__mv} tzdata/Makefile{,.tzdata} + install -d tzcode %{__tar} xzf %{SOURCE2} -C tzcode %patch2 -p1 @@ -147,14 +154,14 @@ cd ../tzdata %java -classpath ../javazic/ rht.tools.javazic.Main -V %{version} \ -d ../zoneinfo/java \ africa antarctica asia australasia europe northamerica pacificnew \ - southamerica backward etcetera solar87 solar88 solar89 systemv \ + southamerica backward etcetera factory systemv \ ../javazic/tzdata_jdk/gmt ../javazic/tzdata_jdk/jdk11_backward cd .. %endif %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_mandir}/man5,%{_includedir}} +install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_mandir}/man5,%{_includedir},%{systemdunitdir}} %{__make} install %if %{with tests} @@ -167,7 +174,7 @@ install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_mandir}/man5,%{_inclu %endif # glibc.spec didn't keep it. so won't here either. -rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posix +%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posix # behave more like glibc.spec ln -sf %{_sysconfdir}/localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/localtime ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixtime @@ -182,8 +189,7 @@ cp -p tzcode/tzfile.5 $RPM_BUILD_ROOT%{_mandir}/man5 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/timezone cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/timezone -install -d $RPM_BUILD_ROOT/etc/init -cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/init/timezone.conf +ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/timezone.service %if %{with java} cp -a zoneinfo/java $RPM_BUILD_ROOT%{_datadir}/javazi @@ -201,12 +207,13 @@ if [ "$1" = "0" ]; then /sbin/chkconfig --del timezone # save for postun - cp -f /etc/localtime /etc/localtime.rpmsave + cp -af /etc/localtime /etc/localtime.rpmsave fi %postun if [ "$1" = "0" ]; then if [ ! -f /etc/localtime -a -f /etc/localtime.rpmsave ]; then + echo >&2 "Preserving /etc/localtime" mv -f /etc/localtime{.rpmsave,} fi fi @@ -229,13 +236,17 @@ if ! grep -q '^TIMEZONE=' /etc/sysconfig/timezone; then %service timezone restart fi +%triggerpostun -- tzdata < 2015f-2 +%systemd_service_disable timezone.service +%systemd_service_stop timezone.service + %files %defattr(644,root,root,755) %doc tzcode/README tzcode/Theory tzcode/tz-link.html %ghost /etc/localtime %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/timezone %attr(754,root,root) /etc/rc.d/init.d/timezone -%config(noreplace) %verify(not md5 mtime size) /etc/init/timezone.conf +%{systemdunitdir}/timezone.service %{_datadir}/zoneinfo %exclude %{_datadir}/zoneinfo/right