X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=tzdata.spec;h=9d257b4e9f9a779a308c78adc967c74303c6e77c;hb=050dc002c2f7fcfb916d37e5a4641cc04dc55fe3;hp=06f33ba69953eaf488c6bba0ee390142844b733b;hpb=8f9d9e0a7f10165cb4362ffa1bbe0ae531e8be1f;p=packages%2Ftzdata.git diff --git a/tzdata.spec b/tzdata.spec index 06f33ba..9d257b4 100644 --- a/tzdata.spec +++ b/tzdata.spec @@ -9,33 +9,20 @@ %endif %endif -%define tzcode_ver 2018i -%define tzdata_ver 2018i Summary: Timezone data Summary(pl.UTF-8): Dane o strefach czasowych Name: tzdata -Version: %{tzdata_ver} +Version: 2020d 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 -# a test suite. It is occasionally updated from glibc sources, and as -# such is under LGPL v2+, but none of this ever gets to be part of -# final zoneinfo files. -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: ftp://ftp.iana.org/tz/releases/%{name}%{tzdata_ver}.tar.gz -# Source1-md5: b3f0a1a789480a036e58466cd0702477 -#Source2Download: http://www.iana.org/time-zones/ -Source2: ftp://ftp.iana.org/tz/releases/tzcode%{tzcode_ver}.tar.gz -# Source2-md5: 6a6d98be8fa2fa3485e25343e79188b4 +#Source0Download: https://www.iana.org/time-zones +Source0: https://www.iana.org/time-zones/repository/releases/tzdb-%{version}.tar.lz +# Source0-md5: 06e1ef95398506c87d3224abfc6f59ff Source3: timezone.init Source4: timezone.sysconfig Source5: javazic.tar.gz # Source5-md5: 6a3392cd5f1594d13c12c1a836ac8d91 -Patch0: %{name}-test-update.patch Patch1: javazic-fixup.patch Patch2: install.patch URL: http://www.twinsun.com/tz/tz-link.htm @@ -116,25 +103,9 @@ Header file for timezone database. Plik nagłówkowy bazy danych stref czasowych. %prep -%setup -qc -mv tzdata/* . -%patch0 -p1 +%setup -qn tzdb-%{version} -%{__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 - -%{__sed} -e " -s|@objpfx@|`pwd`/obj/| -s|@datadir@|%{_datadir}| -s|@install_root@|$RPM_BUILD_ROOT| -" 'Makeconfig.in' > Makeconfig - -sed -i -e '/tz-art.html/d' tzcode/tz-link.html +sed -i -e '/tz-art.html/d' tz-link.html %if %{with java} install -d javazic @@ -157,24 +128,43 @@ cd - %endif %build -%{__make} +%{__make} \ + CFLAGS="%{rpmcflags}" \ + LDFLAGS="%{rpmldflags}" \ + cc="%{__cc}" %if %{with java} cd javazic %javac -source 1.5 -target 1.5 -classpath . $(find -name '*.java') -cd ../tzdata -%java -classpath ../javazic/ rht.tools.javazic.Main -V %{version} \ - -d ../zoneinfo/java \ - africa antarctica asia australasia europe northamerica pacificnew \ - southamerica backward etcetera factory systemv \ - ../javazic/tzdata_jdk/gmt ../javazic/tzdata_jdk/jdk11_backward cd .. + +%java -classpath javazic/ rht.tools.javazic.Main -V %{version} \ + -d zoneinfo/java \ + africa antarctica asia australasia europe northamerica \ + southamerica backward etcetera factory \ + javazic/tzdata_jdk/gmt javazic/tzdata_jdk/jdk11_backward %endif %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_mandir}/man5,%{_includedir},%{systemdunitdir}} -%{__make} install +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +rm $RPM_BUILD_ROOT%{_bindir}/tzselect +rm $RPM_BUILD_ROOT%{_bindir}/zdump +rm $RPM_BUILD_ROOT%{_sbindir}/zic +rm $RPM_BUILD_ROOT%{_mandir}/man3/newctime.3* +rm $RPM_BUILD_ROOT%{_mandir}/man3/newtzset.3* +rm $RPM_BUILD_ROOT%{_mandir}/man8/tzselect.8* +rm $RPM_BUILD_ROOT%{_mandir}/man8/zdump.8* +rm $RPM_BUILD_ROOT%{_mandir}/man8/zic.8* +rm $RPM_BUILD_ROOT%{_prefix}/lib/libtz.a +rm $RPM_BUILD_ROOT%{_datadir}/zoneinfo-posix +rm $RPM_BUILD_ROOT%{_datadir}/zoneinfo/leapseconds +rm $RPM_BUILD_ROOT%{_datadir}/zoneinfo/tzdata.zi +rm $RPM_BUILD_ROOT%{_datadir}/zoneinfo/zone1970.tab +mv $RPM_BUILD_ROOT%{_datadir}/zoneinfo-leaps $RPM_BUILD_ROOT%{_datadir}/zoneinfo/right %if %{with tests} # test needs to be ran after "make install", as it uses installed files @@ -185,8 +175,6 @@ install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_mandir}/man5,%{_inclu : ====================TESTING END===================== %endif -# glibc.spec didn't keep it. so won't here either. -%{__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 @@ -195,12 +183,11 @@ ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixrules > $RPM_BUILD_ROOT/etc/localtime # header file -cp -p tzcode/tzfile.h $RPM_BUILD_ROOT%{_includedir}/tzfile.h -cp -p tzcode/tzfile.5 $RPM_BUILD_ROOT%{_mandir}/man5 +cp -p tzfile.h $RPM_BUILD_ROOT%{_includedir}/tzfile.h +cp -p 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 - ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/timezone.service %if %{with java} @@ -257,7 +244,7 @@ fi %files %defattr(644,root,root,755) -%doc tzcode/README tzcode/tz-link.html +%doc README 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 @@ -286,6 +273,6 @@ fi %files devel %defattr(644,root,root,755) -%doc tzcode/tzfile.5.txt +%doc tzfile.5.txt %{_includedir}/tzfile.h %{_mandir}/man5/tzfile.5*