]> err.no Git - yubikey-personalization/commitdiff
install_name_tool magic
authorKlas Lindfors <klas@yubico.com>
Tue, 16 Apr 2013 06:10:18 +0000 (08:10 +0200)
committerKlas Lindfors <klas@yubico.com>
Tue, 16 Apr 2013 06:10:18 +0000 (08:10 +0200)
ykpers4mac.mk

index 00cd7cfc154c1a1a9382aaa2492eb72c6856a5ab..1060221f022260debd593dadf05430d8c248b774 100644 (file)
@@ -53,6 +53,12 @@ ykpers4mac:
        cd json-c-json-c-* && \
        ./configure --prefix=$(PWD)/tmp/root && \
        make install $(CHECK) && \
+       install_name_tool -id @executable_path/../lib/libjson-c.2.dylib $(PWD)/tmp/root/lib/libjson-c.2.dylib && \
+       install_name_tool -id @executable_path/../lib/libjson-c.2.dylib $(PWD)/tmp/root/lib/libjson-c.dylib && \
+       install_name_tool -id @executable_path/../lib/libjson.0.dylib $(PWD)/tmp/root/lib/libjson.0.dylib && \
+       install_name_tool -id @executable_path/../lib/libjson.0.dylib $(PWD)/tmp/root/lib/libjson.dylib && \
+       install_name_tool -change $(PWD)/tmp/root/lib/libjson-c.2.dylib @executable_path/../lib/libjson-c.2 $(PWD)/tmp/root/lib/libjson.0.dylib && \
+       install_name_tool -change $(PWD)/tmp/root/lib/libjson-c.2.dylib @executable_path/../lib/libjson-c.2 $(PWD)/tmp/root/lib/libjson.dylib && \
        cp COPYING $(PWD)/tmp/root/licenses/json-c.txt && \
        cd .. && \
        cp ../libyubikey-$(LIBYUBIKEYVERSION).tar.gz . \
@@ -61,6 +67,8 @@ ykpers4mac:
        cd libyubikey-$(LIBYUBIKEYVERSION) && \
        ./configure --prefix=$(PWD)/tmp/root && \
        make install $(CHECK) && \
+       install_name_tool -id @executable_path/../lib/libyubikey.0.dylib $(PWD)/tmp/root/lib/libyubikey.dylib && \
+       install_name_tool -id @executable_path/../lib/libyubikey.0.dylib $(PWD)/tmp/root/lib/libyubikey.0.dylib && \
        cp COPYING $(PWD)/tmp/root/licenses/libyubikey.txt && \
        cd .. && \
        cp ../ykpers-$(VERSION).tar.gz . \
@@ -69,6 +77,12 @@ ykpers4mac:
        cd ykpers-$(VERSION)/ && \
        PKG_CONFIG_PATH=$(PWD)/tmp/root/lib/pkgconfig ./configure --prefix=$(PWD)/tmp/root --with-libyubikey-prefix=$(PWD)/tmp/root && \
        make install $(CHECK) && \
+       install_name_tool -id @executable_path/../lib/libykpers-1.1.dylib $(PWD)/tmp/root/lib/libykpers-1.dylib && \
+       install_name_tool -id @executable_path/../lib/libykpers-1.1.dylib $(PWD)/tmp/root/lib/libykpers-1.1.dylib && \
+       for executable in $(PWD)/tmp/root/bin/*; do \
+       install_name_tool -change $(PWD)/tmp/root/lib/libyubikey.0.dylib @executable_path/../lib/libyubikey.0.dylib $$executable && \
+       install_name_tool -change $(PWD)/tmp/root/lib/libykpers-1.1.dylib @executable_path/../lib/libykpers-1.1.dylib $$executable ; \
+       done && \
        cp COPYING $(PWD)/tmp/root/licenses/yubikey-personalization.txt && \
        cd .. && \
        cd root && \