-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathPKGBUILD
43 lines (37 loc) · 1013 Bytes
/
PKGBUILD
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
pkgname=drogon-website
pkgver=0.0.1
pkgrel=1
arch=('aarch64' 'x86_64')
source=($pkgname.tar.zst)
pkg_pathname=`echo $pkgname | sed 's/-/_/g'`
backup=(usr/share/$pkg_pathname/drogon_config.json)
sha1sums=('SKIP')
depends=(
'drogon-git>=1.4'
)
makedepends=(
'gcc>=11'
'cmake>=3.5'
)
optdepends=(
'openssl'
)
build() {
cd $srcdir/$pkgname
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${pkgdir}/usr ..
make -j
}
package() {
cd $srcdir/$pkgname/build
make install
sed -i "s|\"document_root\": \".*\"|\"document_root\": \"/usr/share/$pkgname/content\"|" ${pkgdir}/usr/share/$pkg_pathname/bin/drogon_config.json
# Remove upload folder that may be created during development
if [ -d ${pkgdir}/usr/share/$pkgname/content/uploads ]; then
rm -rf ${pkgdir}/usr/share/$pkgname/content/uploads
fi
cd $srcdir/$pkgname
install -Dm644 systemd/$pkgname.service ${pkgdir}/usr/lib/systemd/system/$pkgname.service
install -Dm644 systemd/$pkgname.conf ${pkgdir}/usr/lib/systemd/system/$pkgname.conf
}