src_prepare() {
default
+ if [[ "${PV}" == *9999 ]] ; then
+ pushd scripts &>/dev/null || die
+ ./mkini.sh || die
+ popd &>/dev/null || die
+ fi
+
sed \
-e 's:mumble-server:murmur:g' \
-e 's:/var/run:/run:g' \
- -i "${S}"/scripts/murmur.{conf,ini} || die
+ -i "${S}"/scripts/murmur.{conf,ini.system} || die
+
+ # Adjust systemd service file to our config location #689208
+ sed "s@/etc/${PN}\.ini@/etc/${PN}/${PN}.ini@" \
+ -i scripts/${PN}.service || die
}
src_configure() {
dodoc -r scripts/server
docompress -x /usr/share/doc/${PF}/scripts
- local dir=release
- if use debug; then
- dir=debug
- fi
-
+ local dir="$(usex debug debug release)"
dobin "${dir}"/murmurd
- insinto /etc/murmur/
- doins scripts/murmur.ini
+ local etcdir="/etc/murmur"
+ insinto ${etcdir}
+ newins scripts/${PN}.ini.system ${PN}.ini
insinto /etc/logrotate.d/
newins "${FILESDIR}"/murmur.logrotate murmur
# Fix permissions on config file as it might contain passwords.
# (bug #559362)
- fowners root:murmur /etc/murmur/murmur.ini
- fperms 640 /etc/murmur/murmur.ini
+ fowners root:murmur ${etcdir}/murmur.ini
+ fperms 640 ${etcdir}/murmur.ini
doman man/murmurd.1