]>
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 |
ef5e70b4 | 7 | version = 0.6.32 |
10189801 | 8 | release = 1 |
2767b51a | 9 | |
802ea3af MT |
10 | groups = Networking/Zeroconf |
11 | url = http://avahi.org/ | |
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 | |
ef5e70b4 MT |
25 | source_dl = http://avahi.org/download/ \ |
26 | https://github.com/lathiat/avahi/releases/download/v%{version}/ | |
2767b51a | 27 | |
802ea3af MT |
28 | build |
29 | requires | |
10189801 | 30 | automake |
802ea3af MT |
31 | dbus-devel |
32 | dbus-glib-devel | |
33 | expat-devel | |
34 | gcc-c++ | |
35 | gettext | |
36 | libdaemon-devel>=0.14 | |
37 | intltool | |
38 | perl | |
39 | perl-XML-Parser | |
40 | pkg-config | |
41 | python-devel | |
42 | python-dbus | |
5aa11a47 | 43 | systemd-units |
802ea3af | 44 | end |
2767b51a | 45 | |
10189801 MT |
46 | prepare_cmds |
47 | # for aarch64 | |
48 | for i in $(find . -name config.guess -or -name config.sub); do | |
49 | cp -vf %{datadir}/automake-*/config.{guess,sub} $(dirname ${i}) | |
50 | done | |
51 | end | |
52 | ||
802ea3af | 53 | configure_options += \ |
802ea3af | 54 | --with-distro=none \ |
5aa11a47 | 55 | --with-systemdsystemunitdir=%{unitdir} \ |
802ea3af MT |
56 | --disable-gdbm \ |
57 | --disable-qt3 \ | |
58 | --disable-qt4 \ | |
59 | --disable-gtk \ | |
60 | --disable-gtk3 \ | |
61 | --disable-pygtk \ | |
62 | --disable-mono | |
63 | end | |
38829578 | 64 | |
802ea3af MT |
65 | packages |
66 | package %{name} | |
5aa11a47 | 67 | requires |
ef5e70b4 | 68 | libdaemon >= 0.14 |
5aa11a47 SS |
69 | end |
70 | ||
6eb163c4 SS |
71 | prerequires += shadow-utils |
72 | ||
73 | # Create avahi user and group. | |
74 | script prein | |
75 | getent group avahi >/dev/null || groupadd -r avahi | |
76 | getent passwd avahi >/dev/null || \ | |
77 | useradd -r -g avahi -d /run/avahi-daemon -s /sbin/nologin \ | |
78 | -c "Avahi mDNS/DNS-SD Stack" avahi | |
79 | exit 0 | |
80 | end | |
81 | ||
5aa11a47 SS |
82 | # Just search for new unit files that were just installed. |
83 | script postin | |
84 | systemctl daemon-reload >/dev/null 2>&1 || : | |
6eb163c4 SS |
85 | |
86 | # Reload dbus configuration. | |
87 | systemctl reload dbus.service >/dev/null 2>&1 || : | |
5aa11a47 SS |
88 | end |
89 | ||
90 | # Disable the service that is to be removed and stop it if it is still running. | |
91 | script preun | |
92 | systemctl --no-reload disable avahi-daemon.service >/dev/null 2>&1 || : | |
93 | systemctl stop avahi-daemon.service avahi-dnsconfd.service >/dev/null 2>&1 || : | |
94 | end | |
95 | ||
96 | # Just tell systemd that unitfiles have been removed. | |
97 | script postun | |
98 | systemctl daemon-reload >/dev/null 2>&1 || : | |
99 | end | |
100 | ||
101 | # Try to restart the service if it is running. | |
102 | script postup | |
103 | systemctl daemon-reload >/dev/null 2>&1 || : | |
6eb163c4 SS |
104 | |
105 | # Reload dbus configuration. | |
106 | systemctl reload dbus.service >/dev/null 2>&1 || : | |
107 | ||
5aa11a47 SS |
108 | systemctl try-restart avahi-daemon.service avahi-dnsconfd.service >/dev/null 2>&1 || : |
109 | end | |
802ea3af | 110 | end |
1f9bc2f0 | 111 | |
802ea3af MT |
112 | package %{name}-devel |
113 | template DEVEL | |
114 | end | |
1f9bc2f0 | 115 | |
802ea3af MT |
116 | package %{name}-libs |
117 | template LIBS | |
118 | end | |
1f9bc2f0 MT |
119 | |
120 | package %{name}-debuginfo | |
121 | template DEBUGINFO | |
122 | end | |
802ea3af | 123 | end |