summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 51906a278bebf74e9f5fb35c84364cd795422f4b (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
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: Antiquete <antiquete@proton.me>

pkgname=mmconneqt-git
pkgver=0.1.1.r7.g66ac6a5
pkgrel=1
pkgdesc="A simple qt based wrapper gui for ModemManager"
arch=('x86_64')
url="https://gitlab.com/Antiquete/mmconneqt"
license=('GPL3')
depends=('qt5-base' 'modemmanager')
makedepends=('git' 'make')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+$url.git" "${pkgname%-git}.desktop")
sha256sums=('SKIP'
            'ac2d984d9c86da3a7af523e99b3f31796b8063c60056319d61688fd3cc8c4766')

pkgver() {
  cd "$srcdir/${pkgname%-git}"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir/${pkgname%-git}"
  mkdir -p build
}

build() {
  cd "$srcdir/${pkgname%-git}"

  export QMAKE_CFLAGS="${CFLAGS}"
  export QMAKE_CXXFLAGS="${CXXFLAGS}"
  export QMAKE_LFLAGS="${LDFLAGS}"

  pushd build
  qmake-qt5 CONFIG+='c++11' PREFIX='/usr' ../MMConneqt.pro
  make
  popd
}

package() {
  cd "$srcdir/${pkgname%-git}"
  install -Dm644 "COPYING" -t "$pkgdir/usr/share/licenses/${pkgname%-git}"
  install -Dm755 "build/${pkgname%-git}" -t "$pkgdir/usr/bin/"
  install -Dm644 "src/icon.png" "$pkgdir/usr/share/pixmaps/${pkgname%-git}.png"
  install -Dm644 "$srcdir/${pkgname%-git}.desktop" -t "$pkgdir/usr/share/applications/"
}