]> git.pld-linux.org Git - packages/tzdata.git/blobdiff - tzdata.spec
- ftp urls for pldnotify
[packages/tzdata.git] / tzdata.spec
index ddf2c412ccdfcbec46ced1b3dd18de1cef55575f..468b1a0127ee8be733758e9b6211ed865b0bbf3a 100644 (file)
@@ -9,13 +9,13 @@
 %endif
 %endif
 
-%define                tzcode_ver      2011g
-%define                tzdata_ver      2011g
+%define                tzcode_ver      2012b
+%define                tzdata_ver      2012c
 Summary:       Timezone data
 Summary(pl.UTF-8):     Dane o strefach czasowych
 Name:          tzdata
 Version:       %{tzdata_ver}
-Release:       2
+Release:       1
 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
@@ -24,27 +24,34 @@ Group:              Base
 # final zoneinfo files.
 Source0:       %{name}-base-0.tar.bz2
 # Source0-md5: e36d2f742c22f8c8dbf0686ac9769b55
-Source1:       ftp://elsie.nci.nih.gov/pub/%{name}%{tzdata_ver}.tar.gz
-# Source1-md5: a068c27e7e426fdb12ab0c88506df20d
-Source2:       ftp://elsie.nci.nih.gov/pub/tzcode%{tzcode_ver}.tar.gz
-# Source2-md5: ecb564279b28c5b184421c525d997d6c
+# 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: cfdc2710bd05c26dbd624441d57028f6
+#Source2Download: http://www.iana.org/time-zones/
+Source2:       ftp://ftp.iana.org/tz/releases/tzcode%{tzcode_ver}.tar.gz
+# Source2-md5: 6137322ffd36e1fd5128885be1c57008
 Source3:       timezone.init
 Source4:       timezone.sysconfig
 Source5:       javazic.tar.gz
 # Source5-md5: 6a3392cd5f1594d13c12c1a836ac8d91
 Source6:       timezone.upstart
+Source7:       timezone.service
+Source8:       timezone.sh
 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.1.4
+Requires:      rc-scripts >= 0.4.3.0
+Requires:      systemd-units >= 38
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -102,10 +109,11 @@ Plik nagłówkowy bazy danych stref czasowych.
 %setup -qc
 mv tzdata/* .
 %{__tar} xzf %{SOURCE1} -C tzdata
-mkdir tzcode
+install -d tzcode
 %{__tar} xzf %{SOURCE2} -C tzcode
+%patch2 -p1
 
-sed -e "
+%{__sed} -e "
 s|@objpfx@|`pwd`/obj/|
 s|@datadir@|%{_datadir}|
 s|@install_root@|$RPM_BUILD_ROOT|
@@ -150,7 +158,7 @@ cd ..
 
 %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}
@@ -172,15 +180,18 @@ ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixrules
 > $RPM_BUILD_ROOT/etc/localtime
 
 # header file
-cp -a tzcode/tzfile.h $RPM_BUILD_ROOT%{_includedir}/tzfile.h
-cp -a tzcode/tzfile.5 $RPM_BUILD_ROOT%{_mandir}/man5
+cp -p tzcode/tzfile.h $RPM_BUILD_ROOT%{_includedir}/tzfile.h
+cp -p tzcode/tzfile.5 $RPM_BUILD_ROOT%{_mandir}/man5
 
 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/timezone
-cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/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
+
 %if %{with java}
 cp -a zoneinfo/java $RPM_BUILD_ROOT%{_datadir}/javazi
 %endif
@@ -191,21 +202,25 @@ 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 -f /etc/localtime /etc/localtime.rpmsave
+       cp -af /etc/localtime /etc/localtime.rpmsave
 fi
+%systemd_preun timezone.service
 
 %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
+%systemd_reload
 
 %triggerpostun -- rc-scripts < 0.4.1.4
 /sbin/chkconfig --add timezone
@@ -225,6 +240,9 @@ if ! grep -q '^TIMEZONE=' /etc/sysconfig/timezone; then
        %service timezone restart
 fi
 
+%triggerpostun -- tzdata < 2012a-2
+%systemd_trigger timezone.service
+
 %files
 %defattr(644,root,root,755)
 %doc tzcode/README tzcode/Theory tzcode/tz-link.html
@@ -232,6 +250,8 @@ fi
 %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
This page took 0.120437 seconds and 4 git commands to generate.