Upgrade core-testing to v0.4.0
Add the new config files and add a drop-in config for the webapp.
This commit is contained in:
parent
b39bd4a189
commit
58d94cc3a3
8 changed files with 55 additions and 42 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Maintainer: Tobias Reisinger <tobias@msrg.cc>
|
# Maintainer: Tobias Reisinger <tobias@msrg.cc>
|
||||||
pkgname=emgauwa-core-testing
|
pkgname=emgauwa-core-testing
|
||||||
pkgver=0.3.5
|
pkgver=0.4.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
epoch=
|
epoch=
|
||||||
pkgdesc=""
|
pkgdesc=""
|
||||||
|
@ -8,20 +8,20 @@ arch=('x86_64' 'armv6h' 'armv7h' 'aarch64')
|
||||||
url="https://git.serguzim.me/emgauwa/core"
|
url="https://git.serguzim.me/emgauwa/core"
|
||||||
license=('unknown')
|
license=('unknown')
|
||||||
groups=()
|
groups=()
|
||||||
depends=('glibc' 'sqlite')
|
depends=('sqlite' 'libbsd')
|
||||||
makedepends=('make' 'cmake' 'gcc' 'vim')
|
makedepends=('make' 'cmake' 'gcc' 'vim')
|
||||||
conflicts=('emgauwa-core')
|
conflicts=('emgauwa-core')
|
||||||
backup=('etc/emgauwa/core.ini')
|
backup=('etc/emgauwa/core.conf')
|
||||||
source=("https://git.serguzim.me/emgauwa/core/archive/testing-v$pkgver.tar.gz"
|
source=("https://git.serguzim.me/emgauwa/core/archive/testing-v$pkgver.tar.gz"
|
||||||
"core.ini"
|
"core.conf"
|
||||||
"emgauwa-core-testing.service"
|
"emgauwa-core-testing.service"
|
||||||
"emgauwa-core-testing.sysusers"
|
"emgauwa-core-testing.sysusers"
|
||||||
"emgauwa-core-testing.tmpfiles")
|
"emgauwa-core-testing.tmpfiles")
|
||||||
sha256sums=('98c19898f675d4c86d8069bf9d17de7069822e16bd85815e8bd7d6c5630dd8b9'
|
sha256sums=('d4d5c6be1fcfa27ac9b6033c23e3730814f423a14103503df4fd5af2628612a4'
|
||||||
'210c8a05bae65e5f19c0c168b0f8c63d064706a9e7885a22a57ca7b04ea4e00f'
|
'ac9cb03e0aee8cc7253f25f6c950936fb8195e450d38c2b369325038d3294d93'
|
||||||
'c781f4d50da8e158551a47a8549981dad05faaf2d632c4fde8b36b48474ab0ec'
|
'541f0c83d883416eec015b5d47061c221ba2aa1ea5683b78a0aaa32145b955e3'
|
||||||
'b9cde58b9e9b0605ca4a1eddd78067c55aa3c8d40f80cde0a25c4da9f6f95798'
|
'b9cde58b9e9b0605ca4a1eddd78067c55aa3c8d40f80cde0a25c4da9f6f95798'
|
||||||
'76f7d12b56efbdb06eb14ac758da2daa4ca9f2c6449a0103db6aeab22ed93cd8')
|
'a7ba77dd757960bf466dbca1510d3b7441fba7474fa40e395111c4551447d75f')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "core"
|
cd "core"
|
||||||
|
@ -37,11 +37,15 @@ build() {
|
||||||
package() {
|
package() {
|
||||||
install -Dm755 "core/build/core" "${pkgdir}/usr/bin/emgauwa-core"
|
install -Dm755 "core/build/core" "${pkgdir}/usr/bin/emgauwa-core"
|
||||||
|
|
||||||
install -Dm600 "core.ini" "${pkgdir}/etc/emgauwa/core.ini"
|
install -Ddm750 "${pkgdir}/etc/emgauwa/"
|
||||||
|
install -Ddm750 "${pkgdir}/etc/emgauwa/core.conf.d/"
|
||||||
|
|
||||||
|
install -Dm660 "core.conf" "${pkgdir}/etc/emgauwa/core.conf"
|
||||||
|
|
||||||
|
install -Ddm750 "${pkgdir}/var/lib/emgauwa"
|
||||||
|
install -Ddm750 "${pkgdir}/var/lib/emgauwa/core/"
|
||||||
|
|
||||||
install -Dm644 "${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
|
install -Dm644 "${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
|
||||||
install -Dm644 "${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
|
install -Dm644 "${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
|
||||||
install -Dm644 "${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
|
install -Dm644 "${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
|
||||||
|
|
||||||
install -Ddm750 "${pkgdir}/var/lib/emgauwa"
|
|
||||||
install -Ddm750 "${pkgdir}/var/lib/emgauwa/core"
|
|
||||||
}
|
}
|
||||||
|
|
19
core-testing/core.conf
Normal file
19
core-testing/core.conf
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[core]
|
||||||
|
database = "/var/lib/emgauwa/core/db.sqlite"
|
||||||
|
|
||||||
|
user = "emgauwa"
|
||||||
|
group = "emgauwa"
|
||||||
|
|
||||||
|
include = "/etc/emgauwa/core.conf.d/"
|
||||||
|
|
||||||
|
[ports]
|
||||||
|
server = 80
|
||||||
|
# 4422 for testing; 4421 for dev-env; 4420 for testing-env; 4419 for prod-env
|
||||||
|
discovery = 4420
|
||||||
|
# 1886 for testing; 1885 for dev-env; 1884 for testing-env; 1883 for prod-env
|
||||||
|
mqtt = 1884
|
||||||
|
|
||||||
|
|
||||||
|
[logging]
|
||||||
|
level = "debug"
|
||||||
|
file = "/var/log/emgauwa/core.log"
|
|
@ -1,19 +0,0 @@
|
||||||
[core]
|
|
||||||
server-port = 80
|
|
||||||
|
|
||||||
user = emgauwa
|
|
||||||
group = emgauwa
|
|
||||||
|
|
||||||
database = /var/lib/emgauwa/core/db.sqlite
|
|
||||||
not-found-file = 404.html
|
|
||||||
not-found-file-mime = text/html
|
|
||||||
not-found-content = 404 - NOT FOUND
|
|
||||||
not-found-content-type = text/plain
|
|
||||||
|
|
||||||
: 4422 for testing; 4421 for dev-env; 4420 for testing-env; 4419 for prod-env
|
|
||||||
discovery-port = 4420
|
|
||||||
: 1886 for testing; 1885 for dev-env; 1884 for testing-env; 1883 for prod-env
|
|
||||||
mqtt-port = 1884
|
|
||||||
|
|
||||||
log-level = debug
|
|
||||||
log-file = /var/log/emgauwa/core.log
|
|
|
@ -5,7 +5,7 @@ After=network.target
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory=/var/lib/emgauwa/core/
|
WorkingDirectory=/var/lib/emgauwa/core/
|
||||||
ExecStart=emgauwa-core start -c /etc/emgauwa/core.ini
|
ExecStart=emgauwa-core
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
@ -3,5 +3,6 @@ d /var/lib/emgauwa/core 0750
|
||||||
Z /var/lib/emgauwa - emgauwa emgauwa
|
Z /var/lib/emgauwa - emgauwa emgauwa
|
||||||
d /var/log/emgauwa 0750
|
d /var/log/emgauwa 0750
|
||||||
Z /var/log/emgauwa - emgauwa emgauwa
|
Z /var/log/emgauwa - emgauwa emgauwa
|
||||||
z /etc/emgauwa 0755 root emgauwa
|
z /etc/emgauwa 0750 root emgauwa
|
||||||
z /etc/emgauwa/core.ini 0660 root emgauwa
|
z /etc/emgauwa/core.conf 0660 root emgauwa
|
||||||
|
d /etc/emgauwa/core.conf.d 0750 root emgauwa
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/sh
|
#!/usr/bin/sh
|
||||||
|
|
||||||
|
commit_message=""
|
||||||
|
|
||||||
function get_latest_version()
|
function get_latest_version()
|
||||||
{
|
{
|
||||||
repo=$1
|
repo=$1
|
||||||
|
@ -20,9 +22,6 @@ function get_latest_version()
|
||||||
|
|
||||||
echo $latest_version
|
echo $latest_version
|
||||||
}
|
}
|
||||||
|
|
||||||
commit_message=""
|
|
||||||
|
|
||||||
function upgrade_package()
|
function upgrade_package()
|
||||||
{
|
{
|
||||||
cd $1
|
cd $1
|
||||||
|
@ -35,7 +34,7 @@ function upgrade_package()
|
||||||
|
|
||||||
if [ "$current_version" != "$latest_version" ]
|
if [ "$current_version" != "$latest_version" ]
|
||||||
then
|
then
|
||||||
commit_message="$commit_message\nupgpkg: $1 v$latest_version"
|
commit_message="$commit_message Upgrade $1 to v$latest_version\n"
|
||||||
git add PKGBUILD
|
git add PKGBUILD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,23 @@
|
||||||
# Maintainer: Tobias Reisinger <tobias@msrg.cc>
|
# Maintainer: Tobias Reisinger <tobias@msrg.cc>
|
||||||
pkgname=emgauwa-webapp
|
pkgname=emgauwa-webapp
|
||||||
pkgver=0.0.9
|
pkgver=0.0.9
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
epoch=
|
epoch=
|
||||||
pkgdesc=""
|
pkgdesc=""
|
||||||
arch=('any')
|
arch=('any')
|
||||||
url="https://git.serguzim.me/emgauwa/client"
|
url="https://git.serguzim.me/emgauwa/client"
|
||||||
license=('unknown')
|
license=('unknown')
|
||||||
groups=()
|
groups=()
|
||||||
source=("$pkgname-$pkgver.tar.gz::https://git.serguzim.me/emgauwa/client/releases/download/v$pkgver/emgauwa.tar.gz")
|
source=("$pkgname-$pkgver.tar.gz::https://git.serguzim.me/emgauwa/client/releases/download/v$pkgver/emgauwa.tar.gz"
|
||||||
sha256sums=('cbbda65e715b8104b1fd0f81c75fa320ecd4d770e5ee9cabe62244aece5785b6')
|
"webapp.conf")
|
||||||
|
sha256sums=('cbbda65e715b8104b1fd0f81c75fa320ecd4d770e5ee9cabe62244aece5785b6'
|
||||||
|
'1179e30b5fb9f8b2a5dc27989cfee8cca3b01dfa54f8af474cddced998fb91ff')
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
# install project
|
|
||||||
install -d "$pkgdir/usr/share/webapps/"
|
install -d "$pkgdir/usr/share/webapps/"
|
||||||
cp -R "$srcdir/emgauwa" "$pkgdir/usr/share/webapps/emgauwa"
|
cp -R "$srcdir/emgauwa" "$pkgdir/usr/share/webapps/emgauwa"
|
||||||
|
|
||||||
|
install -dm750 "${pkgdir}/etc/emgauwa/"
|
||||||
|
install -dm750 "${pkgdir}/etc/emgauwa/core.conf.d"
|
||||||
|
install -Dm750 -o emgauwa -g emgauwa "webapp.conf" "${pkgdir}/etc/emgauwa/core.conf.d/webapp.conf"
|
||||||
}
|
}
|
||||||
|
|
4
webapp/webapp.conf
Normal file
4
webapp/webapp.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[core]
|
||||||
|
content-dir = "/usr/share/webapps/emgauwa"
|
||||||
|
not-found-file = "/usr/share/webapps/emgauwa/index.html"
|
||||||
|
not-found-file-mime = "text/html"
|
Reference in a new issue