From: Elan Ruusamäe Date: Sun, 25 Feb 2007 01:07:24 +0000 (+0000) Subject: - timezone initscript moved here; rel 2 X-Git-Tag: auto/th/tzdata-2007c-1~1 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;h=48f17b2ccf49744afa4d5c780a8160bf12d0c281;p=packages%2Ftzdata.git - timezone initscript moved here; rel 2 Changed files: tzdata.spec -> 1.19 --- diff --git a/tzdata.spec b/tzdata.spec index 1856684..81e8df2 100644 --- a/tzdata.spec +++ b/tzdata.spec @@ -2,7 +2,7 @@ Summary: Timezone data Summary(pl.UTF-8): Dane o strefach czasowych Name: tzdata Version: 2007b -Release: 1 +Release: 2 License: GPL Group: Base Source0: %{name}-base-0.tar.bz2 @@ -11,8 +11,13 @@ Source1: ftp://elsie.nci.nih.gov/pub/%{name}%{version}.tar.gz # Source1-md5: 2b624fbf9e819dcbd8bb0246ab05370c Source2: ftp://elsie.nci.nih.gov/pub/tzcode%{version}.tar.gz # Source2-md5: cdcf902ff81f5a4d787ef73390d1d7ca +Source3: timezone.init +Source4: timezone.sysconfig BuildRequires: gawk BuildRequires: perl-base +BuildRequires: rpmbuild(macros) >= 1.228 +Requires(post,preun): /sbin/chkconfig +Requires: rc-scripts >= 0.4.1.4 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -63,15 +68,16 @@ grep -v tz-art.htm tzcode%{version}/tz-link.htm > tzcode%{version}/tz-link.html %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/etc/ +install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d} %{__make} install -echo ====================TESTING========================= +: ====================TESTING========================= %{__make} check \ CC="%{__cc}" \ CFLAGS="%{rpmcflags} %{rpmldflags}" -echo ====================TESTING END===================== +: ====================TESTING END===================== + # glibc.spec didn't keep it. so won't here either. rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posix @@ -82,13 +88,27 @@ ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixrules > $RPM_BUILD_ROOT/etc/localtime +install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/timezone +cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/timezone + %clean rm -rf $RPM_BUILD_ROOT +%post +/sbin/chkconfig --add timezone +%service timezone restart + +%preun +if [ "$1" = "0" ]; then + /sbin/chkconfig --del timezone +fi + %files %defattr(644,root,root,755) %doc tzcode%{version}/README tzcode%{version}/Theory tzcode%{version}/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 %{_datadir}/zoneinfo %exclude %{_datadir}/zoneinfo/right