Move PKGBUILD to pkgbuild dir
This commit is contained in:
parent
ee25223e73
commit
06c8cab4bf
5 changed files with 0 additions and 0 deletions
46
pkgbuild/PKGBUILD
Normal file
46
pkgbuild/PKGBUILD
Normal file
|
@ -0,0 +1,46 @@
|
|||
pkgname=nummi-git
|
||||
pkgver=r298.2c95379
|
||||
pkgrel=1
|
||||
pkgdesc="Web-based accounting interface"
|
||||
arch=("any")
|
||||
url="https://git.edgarpierre.fr/edpibu/nummi"
|
||||
license=('AGPL3')
|
||||
depends=(
|
||||
"gunicorn"
|
||||
"python-django"
|
||||
"python-toml"
|
||||
"python-psycopg2"
|
||||
)
|
||||
makedepends=("git")
|
||||
optdepends=("postgresql: database")
|
||||
backup=("etc/${pkgname%-git}/config.toml")
|
||||
source=(
|
||||
"${pkgname}::git+https://git.edgarpierre.fr/edpibu/nummi"
|
||||
"${pkgname%-git}.service"
|
||||
"${pkgname%-git}.tmpfiles"
|
||||
"${pkgname%-git}.sysusers"
|
||||
"${pkgname%-git}.nginx"
|
||||
"config.toml"
|
||||
)
|
||||
b2sums=('SKIP'
|
||||
'c1e81c04cb09bf03e6f1f06b1de1a28bf39bf2b1571819071fe95e214847c7712e11ec9988061284fda2a3f565262018ac733603034c4c4aa98a50bc42f6bd95'
|
||||
'cd42e864d82ca5ea191d2c15cec55afea272a875f19ebc1252e03fb86ef3d62820e2fedd706a8da0b0e3a7aee355e0bb5dcdb7f3bd803497c1320fab540f7d70'
|
||||
'78bebc6cca3f8b520783565de9122cc57e62eb629d3693dfaa322a77f4be3c55c5cd5a460bd1f6f3028f4dd1b2018ec6166b7f9aaf55ac3be6178bd1a3a00405'
|
||||
'c878c463ecb58d94b3f9b96d798b098a7718aec6df4b424a60674c0a9daf9abcb4556e527e55f67dbb093e109145b0ca17556f7dce66116ba7b170ead61acc16'
|
||||
'efe7c0a7da971bbd43675c71bc16bd3d44948cec55fb5c2237196ad52d712f3e958790f171f0fab82e9ea5529a60789685c5936489b4e2ffdb4a0e1b3fcb031c')
|
||||
|
||||
pkgver() {
|
||||
cd "$pkgname"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm644 ${pkgname%-git}.service -t "${pkgdir}"/usr/lib/systemd/system/
|
||||
install -Dm644 ${pkgname%-git}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname%-git}.conf
|
||||
install -Dm644 ${pkgname%-git}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname%-git}.conf
|
||||
install -Dm644 ${pkgname%-git}.nginx "${pkgdir}"/etc/nginx/sites-enabled/${pkgname%-git}.conf
|
||||
install -Dm750 -o nummi -g nummi config.toml -t "${pkgdir}"/etc/${pkgname%-git}/
|
||||
|
||||
cd ${pkgname}/${pkgname%-git}
|
||||
find * -type f -exec install -Dm0644 "{}" "${pkgdir}/usr/share/webapps/${pkgname%-git}/{}" \;
|
||||
}
|
20
pkgbuild/nummi.nginx
Normal file
20
pkgbuild/nummi.nginx
Normal file
|
@ -0,0 +1,20 @@
|
|||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name nummi.edgarpierre.fr;
|
||||
|
||||
location / {
|
||||
include conf/50-proxy.conf;
|
||||
|
||||
proxy_pass http://unix:/run/nummi/nummi.socket;
|
||||
}
|
||||
|
||||
location /static {
|
||||
alias /srv/nummi;
|
||||
}
|
||||
|
||||
location /internal/media {
|
||||
internal;
|
||||
alias /var/lib/nummi;
|
||||
}
|
||||
}
|
21
pkgbuild/nummi.service
Normal file
21
pkgbuild/nummi.service
Normal file
|
@ -0,0 +1,21 @@
|
|||
[Unit]
|
||||
Description=Nummi server (accounting)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=nummi
|
||||
Group=nummi
|
||||
RuntimeDirectory=nummi
|
||||
WorkingDirectory=/usr/share/webapps/nummi
|
||||
Environment=NUMMI_CONFIG=/etc/nummi/config.toml
|
||||
ExecStartPre=/usr/bin/python manage.py migrate
|
||||
ExecStartPre=/usr/bin/python manage.py collectstatic --noinput
|
||||
ExecStart=/usr/bin/uvicorn nummi.asgi:application --uds /run/nummi/nummi.socket
|
||||
ExecReload=/bin/kill -s HUP $MAINPID
|
||||
KillMode=mixed
|
||||
TimeoutStopSec=5
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
2
pkgbuild/nummi.sysusers
Normal file
2
pkgbuild/nummi.sysusers
Normal file
|
@ -0,0 +1,2 @@
|
|||
u nummi - "Nummi daemon user" /var/lib/nummi /usr/bin/bash
|
||||
m nummi http
|
2
pkgbuild/nummi.tmpfiles
Normal file
2
pkgbuild/nummi.tmpfiles
Normal file
|
@ -0,0 +1,2 @@
|
|||
d /var/lib/nummi 0750 nummi http
|
||||
d /srv/nummi 0755 nummi nummi
|
Loading…
Add table
Add a link
Reference in a new issue