Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %define url_ver %(echo %{version}|cut -d. -f1,2)
- %define pulse 1
- %define gstreamer 1
- %define _exclude_files_from_autoprov %{_sysconfdir}/.*\\.so
- %define _exclude_files_from_autoreq %{_sysconfdir}/.*\\.so
- Summary: MATE Desktop settings daemon
- Name: mate-settings-daemon
- Version: 1.7.1
- Release: %mkrel 1
- License: GPLv2+
- Group: Graphical desktop/MATE
- URL: http://mate-desktop.org
- Source0: http://pub.mate-desktop.org/releases/%{url_ver}/%{name}-%{version}.tar.xz
- BuildRequires: itstool
- BuildRequires: mate-common
- BuildRequires: pkgconfig(dbus-glib-1)
- BuildRequires: pkgconfig(fontconfig)
- BuildRequires: pkgconfig(glib-2.0)
- BuildRequires: pkgconfig(gtk+-2.0)
- BuildRequires: pkgconfig(ice)
- BuildRequires: pkgconfig(dconf)
- BuildRequires: pkgconfig(mate-desktop-2.0)
- BuildRequires: pkgconfig(libmatekbd)
- BuildRequires: pkgconfig(libnotify)
- BuildRequires: pkgconfig(libxklavier)
- BuildRequires: pkgconfig(nss)
- BuildRequires: pkgconfig(polkit-gtk-mate-1)
- BuildRequires: pkgconfig(x11)
- BuildRequires: pkgconfig(xfixes)
- BuildRequires: pkgconfig(xi)
- BuildRequires: pkgconfig(sm)
- %if %pulse
- BuildRequires: pkgconfig(libpulse)
- BuildRequires: pkgconfig(libcanberra-gtk)
- %endif
- %if %gstreamer
- BuildRequires: pkgconfig(gstreamer-plugins-base-0.10)
- %endif
- %description
- MATE settings daemon manages the configuration of the desktop in the
- background.
- %package -n %{name}-common
- Summary: Common files for mate-settings-daemon
- Group: Graphical desktop/MATE
- Requires: mate-icon-theme
- Provides: %{name} = %{version}-%{release}
- Requires: %{name}-pulse = %{version}-%{release}
- Suggests: %{name}-gstreamer = %{version}-%{release}
- %description -n %{name}-common
- MATE settings daemon manages the configuration of the desktop in the
- background.
- This package includes common files for MATE settings daemon.
- %package -n %{name}-pulse
- Summary: MATE settings daemon PulseAudio backend
- Group: Graphical desktop/MATE
- Requires: %{name}-common = %{version}-%{release}
- Obsoletes: %{name}-pulse < %{version}-%{release}
- Obsoletes: %{name}-gstreamer < %{version}-%{release}
- %description -n %{name}-pulse
- MATE settings daemon manages the configuration of the desktop in the
- background.
- This package is built with PulseAudio support. If you
- want to use GStreamer backend then install mate-settings-daemon-gstreamer
- package.
- %package -n %{name}-gstreamer
- Summary: MATE settings daemon GStreamer backend
- Group: Graphical desktop/MATE
- Requires: %{name}-common = %{version}-%{release}
- Requires: gstreamer0.10-plugins-good
- Requires: gstreamer0.10-plugins-base
- Obsoletes: %{name}-gstreamer < %{version}-%{release}
- Obsoletes: %{name}-pulse < %{version}-%{release}
- %description -n %{name}-gstreamer
- MATE settings daemon manages the configuration of the desktop in the
- background.
- This package is built with GStreamer support. If you
- want to use GStreamer backend then install mate-settings-daemon-gstreamer
- package.
- %package -n %{name}-devel
- Summary: Include files for the MATE settings daemon
- Group: Development/GNOME and GTK+
- Requires: %{name} = %{version}-%{release}
- %description -n %{name}-devel
- Include files for the MATE settings daemon
- %prep
- %setup -q -n %{name} -c
- %if %pulse
- cp -a %{name}-%{version} %{name}-pulse
- pushd %{name}-pulse
- autoreconf -fi
- popd
- %endif
- %if %gstreamer
- mv -f %{name}-%{version} %{name}-gstreamer
- pushd %{name}-gstreamer
- autoreconf -fi
- popd
- %endif
- %build
- %if %gstreamer
- pushd %{name}-gstreamer
- %configure2_5x \
- --disable-static \
- --enable-polkit \
- --disable-pulse \
- --enable-gstreamer \
- --enable-profiling \
- --with-nssdb
- %make
- popd
- %endif
- %if %pulse
- pushd %{name}-pulse
- %configure2_5x \
- --disable-static \
- --enable-polkit \
- --enable-pulse \
- --disable-gstreamer \
- --enable-profiling \
- --with-nssdb
- %make
- popd
- %endif
- %install
- %if %pulse
- pushd %{name}-pulse
- %makeinstall_std
- mv -f %{buildroot}%{_libdir}/%{name}/libmedia-keys.so %{buildroot}%{_libdir}/libmedia-keys-pulse.so
- mv -f %{buildroot}%{_libdir}/%{name}/libsound.so %{buildroot}%{_libdir}/libsound-pulse.so
- # remove all installations except libsound-pulse.so and libmedia-keys-pulse.so;
- # they will created by gstreamer installation
- rm -fr %{buildroot}%{_libdir}/{mate-settings-daemon/*,pkgconfig}
- rm -fr %{buildroot}%{_datadir}
- rm -fr %{buildroot}%{_libexecdir}
- rm -fr %{buildroot}%{_sysconfdir}/{xdg,dbus-1}
- rm -fr %{buildroot}%{_includedir}
- # move libsound-pulse.so and libmedia-keys-pulse.so into its own place
- mv -f %{buildroot}%{_libdir}/*.so %{buildroot}%{_libdir}/%{name}/
- # create /etc/sound stuff
- mkdir -p %{buildroot}%{_sysconfdir}/sound/profiles/pulse/mate/%_lib
- ln -s %{_libdir}/%{name}/libmedia-keys-pulse.so %{buildroot}%{_sysconfdir}/sound/profiles/pulse/mate/%_lib/libmedia-keys.so
- ln -s %{_libdir}/%{name}/libsound-pulse.so %{buildroot}%{_sysconfdir}/sound/profiles/pulse/mate/%_lib/libsound.so
- popd
- %endif
- %if %gstreamer
- pushd %{name}-gstreamer
- %makeinstall_std
- mv -f %{buildroot}%{_libdir}/%{name}/libmedia-keys.so %{buildroot}%{_libdir}/%{name}/libmedia-keys-gstreamer.so
- mv -f %{buildroot}%{_libdir}/%{name}/libsound.so %{buildroot}%{_libdir}/%{name}/libsound-gstreamer.so
- mkdir -p %{buildroot}%{_sysconfdir}/sound/profiles/alsa/mate/%_lib
- ln -s %{_libdir}/%{name}/libmedia-keys-gstreamer.so %{buildroot}%{_sysconfdir}/sound/profiles/alsa/mate/%_lib/libmedia-keys.so
- ln -s %{_libdir}/%{name}/libsound-gstreamer.so %{buildroot}%{_sysconfdir}/sound/profiles/alsa/mate/%_lib/libsound.so
- popd
- %endif
- %if %pulse || %gstreamer
- ln -s %{_sysconfdir}/sound/profiles/current/mate/%_lib/libmedia-keys.so %{buildroot}%{_libdir}/%{name}/libmedia-keys.so
- ln -s %{_sysconfdir}/sound/profiles/current/mate/%_lib/libsound.so %{buildroot}%{_libdir}/%{name}/libsound.so
- %endif
- find %{buildroot}%{_libdir} -type f -name "*.la" -delete
- find %{buildroot}%{_libdir} -type f -name "*.a" -delete
- # We don't need MateConf convert files:
- rm -fr %{buildroot}%{_datadir}/MateConf
- %{find_lang} %{name}
- %pre
- if [ -d %{_libexecdir}/%{name} ]; then
- rm -rf %{_libexecdir}/%{name}
- fi
- %files -n %{name}-common -f %{name}.lang
- %doc %{name}-pulse/AUTHORS %{name}-pulse/README
- %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.mate.SettingsDaemon.DateTimeMechanism.conf
- %config(noreplace) %{_sysconfdir}/xdg/autostart/mate-settings-daemon.desktop
- %{_libdir}/%{name}/liba11y-keyboard.so
- %{_libdir}/%{name}/libkeybindings.so
- %{_libdir}/%{name}/libmpris.so
- %{_libdir}/%{name}/libxrandr.so
- %{_libdir}/%{name}/libbackground.so
- %{_libdir}/%{name}/libkeyboard.so
- %{_libdir}/%{name}/libsmartcard.so
- %{_libdir}/%{name}/libxrdb.so
- %{_libdir}/%{name}/libclipboard.so
- %{_libdir}/%{name}/libxsettings.so
- %{_libdir}/%{name}/libhousekeeping.so
- %{_libdir}/%{name}/libmouse.so
- %{_libdir}/%{name}/libtyping-break.so
- %{_libdir}/%{name}/libmedia-keys.so
- %{_libdir}/%{name}/libsound.so
- %{_libdir}/%{name}/*.mate-settings-plugin
- %{_libexecdir}/*
- %{_datadir}/dbus-1/services/org.mate.SettingsDaemon.service
- %{_datadir}/dbus-1/system-services/org.mate.SettingsDaemon.DateTimeMechanism.service
- %{_iconsdir}/mate/*/*/*
- %{_datadir}/%{name}
- %{_datadir}/glib-2.0/schemas/org.mate.*.xml
- %{_datadir}/polkit-1/actions/org.mate.settingsdaemon.datetimemechanism.policy
- %if %pulse
- %files -n %{name}-pulse
- %{_libdir}/%{name}/libmedia-keys-pulse.so
- %{_libdir}/%{name}/libsound-pulse.so
- %{_sysconfdir}/sound/profiles/pulse/mate/%_lib/libmedia-keys.so
- %{_sysconfdir}/sound/profiles/pulse/mate/%_lib/libsound.so
- %endif
- %if %gstreamer
- %files -n %{name}-gstreamer
- %{_sysconfdir}/sound/profiles/alsa/mate/%_lib/libsound.so
- %{_sysconfdir}/sound/profiles/alsa/mate/%_lib/libmedia-keys.so
- %{_libdir}/%{name}/libmedia-keys-gstreamer.so
- %{_libdir}/%{name}/libsound-gstreamer.so
- %endif
- %files -n %{name}-devel
- %doc %{name}-pulse/ChangeLog
- %{_includedir}/*
- %{_libdir}/pkgconfig/*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement