summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Malaco2019-12-10 10:42:43 -0300
committerJonas Malaco2019-12-10 10:42:43 -0300
commiteb18443297f66219803f909d94f13ab04f2f9dc8 (patch)
tree8a0267a93d965ccb8a618ec42ea392ac05a84e77
downloadaur-eb18443297f66219803f909d94f13ab04f2f9dc8.tar.gz
Create package for libopenusb 1.1.11
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD33
-rw-r--r--fix-inline-function-declariation-without-definition.patch17
-rw-r--r--fix-parallel-builds-of-documentation.patch37
5 files changed, 113 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8b6d99f57128
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = libopenusb
+ pkgdesc = An MT-safe libusb0
+ pkgver = 1.1.11
+ pkgrel = 1
+ url = https://sourceforge.net/projects/openusb
+ arch = x86_64
+ license = LGPL
+ makedepends = systemd
+ depends = glibc
+ depends = systemd-libs
+ provides = libopenusb.so
+ source = https://master.dl.sourceforge.net/project/openusb/libopenusb/libopenusb-1.1.11/libopenusb-1.1.11.tar.gz
+ source = fix-parallel-builds-of-documentation.patch
+ source = fix-inline-function-declariation-without-definition.patch
+ md5sums = a9dc01c88db0c6688fc92cf7ae0eb9ca
+ md5sums = 657348a9113f2dfe39a2ac687d5d0237
+ md5sums = f5ab870d39e8bda7e677e824d292e7ed
+
+pkgname = libopenusb
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b3940c8a9a6f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+**/*
+
+!*.patch
+!.SRCINFO
+!.gitignore
+!PKGBUILD
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cbd1f5245c70
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Jonas Malaco <jonas@protocubo.io>
+pkgname=libopenusb
+pkgver=1.1.11
+pkgrel=1
+pkgdesc='An MT-safe libusb0'
+arch=(x86_64)
+url='https://sourceforge.net/projects/openusb'
+license=(LGPL)
+depends=(glibc systemd-libs)
+makedepends=(systemd)
+provides=(libopenusb.so)
+source=("https://master.dl.sourceforge.net/project/openusb/libopenusb/libopenusb-$pkgver/libopenusb-$pkgver.tar.gz"
+ 'fix-parallel-builds-of-documentation.patch'
+ 'fix-inline-function-declariation-without-definition.patch')
+md5sums=('a9dc01c88db0c6688fc92cf7ae0eb9ca'
+ '657348a9113f2dfe39a2ac687d5d0237'
+ 'f5ab870d39e8bda7e677e824d292e7ed')
+
+build() {
+ cd $pkgname-$pkgver
+ patch --forward --strip=1 --input="${srcdir}/fix-parallel-builds-of-documentation.patch"
+ patch --forward --strip=1 --input="${srcdir}/fix-inline-function-declariation-without-definition.patch"
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ make -C $pkgname-$pkgver check
+}
+
+package () {
+ make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
+}
diff --git a/fix-inline-function-declariation-without-definition.patch b/fix-inline-function-declariation-without-definition.patch
new file mode 100644
index 000000000000..1531a6920f28
--- /dev/null
+++ b/fix-inline-function-declariation-without-definition.patch
@@ -0,0 +1,17 @@
+Description: Fix inline function declaration without definition
+Author: Simon Richter <sjr@debian.org>
+Last-Update: 2012-12-29
+
+--- libopenusb-1.1.7.orig/src/openusb.h.in
++++ libopenusb-1.1.7/src/openusb.h.in
+@@ -647,8 +647,8 @@ int32_t openusb_set_default_timeout(open
+ *
+ * Return Values - Converted data
+ */
+-inline uint16_t openusb_le16_to_cpu(uint16_t data);
+-inline uint32_t openusb_le32_to_cpu(uint32_t data);
++uint16_t openusb_le16_to_cpu(uint16_t data);
++uint32_t openusb_le32_to_cpu(uint32_t data);
+ #define openusb_cpu_to_le16 openusb_le16_to_cpu
+ #define openusb_cpu_to_le32 openusb_le32_to_cpu
+
diff --git a/fix-parallel-builds-of-documentation.patch b/fix-parallel-builds-of-documentation.patch
new file mode 100644
index 000000000000..94d546274ce8
--- /dev/null
+++ b/fix-parallel-builds-of-documentation.patch
@@ -0,0 +1,37 @@
+Description: Fix parallel builds of documentation
+Author: Simon Richter <sjr@debian.org>
+Last-Update: 2012-12-28
+
+--- libopenusb-1.1.7.orig/doc/Makefile.am
++++ libopenusb-1.1.7/doc/Makefile.am
+@@ -34,11 +34,10 @@ manual.ps.gz: $(xml_files) website.dsl
+ gzip manual.ps
+
+ html/index.html: $(xml_files) website.dsl
+- rm -rf html
+- mkdir html
++ mkdir -p html
+ @JADE@ -t xml -d website.dsl\#html $(XMLDCL) manual.xml
+
+ html/openusb_guide.html: $(xml_files) website.dsl
+- test -d html || mkdir html
++ mkdir -p html
+ @JADE@ -V nochunks -t xml -d website.dsl\#html $(XMLDCL) manual.xml > html/openusb_guide.html
+
+--- libopenusb-1.1.7.orig/doc/Makefile.in
++++ libopenusb-1.1.7/doc/Makefile.in
+@@ -411,12 +411,11 @@ manual.ps.gz: $(xml_files) website.dsl
+ gzip manual.ps
+
+ html/index.html: $(xml_files) website.dsl
+- rm -rf html
+- mkdir html
++ mkdir -p html
+ @JADE@ -t xml -d website.dsl\#html $(XMLDCL) manual.xml
+
+ html/openusb_guide.html: $(xml_files) website.dsl
+- test -d html || mkdir html
++ mkdir -p html
+ @JADE@ -V nochunks -t xml -d website.dsl\#html $(XMLDCL) manual.xml > html/openusb_guide.html
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.