packaging: set system wide ELM_ENGINE 05/26505/1
authorPhilippe Coval <philippe.coval@open.eurogiciel.org>
Mon, 25 Aug 2014 12:57:56 +0000 (14:57 +0200)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Mon, 25 Aug 2014 12:58:07 +0000 (14:58 +0200)
Change-Id: Iedca2f73d5904ed83d7b5b42a60e666990906f21
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
packaging/elm-misc.spec

index f4fd785..25d137e 100644 (file)
@@ -1,13 +1,14 @@
-#sbs-git:slp/pkgs/e/elm-misc elm-misc 0.1 9e25eb4b63eed4f5a01bd45518c6226f768292ca
+%bcond_with wayland
+
 Name:       elm-misc
 Summary:    Elementary config files
 Version:    0.1.31
-Release:    1
-Group:      TO_BE/FILLED_IN
-License:    LGPLv2.1
+Release:    0
+Group:      Graphics & UI Framework/Development
+License:    LGPL-2.1
 BuildArch:  noarch
 Source0:    %{name}-%{version}.tar.gz
-Source1001:    elm-misc.manifest
+Source1001: elm-misc.manifest
 
 
 %description
@@ -26,10 +27,16 @@ cp %{SOURCE1001} .
 rm -rf %{buildroot}
 %__mkdir_p %{buildroot}%{_sysconfdir}/profile.d
 %__cp etc/profile.d/* %{buildroot}%{_sysconfdir}/profile.d/
-mkdir -p %{buildroot}/usr/share/license
-cp %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/usr/share/license/%{name}
 
 %post
+
+%if %{with wayland}
+f="/etc/profile.d/elm.sh"
+grep --silent ELM_ENGINE "$f" \
+    || printf "\nELM_ENGINE=wayland_shm\n[ ! -d /dev/dri ] || ELM_ENGINE=wayland_egl\nexport ELM_ENGINE" >> "$f"
+
+%endif
+
 chown root:root /etc/profile.d/elm.sh
 chown root:root /etc/profile.d/evas.sh
 
@@ -37,7 +44,8 @@ chown root:root /etc/profile.d/evas.sh
 %files
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
-/etc/profile.d/*
-/usr/share/license/%{name}
+%license COPYING
+%{_sysconfdir}/profile.d/*
+