summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Kvapil2021-08-09 14:17:59 +0200
committerAndrei Kvapil2021-08-09 14:20:45 +0200
commitea72d2aef42a70450e0d331664758e1943f5d247 (patch)
treea911b75c61472c98e826be28a6b493dd09d3fc49
downloadaur-evdi-amd-vmap-texture.tar.gz
add initial PKGBUILD
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD87
2 files changed, 106 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..dd1235035ca9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = evdi-amd-vmap-texture
+ pkgdesc = A Linux® kernel module that enables management of multiple screens. Patched for the amd_vmap_texture support.
+ pkgver = 1.9.1.r6.g5490f94
+ pkgrel = 1
+ url = https://github.com/pioto1225/evdi
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ makedepends = libdrm
+ makedepends = linux-headers
+ depends = dkms
+ provides = evdi=1.9.1
+ conflicts = evdi
+ source = git+https://github.com/pioto1225/evdi#branch=amd_vmap_texture
+ md5sums = SKIP
+ sha256sums = SKIP
+
+pkgname = evdi-amd-vmap-texture
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..fe3e51e625e8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,87 @@
+# Oiginal PKGBUILD from https://aur.archlinux.org/evdi-git
+
+# After installation run following command to enable vmap_texture
+# echo "options evdi vmap_texture=1" | sudo tee /etc/modprobe.d/evdi.conf
+
+pkgname='evdi-amd-vmap-texture'
+pkgver=1.9.1.r6.g5490f94
+_pkgver="${pkgver%%.r*}"
+pkgrel=1
+pkgdesc='A Linux® kernel module that enables management of multiple screens. Patched for the amd_vmap_texture support.'
+arch=('i686' 'x86_64')
+url='https://github.com/pioto1225/evdi'
+license=('GPL')
+depends=('dkms')
+makedepends=('git' 'libdrm')
+makedepends+=('linux-headers')
+provides=("evdi=${_pkgver}")
+conflicts=('evdi')
+_srcdir="${pkgname%%-*}"
+source=(
+ 'git+https://github.com/pioto1225/evdi'
+)
+source[0]+='#branch=amd_vmap_texture'
+md5sums=('SKIP')
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "${_srcdir}"
+ local _modver _rev
+ #_modver="$(awk -F '=' '/MODVER=/ {print $2}' module/Makefile)"
+ _rev="$(git describe --long --tags | sed -e 's/^v//' -e 's/\([^-]*-g\)/r\1/' -e 's/-/./g')"
+ if [ -z "${_modver:-}" ]; then
+ printf '%s\n' "${_rev}"
+ else
+ printf '%s.r%s\n' "${_modver}" "${_rev##*.r}"
+ fi
+}
+
+prepare() {
+ cd "${_srcdir}"
+ local _src
+ for _src in "${source[@]%%::*}"; do
+ _src="${_src##*/}"
+ if [[ "${_src}" = *.patch ]]; then
+ msg2 "Patch ${_src}"
+ patch -Np1 -i "../${_src}"
+ fi
+ done
+
+ # Fix build for kernel 5.4
+ #sed -E -e 's:SUBDIRS=([^ ]+) :M=\1 &:g' -i 'module/Makefile'
+
+ sed -e 's:-Werror::g' -i 'Makefile'
+}
+
+build() {
+ cd "${_srcdir}"
+ # DKMS builds are hard to debug. We can build it here to debug the errors.
+ if :; then
+ # We only need to build the library in this step, dmks will build the module
+ cd 'library'
+ fi
+ CFLAGS="${CFLAGS/-fno-plt/}"
+ make
+}
+
+package() {
+ cd "${_srcdir}"
+ install -Dpm755 "library/lib${pkgname%%-*}.so"* -t "${pkgdir}/usr/lib/"
+
+ pushd "${pkgdir}/usr/lib/" > /dev/null
+ local _libs=(*.so.*)
+ if [ "${#_libs[@]}" -ne 1 ]; then
+ echo "Too many libs"
+ false
+ fi
+ _libs="${_libs[0]}"
+ local _libase="${_libs%.so*}.so"
+ ln -sf "${_libs}" "${_libase}"
+ ln -sf "${_libs}" "${_libase}.0" # bad soname
+ popd > /dev/null
+
+ local _DKMS="${pkgdir}/usr/src/${pkgname%%-*}-${_pkgver}"
+ install -Dpm644 module/* -t "${_DKMS}/"
+ make -j1 -C "${_DKMS}" clean
+ rm -f "${_DKMS}/evdi.mod"
+}