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.8-gentoo.patch,v 1.1 2009/03/24 09:10:08 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 =================================================================== --- /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