summaryrefslogtreecommitdiff
path: root/media-libs/libspotify/files/destdir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/libspotify/files/destdir.patch')
-rw-r--r--media-libs/libspotify/files/destdir.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/media-libs/libspotify/files/destdir.patch b/media-libs/libspotify/files/destdir.patch
new file mode 100644
index 0000000..3995417
--- /dev/null
+++ b/media-libs/libspotify/files/destdir.patch
@@ -0,0 +1,45 @@
+diff --git a/Makefile b/Makefile
+index 089fd33..249b621 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,25 +1,26 @@
+-prefix ?= /usr/local
++DESTDIR ?= /usr/local
++LIB ?= lib
+
+ all:
+- $(error "Usage: make [prefix=/install/me/here] install | uninstall")
++ $(error "Usage: make [DESTDIR=/install/me/here] install | uninstall")
+
+ install:
+- mkdir -p $(prefix)/include/libspotify
+- install include/libspotify/api.h $(prefix)/include/libspotify
++ mkdir -p $(DESTDIR)/include/libspotify
++ install include/libspotify/api.h $(DESTDIR)/include/libspotify
+
+- mkdir -p $(prefix)/lib
+- install -T lib/libspotify.so.12 $(prefix)/lib/libspotify.so.12.1.51
++ mkdir -p $(DESTDIR)/$(LIB)
++ install -T lib/libspotify.so.12 $(DESTDIR)/$(LIB)/libspotify.so.12.1.51
+
+- cd $(prefix)/lib && ln -sf libspotify.so.12.1.51 libspotify.so.12 && ln -sf libspotify.so.12.1.51 libspotify.so
++ cd $(DESTDIR)/$(LIB) && ln -sf libspotify.so.12.1.51 libspotify.so.12 && ln -sf libspotify.so.12.1.51 libspotify.so
+
+- mkdir -p $(prefix)/lib/pkgconfig
+- sed -e s:PKG_PREFIX:$(prefix):g <lib/pkgconfig/libspotify.pc >$(prefix)/lib/pkgconfig/libspotify.pc
++ mkdir -p $(DESTDIR)/$(LIB)/pkgconfig
++ sed -e s:PKG_PREFIX:$(DESTDIR):g <lib/pkgconfig/libspotify.pc >$(DESTDIR)/$(LIB)/pkgconfig/libspotify.pc
+
+ ldconfig
+
+ uninstall:
+- rm -rf $(prefix)/include/libspotify
+- rm -f $(prefix)/lib/libspotify.so.12.1.51
+- rm -f $(prefix)/lib/libspotify.so.12
+- rm -f $(prefix)/lib/libspotify.so
+- rm -f $(prefix)/lib/pkgconfig/libspotify.pc
++ rm -rf $(DESTDIR)/include/libspotify
++ rm -f $(DESTDIR)/lib/libspotify.so.12.1.51
++ rm -f $(DESTDIR)/lib/libspotify.so.12
++ rm -f $(DESTDIR)/lib/libspotify.so
++ rm -f $(DESTDIR)/lib/pkgconfig/libspotify.pc