diff options
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 51 |
2 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d5c72fb580db --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = qt5-serialport-git + pkgdesc = Provides access to hardware and virtual serial ports + pkgver = 5.12.1.r12.ge6a5786 + pkgrel = 1 + url = https://www.qt.io/ + arch = i686 + arch = x86_64 + license = FDL + license = GPL + license = LGPL + license = custom + makedepends = git + depends = qt5-base + provides = qt5-serialport + conflicts = qt5-serialport + source = git+https://code.qt.io/qt/qtserialport.git#branch=dev + sha256sums = SKIP + +pkgname = qt5-serialport-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..85993a505579 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net> + +pkgname=qt5-serialport-git +pkgver=5.12.1.r12.ge6a5786 +pkgrel=1 +pkgdesc="Provides access to hardware and virtual serial ports" +arch=('i686' 'x86_64') +url="https://www.qt.io/" +license=('FDL' 'GPL' 'LGPL' 'custom') +depends=('qt5-base') +makedepends=('git') +provides=('qt5-serialport') +conflicts=('qt5-serialport') +source=("git+https://code.qt.io/qt/qtserialport.git#branch=dev") +sha256sums=('SKIP') + + +prepare() { + cd "$srcdir" + + mkdir -p "_build" +} + +pkgver() { + cd "qtserialport" + + _tag=$(git tag -l --sort -v:refname | sed -n '1,1{s/v//p}') + _rev=$(git rev-list --count v$_tag..HEAD) + _hash=$(git rev-parse --short HEAD) + printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" +} + +build() { + cd "_build" + + qmake ../qtserialport + make +} + +package() { + cd "_build" + + make INSTALL_ROOT="$pkgdir" install + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/usr/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + cd "$srcdir/qtserialport" + install -Dm644 "LICENSE.GPL3-EXCEPT" "$pkgdir/usr/share/licenses/qt5-serialport/LICENSE.GPL3-EXCEPT" +} |