File towitoko-destdir.patch of Package pcsc-towitoko
diff --git a/doc/Makefile.am b/doc/Makefile.am
index c04859e..eb9fff8 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -41,12 +41,12 @@ install-data-hook:
test -f CT_data.3 || $(LN_S) $(shell echo ctapi | sed '$(transform)').3 CT_data.3 && \
test -f CT_close.3 || $(LN_S) $(shell echo ctapi | sed '$(transform)').3 CT_close.3)
if INSTALL_USB_BUNDLE
- install -D -m 644 Info.plist "@PCSC_LITE_DIR@/towitoko.bundle/Contents/Info.plist"
+ install -D -m 644 Info.plist "$(DESTDIR)@PCSC_LITE_DIR@/towitoko.bundle/Contents/Info.plist"
endif
uninstall-hook:
(cd $(DESTDIR)$(man3dir) && rm -f CT_init.3 CT_data.3 CT_close.3)
if INSTALL_USB_BUNDLE
- rm -f "@PCSC_LITE_DIR@/towitoko.bundle/Contents/Info.plist"
+ rm -f "$(DESTDIR)@PCSC_LITE_DIR@/towitoko.bundle/Contents/Info.plist"
endif
diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am
index 30c3879..6c984a5 100644
--- a/src/driver/Makefile.am
+++ b/src/driver/Makefile.am
@@ -37,13 +37,13 @@ libtowitoko_la_LIBADD = $(top_builddir)/src/ct-api/libtowitoko-ctapi.la \
install-exec-hook:
if INSTALL_USB_BUNDLE
- install -d "@PCSC_LITE_DIR@/towitoko.bundle/Contents/Linux"
- (cd "@PCSC_LITE_DIR@/towitoko.bundle/Contents/Linux" && \
+ install -d "$(DESTDIR)@PCSC_LITE_DIR@/towitoko.bundle/Contents/Linux"
+ (cd "$(DESTDIR)@PCSC_LITE_DIR@/towitoko.bundle/Contents/Linux" && \
test -f libtowitoko.so.2.0.0 || $(LN_S) @libdir@/libtowitoko.so.2.0.0 .)
endif
uninstall-hook:
if INSTALL_USB_BUNDLE
- rm -rf "@PCSC_LITE_DIR@/towitoko.bundle"
+ rm -rf "$(DESTDIR)@PCSC_LITE_DIR@/towitoko.bundle"
endif