Name: apt-cron
Version: 0.1
Release: 1%{?_dist_release}
Vendor: Project Vine
Distribution: Vine Linux
License: GPL
Group: Applications/Administration
Source0: apt-cron.init
Source1: apt-cron.cron
Source2: apt-cron.logrotate
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch: noarch
Requires: apt
Prereq: chkconfig
Summary: Daily apt update

%description
Enable daily run of apt update by cron or anacron.

%prep

%build

%install
%__rm -rf %{buildroot}
%__mkdir_p %{buildroot}/etc/rc.d/init.d/
%__install %{SOURCE0} %{buildroot}/etc/rc.d/init.d/apt-cron
%__mkdir_p %{buildroot}/etc/cron.daily/
%__install %{SOURCE1} %{buildroot}/etc/cron.daily/apt-cron
%__mkdir_p %{buildroot}/etc/logrotate.d/
%__install -m644 %{SOURCE2} %{buildroot}/etc/logrotate.d/apt-cron

%clean
%__rm -rf %{buildroot}

%post
/sbin/chkconfig --add apt-cron

%preun
if [ $1 = 0 ]; then
    /sbin/chkconfig --del apt-cron
fi

%files
%defattr(-,root,root)
/etc/rc.d/init.d/apt-cron
/etc/cron.daily/apt-cron
/etc/logrotate.d/apt-cron

%changelog
* Sun Sep 14 2008 Shu KONNO <owa@bg.wakwak.com> 0.1-1vl5
- applied new versioning policy

* Sun Jul 22 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.1-0vl2
- changed Group to Applications/Administration

* Fri Jun 18 2004 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 0.1-0vl1
- Initial build.

