10116
|
1 |
#
|
|
2 |
# spec file for package SUNWavahi-bridge-dsd
|
|
3 |
#
|
|
4 |
# includes module(s): avahi
|
|
5 |
#
|
|
6 |
# Copyright (c) 2006 Sun Microsystems, Inc.
|
|
7 |
# This file and all modifications and additions to the pristine
|
|
8 |
# package are under the same license as the package itself.
|
|
9 |
#
|
11975
|
10 |
# Owner: padraig
|
|
11 |
#
|
10116
|
12 |
|
|
13 |
%include Solaris.inc
|
|
14 |
|
|
15 |
%use avahi = avahi.spec
|
|
16 |
|
|
17 |
Name: SUNWavahi-bridge-dsd
|
|
18 |
Summary: Avahi client and bridge to SUNWdsd.
|
|
19 |
Version: %{avahi.version}
|
|
20 |
SUNW_BaseDir: %{_basedir}
|
|
21 |
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
11975
|
22 |
SUNW_copyright: %{name}.copyright
|
10116
|
23 |
Source1: avahi-bridge-dsd.xml
|
10671
|
24 |
Source2: svc-avahi-bridge-dsd
|
10116
|
25 |
|
|
26 |
%include default-depend.inc
|
15650
|
27 |
BuildRequires: SUNWgtk2-devel
|
10471
|
28 |
BuildRequires: SUNWgnome-python-libs-devel
|
15366
|
29 |
BuildRequires: SUNWdbus-python24
|
14933
|
30 |
BuildRequires: SUNWpython-setuptools
|
15650
|
31 |
Requires: SUNWgtk2
|
|
32 |
Requires: SUNWdsdu
|
10471
|
33 |
Requires: SUNWgnome-python-libs
|
15473
|
34 |
Requires: SUNWPython
|
15366
|
35 |
Requires: SUNWdbus-python24
|
10116
|
36 |
Requires: SUNWavahi-bridge-dsd-root
|
|
37 |
Requires: SUNWlibdaemon
|
|
38 |
Requires: SUNWlexpt
|
10446
|
39 |
Requires: SUNWdsdr
|
10116
|
40 |
|
|
41 |
%package root
|
|
42 |
Summary: %{summary} - / filesystem
|
|
43 |
SUNW_BaseDir: /
|
|
44 |
%include default-depend.inc
|
|
45 |
|
|
46 |
%package devel
|
|
47 |
Summary: %{summary} - development files
|
|
48 |
SUNW_BaseDir: %{_prefix}
|
|
49 |
%include default-depend.inc
|
15650
|
50 |
Requires: %{name}
|
10116
|
51 |
|
12619
|
52 |
%if %build_l10n
|
|
53 |
%package l10n
|
|
54 |
Summary: %{summary} - l10n files
|
|
55 |
SUNW_BaseDir: %{_basedir}
|
|
56 |
%include default-depend.inc
|
|
57 |
Requires: %{name}
|
|
58 |
%endif
|
|
59 |
|
10116
|
60 |
%prep
|
|
61 |
rm -rf %name-%version
|
|
62 |
mkdir %name-%version
|
|
63 |
%avahi.prep -d %name-%version
|
|
64 |
|
|
65 |
%build
|
|
66 |
PKG_CONFIG_DISABLE_UNISTALLED=
|
|
67 |
unset PKG_CONFIG_DISABLE_UNISTALLED
|
|
68 |
export PKG_CONFIG_PATH=../avahi-%{avahi.version}:%{_pkg_config_path}
|
|
69 |
export CFLAGS="%optflags -I/usr/sfw/include"
|
|
70 |
export RPM_OPT_FLAGS="$CFLAGS"
|
11093
|
71 |
export LDFLAGS="%_ldflags -ldns_sd -lsocket -lnsl -L/usr/sfw/lib -R/usr/sfw/lib -lexpat"
|
10116
|
72 |
|
|
73 |
%avahi.build -d %name-%version
|
|
74 |
|
|
75 |
%install
|
|
76 |
%avahi.install -d %name-%version
|
|
77 |
mkdir -p $RPM_BUILD_ROOT/var/svc/manifest/system
|
|
78 |
chmod -R 755 $RPM_BUILD_ROOT/var/svc
|
|
79 |
cp %SOURCE1 $RPM_BUILD_ROOT/var/svc/manifest/system/
|
10671
|
80 |
mkdir -p $RPM_BUILD_ROOT/lib/svc/method
|
|
81 |
chmod -R 755 $RPM_BUILD_ROOT/lib
|
|
82 |
cp %SOURCE2 $RPM_BUILD_ROOT/lib/svc/method/
|
10116
|
83 |
|
|
84 |
mv $RPM_BUILD_ROOT%{_sbindir}/avahi-daemon $RPM_BUILD_ROOT%{_sbindir}/avahi-daemon-bridge-dsd
|
10708
|
85 |
%if %option_with_indiana_branding
|
10703
|
86 |
rm -rf $RPM_BUILD_ROOT%{_datadir}/applications
|
|
87 |
%endif
|
10116
|
88 |
|
12616
|
89 |
%if %build_l10n
|
|
90 |
%else
|
|
91 |
# REMOVE l10n FILES
|
|
92 |
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
|
|
93 |
%endif
|
|
94 |
|
10116
|
95 |
%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
|
|
96 |
|
|
97 |
%clean
|
10684
|
98 |
rm -rf $RPM_BUILD_ROOT
|
10116
|
99 |
|
|
100 |
%if %(test -f /usr/sadm/install/scripts/i.manifest && echo 0 || echo 1)
|
|
101 |
%iclass manifest -f i.manifest
|
|
102 |
%endif
|
|
103 |
|
13062
|
104 |
%pre root
|
|
105 |
#!/bin/sh
|
|
106 |
#
|
|
107 |
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
|
108 |
# Use is subject to license terms.
|
|
109 |
#
|
|
110 |
|
|
111 |
# Presence of this temp file will tell postinstall script
|
|
112 |
# that the avahi-bridge-dsd service is already installed, in which case
|
|
113 |
# the current service state will be preserved, be it enabled
|
|
114 |
# or disabled.
|
|
115 |
rm -f $PKG_INSTALL_ROOT/var/avahi-bridge-dsd_installed.tmp > /dev/null 2>&1
|
|
116 |
|
|
117 |
if [ -f $PKG_INSTALL_ROOT/var/svc/manifest/system/avahi-bridge-dsd.xml ]; then
|
|
118 |
touch $PKG_INSTALL_ROOT/var/avahi-bridge-dsd_installed.tmp
|
|
119 |
fi
|
|
120 |
|
|
121 |
exit 0
|
|
122 |
|
|
123 |
%post root
|
|
124 |
#!/bin/sh
|
|
125 |
#
|
|
126 |
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
|
127 |
# Use is subject to license terms.
|
|
128 |
#
|
|
129 |
|
|
130 |
# Preinstall script will create this file if avahi-bridge-dsd service was
|
|
131 |
# already installed, in which case we preserve current service state,
|
|
132 |
# be it enabled or disabled.
|
|
133 |
if [ -f $PKG_INSTALL_ROOT/var/avahi-bridge-dsd_installed.tmp ]; then
|
|
134 |
rm -f $PKG_INSTALL_ROOT/var/avahi-bridge-dsd_installed.tmp
|
|
135 |
else
|
|
136 |
# enable avahi-bridge-dsd:
|
|
137 |
# - PKG_INSTALL_ROOT is / or empty when installing onto a live system
|
|
138 |
# and we can invoke svcadm directly;
|
|
139 |
# - otherwise it's upgrade, so we append to the upgrade script
|
|
140 |
if [ "${PKG_INSTALL_ROOT:-/}" = "/" ]; then
|
|
141 |
if [ `/sbin/zonename` = global ]; then
|
|
142 |
/usr/sbin/svcadm enable -r svc:/system/avahi-bridge-dsd:default
|
|
143 |
fi
|
|
144 |
else
|
|
145 |
cat >> ${PKG_INSTALL_ROOT}/var/svc/profile/upgrade <<-EOF
|
|
146 |
if [ \`/sbin/zonename\` = global ]; then
|
|
147 |
/usr/sbin/svcadm enable -r svc:/system/avahi-bridge-dsd:default
|
|
148 |
fi
|
|
149 |
EOF
|
|
150 |
fi
|
|
151 |
fi
|
|
152 |
|
|
153 |
exit 0
|
10116
|
154 |
%files
|
13487
|
155 |
%doc -d avahi-%{avahi.version} README LICENSE
|
|
156 |
%dir %attr (0755, root, other) %{_datadir}/doc
|
10116
|
157 |
%defattr (-, root, bin)
|
|
158 |
%dir %attr (0755, root, bin) %{_bindir}
|
|
159 |
%{_bindir}/*
|
|
160 |
%dir %attr (0755, root, bin) %{_sbindir}
|
|
161 |
%{_sbindir}/avahi-daemon-bridge-dsd
|
|
162 |
%dir %attr (0755, root, bin) %{_libdir}
|
|
163 |
%{_libdir}/libavahi*.so*
|
12616
|
164 |
%{_libdir}/avahi/service-types.db.pag
|
|
165 |
%{_libdir}/avahi/service-types.db.dir
|
10116
|
166 |
%dir %attr (0755, root, sys) %{_datadir}
|
12616
|
167 |
%{_datadir}/avahi/service-types
|
10709
|
168 |
%if %option_with_sun_branding
|
10116
|
169 |
%dir %attr (0755, root, other) %{_datadir}/applications
|
|
170 |
%{_datadir}/applications/avahi-discover.desktop
|
|
171 |
%{_datadir}/applications/bssh.desktop
|
|
172 |
%{_datadir}/applications/bvnc.desktop
|
10703
|
173 |
%endif
|
10116
|
174 |
%{_datadir}/avahi/interfaces/avahi-discover.glade
|
|
175 |
%{_datadir}/avahi/introspection/Server.introspect
|
|
176 |
%{_datadir}/avahi/introspection/EntryGroup.introspect
|
|
177 |
%{_datadir}/avahi/introspection/DomainBrowser.introspect
|
|
178 |
%{_datadir}/avahi/introspection/ServiceBrowser.introspect
|
|
179 |
%{_datadir}/avahi/introspection/ServiceTypeBrowser.introspect
|
|
180 |
%{_datadir}/avahi/introspection/ServiceResolver.introspect
|
|
181 |
%{_datadir}/avahi/introspection/AddressResolver.introspect
|
|
182 |
%{_datadir}/avahi/introspection/HostNameResolver.introspect
|
|
183 |
%{_datadir}/avahi/introspection/RecordBrowser.introspect
|
|
184 |
%{_datadir}/avahi/avahi-service.dtd
|
|
185 |
%dir %attr (0755, root, bin) %{_mandir}
|
|
186 |
%{_mandir}/man1/*
|
|
187 |
%attr (-, root, bin) %{_libdir}/python*
|
|
188 |
|
|
189 |
%files root
|
|
190 |
%defattr (-, root, bin)
|
|
191 |
%dir %attr (0755, root, sys) %{_sysconfdir}
|
|
192 |
%config %{_sysconfdir}/*
|
|
193 |
%dir %attr (0755, root, sys) /var
|
|
194 |
%dir %attr (0755, root, sys) /var/svc
|
|
195 |
%dir %attr (0755, root, sys) /var/svc/manifest
|
|
196 |
%dir %attr (0755, root, sys) /var/svc/manifest/system
|
|
197 |
%class(manifest) %attr (0444, root, sys) /var/svc/manifest/system/avahi-bridge-dsd.xml
|
10671
|
198 |
%attr (0555, root, bin) /lib/svc/method/svc-avahi-bridge-dsd
|
10116
|
199 |
|
|
200 |
%files devel
|
|
201 |
%defattr (-, root, bin)
|
|
202 |
%dir %attr (0755, root, bin) %{_libdir}
|
|
203 |
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
|
|
204 |
%{_libdir}/pkgconfig/*
|
|
205 |
%dir %attr (0755, root, bin) %{_includedir}
|
|
206 |
%{_includedir}/*
|
|
207 |
|
12619
|
208 |
%if %build_l10n
|
|
209 |
%files l10n
|
|
210 |
%defattr (-, root, bin)
|
|
211 |
%dir %attr (0755, root, sys) %{_datadir}
|
|
212 |
%attr (-, root, other) %{_datadir}/locale
|
|
213 |
%endif
|
10116
|
214 |
|
|
215 |
%changelog
|
15473
|
216 |
* Mon Mar 23 2009 - [email protected]
|
|
217 |
- Because /usr/bin/avahi-discover (SUNWavahi-bridge-dsd) requires
|
|
218 |
/usr/bin/i86/isapython2.4 which is found in SUNWPython, add the dependency.
|
15324
|
219 |
* Thu Mar 05 2009 - [email protected]
|
|
220 |
- Change SUNWdbus-bindings to SUNWdbus-python.
|
|
221 |
* Wed Sep 10 2008 - [email protected]
|
13487
|
222 |
- Add %doc in %files for copyright
|
13062
|
223 |
* Wed Aug 06 2008- [email protected]
|
|
224 |
- add pre and post scripts for enabling the avahi-bridge-dsd svc upon
|
|
225 |
installation but leaving it as is upon upgrade (based on dbus spec file)
|
12619
|
226 |
* Fri Jun 06 2008 - [email protected]
|
|
227 |
- Add l10n package.
|
11093
|
228 |
* Wed Oct 31 2007 - [email protected]
|
12157
|
229 |
- Add Build/Requires SUNWdbus-bindings/-devel as the dbus python module is used.
|
|
230 |
* Wed Oct 31 2007 - [email protected]
|
11093
|
231 |
- Remove references to /usr/lib/mdns from LDFLAGS as the dir doesn't exist.
|
10469
|
232 |
* Fri Sep 07 2007 - [email protected]
|
|
233 |
- Add Build/Requires SUNWgnome-base-libs/-devel for glib.
|
10471
|
234 |
- Add Build/Requires SUNWgnome-python-libs/-devel for gtk Python module.
|
10469
|
235 |
* Wed Jun 28 2007 - [email protected]
|
10116
|
236 |
- Initial spec file created.
|
15324
|
237 |
|