]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blob - avahi/avahi.nm
0a8f246860e73c83a1a31c6988adae5ed2276c5b
[people/pmueller/ipfire-3.x.git] / avahi / avahi.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = avahi
7 version = 0.8
8 release = 2
9
10 groups = Networking/Zeroconf
11 url = https://avahi.org/
12 license = LGPLv2+
13 summary = Local network service discovery
14
15 description
16 Avahi is a system which facilitates service discovery on
17 a local network -- this means that you can plug your laptop or
18 computer into a network and instantly be able to view other people who
19 you can chat with, find printers to print to or find files being
20 shared. This kind of technology is already found in MacOS X (branded
21 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') and is very
22 convenient.
23 end
24
25 source_dl = https://avahi.org/download/
26
27 build
28 requires
29 automake
30 dbus-devel
31 dbus-glib-devel
32 expat-devel
33 gcc-c++
34 gettext
35 libdaemon-devel >= 0.14
36 libevent-devel >= 2.0.21
37 intltool
38 perl
39 perl-XML-Parser
40 pkg-config
41 python3-devel
42 python3-dbus
43 python3-gobject3-devel
44 systemd-units
45 zlib-devel
46 end
47
48 configure_options += \
49 --with-distro=none \
50 --with-systemdsystemunitdir=%{unitdir} \
51 --disable-introspection \
52 --disable-gdbm \
53 --disable-qt3 \
54 --disable-qt4 \
55 --disable-qt5 \
56 --disable-gtk \
57 --disable-gtk3 \
58 --disable-mono \
59 --disable-stack-protector \
60 PYTHON=%{python3}
61
62 end
63
64 packages
65 package %{name}
66 prerequires += shadow-utils
67
68 # Create avahi user and group.
69 script prein
70 getent group avahi >/dev/null || groupadd -r avahi
71 getent passwd avahi >/dev/null || \
72 useradd -r -g avahi -d /run/avahi-daemon -s /sbin/nologin \
73 -c "Avahi mDNS/DNS-SD Stack" avahi
74 exit 0
75 end
76
77 # Just search for new unit files that were just installed.
78 script postin
79 systemctl daemon-reload >/dev/null 2>&1 || :
80
81 # Reload dbus configuration.
82 systemctl reload dbus.service >/dev/null 2>&1 || :
83 end
84
85 # Disable the service that is to be removed and stop it if it is still running.
86 script preun
87 systemctl --no-reload disable avahi-daemon.service >/dev/null 2>&1 || :
88 systemctl stop avahi-daemon.service avahi-dnsconfd.service >/dev/null 2>&1 || :
89 end
90
91 # Just tell systemd that unitfiles have been removed.
92 script postun
93 systemctl daemon-reload >/dev/null 2>&1 || :
94 end
95
96 # Try to restart the service if it is running.
97 script postup
98 systemctl daemon-reload >/dev/null 2>&1 || :
99
100 # Reload dbus configuration.
101 systemctl reload dbus.service >/dev/null 2>&1 || :
102
103 systemctl try-restart avahi-daemon.service avahi-dnsconfd.service >/dev/null 2>&1 || :
104 end
105 end
106
107 package %{name}-devel
108 template DEVEL
109 end
110
111 package %{name}-libs
112 template LIBS
113 end
114
115 package %{name}-debuginfo
116 template DEBUGINFO
117 end
118 end