Advertisement
Guest User

mate-settings-daemon.spec (Mageia 5)

a guest
Feb 17th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %define          url_ver    %(echo %{version}|cut -d. -f1,2)
  2. %define          pulse 1
  3. %define          gstreamer 1
  4. %define          _exclude_files_from_autoprov %{_sysconfdir}/.*\\.so
  5. %define          _exclude_files_from_autoreq %{_sysconfdir}/.*\\.so
  6. Summary:         MATE Desktop settings daemon
  7. Name:            mate-settings-daemon
  8. Version:         1.7.1
  9. Release:         %mkrel 1
  10. License:         GPLv2+
  11. Group:           Graphical desktop/MATE
  12. URL:             http://mate-desktop.org
  13. Source0:         http://pub.mate-desktop.org/releases/%{url_ver}/%{name}-%{version}.tar.xz
  14.  
  15. BuildRequires:   itstool
  16. BuildRequires:   mate-common
  17. BuildRequires:   pkgconfig(dbus-glib-1)
  18. BuildRequires:   pkgconfig(fontconfig)
  19. BuildRequires:   pkgconfig(glib-2.0)
  20. BuildRequires:   pkgconfig(gtk+-2.0)
  21. BuildRequires:   pkgconfig(ice)
  22. BuildRequires:   pkgconfig(dconf)
  23. BuildRequires:   pkgconfig(mate-desktop-2.0)
  24. BuildRequires:   pkgconfig(libmatekbd)
  25. BuildRequires:   pkgconfig(libnotify)
  26. BuildRequires:   pkgconfig(libxklavier)
  27. BuildRequires:   pkgconfig(nss)
  28. BuildRequires:   pkgconfig(polkit-gtk-mate-1)
  29. BuildRequires:   pkgconfig(x11)
  30. BuildRequires:   pkgconfig(xfixes)
  31. BuildRequires:   pkgconfig(xi)
  32. BuildRequires:   pkgconfig(sm)
  33.  
  34. %if %pulse
  35. BuildRequires:   pkgconfig(libpulse)
  36. BuildRequires:   pkgconfig(libcanberra-gtk)
  37. %endif
  38.  
  39. %if %gstreamer
  40. BuildRequires:   pkgconfig(gstreamer-plugins-base-0.10)
  41. %endif
  42.  
  43. %description
  44. MATE settings daemon manages the configuration of the desktop in the
  45. background.
  46.  
  47. %package -n %{name}-common
  48. Summary:         Common files for mate-settings-daemon
  49. Group:           Graphical desktop/MATE
  50. Requires:        mate-icon-theme
  51. Provides:        %{name} = %{version}-%{release}
  52. Requires:        %{name}-pulse = %{version}-%{release}
  53. Suggests:        %{name}-gstreamer = %{version}-%{release}
  54.  
  55. %description -n %{name}-common
  56. MATE settings daemon manages the configuration of the desktop in the
  57. background.
  58.  
  59. This package includes common files for MATE settings daemon.
  60.  
  61. %package -n %{name}-pulse
  62. Summary:         MATE settings daemon PulseAudio backend
  63. Group:           Graphical desktop/MATE
  64. Requires:        %{name}-common = %{version}-%{release}
  65. Obsoletes:       %{name}-pulse < %{version}-%{release}
  66. Obsoletes:       %{name}-gstreamer < %{version}-%{release}
  67.  
  68. %description -n %{name}-pulse
  69. MATE settings daemon manages the configuration of the desktop in the
  70. background.
  71.  
  72. This package is built with PulseAudio support. If you
  73. want to use GStreamer backend then install mate-settings-daemon-gstreamer
  74. package.
  75.  
  76. %package -n %{name}-gstreamer
  77. Summary:         MATE settings daemon GStreamer backend
  78. Group:           Graphical desktop/MATE
  79. Requires:        %{name}-common = %{version}-%{release}
  80. Requires:        gstreamer0.10-plugins-good
  81. Requires:        gstreamer0.10-plugins-base
  82. Obsoletes:       %{name}-gstreamer < %{version}-%{release}
  83. Obsoletes:       %{name}-pulse < %{version}-%{release}
  84.  
  85. %description -n %{name}-gstreamer
  86. MATE settings daemon manages the configuration of the desktop in the
  87. background.
  88.  
  89. This package is built with GStreamer support. If you
  90. want to use GStreamer backend then install mate-settings-daemon-gstreamer
  91. package.
  92.  
  93. %package -n     %{name}-devel
  94. Summary:        Include files for the MATE settings daemon
  95. Group:          Development/GNOME and GTK+
  96. Requires:       %{name} = %{version}-%{release}
  97.  
  98. %description -n %{name}-devel
  99. Include files for the MATE settings daemon
  100.  
  101. %prep
  102. %setup -q -n %{name} -c
  103. %if %pulse
  104. cp -a %{name}-%{version} %{name}-pulse
  105. pushd %{name}-pulse
  106. autoreconf -fi
  107. popd
  108. %endif
  109. %if %gstreamer
  110. mv -f %{name}-%{version} %{name}-gstreamer
  111. pushd %{name}-gstreamer
  112. autoreconf -fi
  113. popd
  114. %endif
  115.  
  116.  
  117. %build
  118. %if %gstreamer
  119. pushd %{name}-gstreamer
  120. %configure2_5x \
  121.    --disable-static \
  122.    --enable-polkit \
  123.    --disable-pulse \
  124.    --enable-gstreamer \
  125.    --enable-profiling   \
  126.    --with-nssdb
  127.  
  128. %make
  129. popd
  130. %endif
  131.  
  132. %if %pulse
  133. pushd %{name}-pulse
  134. %configure2_5x \
  135.    --disable-static \
  136.    --enable-polkit \
  137.    --enable-pulse \
  138.    --disable-gstreamer \
  139.    --enable-profiling \
  140.    --with-nssdb
  141.  
  142. %make
  143. popd
  144. %endif
  145.  
  146.  
  147. %install
  148. %if %pulse
  149. pushd %{name}-pulse
  150. %makeinstall_std
  151. mv -f %{buildroot}%{_libdir}/%{name}/libmedia-keys.so %{buildroot}%{_libdir}/libmedia-keys-pulse.so
  152. mv -f %{buildroot}%{_libdir}/%{name}/libsound.so %{buildroot}%{_libdir}/libsound-pulse.so
  153. # remove all installations except libsound-pulse.so and libmedia-keys-pulse.so;
  154. # they will created by gstreamer installation
  155. rm -fr %{buildroot}%{_libdir}/{mate-settings-daemon/*,pkgconfig}
  156. rm -fr %{buildroot}%{_datadir}
  157. rm -fr %{buildroot}%{_libexecdir}
  158. rm -fr %{buildroot}%{_sysconfdir}/{xdg,dbus-1}
  159. rm -fr %{buildroot}%{_includedir}
  160. # move libsound-pulse.so and libmedia-keys-pulse.so into its own place
  161. mv -f %{buildroot}%{_libdir}/*.so %{buildroot}%{_libdir}/%{name}/
  162. # create /etc/sound stuff
  163. mkdir -p %{buildroot}%{_sysconfdir}/sound/profiles/pulse/mate/%_lib
  164. ln -s %{_libdir}/%{name}/libmedia-keys-pulse.so %{buildroot}%{_sysconfdir}/sound/profiles/pulse/mate/%_lib/libmedia-keys.so
  165. ln -s %{_libdir}/%{name}/libsound-pulse.so %{buildroot}%{_sysconfdir}/sound/profiles/pulse/mate/%_lib/libsound.so
  166. popd
  167. %endif
  168.  
  169. %if %gstreamer
  170. pushd %{name}-gstreamer
  171. %makeinstall_std
  172. mv -f %{buildroot}%{_libdir}/%{name}/libmedia-keys.so %{buildroot}%{_libdir}/%{name}/libmedia-keys-gstreamer.so
  173. mv -f %{buildroot}%{_libdir}/%{name}/libsound.so %{buildroot}%{_libdir}/%{name}/libsound-gstreamer.so
  174. mkdir -p %{buildroot}%{_sysconfdir}/sound/profiles/alsa/mate/%_lib
  175. ln -s %{_libdir}/%{name}/libmedia-keys-gstreamer.so %{buildroot}%{_sysconfdir}/sound/profiles/alsa/mate/%_lib/libmedia-keys.so
  176. ln -s %{_libdir}/%{name}/libsound-gstreamer.so %{buildroot}%{_sysconfdir}/sound/profiles/alsa/mate/%_lib/libsound.so
  177. popd
  178. %endif
  179.  
  180. %if %pulse || %gstreamer
  181. ln -s %{_sysconfdir}/sound/profiles/current/mate/%_lib/libmedia-keys.so %{buildroot}%{_libdir}/%{name}/libmedia-keys.so
  182. ln -s %{_sysconfdir}/sound/profiles/current/mate/%_lib/libsound.so %{buildroot}%{_libdir}/%{name}/libsound.so
  183. %endif
  184.  
  185. find %{buildroot}%{_libdir} -type f -name "*.la" -delete
  186. find %{buildroot}%{_libdir} -type f -name "*.a" -delete
  187.  
  188. # We don't need MateConf convert files:
  189. rm -fr %{buildroot}%{_datadir}/MateConf
  190.  
  191. %{find_lang} %{name}
  192.  
  193. %pre
  194. if [ -d %{_libexecdir}/%{name} ]; then
  195.     rm -rf %{_libexecdir}/%{name}
  196. fi
  197.  
  198.  
  199.  
  200. %files -n %{name}-common -f %{name}.lang
  201. %doc %{name}-pulse/AUTHORS %{name}-pulse/README
  202. %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.mate.SettingsDaemon.DateTimeMechanism.conf
  203. %config(noreplace) %{_sysconfdir}/xdg/autostart/mate-settings-daemon.desktop
  204. %{_libdir}/%{name}/liba11y-keyboard.so
  205. %{_libdir}/%{name}/libkeybindings.so
  206. %{_libdir}/%{name}/libmpris.so
  207. %{_libdir}/%{name}/libxrandr.so
  208. %{_libdir}/%{name}/libbackground.so
  209. %{_libdir}/%{name}/libkeyboard.so
  210. %{_libdir}/%{name}/libsmartcard.so
  211. %{_libdir}/%{name}/libxrdb.so
  212. %{_libdir}/%{name}/libclipboard.so
  213. %{_libdir}/%{name}/libxsettings.so
  214. %{_libdir}/%{name}/libhousekeeping.so
  215. %{_libdir}/%{name}/libmouse.so
  216. %{_libdir}/%{name}/libtyping-break.so
  217. %{_libdir}/%{name}/libmedia-keys.so
  218. %{_libdir}/%{name}/libsound.so
  219. %{_libdir}/%{name}/*.mate-settings-plugin
  220. %{_libexecdir}/*
  221. %{_datadir}/dbus-1/services/org.mate.SettingsDaemon.service
  222. %{_datadir}/dbus-1/system-services/org.mate.SettingsDaemon.DateTimeMechanism.service
  223. %{_iconsdir}/mate/*/*/*
  224. %{_datadir}/%{name}
  225. %{_datadir}/glib-2.0/schemas/org.mate.*.xml
  226. %{_datadir}/polkit-1/actions/org.mate.settingsdaemon.datetimemechanism.policy
  227.  
  228. %if %pulse
  229. %files -n %{name}-pulse
  230. %{_libdir}/%{name}/libmedia-keys-pulse.so
  231. %{_libdir}/%{name}/libsound-pulse.so
  232. %{_sysconfdir}/sound/profiles/pulse/mate/%_lib/libmedia-keys.so
  233. %{_sysconfdir}/sound/profiles/pulse/mate/%_lib/libsound.so
  234. %endif
  235.  
  236. %if %gstreamer
  237. %files -n %{name}-gstreamer
  238. %{_sysconfdir}/sound/profiles/alsa/mate/%_lib/libsound.so
  239. %{_sysconfdir}/sound/profiles/alsa/mate/%_lib/libmedia-keys.so
  240. %{_libdir}/%{name}/libmedia-keys-gstreamer.so
  241. %{_libdir}/%{name}/libsound-gstreamer.so
  242. %endif
  243.  
  244. %files -n %{name}-devel
  245. %doc %{name}-pulse/ChangeLog
  246. %{_includedir}/*
  247. %{_libdir}/pkgconfig/*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement