summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUffe Jakobsen2018-02-25 03:03:36 +0100
committerUffe Jakobsen2018-02-25 03:03:36 +0100
commit36a128689f15693b68c7929e2e58af0cbeeb0b8a (patch)
tree1c0178f3bf5249fcd9765c4f26c2d83035b8907e
parent154f0385baf619a2b78ec668f9209d4ab8837c70 (diff)
downloadaur-36a128689f15693b68c7929e2e58af0cbeeb0b8a.tar.gz
Update
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD38
2 files changed, 33 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1aa3220cb658..806b2ca96135 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Mon Oct 17 09:45:45 UTC 2016
+# Sun Feb 25 02:02:29 UTC 2018
pkgbase = opencbm-git
pkgdesc = OpenCBM allows access to Commodore (C64) storage devices VIC 1540, 1541, 1570, 1571, or even 1581 floppy drive
- pkgver = r1229.dbeb7de
+ pkgver = r1249.19c0d53
pkgrel = 1
url = http://sourceforge.net/projects/opencbm/
arch = i686
diff --git a/PKGBUILD b/PKGBUILD
index c49a73d212e9..50230f600924 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
# Maintainer: Uffe Jakobsen <microtop@starion.dk>
#
pkgname=opencbm-git
-pkgver=r1229.dbeb7de
+pkgver=r1249.19c0d53
pkgrel=1
epoch=
pkgdesc="OpenCBM allows access to Commodore (C64) storage devices VIC 1540, 1541, 1570, 1571, or even 1581 floppy drive"
@@ -30,6 +30,9 @@ noextract=()
source=(git+http://git.code.sf.net/p/opencbm/code)
md5sums=('SKIP')
+build_kernel_module=
+
+
pkgver() {
cd "${srcdir}/code"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
@@ -37,12 +40,23 @@ pkgver() {
prepare() {
cd "${srcdir}/code"
+ # kernel module: add includes to kernel module source
+ sed -i '\!#include <asm/uaccess.h>!s!.*!&\n#include <linux/uaccess.h>\n#include <linux/sched/signal.h>!' opencbm/sys/linux/cbm_module.c
+ # kernel module: Makefile is needed later
+ sed -i '\!-rm -f Makefile!d' opencbm/sys/linux/LINUX/Makefile
}
build() {
cd "${srcdir}/code"
- #make -f LINUX/Makefile opencbm plugin-xum1541 plugin-xu1541
- make -f LINUX/Makefile opencbm plugin
+ CC65_HOME="/usr/share/cc65"
+ export CC65_HOME
+ #make -f LINUX/Makefile opencbm plugin
+ make -f LINUX/Makefile opencbm plugin-xum1541 plugin-xu1541
+
+ # kernel module: build (optional)
+ if test "${build_kernel_module}" != ""; then
+ make -f LINUX/Makefile plugin-xa1541
+ fi
}
check() {
@@ -52,12 +66,22 @@ check() {
package() {
cd "${srcdir}/code"
mkdir -p "${pkgdir}/etc/udev/rules.d"
- make -f LINUX/Makefile PREFIX="/usr" MANDIR="/usr/share/man/man1" INFODIR="/usr/share/info" DESTDIR="${pkgdir}/" install install-plugin
+ make -f LINUX/Makefile PREFIX="/usr" MANDIR="/usr/share/man/man1" INFODIR="/usr/share/info" DESTDIR="${pkgdir}/" install install-plugin-xum1541 install-plugin-xu1541
mv "${pkgdir}/etc/opencbm.conf" "${pkgdir}/etc/opencbm.conf.sample"
- # remove kernel modules - not supported by this pkg
- rm -rf "${pkgdir}/lib/modules"
+
+
+ # kernel module: build (optional)
+ if test "${build_kernel_module}" != ""; then
+ make -f LINUX/Makefile PREFIX="/usr" MANDIR="/usr/share/man/man1" INFODIR="/usr/share/info" DESTDIR="${pkgdir}/" install install-plugin-xa1541
+ # kernel module: copy and compress
+ cp -a "${pkgdir}/lib" "${pkgdir}/usr"
+ gzip "${pkgdir}/usr/lib/modules/$(uname -r)/kernel/drivers/char/cbm.ko"
+ # kernel module: clean up left overs
+ rm -rf "${pkgdir}/lib/modules"
+ rmdir "${pkgdir}/lib"
+ fi
+
# clean up empty dirs
- rmdir "${pkgdir}/lib"
rmdir "${pkgdir}/usr/share/info"
}