summaryrefslogtreecommitdiff
blob: 0bfe26cfe82cafd0935f33f060296e47b4e1de55 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
Index: incron-0.5.7/Makefile
===================================================================
--- incron-0.5.7.orig/Makefile
+++ incron-0.5.7/Makefile
@@ -1,15 +1,16 @@
 
-PREFIX = /usr/local
-USERDATADIR = /var/spool/incron
-SYSDATADIR = /etc/incron.d
-CFGDIR = /etc
-MANPATH = /usr/share/man
+PREFIX = $(DESTDIR)usr
+USERDATADIR = $(DESTDIR)var/spool/incron
+SYSDATADIR = $(DESTDIR)etc/incron.d
+CFGDIR = $(DESTDIR)etc
+MANPATH = $(DESTDIR)usr/share/man
+INITDIR = $(DESTDIR)etc/init.d
 RELEASE = incron-`cat VERSION`
 RELEASEDIR = /tmp/$(RELEASE)
 
 USER = root
 
-CXX = g++
+CXX := g++
 INSTALL = install
 
 OPTIMIZE = -O2
@@ -17,8 +18,8 @@ DEBUG = -g0
 WARNINGS = -Wall
 CXXAUX = -pipe
 
-CXXFLAGS = $(OPTIMIZE) $(DEBUG) $(WARNINGS) $(CXXAUX)
-LDFLAGS = $(WARNINGS)
+CXXFLAGS := $(OPTIMIZE) $(DEBUG) $(WARNINGS) $(CXXAUX)
+LDFLAGS += $(WARNINGS)
 
 PROGRAMS = incrond incrontab
 
@@ -45,11 +46,15 @@ distclean: clean
 
 install:	all install-man
 	[ -d $(PREFIX) ]
+	$(INSTALL) -m 0755 -d $(PREFIX)/bin
+	$(INSTALL) -m 0755 -d $(PREFIX)/sbin
+	$(INSTALL) -m 0755 -d $(INITDIR)/
 	$(INSTALL) -m 04755 -o $(USER) incrontab $(PREFIX)/bin/
 	$(INSTALL) -m 0755 incrond $(PREFIX)/sbin/
 	$(INSTALL) -m 0755 -o $(USER) -d $(USERDATADIR)
 	$(INSTALL) -m 0755 -o $(USER) -d $(SYSDATADIR)
-	$(INSTALL) -m 0644 -o $(USER) incron.conf.example $(CFGDIR)
+	$(INSTALL) -m 0644 -o $(USER) incron.conf $(CFGDIR)
+	$(INSTALL) -m 0755 incrond-init.d $(INITDIR)/incrond
 
 install-man:	incrontab.1 incrontab.5 incrond.8 incron.conf.5
 	$(INSTALL) -m 0755 -d $(MANPATH)/man1
Index: incron-0.5.7/incrond-init.d
===================================================================
--- /dev/null
+++ incron-0.5.7/incrond-init.d
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/incron/files/incron-0.5.7-gentoo.patch,v 1.2 2007/12/19 20:56:38 hollow Exp $
+
+depend() {
+	use clock logger
+	need localmount
+}
+
+start() {
+	ebegin "Starting incrond"
+	start-stop-daemon --start --quiet --exec /usr/sbin/incrond -- -f /etc/incron.conf
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping incrond"
+	start-stop-daemon --stop --quiet --pidfile /var/run/incrond.pid
+	eend $?
+}
Index: incron-0.5.7/incron.conf.example
===================================================================
--- incron-0.5.7.orig/incron.conf.example
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# *** incron example configuration file ***
-# 
-# (c) Lukas Jelinek, 2007
-# 
-
-
-# Parameter:   system_table_dir
-# Meaning:     system table directory
-# Description: This directory is examined by incrond for system table files.
-# Default:     /etc/incron.d
-#
-# Example:
-# system_table_dir = /var/spool/incron.systables
-
-
-# Parameter:   user_table_dir
-# Meaning:     user table directory
-# Description: This directory is examined by incrond for user table files.
-# Default:     /var/spool/incron
-#
-# Example:
-# user_table_dir = /var/spool/incron.usertables
-
-
-# Parameter:   allowed_users
-# Meaning:     allowed users list file
-# Description: This file contains users allowed to use incron.
-# Default:     /etc/incron.allow
-#
-# Example:
-# allowed_users = /etc/incron/allow
-
-
-# Parameter:   denied_users
-# Meaning:     denied users list file
-# Description: This file contains users denied to use incron.
-# Default:     /etc/incron.deny
-#
-# Example:
-# denied_users = /etc/incron/deny
-
-
-# Parameter:   lockfile_dir
-# Meaning:     application lock file directory
-# Description: This directory is used for creating a lock avoiding to run
-#              multiple instances of incrond.
-# Default:     /var/run
-#
-# Example:
-# lockfile_dir = /tmp
-
-
-# Parameter:   lockfile_name
-# Meaning:     application lock file name base
-# Description: This name (appended by '.pid') is used for creating a lock
-#              avoiding to run multiple instances of incrond.
-# Default:     incrond
-#
-# Example:
-# lockfile_name = incron.lock
-
-
-# Parameter:   editor
-# Meaning:     editor executable
-# Description: This name or path is used to run as an editor for editting
-#              user tables.
-# Default:     vim
-#
-# Example:
-# editor = nano
-
Index: incron-0.5.7/incron.conf
===================================================================
--- /dev/null
+++ incron-0.5.7/incron.conf
@@ -0,0 +1,56 @@
+#
+# *** incron example configuration file ***
+# 
+# (c) Lukas Jelinek, 2007
+# 
+
+# Parameter:   system_table_dir
+# Meaning:     system table directory
+# Description: This directory is examined by incrond for system table files.
+# Default:     /etc/incron.d
+system_table_dir = /etc/incron.d
+
+
+# Parameter:   user_table_dir
+# Meaning:     user table directory
+# Description: This directory is examined by incrond for user table files.
+# Default:     /var/spool/incron
+user_table_dir = /var/spool/incron
+
+
+# Parameter:   allowed_users
+# Meaning:     allowed users list file
+# Description: This file contains users allowed to use incron.
+# Default:     /etc/incron.allow
+allowed_users = /etc/incron.allow
+
+
+# Parameter:   denied_users
+# Meaning:     denied users list file
+# Description: This file contains users denied to use incron.
+# Default:     /etc/incron.deny
+denied_users = /etc/incron.deny
+
+
+# Parameter:   lockfile_dir
+# Meaning:     application lock file directory
+# Description: This directory is used for creating a lock avoiding to run
+#              multiple instances of incrond.
+# Default:     /var/run
+lockfile_dir = /var/run
+
+
+# Parameter:   lockfile_name
+# Meaning:     application lock file name base
+# Description: This name (appended by '.pid') is used for creating a lock
+#              avoiding to run multiple instances of incrond.
+# Default:     incrond
+lockfile_name = incrond
+
+
+# Parameter:   editor
+# Meaning:     editor executable
+# Description: This name or path is used to run as an editor for editting
+#              user tables.
+# Default:     vim
+editor = nano