Browse Source

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@1215 ec354946-7b23-47d6-9f5a-488ba84defc7

kudoh 14 years ago
parent
commit
77c3223f41
1 changed files with 38 additions and 42 deletions
  1. 38 42
      r/readahead/readahead-vl.spec

+ 38 - 42
r/readahead/readahead-vl.spec

@@ -1,28 +1,29 @@
 Summary:        Read a preset list of files into memory.
 Summary(ja):    あらかじめ指定したファイル群をメモリに先読みするツール
 Name:           readahead
-Version:        1.5.4
+Version:        1.5.6
 Release:	1%{?_dist_release}
 Group:          System Environment/Base
 License:        GPLv2+
 URL:		https://hosted.fedoraproject.org/readahead
 Source0:	readahead-%{version}.tar.bz2
-Source1:	readahead_early
-Source2:	default.early
+#Source1:	readahead_early
+#Source2:	default.early
 # default settings for Vine Linux
-Patch0:		readahead-1.5.0-default.patch
+#Patch0:		readahead-1.5.0-default.patch
 # (mdv) create a temp file to detect if collector is running, autodelect collector enabling file at end of collection
-Patch1:		readahead-1.4.6-autocollector.patch
+#Patch1:		readahead-1.4.6-autocollector.patch
 # (mdv) don't generate later list
-Patch2:		readahead-1.4.6-nolater.patch
+#Patch2:		readahead-1.4.6-nolater.patch
 Patch3:		better-cron.patch
-Patch4:         multiple-ignores.patch
+#Patch4:         multiple-ignores.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-root
 Requires(post):	/sbin/chkconfig
 Requires(pre): 	/sbin/chkconfig
 Requires(triggerpostun): /sbin/chkconfig
 Requires:	procps, gawk
+Requires:       upstart /usr/bin/ionice
 BuildRequires:	e2fsprogs-devel, audit-libs-devel, libblkid-devel
 BuildRequires:	pkgconfig
 
@@ -38,52 +39,28 @@ readahead はあらかじめ指定されたファイルをメモリに読み込
 
 %prep
 %setup -q
-%patch0 -p1 -b .default
-%patch1 -p1 -b .autocollector
-%patch2 -p1 -b .nolater
+#%patch0 -p1 -b .default
+#%patch1 -p1 -b .autocollector
+#%patch2 -p1 -b .nolater
 %patch3 -p1
-%patch4 -p1
-install -m644 %{SOURCE2} lists/
+#%patch4 -p1
+#install -m644 %{SOURCE2} lists/
 
 
 %build
 %configure --sbindir=/sbin
-make %{?_smp_mflags} rpm-lists-rebuild FILES="default.early" CFLAGS="$RPM_OPT_FLAGS" RPM_LIB="%{_lib}" RPM_ARCH="%{_arch}"
+make %{?_smp_mflags}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 make DESTDIR=$RPM_BUILD_ROOT install
-%find_lang %{name}
-
-install -m755 %{SOURCE1} $RPM_BUILD_ROOT/sbin
-
-# file list dir
-mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/readahead
 
+%find_lang %{name}
 
 %clean
 rm -rf ${RPM_BUILD_ROOT}
 
-%files -f %{name}.lang
-%defattr(-,root,root)
-%doc COPYING README 
-#%attr(0644,root,root) %{_sysconfdir}/readahead.d/default.early
-/sbin/readahead
-/sbin/readahead-collector
-/sbin/readahead_early
-/etc/event.d/*
-/etc/cron.daily/readahead.cron
-/etc/cron.monthly/readahead-monthly.cron
-%config(noreplace) %{_sysconfdir}/sysconfig/readahead
-%config(noreplace) /etc/readahead.conf
-%dir %{_localstatedir}/lib/%{name}
-
-%pre
-if [ -f /etc/rc.d/init.d/readahead_early ]; then
-  /sbin/chkconfig --del readahead_early > /dev/null 2>&1 ||:
-  /sbin/chkconfig --del readahead_later > /dev/null 2>&1 ||:
-fi
-
 %preun
 if [ "$1" = "0" ] ; then
  # for updating older packages with service files
@@ -95,11 +72,30 @@ if [ "$1" = "0" ] ; then
 fi
 
 %post
-if [ "$1" = "1" ]; then
- touch /.readahead_collect
-fi
+%{_sysconfdir}/cron.monthly/readahead-monthly.cron
+:
+
+%files -f %{name}.lang
+%defattr(-,root,root,- )
+%doc COPYING README lists/README.lists NEWS
+%{_sysconfdir}/cron.daily/readahead.cron
+%{_sysconfdir}/cron.monthly/readahead-monthly.cron
+%dir %{_localstatedir}/lib/readahead
+%{_sysconfdir}/init/readahead-collector.conf
+%{_sysconfdir}/init/readahead-disable-services.conf
+%{_sysconfdir}/init/readahead.conf
+%config(noreplace) %{_sysconfdir}/sysconfig/readahead
+%config(noreplace) %{_sysconfdir}/readahead.conf
+/sbin/readahead
+/sbin/readahead-collector
 
 %changelog
+* Wed Jun 16 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.5.6-1
+- new upstream release
+- dropt patche0,1,2,4 and other sources
+- added Requires: upstart, /usr/bin/ionice
+- set up for upstart
+
 * Sun Oct 25 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.5.4-1
 - new upstream release
 - added %preun to delete old service