From 4a1755fe8c73c7d243f9eaa7a31aed0e0ebc81d9 Mon Sep 17 00:00:00 2001 From: peavey Date: Thu, 21 Jun 2007 04:24:54 +0000 Subject: Apply OSX patch from BuildSmart that fixes installation issues. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7398 e03df62e-2008-0410-955e-edbf42e46eb7 --- .Makefile.inc | 8 ++++++-- .org.inspircd.plist.inc | 25 +++++++++++++++++++++++++ configure | 9 +++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 .org.inspircd.plist.inc 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 @@ + + + + + Iterations + 3 + Label + org.inspircd + LowPriorityIO + + Nice + 1 + OnDemand + + Program + @BINARY_DIR@/inspircd + ProgramArguments + + inspircd + -nofork + + ServiceIPC + + + diff --git a/configure b/configure index b20e28da2..c00bb3ed8 100755 --- a/configure +++ b/configure @@ -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}/; -- cgit v1.2.3