[CalendarServer-changes] [13446] CalendarServer/trunk/support/Apple.make
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 5 15:57:10 PDT 2014
Revision: 13446
http://trac.calendarserver.org//changeset/13446
Author: wsanchez at apple.com
Date: 2014-05-05 15:57:10 -0700 (Mon, 05 May 2014)
Log Message:
-----------
Replace symlinks with target content if they point to an absolute path
Modified Paths:
--------------
CalendarServer/trunk/support/Apple.make
Modified: CalendarServer/trunk/support/Apple.make
===================================================================
--- CalendarServer/trunk/support/Apple.make 2014-05-05 21:26:20 UTC (rev 13445)
+++ CalendarServer/trunk/support/Apple.make 2014-05-05 22:57:10 UTC (rev 13446)
@@ -119,9 +119,20 @@
@#
@echo "Cleaning up virtual environment...";
$(_v) perl -i -pe "s|#PATH|export PYTHON=$(CS_VIRTUALENV)/bin/python;|" "$(DSTROOT)$(CS_VIRTUALENV)/bin/caldavd";
- $(_v) $(FIND) "$(DSTROOT)$(CS_VIRTUALENV)" -type d -name .svn -print0 | xargs -0 rm -rf;
- $(_v) $(FIND) "$(DSTROOT)$(CS_VIRTUALENV)" -type f -name '*.so' -print0 | xargs -0 $(STRIP) -Sx;
- $(_v) $(FIND) "$(DSTROOT)$(CS_VIRTUALENV)" -type f -size 0 -exec sh -c 'printf "# empty\n" > {}' ";";
+ $(_v) find "$(DSTROOT)$(CS_VIRTUALENV)" -type d -name .svn -print0 | xargs -0 rm -rf;
+ $(_v) find "$(DSTROOT)$(CS_VIRTUALENV)" -type f -name "*.so" -print0 | xargs -0 $(STRIP) -Sx;
+ $(_v) find "$(DSTROOT)$(CS_VIRTUALENV)" -type f -size 0 -name "*.py" -exec sh -c 'printf "# empty\n" > {}' ";";
+ $(_v) find "$(DSTROOT)$(CS_VIRTUALENV)" -type l | \
+ while read link; do \
+ target="$(readlink "${link}")"; \
+ if [ "$(echo ${target} | cut -f 1 -d /)" == "" ]; then \
+ rm -fv "${link}"; \
+ cp -afv "${target}" "${link}" || { \
+ rm -rfv "${link}"; \
+ ln -sfv "${target}" "${link}"; \
+ } \
+ fi; \
+ done;
install:: install-config
install-config::
@@ -137,9 +148,16 @@
@echo "Installing links to executables...";
$(_v) $(INSTALL_DIRECTORY) "$(DSTROOT)$(SIPP)/usr/sbin";
$(_v) ln -fs "../..$(NSLOCALDIR)$(NSLIBRARYSUBDIR)/CalendarServer/bin/caldavd" "$(DSTROOT)$(SIPP)/usr/sbin/caldavd";
- $(_v) cd "$(DSTROOT)$(SIPP)/usr/sbin/" && \
- for cmd in "../..$(NSLOCALDIR)$(NSLIBRARYSUBDIR)/CalendarServer/bin/calendarserver_"*; do \
- ln -fs "$${cmd}" "./$$(basename "$${cmd}")"; \
+ $(_v) for cmd in \
+ caldavd \
+ calendarserver_command_gateway \
+ calendarserver_export \
+ calendarserver_manage_principals \
+ calendarserver_purge_attachments \
+ calendarserver_purge_events \
+ calendarserver_purge_principals \
+ ; do \
+ ln -fs "../..$(NSLOCALDIR)$(NSLIBRARYSUBDIR)/CalendarServer/bin/$${cmd}" "$(DSTROOT)$(SIPP)/usr/sbin/$${cmd}"; \
done;
install:: install-man
@@ -153,8 +171,6 @@
$(_v) $(INSTALL_FILE) "$(Sources)/doc/calendarserver_purge_attachments.8" "$(DSTROOT)$(SIPP)$(MANDIR)/man8";
$(_v) $(INSTALL_FILE) "$(Sources)/doc/calendarserver_purge_events.8" "$(DSTROOT)$(SIPP)$(MANDIR)/man8";
$(_v) $(INSTALL_FILE) "$(Sources)/doc/calendarserver_purge_principals.8" "$(DSTROOT)$(SIPP)$(MANDIR)/man8";
- $(_v) $(INSTALL_FILE) "$(Sources)/doc/calendarserver_shell.8" "$(DSTROOT)$(SIPP)$(MANDIR)/man8";
- $(_v) $(INSTALL_FILE) "$(Sources)/doc/calendarserver_manage_timezones.8" "$(DSTROOT)$(SIPP)$(MANDIR)/man8";
$(_v) gzip -9 -f "$(DSTROOT)$(SIPP)$(MANDIR)/man8/"*.[0-9];
install:: install-launchd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140505/5acca2ef/attachment.html>
More information about the calendarserver-changes
mailing list