summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 98b58b8a38a1faee6ff74655f92c95c0511baca3 (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
48
# Maintainer: Felice Murolo <linuxboy@giove.tk>
pkgname=libqhttp
pkgver=r232.2cc654a
pkgrel=2
packager=felmur
pkgdesc="HTTP library, managing connections, parsing/building HTTP requests/responses"
arch=('x86_64')
url="https://github.com/azadkuh/qhttp"
license=('MIT')
provides=($pkgname)
conflicts=($pkgname)
depends=('qt5-base')
makedepends=('git')
source=("$pkgname::git+https://github.com/azadkuh/qhttp.git")
md5sums=('SKIP')

pkgver() {
  cd $pkgname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd $pkgname
  ./update-dependencies.sh
}

build() {
  cd $pkgname
  qmake -r qhttp.pro
  make -j 8
}

package() {
  cd $pkgname
  #install -D -m755 xbin/libqhttp.so.1.0.0 "$pkgdir/usr/lib/libqhttp.so.1.0.0"
  mkdir -p -v "$pkgdir/usr/lib"
  cp -v -d xbin/libqhttp* "$pkgdir/usr/lib"
  mkdir -p -v "$pkgdir/usr/include/libqhttp"
  cp -v -d example/include/* "$pkgdir/usr/include/libqhttp"
  cp -v -d src/*.hpp "$pkgdir/usr/include/libqhttp"
  
  install -D -m755 xbin/basic-server "$pkgdir/usr/share/libqhttp/xbin/basic-server"
  install -D -m755 xbin/helloworld "$pkgdir/usr/share/libqhttp/xbin/helloworld"
  install -D -m755 xbin/postcollector "$pkgdir/usr/share/libqhttp/xbin/postcollector"
  install -D -m755 README.md LICENSE "$pkgdir/usr/share/libqhttp/"
  
}