0
|
1 # Copyright 1999-2004 Gentoo Foundation
|
|
2 # Distributed under the terms of the GNU General Public License v2
|
|
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/noflushd/noflushd-2.7.3.ebuild,v 1.5 2004/09/03 21:03:24 pvdabeel Exp $
|
|
4
|
|
5 inherit flag-o-matic eutils
|
|
6
|
|
7 DESCRIPTION="A daemon to spin down your disks and force accesses to be cached"
|
|
8 HOMEPAGE="http://noflushd.sourceforge.net"
|
|
9 SRC_URI="mirror://sourceforge/noflushd/${P}.tar.gz"
|
|
10 RESTRICT="nomirror"
|
|
11 LICENSE="GPL-2"
|
|
12 KEYWORDS="~x86 ~amd64 ppc"
|
|
13 IUSE="SCSI"
|
|
14 SLOT="0"
|
|
15
|
|
16 DEPEND="virtual/libc"
|
|
17
|
|
18 src_compile() {
|
|
19
|
|
20 if use SCSI; then
|
|
21 ewarn "Enabling SCSI support - you do this on your own risk!"
|
|
22 epatch ${FILESDIR}/${P}-SCSI.patch
|
|
23 fi
|
|
24
|
|
25 # Replace -O[2-9] flags to keep the executable small
|
|
26 replace-flags -O[2-9] -Os
|
|
27
|
|
28 ./configure --prefix=/usr \
|
|
29 --host=${CHOST} \
|
|
30 --mandir=/usr/share/man \
|
|
31 --infodir=/usr/share/info \
|
|
32 --with-docdir=/usr/share/doc/${PF} || die "configure problem"
|
|
33 emake || die "compile problem"
|
|
34 }
|
|
35
|
|
36 src_install () {
|
|
37 dosbin src/noflushd
|
|
38 doman man/noflushd.8
|
|
39 dodoc README NEWS
|
|
40
|
|
41 exeinto /etc/init.d ; newexe ${FILESDIR}/noflushd.rc6 noflushd
|
|
42 insinto /etc/conf.d ; newins ${FILESDIR}/noflushd.confd noflushd
|
|
43 }
|
|
44
|
|
45 pkg_postinst() {
|
|
46 einfo 'Run "rc-update add noflushd default" to add it to the'
|
|
47 einfo "default runlevel."
|
|
48
|
|
49 ewarn "noflushd works reliably with IDE devices only."
|
|
50 ewarn "It has possible problems with reiserfs, too."
|
|
51 }
|
|
52
|