]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Update OSX packages to include both the launchd and non-launchd startup
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 1 Feb 2006 04:44:42 +0000 (04:44 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 1 Feb 2006 04:44:42 +0000 (04:44 +0000)
scripts, with auto-detect at startup.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@5034 7a7537e8-13f0-0310-91df-b6672ffda945

Makefile
init/Localizable.strings [moved from init/cups.strings with 100% similarity]
init/PrintingServices.launchd [moved from init/cupsd-launchd.sh with 82% similarity]
init/PrintingServices.standard [moved from init/cups.osx with 100% similarity]
init/StartupParameters.plist [moved from init/cups.plist with 100% similarity]
init/org.cups.cupsd.plist [moved from init/cupsd-launchd.plist with 100% similarity]
tools/testosx

index 01f89dd3f93e78d299f78fb4f7475c1ac7be44e5..e6fc2301500cbffc55c7043906b772480e3738c1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -103,17 +103,17 @@ install:  installhdrs
        if test "x$(INITDIR)" = "x" -a "x$(INITDDIR)" != "x"; then \
                $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
                if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
-                       $(INSTALL_SCRIPT) init/cups.osx $(BUILDROOT)$(INITDDIR)/PrintingServices; \
-                       $(INSTALL_DATA) init/cups.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
+                       $(INSTALL_SCRIPT) init/PrintingServices.standard $(BUILDROOT)$(INITDDIR)/PrintingServices; \
+                       $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
                        $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
-                       $(INSTALL_DATA) init/cups.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
+                       $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
                elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
-                       $(INSTALL_DATA) init/cupsd-launchd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
+                       $(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
                        $(INSTALL_DIR) $(BUILDROOT)/System/Library/StartupItems/PrintingServices; \
-                       $(INSTALL_SCRIPT) init/cupsd-launchd.sh $(BUILDROOT)/System/Library/StartupItems/PrintingServices/PrintingServices; \
-                       $(INSTALL_DATA) init/cups.plist $(BUILDROOT)/System/Library/StartupItems/PrintingServices/StartupParameters.plist; \
+                       $(INSTALL_SCRIPT) init/PrintingServices.launchd $(BUILDROOT)/System/Library/StartupItems/PrintingServices/PrintingServices; \
+                       $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)/System/Library/StartupItems/PrintingServices/StartupParameters.plist; \
                        $(INSTALL_DIR) $(BUILDROOT)/System/Library/StartupItems/PrintingServices/Resources/English.lproj; \
-                       $(INSTALL_DATA) init/cups.strings $(BUILDROOT)/System/Library/StartupItems/PrintingServices/Resources/English.lproj/Localizable.strings; \
+                       $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)/System/Library/StartupItems/PrintingServices/Resources/English.lproj/Localizable.strings; \
                else \
                        $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
                fi \
similarity index 100%
rename from init/cups.strings
rename to init/Localizable.strings
similarity index 82%
rename from init/cupsd-launchd.sh
rename to init/PrintingServices.launchd
index c956220543e5024bd9c3162dd92ff2c2223ad015..edcb0c6dc12f3d5febfd4e0eedf1e70c31d95eb0 100755 (executable)
@@ -3,5 +3,5 @@
 # writable.  This works around a problem in launchd...
 
 if test -e /private/var/run/cupsd; then
-       chmod g+w,o+w /private/var/run/cupsd
+       chmod a+rwx /private/var/run/cupsd
 fi
similarity index 100%
rename from init/cups.osx
rename to init/PrintingServices.standard
similarity index 100%
rename from init/cups.plist
rename to init/StartupParameters.plist
index af37a09750b75554b4e5c36ca25bd73fe9fb7532..0ece7bf5e7c9b238f65ff0745fc8d40239beacf7 100755 (executable)
@@ -36,12 +36,19 @@ chmod 755 $pkgdir/Resources/preflight
 
 cat >$pkgdir/Resources/postflight <<EOF
 #!/bin/sh
-launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist || exit 0
-launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist
-sleep 1
-if test -e /private/var/run/cupsd; then
-        chmod g+w,o+w /private/var/run/cupsd
+rm -f /System/Library/StartupItems/PrintingServices/PrintingServices
+if test -x /bin/launchctl; then
+       launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist || exit 0
+       launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist
+       sleep 1
+       if test -e /private/var/run/cupsd; then
+               chmod a+rwx /private/var/run/cupsd
+       fi
+       ln -s PrintingServices.launchd /System/Library/StartupItems/PrintingServices/PrintingServices
+else
+       ln -s PrintingServices.standard /System/Library/StartupItems/PrintingServices/PrintingServices
 fi
+
 EOF
 chmod 755 $pkgdir/Resources/postflight
 
@@ -61,6 +68,11 @@ sed -e '1,$s/@CUPS_VERSION@/1.2svn-r'$rev'/g' \
 #make INSTALL=$topdir/install-sh BUILDROOT=$pkgdir/Package install
 make BUILDROOT=$pkgdir/Package install
 
+# Install standard startup script and rename launchd startup script...
+temp=$pkgdir/Package/System/Library/StartupItems/PrintingServices
+mv $temp/PrintingServices $temp/PrintingServices.launchd
+/usr/bin/install -c -m 755 init/PrintingServices.standard $temp/PrintingServices.standard
+
 # Figure out where PackageMaker is installled...
 if test -d /Developer/Applications/Utilities/PackageMaker.app; then
        PackageMaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker