Bump to 0.6.31
[platform/upstream/avahi.git] / packaging / avahi.spec
1 %define _unpackaged_files_terminate_build 0
2 Name:           avahi
3 Version:        0.6.31
4 Release:        0
5 Summary:        Local network service discovery
6 Group:          System/Network
7 License:        LGPL-2.0
8 Requires:       dbus
9 Requires:       expat
10 Requires(post): glibc
11 Requires:       %{name}-libs = %{version}-%{release}
12 BuildRequires:  automake libtool
13 BuildRequires:  dbus-devel >= 0.90
14 BuildRequires:  dbus-glib-devel >= 0.70
15 BuildRequires:  libdaemon-devel
16 BuildRequires:  libcap-devel
17 BuildRequires:  expat-devel
18 BuildRequires:  intltool
19 BuildRequires:  perl-XML-Parser
20 Obsoletes:      howl
21 Source0:        %{name}-%{version}.tar.gz
22 Source1001:     %{name}.manifest
23 Source1002:     %{name}-libs.manifest
24 Source1003:     %{name}-devel.manifest
25 Source1004:     %{name}-data.manifest
26
27 %description
28 Avahi is a system which facilitates service discovery on
29 a local network -- this means that you can plug your laptop or
30 computer into a network and instantly be able to view other people who
31 you can chat with, find printers to print to or find files being
32 shared. This kind of technology is already found in MacOS X (branded
33 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') and is very
34 convenient.
35
36 %package libs
37 Summary:  Libraries for avahi run-time use
38 Group:    System/Libraries
39 Requires: poppler-tools
40
41 %description libs
42 The avahi-libs package contains the libraries needed
43 to run programs that use avahi.
44
45 %package devel
46 Summary:  Libraries and header files for avahi development
47 Group:    Development/Libraries
48 Requires: %{name}-libs = %{version}-%{release}
49 Requires: pkgconfig
50
51 %description devel
52 The avahi-devel package contains the header files and libraries
53 necessary for developing programs using avahi.
54
55 %package -n %{name}-data
56 Summary:  Libraries for avahi run-time use
57 Group:    System/Libraries
58 Requires: %{name}
59
60 %description -n %{name}-data
61 The avahi-libs package contains the libraries needed
62 to run programs that use avahi.
63
64 %prep
65 %setup -q
66 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} .
67
68 %build
69 %autogen --with-distro=fedora --with-avahi-user=avahi --with-avahi-group=avahi --with-avahi-priv-access-group=avahi \
70                 --disable-compat-libdns_sd \
71                 --disable-mono \
72                 --disable-manpages \
73                 --disable-monodoc \
74                 --disable-qt3 \
75                 --disable-qt4 \
76                 --disable-gtk \
77                 --disable-gtk3\
78                 --disable-python \
79                 --disable-pygtk \
80                 --disable-python-dbus \
81                 --disable-doxygen-doc\
82                 --disable-doxygen-dot\
83                 --disable-doxygen-xml\
84                 --disable-doxygen-html\
85                 --disable-doxygen-manpages\
86                 --disable-doxygen-xmltoman\
87                 --disable-glib \
88                 --disable-gobject \
89                 --disable-gdbm \
90         --sysconfdir=%{_sysconfdir}  \
91                 --localstatedir=%{_localstatedir} \
92                 --without-systemdsystemunitdir
93
94 make %{?_smp_mflags}
95
96 %install
97
98 rm -rf $RPM_BUILD_ROOT
99 make install DESTDIR=$RPM_BUILD_ROOT
100
101 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
102 rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
103
104 # remove example
105 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/services/sftp-ssh.service
106
107 # create /var/run/avahi-daemon to ensure correct selinux policy for it:
108 mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/%{name}-daemon
109
110
111 #mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}-autoipd
112
113
114 # Make /etc/avahi/etc/localtime owned by avahi:
115 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/etc
116 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/etc/localtime
117
118
119 %find_lang %{name}
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124
125 %post
126 mkdir -p %{_localstatedir}/run/%{name}-daemon
127 #Evne eglibc is included in Requires(post),
128 #Not sure whether it's ok or not during making OBS image.
129 #That's why if statement is commented out to gurantee chown operation
130 #if [ ! -z "`getent group %{name}`" ]; then
131     chown -R %{name}:%{name} %{_localstatedir}/run/%{name}-daemon || true
132 #fi
133
134
135 %post libs
136 /sbin/ldconfig
137 %postun libs
138 /sbin/ldconfig
139
140
141 %files
142 %manifest %{name}.manifest
143 %defattr(0644,root,root,0755)
144 %ghost %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}-daemon
145 %attr(0755,root,root) %{_sbindir}/%{name}-daemon
146 %license LICENSE
147
148 %files devel
149 %manifest %{name}-devel.manifest
150 %defattr(0644, root, root, 0755)
151 %attr(755,root,root) %{_libdir}/lib%{name}-common.so
152 %attr(755,root,root) %{_libdir}/lib%{name}-core.so
153 %attr(755,root,root) %{_libdir}/lib%{name}-client.so
154 %{_includedir}/%{name}-client
155 %{_includedir}/%{name}-common
156 %{_includedir}/%{name}-core
157 %{_libdir}/pkgconfig/%{name}-core.pc
158 %{_libdir}/pkgconfig/%{name}-client.pc
159 %attr(755,root,root) %{_bindir}/%{name}-browse
160 %attr(755,root,root) %{_bindir}/%{name}-browse-domains
161 %attr(755,root,root) %{_bindir}/%{name}-publish
162 %attr(755,root,root) %{_bindir}/%{name}-publish-address
163 %attr(755,root,root) %{_bindir}/%{name}-publish-service
164 %attr(755,root,root) %{_bindir}/%{name}-resolve
165 %attr(755,root,root) %{_bindir}/%{name}-resolve-address
166 %attr(755,root,root) %{_bindir}/%{name}-resolve-host-name
167 %attr(755,root,root) %{_bindir}/%{name}-set-host-name
168 %attr(755,root,root) %{_sbindir}/%{name}-autoipd
169
170 %files libs
171 %manifest %{name}-libs.manifest
172 %defattr(0644, root, root, 0755)
173 %{_libdir}/%{name}
174 %exclude %{_libdir}/%{name}/service-types.db
175 %attr(0755,root,root) %{_libdir}/lib%{name}-common.so.*
176 %attr(0755,root,root) %{_libdir}/lib%{name}-client.so.*
177 %attr(0755,root,root) %{_libdir}/lib%{name}-core.so.*
178 %license LICENSE
179
180 %files -n %{name}-data
181 %manifest %{name}-data.manifest
182 %defattr(0644,root,root,0755)
183 %exclude %dir %{_datadir}/%{name}
184 %exclude %{_datadir}/%{name}/*.dtd
185 %exclude %{_datadir}/%{name}/service-types
186 %dir %{_sysconfdir}/%{name}
187 %dir %{_sysconfdir}/%{name}/etc
188 %ghost %{_sysconfdir}/%{name}/etc/localtime
189 %config %{_sysconfdir}/%{name}/%{name}-daemon.conf
190 %license LICENSE