summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Olexa <darkside@gentoo.org>2009-01-23 05:57:56 +0000
committerJeremy Olexa <darkside@gentoo.org>2009-01-23 05:57:56 +0000
commit386d1dd316556cd2c4f8231e532daf091cc45e57 (patch)
treecbde96d81b8cd4e2170ae46cdbb8d61dbc79d4ae /sys-apps/sreadahead
parentAutomated update of use.local.desc (diff)
downloadgentoo-2-386d1dd316556cd2c4f8231e532daf091cc45e57.tar.gz
gentoo-2-386d1dd316556cd2c4f8231e532daf091cc45e57.tar.bz2
gentoo-2-386d1dd316556cd2c4f8231e532daf091cc45e57.zip
Initial commit, ebuild by Anna Gabutero, bug 255724
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/sreadahead')
-rw-r--r--sys-apps/sreadahead/ChangeLog10
-rw-r--r--sys-apps/sreadahead/files/sreadahead-pack.rc33
-rw-r--r--sys-apps/sreadahead/files/sreadahead.rc27
-rw-r--r--sys-apps/sreadahead/metadata.xml8
-rw-r--r--sys-apps/sreadahead/sreadahead-0.04.ebuild36
5 files changed, 114 insertions, 0 deletions
diff --git a/sys-apps/sreadahead/ChangeLog b/sys-apps/sreadahead/ChangeLog
new file mode 100644
index 000000000000..e171f3dfa582
--- /dev/null
+++ b/sys-apps/sreadahead/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sys-apps/sreadahead
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/sreadahead/ChangeLog,v 1.1 2009/01/23 05:57:56 darkside Exp $
+
+*sreadahead-0.04 (23 Jan 2009)
+
+ 23 Jan 2009; Jeremy Olexa <darkside@gentoo.org> +files/sreadahead.rc,
+ +files/sreadahead-pack.rc, +metadata.xml, +sreadahead-0.04.ebuild:
+ Initial commit, ebuild by Anna Gabutero, bug 255724
+
diff --git a/sys-apps/sreadahead/files/sreadahead-pack.rc b/sys-apps/sreadahead/files/sreadahead-pack.rc
new file mode 100644
index 000000000000..cbe33e728d31
--- /dev/null
+++ b/sys-apps/sreadahead/files/sreadahead-pack.rc
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+
+# This script generates the sreadahead pack file, which lists the blocks that
+# sreadahead should load into memory.
+# To regenerate the pack file, delete /etc/readahead.packed and reboot the
+# system.
+
+description="Generate sreadahead pack file (if it does not exist)"
+
+depend() {
+ after *
+}
+
+start() {
+ if [ -f /etc/readahead.packed ]
+ then
+ return 0
+ fi
+
+ ebegin "Generating sreadahead pack file"
+ cd /tmp
+ find / \
+ -path /home -prune -o \
+ -path /tmp -prune -o \
+ -path /var -prune -o \
+ -path /proc -prune -o \
+ -path /usr/portage -prune -o \
+ -type f \( -fstype ext3 -o -fstype rootfs \) > \
+ /tmp/readahead.packed.new
+ /sbin/sreadahead-pack readahead.packed.new &> /dev/null
+ mv readahead.packed /etc/readahead.packed
+ eend $?
+}
diff --git a/sys-apps/sreadahead/files/sreadahead.rc b/sys-apps/sreadahead/files/sreadahead.rc
new file mode 100644
index 000000000000..8d0245e22479
--- /dev/null
+++ b/sys-apps/sreadahead/files/sreadahead.rc
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/sreadahead/files/sreadahead.rc,v 1.1 2009/01/23 05:57:56 darkside Exp $
+
+description="Start sreadahead daemon"
+
+depend() {
+ need localmount
+ before clock bootmisc consolefont keymaps rmnologin serial urandom
+}
+
+start() {
+ PACKFILE="/etc/readahead.packed"
+
+ if ! [ -f $PACKFILE ]
+ then
+ ewarn "Cannot find sreadahead pack file $PACKFILE"
+ return 1
+ fi
+
+ ebegin "Starting sreadahead"
+ /sbin/sreadahead
+ eend $?
+}
+
+# vim: ts=4 sw=4
diff --git a/sys-apps/sreadahead/metadata.xml b/sys-apps/sreadahead/metadata.xml
new file mode 100644
index 000000000000..a58bf8266ebc
--- /dev/null
+++ b/sys-apps/sreadahead/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>darkside@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/sreadahead/sreadahead-0.04.ebuild b/sys-apps/sreadahead/sreadahead-0.04.ebuild
new file mode 100644
index 000000000000..0b1e57a4b1c5
--- /dev/null
+++ b/sys-apps/sreadahead/sreadahead-0.04.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/sreadahead/sreadahead-0.04.ebuild,v 1.1 2009/01/23 05:57:56 darkside Exp $
+
+EAPI=2
+
+DESCRIPTION="A readahead implementation optimized for solid state discs"
+HOMEPAGE="http://code.google.com/p/sreadahead/"
+SRC_URI="http://sreadahead.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc README 0001-superreadahead-patch.patch || die
+ newinitd "${FILESDIR}"/sreadahead.rc sreadahead || die
+ newinitd "${FILESDIR}"/sreadahead-pack.rc sreadahead-pack || die
+}
+
+pkg_postinst() {
+ elog "Sreadahead requires a kernel built with the superreadahead patch,"
+ elog "which can be found in /usr/share/doc/${PF}"
+ elog "If you don't know how to do this, it may be best to stay away from it"
+ elog
+ elog "Note that only ext3 partitions are currently supported."
+ elog
+ elog "To add sreadahead to your runlevels:"
+ elog " # rc-update add sreadahead boot"
+ elog " # rc-update add sreadahead-pack default"
+}