Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37787047
en ru br
Репозитории ALT
4.1: 2.24-alt2
4.0: 2.24-alt2
3.0: 2.23-alt6
www.altlinux.org/Changes

Группа :: Система/Основа
Пакет: hwclock

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Name: hwclock
Version: 2.24
Release: alt2

Summary: Query and set the hardware clock
License: GPL
Group: System/Base
Url: ftp://ibiblio.org/pub/Linux/system/hardware
Packager: Dmitry V. Levin <ldv at altlinux.org>

Source0: %url/%name-%version.tar
Source1: clock_unsynced.c

Patch1: hwclock-2.22-alt-build.patch
Patch2: hwclock-2.23-alt-tzoffset.patch
Patch3: hwclock-2.23-alt-tzoffset_check.patch
Patch4: hwclock-2.23-alt-x86_64.patch
Patch5: hwclock-2.23-alt-sparc.patch
Patch6: hwclock-2.24-alt-warnings.patch

Conflicts: startup <= 0:0.6-alt1

# Automatically added by buildreq on Mon May 21 2001

BuildRequires: libshhopt-devel

%description
Hwclock is a program that runs under Linux and sets and queries the
Hardware Clock, which is often called the Real Time Clock, RTC, or
CMOS clock.

You can set the Hardware Clock to a particular time or from the Linux
System Time.  You can set the Linux System Time from the Hardware
Clock, and a typical usage is to invoke Hwclock from a system startup
script to initialize the System Time.

Hwclock's --adjust function corrects systematic drift in the Hardware
Clock.  You just invoke it regularly and it corrects for a fast or
slow Hardware Clock.  Hwclock automatically computes how fast or slow
the Hardware Clock is every time you set it.

Hwclock uses /dev/rtc if it is available.  Otherwise, it uses its own
direct I/O to do what the rtc device driver would normally do.

%prep
%setup -q -n %name
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
find -type f -print0 |
xargs -r0 grep -FZl /var/state -- |
xargs -r0 %__subst -p 's,/var/state,%_localstatedir/%name,g' --
find -type f -name \*.orig -print -delete
install -pm644 %_sourcedir/clock_unsynced.c .

%build
make clean -C src
%make_build -C src
%__cc %optflags clock_unsynced.c -o clock_unsynced

%install
install -pD -m755 src/%name %buildroot/sbin/%name
ln -s %name %buildroot/sbin/clock
install -pD -m644 src/%name.8 %buildroot%_man8dir/%name.8
install -pD -m755 clock_unsynced %buildroot/bin/clock_unsynced
mkdir -p %buildroot%_localstatedir/%name
install -pD -m644 /dev/null %buildroot%_sysconfdir/adjtime

%triggerpostun -- startup <= 0.6-alt1, initscripts < 1:5.49.1-alt1
f=%_sysconfdir/adjtime
if [ ! -f "$f" ]; then
if [ -f "$f".rpmsave ]; then
%__cp -pf "$f".rpmsave "$f"
elif [ -f "$f".rpmnew ]; then
%__cp -pf "$f".rpmnew "$f"
fi
fi

%files
%config(noreplace) %_sysconfdir/adjtime
/bin/*
/sbin/*
%_man8dir/*
%dir %_localstatedir/%name
%doc README src/HISTORY *.lsm

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin