]>
Commit | Line | Data |
---|---|---|
2767b51a | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
2767b51a BS |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = avahi |
f92aff06 | 7 | version = 0.8 |
10189801 | 8 | release = 1 |
2767b51a | 9 | |
802ea3af | 10 | groups = Networking/Zeroconf |
f92aff06 | 11 | url = https://avahi.org/ |
802ea3af MT |
12 | license = LGPLv2+ |
13 | summary = Local network service discovery | |
2767b51a | 14 | |
802ea3af | 15 | description |
6eb163c4 SS |
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 | |
f0b55c28 | 22 | convenient. |
802ea3af | 23 | end |
2767b51a | 24 | |
f92aff06 | 25 | source_dl = https://avahi.org/download/ |
2767b51a | 26 | |
802ea3af MT |
27 | build |
28 | requires | |
10189801 | 29 | automake |
802ea3af MT |
30 | dbus-devel |
31 | dbus-glib-devel | |
32 | expat-devel | |
33 | gcc-c++ | |
34 | gettext | |
f92aff06 MT |
35 | libdaemon-devel >= 0.14 |
36 | libevent-devel >= 2.0.21 | |
802ea3af MT |
37 | intltool |
38 | perl | |
39 | perl-XML-Parser | |
40 | pkg-config | |
f92aff06 MT |
41 | python3-devel |
42 | python3-dbus | |
43 | python3-gobject3-devel | |
5aa11a47 | 44 | systemd-units |
f92aff06 | 45 | zlib-devel |
10189801 MT |
46 | end |
47 | ||
802ea3af | 48 | configure_options += \ |
802ea3af | 49 | --with-distro=none \ |
5aa11a47 | 50 | --with-systemdsystemunitdir=%{unitdir} \ |
f92aff06 | 51 | --disable-introspection \ |
802ea3af MT |
52 | --disable-gdbm \ |
53 | --disable-qt3 \ | |
54 | --disable-qt4 \ | |
f92aff06 | 55 | --disable-qt5 \ |
802ea3af MT |
56 | --disable-gtk \ |
57 | --disable-gtk3 \ | |
f92aff06 MT |
58 | --disable-mono \ |
59 | PYTHON=%{python3} | |
802ea3af | 60 | end |
38829578 | 61 | |
802ea3af MT |
62 | packages |
63 | package %{name} | |
6eb163c4 SS |
64 | prerequires += shadow-utils |
65 | ||
66 | # Create avahi user and group. | |
67 | script prein | |
68 | getent group avahi >/dev/null || groupadd -r avahi | |
69 | getent passwd avahi >/dev/null || \ | |
70 | useradd -r -g avahi -d /run/avahi-daemon -s /sbin/nologin \ | |
71 | -c "Avahi mDNS/DNS-SD Stack" avahi | |
72 | exit 0 | |
73 | end | |
74 | ||
5aa11a47 SS |
75 | # Just search for new unit files that were just installed. |
76 | script postin | |
77 | systemctl daemon-reload >/dev/null 2>&1 || : | |
6eb163c4 SS |
78 | |
79 | # Reload dbus configuration. | |
80 | systemctl reload dbus.service >/dev/null 2>&1 || : | |
5aa11a47 SS |
81 | end |
82 | ||
83 | # Disable the service that is to be removed and stop it if it is still running. | |
84 | script preun | |
85 | systemctl --no-reload disable avahi-daemon.service >/dev/null 2>&1 || : | |
86 | systemctl stop avahi-daemon.service avahi-dnsconfd.service >/dev/null 2>&1 || : | |
87 | end | |
88 | ||
89 | # Just tell systemd that unitfiles have been removed. | |
90 | script postun | |
91 | systemctl daemon-reload >/dev/null 2>&1 || : | |
92 | end | |
93 | ||
94 | # Try to restart the service if it is running. | |
95 | script postup | |
96 | systemctl daemon-reload >/dev/null 2>&1 || : | |
6eb163c4 SS |
97 | |
98 | # Reload dbus configuration. | |
99 | systemctl reload dbus.service >/dev/null 2>&1 || : | |
100 | ||
5aa11a47 SS |
101 | systemctl try-restart avahi-daemon.service avahi-dnsconfd.service >/dev/null 2>&1 || : |
102 | end | |
802ea3af | 103 | end |
1f9bc2f0 | 104 | |
802ea3af MT |
105 | package %{name}-devel |
106 | template DEVEL | |
107 | end | |
1f9bc2f0 | 108 | |
802ea3af MT |
109 | package %{name}-libs |
110 | template LIBS | |
111 | end | |
1f9bc2f0 MT |
112 | |
113 | package %{name}-debuginfo | |
114 | template DEBUGINFO | |
115 | end | |
802ea3af | 116 | end |