summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--Makefile16
-rw-r--r--PKGBUILD27
-rw-r--r--fix-path_for_include_deadbeef_h.patch8
4 files changed, 50 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6f814f94e912..fd3d0ec27780 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,18 @@
pkgbase = deadbeef-plugin-rating
- pkgdesc = rate song(s) by editing the metadata tag rating
+ pkgdesc = rate songs by editing the metadata tag: rating
pkgver = 1.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/splushii/deadbeef-rating
arch = i686
arch = x86_64
license = GPL2
depends = deadbeef
source = deadbeef-rating-1.2.tar.gz::https://github.com/splushii/deadbeef-rating/archive/1.2.tar.gz
+ source = fix-path_for_include_deadbeef_h.patch
+ source = Makefile
sha256sums = 2017bdd563c4f46a9af2d349ac8676b461969824ad1254cd653c7e70dcabff19
+ sha256sums = 1c99aab7c07fd129cebe4fb6a768ce729248e0e742f5a03223f8a830a8e17ab3
+ sha256sums = a98bc49c1899f533707859b92fa54211fdc7576e2e89146605caf0eab16746f4
pkgname = deadbeef-plugin-rating
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..5bc0b472fe40
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+CFLAGS_EXTRA ?= -Wall -fPIC -std=c99 -shared -O2
+PREFIX ?= $(HOME)/.local
+LIBDIR ?= /lib/deadbeef
+
+build:
+ $(CC) $(CFLAGS) $(CFLAGS_EXTRA) rating.c -o rating.so
+
+clean:
+ test -f rating.so && rm rating.so || true
+
+install:
+ install -d "$(DESTDIR)$(PREFIX)$(LIBDIR)"
+ install "rating.so" "$(DESTDIR)$(PREFIX)$(LIBDIR)/rating.so"
+
+uninstall:
+ rm "$(DESTDIR)$(PREFIX)$(LIBDIR)/rating.so"
diff --git a/PKGBUILD b/PKGBUILD
index 0366cd8a6e86..72531ada807a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,21 +2,34 @@
pkgname=deadbeef-plugin-rating
_pkgname=deadbeef-rating
pkgver=1.2
-pkgrel=1
-pkgdesc="rate song(s) by editing the metadata tag rating"
+pkgrel=2
+pkgdesc="rate songs by editing the metadata tag: rating"
url="https://github.com/splushii/deadbeef-rating"
arch=('i686' 'x86_64')
-license=('GPL2')
+license=('GPL2') # or GPL3? who know?
depends=('deadbeef')
-source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/splushii/${_pkgname}/archive/${pkgver}.tar.gz")
-sha256sums=('2017bdd563c4f46a9af2d349ac8676b461969824ad1254cd653c7e70dcabff19')
+source=(
+ "${_pkgname}-${pkgver}.tar.gz::https://github.com/splushii/${_pkgname}/archive/${pkgver}.tar.gz"
+ fix-path_for_include_deadbeef_h.patch
+ Makefile
+)
+sha256sums=('2017bdd563c4f46a9af2d349ac8676b461969824ad1254cd653c7e70dcabff19'
+ '1c99aab7c07fd129cebe4fb6a768ce729248e0e742f5a03223f8a830a8e17ab3'
+ 'a98bc49c1899f533707859b92fa54211fdc7576e2e89146605caf0eab16746f4')
+
+prepare() {
+ cd "${_pkgname}-${pkgver}"
+ cp ../Makefile .
+ patch -p1 -i ../fix-path_for_include_deadbeef_h.patch
+}
build() {
cd "${_pkgname}-${pkgver}"
- gcc -Wall -I/usr/include/deadbeef/ -fPIC -std=c99 -shared -O2 -o rating.so rating.c
+ make
}
package() {
- install -D -v -c "${srcdir}/${_pkgname}-${pkgver}/rating.so" "${pkgdir}/usr/lib/deadbeef/rating.so"
+ cd "${_pkgname}-${pkgver}"
+ make install PREFIX="/usr" DESTDIR="${pkgdir}"
}
diff --git a/fix-path_for_include_deadbeef_h.patch b/fix-path_for_include_deadbeef_h.patch
new file mode 100644
index 000000000000..b809fd7c3df6
--- /dev/null
+++ b/fix-path_for_include_deadbeef_h.patch
@@ -0,0 +1,8 @@
+--- a/rating.c 2019-06-06 15:56:03.000000000 +0200
++++ b/rating.c 2020-05-28 17:48:35.171091539 +0200
+@@ -1,4 +1,4 @@
+-#include <deadbeef.h>
++#include <deadbeef/deadbeef.h>
+ #include <string.h>
+ #include <stdlib.h>
+