summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Maciej Nowak2018-03-13 19:57:23 +0100
committerTomasz Maciej Nowak2018-03-13 19:57:23 +0100
commit3759824c9ccefb58f97a36583f55d544027622fb (patch)
tree2bcdb52d3c2ccec3f1699975bfdc2da0d5b7a9cf
downloadaur-v4l-dvb-crazycat-git.tar.gz
Initial upload: v4l-dvb-crazycat-git 4.16rc4_r943.7ae4d8a8273b-1
addpkg: v4l-dvb-crazycat-git
-rw-r--r--.SRCINFO33
-rw-r--r--PKGBUILD64
-rw-r--r--v4l-dvb-crazycat.install14
3 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..31ed6c806220
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+# Generated by mksrcinfo v8
+# Tue Mar 13 19:03:31 UTC 2018
+pkgbase = v4l-dvb-crazycat-git
+ pkgdesc = V4L-DVB device drivers also with out-of-tree and staging ones (thanks to crazycat and ljalves)
+ pkgver = 4.16rc4_r943.7ae4d8a8273b
+ pkgrel = 1
+ url = https://github.com/crazycat69/linux_media
+ install = v4l-dvb-crazycat.install
+ arch = i686
+ arch = x86_64
+ arch = arm
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
+ license = GPL2
+ makedepends = bc
+ makedepends = git
+ makedepends = linux-headers
+ makedepends = patchutils
+ makedepends = perl-proc-processtable
+ makedepends = wget
+ depends = kmod
+ depends = linux=4.15.8
+ conflicts = v4l-dvb-git
+ conflicts = tbs-dvb-drivers
+ options = !strip
+ source = git+https://bitbucket.org/CrazyCat/media_build.git
+ source = git+https://github.com/crazycat69/linux_media.git
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = v4l-dvb-crazycat-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9606022e8f6f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Tomasz Maciej Nowak <com[dot]gmail[at]tmn505>
+# based on package v4l-dvb-git by Olaf Bauer <obauer@freenet.de>
+
+# All my PKGBUILDs are managed at https://github.com/tmn505/AUR
+
+_kernver="$(uname -r)"
+_packernver="$(sed -e 's/-.*//' -e 's/\.0//' <<< "${_kernver}")"
+_extramodules="extramodules-$(sed 's/\.[0-9]*-[0-9]*-/-/' <<< "${_kernver}")"
+pkgname=v4l-dvb-crazycat-git
+pkgver=4.16rc4_r943.7ae4d8a8273b
+pkgrel=1
+arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
+url="https://github.com/crazycat69/linux_media"
+license=('GPL2')
+pkgdesc="V4L-DVB device drivers also with out-of-tree and staging ones (thanks to crazycat and ljalves)"
+makedepends=('bc' 'git' 'linux-headers' 'patchutils' 'perl-proc-processtable' 'wget')
+depends=('kmod' "linux=${_packernver}")
+conflicts=('v4l-dvb-git' 'tbs-dvb-drivers')
+options=('!strip')
+install=v4l-dvb-crazycat.install
+source=("git+https://bitbucket.org/CrazyCat/media_build.git"
+ "git+${url}.git")
+sha256sums=('SKIP'
+ 'SKIP')
+
+prepare() {
+ cd ${srcdir}/media_build/linux
+ make tar DIR="${srcdir}/linux_media"
+ cd ..
+ make untar
+}
+
+pkgver() {
+ cd ${srcdir}/linux_media
+ printf "%s_r%s.%s" \
+ "$(make kernelversion | sed 's/\.0-//')" \
+ "$(git rev-list --no-merges --count `git log --pretty=format:%H --author="Linus Torvalds" --grep="Linux ." -n 1 -- Makefile`..HEAD)" \
+ "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd ${srcdir}/media_build
+ make VER="${_kernver}" KERNELRELEASE="${_kernver}" stagingconfig
+ make VER="${_kernver}" KERNELRELEASE="${_kernver}"
+}
+
+package() {
+ # set correct depmod command for install
+ cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
+ true && install=${install}.pkg
+ sed \
+ -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \
+ -i "${startdir}/${install}"
+ # package modules
+ cd ${srcdir}/media_build
+ sed -i '/^[^#].*depmod/s/^/#/' v4l/Makefile.media
+ make \
+ KERNELRELEASE="${_kernver}" \
+ DESTDIR="${pkgdir}" \
+ KDIR26="/usr/lib/modules/${_extramodules}/crazycat" \
+ FW_DIR="/dev/null" \
+ install
+ find ${pkgdir} -name '*.ko' -exec gzip -9 {} \;
+}
diff --git a/v4l-dvb-crazycat.install b/v4l-dvb-crazycat.install
new file mode 100644
index 000000000000..bc604f800153
--- /dev/null
+++ b/v4l-dvb-crazycat.install
@@ -0,0 +1,14 @@
+KERNEL_VERSION=
+
+post_install() {
+ echo ">>> Updating module dependencies. Please wait ..."
+ depmod $(cat /usr/lib/modules/${KERNEL_VERSION}/extramodules/version) > /dev/null 2>&1
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}