]> git.pld-linux.org Git - packages/tzdata.git/blobdiff - tzdata.spec
do not own tzdata dir by two packages; refs 2141fdb
[packages/tzdata.git] / tzdata.spec
index ec14b75a38ae38b25eea2d30d2b6993089f7173d..9a252e3e6accbfe976a9bac25747b2dd8f5fd9c0 100644 (file)
@@ -9,13 +9,13 @@
 %endif
 %endif
 
-%define                tzcode_ver      2012h
-%define                tzdata_ver      2012h
+%define                tzcode_ver      2017c
+%define                tzdata_ver      2017c
 Summary:       Timezone data
 Summary(pl.UTF-8):     Dane o strefach czasowych
 Name:          tzdata
 Version:       %{tzdata_ver}
-Release:       1
+Release:       2
 License:       Public Domain (database), BSD/LGPL v2.1+ (code/test suite)
 Group:         Base
 # The tzdata-base-0.tar.bz2 is a simple building infrastructure and
@@ -27,17 +27,15 @@ Source0:    %{name}-base-0.tar.bz2
 # ftp://elsie.nci.nih.gov/pub/ has been shut down because of lawsuit
 #Source1Download: http://www.iana.org/time-zones/
 Source1:       ftp://ftp.iana.org/tz/releases/%{name}%{tzdata_ver}.tar.gz
-# Source1-md5: b937335e087fb85b7f8e3ce33e69184b
+# Source1-md5: 1e751e7e08f8b68530674f04619d894d
 #Source2Download: http://www.iana.org/time-zones/
 Source2:       ftp://ftp.iana.org/tz/releases/tzcode%{tzcode_ver}.tar.gz
-# Source2-md5: 44b3b6c3e50240ac44f16437040a7ba2
+# Source2-md5: 2fe6986231db5182c61d565021a0cd7b
 Source3:       timezone.init
 Source4:       timezone.sysconfig
 Source5:       javazic.tar.gz
 # Source5-md5: 6a3392cd5f1594d13c12c1a836ac8d91
-Source6:       timezone.upstart
-Source7:       timezone.service
-Source8:       timezone.sh
+Patch0:                %{name}-test-update.patch
 Patch1:                javazic-fixup.patch
 Patch2:                install.patch
 URL:           http://www.twinsun.com/tz/tz-link.htm
@@ -49,6 +47,7 @@ BuildRequires:        jpackage-utils
 BuildRequires: rpm-javaprov
 %endif
 Requires(post,preun,postun):   systemd-units >= 38
+Requires:      %{name}-zoneinfo = %{version}-%{release}
 Requires:      /sbin/chkconfig
 Requires:      rc-scripts >= 0.4.3.0
 Requires:      systemd-units >= 38
@@ -75,11 +74,22 @@ This package contains timezone information for use by Java runtimes.
 Ten pakiet zawiera informacje o strefach czasowych przeznaczone dla
 programów w Javie.
 
+%package zoneinfo
+Summary:       Timezone data
+Summary(pl.UTF-8):     Dane stref czasowych
+Group:         Base
+
+%description zoneinfo
+Timezone data.
+
+%description zoneinfo -l pl.UTF-8
+Dane stref czasowych.
+
 %package zoneinfo_right
 Summary:       Non-POSIX (real) time zones
 Summary(es.UTF-8):     Zonas de tiempo reales (no de POSIX)
 Summary(pl.UTF-8):     Nie-POSIX-owe (prawdziwe) strefy czasowe
-Group:         Libraries
+Group:         Base
 Obsoletes:     glibc-zoneinfo_right
 
 %description zoneinfo_right
@@ -108,9 +118,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}
+%{__mv} tzdata/Makefile{,.tzdata}
+
 install -d tzcode
 %{__tar} xzf %{SOURCE2} -C tzcode
 %patch2 -p1
@@ -153,7 +166,7 @@ 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
@@ -188,11 +201,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
-
-install -p %{SOURCE7} $RPM_BUILD_ROOT%{systemdunitdir}/timezone.service
-install -p %{SOURCE8} $RPM_BUILD_ROOT/lib/systemd/pld-timezone
+ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/timezone.service
 
 %if %{with java}
 cp -a zoneinfo/java $RPM_BUILD_ROOT%{_datadir}/javazi
@@ -204,16 +213,17 @@ rm -rf $RPM_BUILD_ROOT
 %post
 /sbin/chkconfig --add timezone
 %service timezone restart
-%systemd_post timezone.service
 
 %preun
 if [ "$1" = "0" ]; then
        /sbin/chkconfig --del timezone
 
        # save for postun
-       cp -af /etc/localtime /etc/localtime.rpmsave
+       localtime=$(readlink -f /etc/localtime)
+       # cp has no dereference target option, so remove link first
+       test -L /etc/localtime.rpmsave && rm -f /etc/localtime.rpmsave
+       cp -pf $localtime /etc/localtime.rpmsave
 fi
-%systemd_preun timezone.service
 
 %postun
 if [ "$1" = "0" ]; then
@@ -222,7 +232,6 @@ if [ "$1" = "0" ]; then
                mv -f /etc/localtime{.rpmsave,}
        fi
 fi
-%systemd_reload
 
 %triggerpostun -- rc-scripts < 0.4.1.4
 /sbin/chkconfig --add timezone
@@ -242,21 +251,20 @@ if ! grep -q '^TIMEZONE=' /etc/sysconfig/timezone; then
        %service timezone restart
 fi
 
-%triggerpostun -- tzdata < 2012a-2
-%systemd_trigger timezone.service
+%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
+%doc tzcode/README 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
-%attr(755,root,root) /lib/systemd/pld-timezone
-
-%{_datadir}/zoneinfo
-%exclude %{_datadir}/zoneinfo/right
+%{_datadir}/zoneinfo/localtime
+%{_datadir}/zoneinfo/posixrules
+%{_datadir}/zoneinfo/posixtime
 
 %if %{with java}
 %files -n java-tzdata
@@ -264,6 +272,14 @@ fi
 %{_datadir}/javazi
 %endif
 
+%files zoneinfo
+%defattr(644,root,root,755)
+%{_datadir}/zoneinfo
+%exclude %{_datadir}/zoneinfo/right
+%exclude %{_datadir}/zoneinfo/localtime
+%exclude %{_datadir}/zoneinfo/posixrules
+%exclude %{_datadir}/zoneinfo/posixtime
+
 %files zoneinfo_right
 %defattr(644,root,root,755)
 %{_datadir}/zoneinfo/right
This page took 0.058742 seconds and 4 git commands to generate.