summaryrefslogtreecommitdiff
blob: 40786780926699ec7bf6e7b4e4e89f083d193224 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/fam/fam-2.7.0-r4.ebuild,v 1.6 2006/01/23 19:56:37 corsair Exp $

inherit libtool eutils gnuconfig

DESCRIPTION="FAM, the File Alteration Monitor"
HOMEPAGE="http://oss.sgi.com/projects/fam/"
SRC_URI="ftp://oss.sgi.com/projects/fam/download/stable/${P}.tar.gz"

LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86"
IUSE=""

DEPEND=">=net-nds/portmap-5b-r6
	!app-admin/gamin"
PROVIDE="virtual/fam"

src_unpack() {
	unpack ${A}

	cd ${S}

	# large file patch #76679
	epatch ${FILESDIR}/${P}-largefiles.patch

	# dnotify patch #43027
	epatch ${FILESDIR}/${P}-dnotify.patch

	# Use limits correctly -#89478
	epatch "${FILESDIR}/${P}-limits.patch"

	# Fix gcc 4.1 problems
	epatch ${FILESDIR}/${P}-gcc41.patch

	# Fix permission problems with user* in FEATURES (#35307)
	chmod u+w ${S}/configure

	gnuconfig_update
	libtoolize --copy --force

	# Please do not remove this again - fixes $S and $D in libtool linker
	# scripts (.la files)
	elibtoolize
}

src_install() {

	make install DESTDIR="${D}" || die

	dosed "s:local_only = false:local_only = true:g" /etc/fam.conf

	exeinto /etc/init.d
	doexe ${FILESDIR}/famd

	dodoc AUTHORS ChangeLog INSTALL NEWS TODO README

}

pkg_postinst() {

	einfo "To enable fam on  boot you will have to add it to the"
	einfo "default profile, issue the following command as root to do so."
	echo
	einfo "rc-update add famd default"

	# temporary warning for people upgrading
	# 6-12-03 foser <foser@gentoo.org>
	if [ -e /etc/init.d/fam ]
	then
		echo
		echo
		ewarn "IMPORTANT INFO FOR USERS UPGRADING FROM OLDER (<2.7.0) FAM VERSIONS :"
		echo
		einfo "With the 2.7.0 version the fam daemon moved to sbin and was"
		einfo "renamed from 'fam' to 'famd'. These changes are for consistency"
		einfo "reasons also applied to the Gentoo init script. This means you"
		einfo "will have to remove fam from the default runlevel and add famd."
		einfo "This can be done by issueing the following commands :"
		echo
		einfo "rc-update del fam"
		einfo "rc-update add famd default"
		einfo "rm /etc/init.d/fam"
		echo
		einfo "The last command removes the old init script."
	fi

}