+# vim:ft=automake
+# Copyright (c) 2007,2008,2009 Zmanda, Inc. All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Contact information: Zmanda Inc., 465 S. Mathilda Ave., Suite 300
+# Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+
+# simple include file to pre-define variables which are then +='d by other
+# scripts in this directory.
+
+# vim:ft=automake
+#
+# Adjust post-install permissions settings. This rule works off two
+# specially-formatted variables, INSTALLPERMS_exec and INSTALLPERMS_data.
+# Each is a whitespace-separated list of commands, all of which are either
+# a variable assignment or a filename. Three variables are available:
+#
+# - dest= sets the destination directory to e.g., $(sbindir)
+# - chown= controls changes in ownership; value is first argument to chown
+# - chmod= controls changes in permissions; value is first argument to chmod
+#
+# The following special cases are available:
+# amanda:setuid = $(BINARY_OWNER):$(SETUID_GROUP)
+# root:setuid = root:$(SETUID_GROUP)
+# These variables might otherwise have problems with whitespace in the user/group
+# names.
+#
+# when a filename is seen, the currently active variables are applied.
+#
+# Note that scripts are data, not executables!
+#
+# EXAMPLE
+#
+# sbin_PROGRAMS = foo bar bing
+# libexec_PROGRAMS = pro gram
+# sbin_SCRIPTS = sk ript
+# INSTALLPERMS_exec = \
+# dest=$(sbindir) chown=amanda chmod= \
+# foo bar \
+# chmod=07450 \
+# bing
+# dest=$(libexecdir) chmod= \
+# $(libexec_PROGRAMS)
+# INSTALLPERMS_data = \
+# dest=$(sbindir) chown=amanda chmod= \
+# $(sbin_SCRIPTS)
+#
+# This whole operation is not required when making builds for packaging,
+# and can be disabled with --disable-installperms, via the WANT_INSTALLPERMS
+# AM_CONDITIONAL. When disabled, the file 'installperms.sh' in the top-level
+# build directory is populated with a format suitable for shell interpretation,
+# with lines like this:
+# installperm "amanda:disk" "04750" "/usr/local/sbin/bing"
+# the arguments being, respectively, owner:group, mode, and filename. There will
+# be exactly one line for each file which has specific permissions. The intention
+# is that this file be used by packaging scripts to set correct permissions at install
+# time. Note that files which have no special permissions requirements do not appear
+# in this file at all, due to limitations of Automake.
+