arch-ppa/src/evdi-git/PKGBUILD

74 lines
1.7 KiB
Bash
Raw Normal View History

2019-07-27 10:40:51 -04:00
# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
# Contributor: ajs124
2017-08-27 13:02:19 -04:00
2019-07-27 10:40:51 -04:00
# Tested with Kernel 4.16, Dell D3000 SuperSpeed USB 3.0 Docking Station, 17e9:4318 DisplayLink
set -u
pkgname='evdi-git'
pkgver=1.6.2.r2.g75536ec
_pkgver="${pkgver%%.r*}"
2017-08-27 13:02:19 -04:00
pkgrel=1
2019-07-27 10:40:51 -04:00
pkgdesc='kernel module that enables management of multiple screens, primarily for DisplayLink USB VGA DVI HDMI DisplayPort video'
pkgdesc+=' git version.'
2017-08-27 13:02:19 -04:00
arch=('i686' 'x86_64')
2019-07-27 10:40:51 -04:00
url='https://github.com/DisplayLink/evdi'
2017-08-27 13:02:19 -04:00
license=('GPL')
2019-07-27 10:40:51 -04:00
depends=('dkms')
makedepends=('git' 'libdrm')
provides=("evdi=${_pkgver}")
conflicts=('evdi')
install=${pkgname}.install
changelog="${pkgname}.Changelog"
_srcdir="${pkgname%-git}"
source=(
'git+https://github.com/DisplayLink/evdi/'
'relro.patch'
)
md5sums=('SKIP'
'05e64dd295a66c030139d0c8f6f7013b')
sha256sums=('SKIP'
'ff03b5a804af826e6b0678cd4d821b5ecd2c5bf04ea7c465751f83b28e928786')
2017-08-27 13:02:19 -04:00
pkgver() {
2019-07-27 10:40:51 -04:00
set -u
cd "${_srcdir}"
git describe --long --tags | sed -e 's/^v//' -e 's/\([^-]*-g\)/r\1/' -e 's/-/./g'
set +u
}
prepare() {
set -u
cd "${_srcdir}"
local _src
for _src in "${source[@]}"; do
_src="${_src%%::*}"
_src="${_src##*/}"
if [[ "${_src}" = *.patch ]]; then
patch -Np1 -i "../${_src}"
fi
done
set +u
2017-08-27 13:02:19 -04:00
}
build() {
2019-07-27 10:40:51 -04:00
set -u
# We only need to build the library in this step, dmks will build the module
#cd "${_srcdir}/library"
# DKMS builds are hard to debug. We build it here and throw it away.
cd "${_srcdir}"
make
set +u
2017-08-27 13:02:19 -04:00
}
package() {
2019-07-27 10:40:51 -04:00
set -u
cd "${_srcdir}"
install -Dpm755 "library/lib${pkgname%-git}.so" -t "${pkgdir}/usr/lib/"
2017-08-27 13:02:19 -04:00
2019-07-27 10:40:51 -04:00
local _DKMS="${pkgdir}/usr/src/${pkgname%-git}-${_pkgver}"
install -Dpm644 module/* -t "${_DKMS}/"
make -j1 -C "${_DKMS}" clean
set +u
}
set +u