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 \
# 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
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
#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