Initial commit for Arch Linux PKGBUILD for ebusd

This commit is contained in:
NoName
2015-03-08 14:47:59 +01:00
parent 10c7981219
commit dde1a6a61c
4 changed files with 82 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
# Maintainer: Milan Knizek <knizek volny cz>
# Contributor: Milan Knizek <knizek volny cz>
pkgname=ebusd
#_gitname=ebusd
pkgver=1.0.0
_pkgver=1.0.0
pkgrel=1
pkgdesc="ebusd provides a communication interface to the energy bus (ebus)."
arch=('i686' 'x86_64' 'armv6h')
url=https://github.com/yuhu-/ebusd/
license=('GPL3')
depends=()
optdepends=()
conflicts=('ebusd-git')
provides=('ebusd')
install=ebusd.install
options=()
backup=('etc/conf.d/ebusd')
source=("https://github.com/john30/ebusd/archive/v${_pkgver}.tar.gz" 'ebusd.service' 'ebusd')
build() {
cd "${srcdir}"/${pkgname}-${_pkgver}
./autogen.sh --prefix=/usr --sysconfdir=/etc
# This is corrected in master
sed -i 's@\(\[ -d \)\(\$(sysconfdir)/ebusd \] || mkdir -p \)\(\$(sysconfdir)/ebusd\)@\1\$(DESTDIR)\2\$(DESTDIR)\3@' src/ebusd/Makefile.am
make -j1
}
package() {
cd "${srcdir}"/${pkgname}-${_pkgver}
make DESTDIR="$pkgdir" install
install -d "${pkgdir}"/usr/lib/systemd/system
install -m 0644 ../ebusd.service "${pkgdir}"/usr/lib/systemd/system
install -d "${pkgdir}"/etc/conf.d
install -m 0644 ../ebusd_conf.d "${pkgdir}"/etc/conf.d/ebusd
}
+24
View File
@@ -0,0 +1,24 @@
pkgname=ebusd
post_install() {
echo ">>> Put daemon options to /etc/conf.d/ebusd (especially /dev/tty????)"
echo " Copy your configuration files (csv) to /etc/ebusd"
echo " Start the daemon 'systemctl start ebusd'"
}
pre_upgrade() {
true
}
post_upgrade() {
true
}
pre_remove() {
true
}
post_remove() {
true
}
+15
View File
@@ -0,0 +1,15 @@
[Unit]
Description=Communication interface to the energy bus (ebus)
After=local-fs.target
ConditionPathExists=/var/log
[Service]
Type=forking
EnvironmentFile=-/etc/conf.d/ebusd
ExecStart=/usr/bin/ebusd $EBUSD_ARGS
Restart=always
PIDFile=/run/ebusd.pid
[Install]
WantedBy=multi-user.target
+5
View File
@@ -0,0 +1,5 @@
# /etc/conf.d/ebusd: config file for ebusd.service
# Options to pass to the ebusd.
# See the ebusd -h for more info.
EBUSD_ARGS=""