summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD98
1 files changed, 16 insertions, 82 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b236f5c711ec..9b91a1a65d23 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,102 +1,36 @@
# Maintainer: Oleksandr Natalenko <oleksandr@natalenko.name>
pkgname=bandwidthd
-_repouser=neatbasis
+_repouser=post-factum
_reponame=bandwidthd
-_rev=0307fbba56a39a6e65ebadf488ad87979c64fdef
-pkgver=2.0.2.r1.${_rev:0:10}
-pkgrel=11
+pkgver=2.0.13
+pkgrel=1
epoch=1
pkgdesc="Daemon for graphing traffic of subnet machines"
arch=(x86_64)
-url="https://github.com/neatbasis/bandwidthd"
+url="https://codeberg.org/post-factum/bandwidthd"
license=(GPL)
-depends=(sqlite libpcap libpng gd nginx)
+depends=(sqlite libpcap libpng gd)
+makedepends=(meson)
+source=(https://codeberg.org/${_repouser}/${_reponame}/archive/v${pkgver}.tar.gz)
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/${_repouser}/${_reponame}/archive/${_rev}.tar.gz
- 01-bandwidthd-recover-cdf.patch
- 02-bandwidthd-missing-comma.patch
- 03-bandwidthd-subnet-reporting.patch
- 04-bandwidthd-misc.patch
- 05-bandwidthd-pidfile.patch
- 06-bandwidthd-externs.patch
- bandwidthd.service
- bandwidthd-webui.service
- bandwidthd-webui.conf
- bandwidthd-rotate.timer
- bandwidthd-rotate.service
- bandwidthd.sysusers
- bandwidthd.tmpfiles)
-
-sha256sums=('7e8ebf7e2eeb5266af904a8f7188b11d5a13ebb0343022c2a118b86f48a952e4'
- 'b679dbd2fcc4ac8246c75cab0a5f0db86c00d2083c3b202e7fafb339114c971f'
- '641c006a8b90e9548a1b2ea3e40326a2128df69d490a13173e61469543b20352'
- '88c38a18b7bda6f3496dda3030ba118f8c461447dea426c13245099ae37a6d86'
- 'be5fa230311258f14d4af6a00496443bfbc1a148a77f237bb4a0b663947e090a'
- 'fc38a5623e66d82dec2efd28d2729e76e8f3b6056fb2bc2462a1ea1549f68807'
- '51788ac70e44ca20706014302466cee7d70e19ad70faba52e3a54fb5c2c3c2a2'
- '9c1cd09515073875438dc75fa0919cf6654dd1bd6398dbbb3772b990f515e71f'
- '4e9f265d8cb2f23a5458afae61a8f88377ddc9ee31fa42b38a4062f0ffe426e1'
- 'cd7b1ffff5dd9490ab69d777e459d79c229d5fef2e71a811df29f6c11e6acde4'
- '73637c20e8e13f69efdfa58460dc8aa61478a3adb5c72927686adbbc524c468d'
- '7526f4baa5e2e66f87647f876a0b3a4c766ed7d7489ae801e85608338c85a782'
- 'd734cea9710691a1658b9996e35cd407e85b542aa0961aec57fc49281516aa5d'
- '6c9e5bf89ecb580261a5a68ac240bd80ee43a7516c79023864acacbd8cee0ae2')
+sha256sums=('e4761abe5e06a7ff1ecde7643d54c45390f33129c6de074fbd4df74e3c26f740')
backup=('etc/bandwidthd/bandwidthd.conf'
- 'etc/bandwidthd/bandwidthd-webui.conf')
-
-prepare () {
- cd "${_reponame}-${_rev}"
-
- patch -Np1 -i ../01-bandwidthd-recover-cdf.patch
- patch -Np1 -i ../02-bandwidthd-missing-comma.patch
- patch -Np1 -i ../03-bandwidthd-subnet-reporting.patch
- patch -Np1 -i ../04-bandwidthd-misc.patch
- patch -Np1 -i ../05-bandwidthd-pidfile.patch
- patch -Np1 -i ../06-bandwidthd-externs.patch
-
- sed -i 's|EXTRA_VERSION=".IPv6"|EXTRA_VERSION=".'${_rev:0:10}'"|' configure.in
-
- sed -i 's|output_cdf false|output_cdf true|' etc/bandwidthd.conf
- sed -i 's|recover_cdf false|recover_cdf true|' etc/bandwidthd.conf
- sed -i 's|graph false|graph true|' etc/bandwidthd.conf
-
- sed -i 's|#log_dir "/usr/local/var/bandwidthd"|log_dir "/var/lib/bandwidthd"|' etc/bandwidthd.conf
- sed -i 's|#htdocs_dir "/usr/local/var/bandwidthd/htdocs"|htdocs_dir "/var/lib/bandwidthd/htdocs"|' etc/bandwidthd.conf
-
- sed -i 's|pgsql_connect_string "dbname = bandwidthd password=kahlas12451 user = perkins host = localhost"|#pgsql_connect_string "dbname = bandwidthd password=kahlas12451 user = perkins host = localhost"|' etc/bandwidthd.conf
- sed -i 's|#sqlite_filename "/var/bandwidthd.db"|sqlite_filename "/var/lib/bandwidthd/bandwidthd.db"|' etc/bandwidthd.conf
-
- CFLAGS="-std=gnu89 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt" ./configure \
- --prefix=/usr \
- --sysconfdir=/etc/bandwidthd \
- --localstatedir=/var/lib \
- --disable-python \
- --disable-pgsql \
- --without-x
-}
+ 'etc/bandwidthd/Caddyfile')
build() {
- cd "${_reponame}-${_rev}"
+ cd ${_reponame}
- make -j1
+ arch-meson . build
+
+ meson compile -C build
}
package() {
- cd "${_reponame}-${_rev}"
-
- install -dm700 "${pkgdir}/var/lib/bandwidthd"
+ depends+=(caddy)
- make DESTDIR="${pkgdir}" install
+ cd ${_reponame}
- install -Dm644 "../bandwidthd.service" -t "${pkgdir}/usr/lib/systemd/system"
- install -Dm644 "../bandwidthd-webui.service" -t "${pkgdir}/usr/lib/systemd/system"
- install -Dm644 "../bandwidthd-webui.conf" -t "${pkgdir}/etc/bandwidthd"
- install -Dm644 "../bandwidthd-rotate.timer" -t "${pkgdir}/usr/lib/systemd/system"
- install -Dm644 "../bandwidthd-rotate.service" -t "${pkgdir}/usr/lib/systemd/system"
- install -Dm644 "../bandwidthd.sysusers" "${pkgdir}/usr/lib/sysusers.d/bandwidthd.conf"
- install -Dm644 "../bandwidthd.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/bandwidthd.conf"
+ meson install -C build --destdir "${pkgdir}"
}
-
-# vim: set tabstop=4:softtabstop=4:shiftwidth=4:noexpandtab