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