]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - avahi/avahi.nm
pcengines-apu-firmware: New package
[ipfire-3.x.git] / avahi / avahi.nm
index 3df04f7a9153b9902a9360bf44d94f3a8f0d9caa..4bfa13cace78ef4b041557acd705857ff98b24a6 100644 (file)
@@ -4,8 +4,8 @@
 ###############################################################################
 
 name       = avahi
-version    = 0.6.30
-release    = 3
+version    = 0.6.32
+release    = 1
 
 groups     = Networking/Zeroconf
 url        = http://avahi.org/
@@ -13,19 +13,21 @@ 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 \
+       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  = http://avahi.org/download/
+source_dl  = http://avahi.org/download/ \
+       https://github.com/lathiat/avahi/releases/download/v%{version}/
 
 build
        requires
+               automake
                dbus-devel
                dbus-glib-devel
                expat-devel
@@ -41,6 +43,13 @@ build
                systemd-units
        end
 
+       prepare_cmds
+               # for aarch64
+               for i in $(find . -name config.guess -or -name config.sub); do
+                       cp -vf %{datadir}/automake-*/config.{guess,sub} $(dirname ${i})
+               done
+       end
+
        configure_options += \
                --with-distro=none \
                --with-systemdsystemunitdir=%{unitdir} \
@@ -56,12 +65,26 @@ end
 packages
        package %{name}
                requires
-                       libdaemon>=0.14
+                       libdaemon >= 0.14
+               end
+
+               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.
@@ -78,6 +101,10 @@ packages
                # 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