summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-04-22 15:04:29 +0300
committereug-vs <eugene@eug-vs.xyz>2022-04-22 15:04:29 +0300
commit54cb832bb19dbd381bd2ed2aafab46b9f0398ffd (patch)
tree04b0b9c1ef38cd03b4965276bf23bc56129ed3d9
parent8651953c96f6b0dc1c96c8ccb660410646c93e96 (diff)
downloadebuild-repository-54cb832bb19dbd381bd2ed2aafab46b9f0398ffd.tar.gz
feat: add libspotify ebuild
-rw-r--r--media-libs/libspotify/Manifest1
-rw-r--r--media-libs/libspotify/files/destdir.patch45
-rw-r--r--media-libs/libspotify/libspotify-12.1.51.ebuild27
3 files changed, 73 insertions, 0 deletions
diff --git a/media-libs/libspotify/Manifest b/media-libs/libspotify/Manifest
new file mode 100644
index 0000000..cfd02fd
--- /dev/null
+++ b/media-libs/libspotify/Manifest
@@ -0,0 +1 @@
+DIST libspotify-12.1.51-Linux-x86_64-release.tar.gz 1571265 BLAKE2B b2c5b60b7857b4e5470346d6c442a27783a89ef7bc395a9c464510b0769ab699d7c2db2d9d151de8ba0736b83cc835761516666eb938ab530fb529656292523d SHA512 3c636e1739a75910a0da9270c3d2203b52fe1c2d69615159a09bcc8b57c8909f1d005aa22dc5cef529489c6f3a9ee5bde4d6a922be536f8017185c25432c3666
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
diff --git a/media-libs/libspotify/libspotify-12.1.51.ebuild b/media-libs/libspotify/libspotify-12.1.51.ebuild
new file mode 100644
index 0000000..9f58a72
--- /dev/null
+++ b/media-libs/libspotify/libspotify-12.1.51.ebuild
@@ -0,0 +1,27 @@
+EAPI=8
+
+HOMEPAGE="https://github.com/mopidy/libspotify-archive"
+
+SRC_URI="https://github.com/mopidy/libspotify-archive/raw/master/${P}-Linux-x86_64-release.tar.gz"
+
+S="${WORKDIR}/${P}-Linux-x86_64-release"
+
+SLOT="0"
+
+KEYWORDS="amd64"
+
+PATCHES=(
+ "${FILESDIR}/destdir.patch"
+)
+
+src_compile() {
+ true
+}
+
+src_install() {
+ emake install DESTDIR=${D}/usr LIB=lib64
+}
+
+src_uninstall() {
+ emake install DESTDIR=${D}/usr LIB=lib64
+}