summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6c052d3b12b9d46419ed4cb2eda9e50372d00f98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
# Contributor: Kosyak <ObKo@mail.ru>

pkgname=qextserialport
pkgver=1.2rc
pkgrel=6
pkgdesc="Cross-platform serial port class libary for Qt4 and Qt5."
arch=('i686' 'x86_64')
url='https://github.com/qextserialport/qextserialport'
license=('MIT')
depends=('qt5-base')
source=("qextserialport-${pkgver}.tar.gz::https://github.com/qextserialport/qextserialport/archive/${pkgver}.tar.gz")
sha1sums=('2cd3ec6771b056db1bdf471517f8e20e8a4ecff2')

prepare() {
  mkdir -p build
}

build() {
  cd build

  qmake-qt5 "../qextserialport-${pkgver}"
  make
}

package() {
  make -C build INSTALL_ROOT="${pkgdir}" install

  install -Dm644 "qextserialport-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/qextserialport/LICENSE"

  # Fix wrong path in prl files
  find "${pkgdir}/usr/lib" -type f -name '*.prl' \
    -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
}