summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorMichael Biebl <mbiebl@gmail.com>2007-04-02 16:16:16 -0400
committerWilliam Jon McCann <mccann@jhu.edu>2007-04-02 16:16:16 -0400
commitb57d5c11612dbb896c53d65c01104bae586f6e17 (patch)
treeb7063a6133b6e339d38a372b87c00b5b1737fdde /data
parent86740ea242d0b26758e8a8c43904a0fc88a195f6 (diff)
autoconf fixes, separate pamlibdir variable, path expansion at make time
The attached patch does the following: - Use a separate $pam-module-dir variable for the pam module - Instead of defining a custom $slibdir variable, just use the standard $libdir variable specified by autoconf - Use the standard autoconf $docdir variable (Add AC_PREREQ(2.59) for that). - Drop AS_AC_EXPAND macro and remove AC_DEFINE_UNQUOTED for dir variables. + Build the init script at make time using sed + Use defines in src/Makefile.am to pass the variables to gcc at make time - Consistently use AC_HELP_STRING everywhere - Remove/Replace deprecated macros: + AM_INIT_AUTOMAKE takes the package name and version number from AC_INIT + AM_CONFIG_HEADER -> AC_CONFIG_HEADERS + AC_OUTPUT -> AC_CONFIG_FILES Patch is tested and make distcheck works.
Diffstat (limited to 'data')
-rwxr-xr-xdata/ConsoleKit.in10
-rw-r--r--data/Makefile.am13
2 files changed, 18 insertions, 5 deletions
diff --git a/data/ConsoleKit.in b/data/ConsoleKit.in
index 3bc6ef0..83360cd 100755
--- a/data/ConsoleKit.in
+++ b/data/ConsoleKit.in
@@ -10,10 +10,10 @@
#
# Sanity checks.
-[ -x @SBINDIR@/console-kit-daemon ] || exit 0
+[ -x @sbindir@/console-kit-daemon ] || exit 0
# Source function library.
-. @SYSCONFDIR@/rc.d/init.d/functions
+. @sysconfdir@/rc.d/init.d/functions
# so we can rearrange this easily
processname=console-kit-daemon
@@ -26,7 +26,7 @@ start() {
daemon --check $servicename $processname
RETVAL=$?
echo
- [ $RETVAL -eq 0 ] && touch @LOCALSTATEDIR@/lock/subsys/$servicename
+ [ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$servicename
}
stop() {
@@ -36,7 +36,7 @@ stop() {
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
- rm -f @LOCALSTATEDIR@/lock/subsys/$servicename
+ rm -f @localstatedir@/lock/subsys/$servicename
rm -f @CONSOLE_KIT_PID_FILE@
fi
}
@@ -58,7 +58,7 @@ case "$1" in
start
;;
condrestart)
- if [ -f @LOCALSTATEDIR@/lock/subsys/$servicename ]; then
+ if [ -f @localstatedir@/lock/subsys/$servicename ]; then
stop
start
fi
diff --git a/data/Makefile.am b/data/Makefile.am
index 9c8f0ab..f9216c4 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -9,10 +9,23 @@ initd_SCRIPTS= \
ConsoleKit \
$(NULL)
+
+ConsoleKit: ConsoleKit.in Makefile
+ $(edit) $< >$@
+
+edit = sed \
+ -e 's|@sbindir[@]|$(sbindir)|g' \
+ -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
+ -e 's|@localstatedir[@]|$(localstatedir)|g' \
+ -e 's|@CONSOLE_KIT_PID_FILE[@]|$(CONSOLE_KIT_PID_FILE)|g'
+
EXTRA_DIST = \
$(dbusconf_DATA) \
+ $(SCRIPT_IN_FILES) \
$(NULL)
MAINTAINERCLEANFILES = \
*~ \
Makefile.in
+
+CLEANFILES = ConsoleKit