diff options
-rw-r--r-- | .Makefile.inc | 8 | ||||
-rw-r--r-- | .org.inspircd.plist.inc | 25 | ||||
-rwxr-xr-x | configure | 9 |
3 files changed, 40 insertions, 2 deletions
diff --git a/.Makefile.inc b/.Makefile.inc index d7b5e4697..6ca267f49 100644 --- a/.Makefile.inc +++ b/.Makefile.inc @@ -16,6 +16,7 @@ BASE = $(DESTDIR)@BASE_DIR@ CONPATH = $(DESTDIR)@CONFIG_DIR@ MODPATH = $(DESTDIR)@MODULE_DIR@ BINPATH = $(DESTDIR)@BINARY_DIR@ +LAUNCHDPATH = $(DESTDIR)/System/Library/LaunchDaemons LIBPATH = $(DESTDIR)@LIBRARY_DIR@ LIB_EXT = @LIBRARY_EXT@ MODULES = @MODULES@ @@ -66,7 +67,7 @@ ircd: @echo "*************************************" ${MAKE} -C src DIRNAME="src" $(MAKEARGS) -install: all +install: all@EXTRA_DIR@ @-install -d -m $(INSTMODE) ${BASE} @-install -d -m $(INSTMODE) $(LIBPATH) @-install -d -m $(INSTMODE) $(BINPATH) @@ -95,7 +96,7 @@ install: all -install -m $(INSTMODE) src/libIRCDtimer.$(LIB_EXT) $(LIBPATH) -install -m $(INSTMODE) src/libIRCDsnomasks.$(LIB_EXT) $(LIBPATH) -install -m $(INSTMODE) src/inspircd $(BINPATH) - -install -m $(INSTMODE) inspircd $(BASE) 2>/dev/null + -install -m $(INSTMODE) @STARTSCRIPT@ $(@DESTINATION@) 2>/dev/null -install -m $(INSTMODE) src/cmd_admin.so $(LIBPATH) -install -m $(INSTMODE) src/cmd_away.so $(LIBPATH) -install -m $(INSTMODE) src/cmd_clearcache.so $(LIBPATH) @@ -195,6 +196,9 @@ modclean: squeakyclean: distclean +launchd_dir: + @-install -d -m $(INSTMODE) ${LAUNCHDPATH} + configureclean: rm -f .config.cache rm src/modules/Makefile diff --git a/.org.inspircd.plist.inc b/.org.inspircd.plist.inc new file mode 100644 index 000000000..699e878c1 --- /dev/null +++ b/.org.inspircd.plist.inc @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Iterations</key> + <integer>3</integer> + <key>Label</key> + <string>org.inspircd</string> + <key>LowPriorityIO</key> + <true/> + <key>Nice</key> + <integer>1</integer> + <key>OnDemand</key> + <false/> + <key>Program</key> + <string>@BINARY_DIR@/inspircd</string> + <key>ProgramArguments</key> + <array> + <string>inspircd</string> + <string>-nofork</string> + </array> + <key>ServiceIPC</key> + <false/> +</dict> +</plist> @@ -224,9 +224,15 @@ chomp($config{GCCVER} = `g++ -dumpversion | cut -c 1`); # Major GCC Ver $config{_SOMAXCONN} = SOMAXCONN; # Max connections in accept queue $config{OSNAME} = $^O; # Operating System Name $config{IS_DARWIN} = "NO"; # Is OSX? +$config{STARTSCRIPT} = "inspircd"; # start script? +$config{DESTINATION} = "BASE"; # Is target path. +$config{EXTRA_DIR} = ""; # Is empty. if ($config{OSNAME} =~ /darwin/i) { $config{IS_DARWIN} = "YES"; + $config{STARTSCRIPT} = "org.inspircd.plist"; # start script for OSX. + $config{DESTINATION} = "LAUNCHDPATH"; # Is OSX target. + $config{EXTRA_DIR} = " launch_dir"; # Is OSX specific path. } $config{CC} = "g++"; # C++ compiler if (defined $opt_cc) @@ -1143,6 +1149,9 @@ EOF $tmp =~ s/\@LIBRARY_DIR\@/$config{LIBRARY_DIR}/; $tmp =~ s/\@LIBRARY_EXT\@/$LIBEXT/; $tmp =~ s/\@MODULES\@/$modules/; + $tmp =~ s/\@STARTSCRIPT\@/$config{STARTSCRIPT}/; + $tmp =~ s/\@DESTINATION\@/$config{DESTINATION}/; + $tmp =~ s/\@EXTRA_DIR\@/$config{EXTRA_DIR}/; $tmp =~ s/\@EXECUTABLE\@/$exe/; $tmp =~ s/\@MAKEORDER\@/$config{MAKEORDER}/; $tmp =~ s/\@STATICLIBS\@/$config{STATICLIBS}/; |