Commit 8ac44ca8 authored by Vincent Cappe's avatar Vincent Cappe Committed by conrad

Fix an issue with the symlinks for pre-0.9.9 tool names

When files with pre-0.9.9 tool names exist in $(exec_prefix)/bin,
"make DESTDIR=${staging_dir} install" tries to delete them, which
may cause a failure for lack of permissions (quite likely to happen
when building a package as a normal user), and is wrong anyway
(nothing outside of DESTDIR should ever be changed by "make install").

With this patch, it will now cd to "$(DESTDIR)$(bindir)" and create
relative symlinks there, if need be. This preverse the old behavior
when DESTDIR=="", except for the fact the symlinks will be relative
rather than absolute.
parent 3fc79474
......@@ -74,10 +74,11 @@ oggz_codecs_LDADD = $(OGGZ_LIBS)
# Add symlinks for deprecated tool names, if they are already installed;
# see
cd $(DESTDIR)$(bindir) && \
for p in dump diff info merge rip ; do \
if test -e $(exec_prefix)/bin/oggz$$p ; then \
$(RM) $(exec_prefix)/bin/oggz$$p ; \
$(LN_S) $(exec_prefix)/bin/oggz-$$p $(exec_prefix)/bin/oggz$$p ; \
if test -e oggz$$p ; then \
$(RM) oggz$$p ; \
$(LN_S) oggz-$$p oggz$$p ; \
fi ; \
......@@ -89,7 +90,7 @@ install-exec-local:
# such systems.
for p in dump diff info merge rip ; do \
if test -L $(exec_prefix)/bin/oggz$$p ; then \
$(RM) $(exec_prefix)/bin/oggz$$p ; \
if test -L $(DESTDIR)$(bindir)/oggz$$p ; then \
$(RM) $(DESTDIR)$(bindir)/oggz$$p ; \
fi ; \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment