# Turn off the brp-python-bytecompile script, # it somehow (dont remember how:) badly affects python builds %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') Name: sugar-client Version: 1.1 Release: 28.1 Group: Development/Tools/Other Summary: Client side tool to interact with Sugar server License: GPLv3+ Url: http://wiki.sugarlabs.org/go/Sugar_Server_Kit/sugar-client Source: sugar-client-1.1.tar.gz Source1: sweet.tar.gz Requires: python Requires: yum Requires: yum-utils Requires: rsync BuildRequires: python BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} AutoProv: no AutoReq: no BuildArch: noarch %description Client side tool to interact with Sugar server %prep %setup -n sugar-client-1.1 tar xzpvf %{SOURCE1} -C %{_sourcedir} %build %install install -m 0755 -D sugar-client %{buildroot}/.dest/%{_bindir}/sugar-client && install -m 0755 -D sugar-client-service %{buildroot}/.dest/%{_bindir}/sugar-client-service && install -m 0755 -d %{buildroot}/.dest/`python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()'` && cp -r sugar_client %{buildroot}/.dest/`python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()'`/ && install -m 0755 -d %{buildroot}/.dest/%{_datadir}/doc/sugar-client && cp AUTHORS COPYING HACKING NEWS README TODO %{buildroot}/.dest/%{_datadir}/doc/sugar-client/ && install -m 0755 -d %{buildroot}/.dest/%{_datadir}/dbus-1/services && sed 's#@bindir@#%{_bindir}#' org.sugarlabs.client.Backup.service.in > %{buildroot}/.dest/%{_datadir}/dbus-1/services/org.sugarlabs.client.Backup.service && sed 's#@bindir@#%{_bindir}#' org.sugarlabs.client.Server.service.in > %{buildroot}/.dest/%{_datadir}/dbus-1/services/org.sugarlabs.client.Server.service && sed 's#@bindir@#%{_bindir}#' org.sugarlabs.client.Statistics.service.in > %{buildroot}/.dest/%{_datadir}/dbus-1/services/org.sugarlabs.client.Statistics.service && install -m 0755 -d %{buildroot}/.dest/%{_datadir}/dbus-1/system-services && sed 's#@bindir@#%{_bindir}#' org.sugarlabs.client.System.service.in > %{buildroot}/.dest/%{_datadir}/dbus-1/system-services/org.sugarlabs.client.System.service && install -m 0644 -D org.sugarlabs.client.System.conf %{buildroot}/.dest/%{_sysconfdir}/dbus-1/system.d/org.sugarlabs.client.System.conf && install -m 0755 -d %{buildroot}/.dest//usr/local/sbin && for i in dextrose-updater journal-backup journal-restore ds-backup.sh ds-backup.py; do ln -s %{_bindir}/sugar-client %{buildroot}/.dest//usr/local/sbin/$i; done python %{_sourcedir}/sweet_install.py move rpm %{buildroot}/.dest %{buildroot} /usr '' '' >> sugar-client.files rm -rf %{buildroot}/.dest %post dbus-send --system /org/sugarlabs/system org.sugarlabs.client.System.Reboot && dbus-send --system /org/sugarlabs/system org.sugarlabs.system.Reboot %preun %clean rm -rf %{buildroot} %files -f sugar-client.files %changelog