about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2008-02-17 15:31:14 +0000
committerFlorian Westphal <fw@strlen.de>2008-02-26 23:49:33 +0100
commit0250acc50bd54ff74dfc5e73a61d382805f37462 (patch)
tree62f68b9c9165ec69a7e15d9a655e99732637498e
parentec80cc99c646d11da4eee4ddbbe5a859bed85685 (diff)
downloadngircd-0250acc50bd54ff74dfc5e73a61d382805f37462.tar.gz
ngircd-0250acc50bd54ff74dfc5e73a61d382805f37462.zip
Install a LaunchDaemon script to start/stop ngIRCd on Mac OS X.
-rw-r--r--ChangeLog3
-rw-r--r--contrib/MacOSX/Makefile.am33
2 files changed, 33 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 163ccab5..b36a0a92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
 
 ngIRCd HEAD
 
+  - Install a LaunchDaemon script to start/stop ngIRCd on Mac OS X.
   - Implemented IRC commands INFO, SUMMON (dummy), and USERS (dummy) and
     enhanced test suite to check these commands. (Dana Dahlstrom)
   - RPL_WHOREPLY messages generated by IRC_WHO didn't include flags (*,@,+).
@@ -751,4 +752,4 @@ ngIRCd 0.0.1, 31.12.2001
 
 
 -- 
-$Id: ChangeLog,v 1.340 2008/02/17 13:26:41 alex Exp $
+$Id: ChangeLog,v 1.341 2008/02/17 15:31:14 alex Exp $
diff --git a/contrib/MacOSX/Makefile.am b/contrib/MacOSX/Makefile.am
index d26499ea..76b43800 100644
--- a/contrib/MacOSX/Makefile.am
+++ b/contrib/MacOSX/Makefile.am
@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2004 Alexander Barton <alex@barton.de>
+# Copyright (c)2001-2008 Alexander Barton <alex@barton.de>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -8,9 +8,38 @@
 # (at your option) any later version.
 # Please read the file COPYING, README and AUTHORS for more information.
 #
-# $Id: Makefile.am,v 1.2 2004/05/11 00:34:26 alex Exp $
+# $Id: Makefile.am,v 1.3 2008/02/17 15:31:15 alex Exp $
 #
 
+EXTRA_DIST = de.barton.ngircd.plist.tmpl config.h cvs-version.h
+
+SUFFIXES = .tmpl .
+
+.tmpl:
+	sed \
+	    -e s@:SBINDIR:@${sbindir}@ \
+	    <$< >$@
+
+install-data-local:
+	[ `uname -s` != "Darwin" ] || make install-sys-darwin
+
+install-sys-darwin:
+	@if [ `id -u` -eq 0 ]; then \
+	  make install-sys-darwin-root; \
+	else \
+	  echo; \
+	  echo " ** NOTE: Not installing with root privileges, so the LaunchDaemon script"; \
+	  echo " ** \"/Library/LaunchDaemons/de.barton.ngircd.plist\" can't be installed/updated!"; \
+	  echo; \
+	fi
+
+install-sys-darwin-root: de.barton.ngircd.plist
+	install -c -m 644 -b -o root -g wheel de.barton.ngircd.plist /Library/LaunchDaemons/de.barton.ngircd.plist
+	@echo
+	@echo " ** \"/Library/LaunchDaemons/de.barton.ngircd.plist\" has been installed,"
+	@echo " ** but is disabled. Use launchctl(8) to enable/run ngIRCd on Darwin/Mac OS X."
+	@echo
+
 clean-local:
 	rm -rf build