summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b4c5d57ef216b1e83888ffa4a669f24ef323c9e5 (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
49
# Maintainer: Martin Chang <marty188586@gmail.com>
# Creater: Daniel Mensinger <daniel@mensinger-ka.de>
pkgname=drogon-git
pkgver=1.8.2.c5398b2
pkgrel=1
pkgdesc='A C++14/17 based HTTP web application framework running on Linux/macOS/Unix'
arch=('x86_64' 'aarch64')
url='https://github.com/an-tao/drogon'
license=('MIT')
depends=(mariadb postgresql libpqxx sqlite jsoncpp util-linux c-ares hiredis brotli)
makedepends=(cmake git)
checkdepends=()
optdepends=()
provides=(drogon)
conflicts=()
replaces=()
options=()
source=("$pkgname::git+https://github.com/an-tao/drogon.git"
        "trantor::git+https://github.com/an-tao/trantor.git" )
sha256sums=('SKIP' 'SKIP')

prepare() {
  cd "$pkgname"
  git submodule init
  git config submodule.trantor.url $srcdir/trantor
  git -c protocol.file.allow=always submodule update
}

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

build() {
  cd "$pkgname"
  [ -d build ] && rm -rf build
  mkdir build
  cd build
  cmake                         \
    -DCMAKE_BUILD_TYPE=RELEASE  \
    -DCMAKE_INSTALL_PREFIX=/usr \
    ..
	make
}

package() {
	cd "$pkgname/build"
	make DESTDIR="$pkgdir/" install
}