%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: disper Version: 0.3.1 Release: 2%{?dist} Summary: On-the-fly display switch utility License: GPLv3+ URL: http://willem.engen.nl/projects/disper/ Source0: http://ppa.launchpad.net/disper-dev/ppa/ubuntu/pool/main/d/disper/%{name}_%{version}.tar.gz Patch0: disper_0.3.1-fix_Makefile.patch BuildArch: noarch BuildRequires: python # disper require notify-send included in libnotify package Requires: libnotify # disper require libXrandr and libX11 too, the library are loaded via python and # rpm doesn't find these dependencies by itself Requires: libXrandr Requires: libX11 %description Disper is an on-the-fly display switch utility. It is intended to be used just before giving a presentation with a laptop, when all one wants is that the beamer, which has just been connected, is able to show whatever you prepared. Disper gives you the option to either clone all detected displays, or extend the desktop to them. Resolutions are automatically detected. For cloning, the highest common resolution supported by all displays is chosen; for extending every display device gets its highest supported resolution. For special setups requiring more detailed control, one can still use the standard display configuration utilities. At the moment nVidia cards are supported, and a basic XRandR backend is in place. %prep %setup -q -n %{name} %patch0 -p1 %build %install DESTDIR=%{buildroot} PREFIX=%{_prefix} \ BINDIR=%{_bindir} DATADIR=%{_datadir} \ make install # fcami - kludge starts here # - disper installs itself in %{_datadir}/%{name}/src ... # so rename that directory to %{python_sitelib}%{name} mkdir -p %{buildroot}%{python_sitelib} mv %{buildroot}%{_datadir}/%{name}/src %{buildroot}%{python_sitelib}/%{name} # - adapt the hardcoded system path in /usr/bin/disper to %{python_sitelib}%{name} sed -i "s,^sys\.path\.append.*,sys\.path\.append\(\'%{python_sitelib}/%{name}\'\),g" %{buildroot}%{_bindir}/%{name} # end kludge # these should already be +x in the sources chmod +x %{buildroot}%{python_sitelib}/%{name}/xrandr/core.py chmod +x %{buildroot}%{python_sitelib}/%{name}/xrandr/gdk.py chmod +x %{buildroot}%{python_sitelib}/%{name}/xrandr/__init__.py gzip %{name}.1 install -Dpm 0644 %{name}.1.gz %{buildroot}%{_mandir}/man1/%{name}.1.gz %files %doc README TODO %{_bindir}/%{name} %{python_sitelib}/* %{_datadir}/%{name} %{_datadir}/pixmaps/%{name}.svg %{_mandir}/man1/%{name}.1.gz %changelog * Wed Sep 24 2014 François Cami - 0.3.1-2 - Install in python_sitelib instead of /usr/share/disper/src/ * Wed Sep 17 2014 François Cami - 0.3.1-1 - Update disper to 0.3.1 * Sat Jun 07 2014 Fedora Release Engineering - 0.3.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Aug 03 2013 Fedora Release Engineering - 0.3.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Feb 13 2013 Fedora Release Engineering - 0.3.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Wed Jul 18 2012 Fedora Release Engineering - 0.3.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Jan 13 2012 Mario Santagiuliana - 0.3.0-5 - Add comment in spec file for require dependencies - Fix error in changelog data report * Tue Jan 10 2012 Mario Santagiuliana - 0.3.0-4 - Update spec file * Tue Jul 19 2011 Mario Santagiuliana - 0.3.0-3 - Update description using upstream website description * Tue Jun 21 2011 Mario Santagiuliana - 0.3.0-2 - Update dependencies * Sat Jun 11 2011 Mario Santagiualiana - 0.3.0-1 - Merge Spec file of kwizart and Felix - Update disper to version 0.3.0 - Update Spec file * Sat Sep 19 2009 kwizart < kwizart at gmail.com > - 0.2.3-1 - Initial package * Tue Jul 07 2009 Felix Kaechele - 0.2.3-1 - initial build