Minor fixes in PKGBUILD

This commit is contained in:
Rajnish Mishra 2021-12-24 05:53:17 +05:30
parent 1901188dc7
commit 6be6716f73
1 changed files with 8 additions and 3 deletions

View File

@ -2,14 +2,14 @@
pkgname=raspmgr-git
_pkgname=Rasp-Manager
pkgver=1.0.0.r10.7800fc8
pkgver=1.0.0.r11.1901188
pkgrel=1
pkgdesc="A simple server manager for local network (especially for Raspberry Pi)"
arch=('any')
url="https://github.com/PiyushXCoder/${_pkgname}"
license=('GPL3')
makedepends=('git' 'cargo')
source=("git+${url}.git")
source=("git+https://github.com/darajnish/Rasp-Manager.git")
md5sums=('SKIP')
pkgver() {
@ -18,6 +18,11 @@ pkgver() {
printf "$v.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${_pkgname}"
sed -i 's/port = 8080/port = 80/g;s/\".\/static\"/\"\/var\/lib\/rasp_mgr\/static\"/g' Config.toml
}
build() {
cd "${_pkgname}"
cargo build --release
@ -29,6 +34,6 @@ package() {
install -Dm644 "Config.toml" "${pkgdir}/etc/rasp_mgr/Config.toml"
install -Dm644 "rasp_mgr.service" "${pkgdir}/usr/lib/systemd/system/rasp_mgr.service"
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/rasp_mgr/LICENSE"
mkdir "${pkgdir}/var/lib/rasp_mgr/"
mkdir -p "${pkgdir}/var/lib/rasp_mgr/"
cp -r "static" "${pkgdir}/var/lib/rasp_mgr/"
}