ipfire-3.x/avahi/avahi.nm

119 lines
2.9 KiB
Plaintext

###############################################################################
# IPFire.org - An Open Source Firewall Solution #
# Copyright (C) - IPFire Development Team <info@ipfire.org> #
###############################################################################
name = avahi
version = 0.8
release = 2.1
groups = Networking/Zeroconf
url = https://avahi.org/
license = LGPLv2+
summary = Local network service discovery
description
Avahi is a system which facilitates service discovery on
a local network -- this means that you can plug your laptop or
computer into a network and instantly be able to view other people who
you can chat with, find printers to print to or find files being
shared. This kind of technology is already found in MacOS X (branded
'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') and is very
convenient.
end
source_dl = https://avahi.org/download/
build
requires
automake
dbus-devel
dbus-glib-devel
expat-devel
gcc-c++
gettext
libdaemon-devel >= 0.14
libevent-devel >= 2.0.21
intltool
perl
perl-XML-Parser
pkg-config
python3-devel
python3-dbus
python3-gobject3-devel
systemd-units
zlib-devel
end
configure_options += \
--with-distro=none \
--with-systemdsystemunitdir=%{unitdir} \
--disable-introspection \
--disable-gdbm \
--disable-qt3 \
--disable-qt4 \
--disable-qt5 \
--disable-gtk \
--disable-gtk3 \
--disable-mono \
--disable-stack-protector \
PYTHON=%{python3}
end
packages
package %{name}
prerequires += shadow-utils
# Create avahi user and group.
script prein
getent group avahi >/dev/null || groupadd -r avahi
getent passwd avahi >/dev/null || \
useradd -r -g avahi -d /run/avahi-daemon -s /sbin/nologin \
-c "Avahi mDNS/DNS-SD Stack" avahi
exit 0
end
# Just search for new unit files that were just installed.
script postin
systemctl daemon-reload >/dev/null 2>&1 || :
# Reload dbus configuration.
systemctl reload dbus.service >/dev/null 2>&1 || :
end
# Disable the service that is to be removed and stop it if it is still running.
script preun
systemctl --no-reload disable avahi-daemon.service >/dev/null 2>&1 || :
systemctl stop avahi-daemon.service avahi-dnsconfd.service >/dev/null 2>&1 || :
end
# Just tell systemd that unitfiles have been removed.
script postun
systemctl daemon-reload >/dev/null 2>&1 || :
end
# Try to restart the service if it is running.
script postup
systemctl daemon-reload >/dev/null 2>&1 || :
# Reload dbus configuration.
systemctl reload dbus.service >/dev/null 2>&1 || :
systemctl try-restart avahi-daemon.service avahi-dnsconfd.service >/dev/null 2>&1 || :
end
end
package %{name}-devel
template DEVEL
end
package %{name}-libs
template LIBS
end
package %{name}-debuginfo
template DEBUGINFO
end
end