summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormedicineman252020-01-05 22:27:47 +1100
committermedicineman252020-01-05 22:27:47 +1100
commit58ee00e1ebc3f74cf16eb3cf3a9c222187a52b97 (patch)
treebdf7b2bc39e325faad0d6682625d62c654a24993
downloadaur-58ee00e1ebc3f74cf16eb3cf3a9c222187a52b97.tar.gz
first commit, PKGBUILD, .SRCINFO, and LICENSE
-rw-r--r--.SRCINFO16
-rw-r--r--LICENSE29
-rw-r--r--PKGBUILD40
3 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7776a368906c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = spidriver-git
+ pkgdesc = CL utility and shared library, for the spidriver usb-to-spi adaptor
+ pkgver = v.r43.gc781cc2
+ pkgrel = 1
+ url = https://spidriver.com/
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = git
+ provides = spidriver.so_v.r43.gc781cc2
+ provides = spicl
+ source = spidriver-git::git+https://github.com/jamesbowman/spidriver.git
+ md5sums = SKIP
+
+pkgname = spidriver-git
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..efc1d2879e1a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2018, James Bowman
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ad78871bde13
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# This is an example PKGBUILD file. Use this as a start to creating your own,
+# and remove these comments. For more information, see 'man PKGBUILD'.
+# NOTE: Please fill out the license field for your package! If it is unknown,
+# then please put 'unknown'.
+
+# Maintainer: Aidan MP <admin@bitshift.net.au>
+_pkgname=spidriver
+pkgname=$_pkgname-git
+pkgver=v$pkgver.r43.gc781cc2
+pkgrel=1
+pkgdesc="CL utility and shared library, for the spidriver usb-to-spi adaptor"
+arch=('i686' 'x86_64')
+url="https://spidriver.com/"
+license=('BSD')
+makedepends=('git')
+provides=("spidriver.so_$pkgver" "spicl")
+source=('spidriver-git::git+https://github.com/jamesbowman/spidriver.git')
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/.*r/v$pkgver.r/'
+}
+
+build() {
+ cd $srcdir/$pkgname/c
+ make -f linux/Makefile
+ cd common
+ gcc -c -Wall -Werror -fpic spidriver.c
+ gcc -shared -o libspidriver.so spidriver.o
+}
+
+package() {
+ mkdir -p $pkgdir/usr/bin
+ mkdir -p $pkgdir/usr/lib
+
+ cd $srcdir/$pkgname/c
+ cp ./build/spicl $pkgdir/usr/bin
+ cp ./common/libspidriver.so $pkgdir/usr/lib
+}