shift-shell/packaging/plasma-phone-components.spec
Pier Luigi Fiorini 7fca0c8703 Alternative environment variables for compositor
droid-hal configuration for hammerhead is broken and inverts Y.
As a workaround we provide our configuration.
2014-11-01 20:49:43 +01:00

141 lines
3.7 KiB
RPMSpec

#
# Do NOT Edit the Auto-generated Part!
# Generated by: spectacle version 0.27
#
Name: plasma-phone-components
# >> macros
# << macros
Summary: Plasma Phone Components
Version: 0.1.0
Release: 1
Group: System/GUI/Other
License: GPLv2+
URL: http://www.kde.org
Source0: %{name}-%{version}.tar.xz
Source100: plasma-phone-components.yaml
Requires: greenisland
Requires: plasma-workspace
Requires: plasma-workspace-wallpaper-image
Requires: breeze-icon-theme
Requires: oxygen-fonts
Requires: frameworkintegration
Requires: libqofono-qt5
Requires: libqofono-qt5-declarative
Requires: voicecall-qt5
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: extra-cmake-modules
BuildRequires: kf5-rpm-macros
BuildRequires: qt5-tools
BuildRequires: plasma-devel
%description
Plasma Phone Components.
%prep
%setup -q -n %{name}-%{version}
# >> setup
# << setup
%build
# >> build pre
%kf5_make
# << build pre
# >> build post
# << build post
%install
rm -rf %{buildroot}
# >> install pre
%kf5_make_install
# << install pre
# >> install post
# File with environment variables, used by compositor systemd unit
mkdir -p %{buildroot}%{_sharedstatedir}/environment/greenisland
cat > %{buildroot}%{_sharedstatedir}/environment/greenisland/greenisland.conf <<EOF
# From hammerhead configuration
QT_QPA_PLATFORM=hwcomposer
EGL_PLATFORM=hwcomposer
QT_QPA_EGLFS_DEPTH=32
QT_QPA_EGLFS_HIDECURSOR=1
LIPSTICK_OPTIONS=-plugin evdevtouch:/dev/input/event1 -plugin evdevkeyboard:keymap=/usr/share/qt5/keymaps/droid.qmap
# This one was set to 1 in hammerhead configuration,
# but it's just wrong
QT_COMPOSITOR_NEGATE_INVERTED_Y=0
KSCREEN_BACKEND=QScreen
EOF
# File with environment variables, used by shell systemd unit
mkdir -p %{buildroot}%{_sharedstatedir}/environment/plasma-phone
cat > %{buildroot}%{_sharedstatedir}/environment/plasma-phone/plasma-phone.conf <<EOF
LIBEXEC_PATH="%{_libexecdir}:%{_libdir}/libexec:%{_kf5_libexecdir}"
QT_QPA_PLATFORM=wayland
QT_QPA_PLATFORMTHEME=KDE
QT_WAYLAND_DISABLE_WINDOWDECORATION=1
XDG_CURRENT_DESKTOP=KDE
KSCREEN_BACKEND=QScreen
EOF
# Default configuration for plasmashell
mkdir -p %{buildroot}%{_kf5_configdir}
cat > %{buildroot}%{_kf5_configdir}/kdeglobals <<EOF
[KDE]
LookAndFeelPackage=org.kde.satellite.phone
[General]
desktopFont=Oxygen Sans,9,-1,5,50,0,0,0,0,0
fixed=Oxygen Mono,8,-1,5,50,0,0,0,0,0
font=Oxygen Sans,9,-1,5,50,0,0,0,0,0
menuFont=Oxygen Sans,9,-1,5,50,0,0,0,0,0
smallestReadableFont=Oxygen Sans,7,-1,5,50,0,0,0,0,0
taskbarFont=Oxygen Sans,9,-1,5,50,0,0,0,0,0
toolBarFont=Oxygen Sans,8,-1,5,50,0,0,0,0,0
[Icons]
Theme=breeze
[Theme]
name=default
EOF
# Install systemd units
mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/
for service in compositor kbuildsycoca5 kdeinit ksyncdbusenv shell; do
install -D -m 644 services/plasma-phone-${service}.service %{buildroot}%{_libdir}/systemd/user/plasma-phone-${service}.service
ln -s ../plasma-phone-${service}.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/plasma-phone-${service}.service
done
# << install post
%files
%defattr(-,root,root,-)
%config %{_kf5_configdir}/kdeglobals
%{_kf5_sharedir}/plasma/*
%{_kf5_sharedir}/wallpapers/*
%{_kf5_servicesdir}/*.desktop
%{_sharedstatedir}/environment/greenisland/*
%{_sharedstatedir}/environment/plasma-phone/*
%{_libdir}/systemd/user/*
%{_libdir}/systemd/user/user-session.target.wants/*
%{_libdir}/qt5/qml/*
# >> files
# << files