#These options are DEACTIVATED by default. %bcond_with wayland %bcond_with emulator %define standard_mix off Name: feedbackd Summary: Feedbackd Version: 1.0.0 Release: 1 Group: System/Management License: Apache-2.0 Source0: %{name}-%{version}.tar.gz Source1: feedbackd.manifest BuildRequires: cmake BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(capi-base-common) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(capi-system-info) BuildRequires: pkgconfig(capi-system-peripheral-io) BuildRequires: pkgconfig(libgdbus) BuildRequires: pkgconfig(libsystemd) Requires(post): /usr/bin/vconftool Requires: %{name}-compat = %{version}-%{release} Recommends: %{name}-driver-standard = %{version}-%{release} Requires: configuration-compat = %{version}-%{release} Recommends: %{name}-conf-level6 = %{version}-%{release} %description feedback daemon %package feedbackd Summary: feedback daemon Group: main %description feedbackd feedback daemon. # if driver = external or undefined %package driver-external Summary: Feedbackd binaries targeting external plugin Provides: %{name}-compat = %{version}-%{release} Conflicts: %{name}-driver-emulator Conflicts: %{name}-driver-gpio Conflicts: %{name}-driver-standard Conflicts: %{name}-driver-circle %description driver-external Feedbackd binaries with external plugin. Required by main feedbackd package # if driver = emulator or undefined %package driver-emulator Summary: Feedbackd binaries targeting emulator plugin Provides: %{name}-compat = %{version}-%{release} Conflicts: %{name}-driver-external Conflicts: %{name}-driver-gpio Conflicts: %{name}-driver-standard Conflicts: %{name}-driver-circle %description driver-emulator Feedbackd binaries with emulator plugin. Required by main feedbackd package # if driver = gpio or undefined %package driver-gpio Summary: Feedbackd binaries targeting gpio plugin Provides: %{name}-compat = %{version}-%{release} Conflicts: %{name}-driver-external Conflicts: %{name}-driver-emulator Conflicts: %{name}-driver-standard Conflicts: %{name}-driver-circle %description driver-gpio Feedbackd binaries with gpio plugin. Required by main feedbackd package # if driver = standard or undefined %package driver-standard Summary: Feedbackd binaries targeting emulator plugin Provides: %{name}-compat = %{version}-%{release} Conflicts: %{name}-driver-external Conflicts: %{name}-driver-emulator Conflicts: %{name}-driver-gpio Conflicts: %{name}-driver-circle %description driver-standard Feedbackd binaries with standard plugin. Required by main feedbackd package # if driver = circle or undefined %package driver-circle Summary: Feedbackd binaries targeting circle plugin Provides: %{name}-compat = %{version}-%{release} Conflicts: %{name}-driver-external Conflicts: %{name}-driver-emulator Conflicts: %{name}-driver-gpio Conflicts: %{name}-driver-standard %description driver-circle Feedbackd binaries with circle plugin. Required by main feedbackd package %package conf-level3 Summary: Feedbackd configuration file Provides: configuration-compat = %{version}-%{release} Conflicts: %{name}-conf-level6 %description conf-level3 Feedbackd configuration file. %package conf-level6 Summary: Feedbackd configuration file Provides: configuration-compat = %{version}-%{release} Conflicts: %{name}-conf-level3 %description conf-level6 Feedbackd configuration file. %package auto-test Summary: Feedbackd auto test tool Group: System/Utilities %description auto-test Feedbackd helper programs. This package can be installed optional for auto dbus test. %prep %setup -q # Build per driver # if driver = external or undefined mkdir -p build_external pushd build_external %cmake .. \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DDRIVER=external \ #eol popd # if driver = emulator or undefined mkdir -p build_emulator pushd build_emulator %cmake .. \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DDRIVER=emulator \ #eol popd # if driver = gpio or undefined mkdir -p build_gpio pushd build_gpio %cmake .. \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DDRIVER=gpio \ #eol popd # if driver = standard or undefined mkdir -p build_standard pushd build_standard %cmake .. \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DDRIVER=standard \ #eol popd # if driver = circle or undefined mkdir -p build_circle pushd build_circle %cmake .. \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DDRIVER=circle \ #eol popd %build cp %{SOURCE1} . # Build per driver # if driver = external or undefined pushd build_external make %{?jobs:-j%jobs} popd # if driver = emulator or undefined pushd build_emulator make %{?jobs:-j%jobs} popd # if driver = gpio or undefined pushd build_gpio make %{?jobs:-j%jobs} popd # if driver = standard or undefined pushd build_standard make %{?jobs:-j%jobs} popd # if driver = circle or undefined pushd build_circle make %{?jobs:-j%jobs} popd %install rm -rf %{buildroot} # Build per driver pushd build_external %make_install mv %{buildroot}%{_bindir}/feedbackd %{buildroot}%{_bindir}/feedbackd.external popd pushd build_emulator %make_install mv %{buildroot}%{_bindir}/feedbackd %{buildroot}%{_bindir}/feedbackd.emulator popd pushd build_gpio %make_install mv %{buildroot}%{_bindir}/feedbackd %{buildroot}%{_bindir}/feedbackd.gpio popd pushd build_standard %make_install mv %{buildroot}%{_bindir}/feedbackd %{buildroot}%{_bindir}/feedbackd.standard popd pushd build_circle %make_install mv %{buildroot}%{_bindir}/feedbackd %{buildroot}%{_bindir}/feedbackd.circle popd %install_service multi-user.target.wants feedbackd.service %post systemctl daemon-reload if [ "$1" == "1" ]; then systemctl restart feedbackd.service fi %post driver-external mv %{_bindir}/feedbackd.external %{_bindir}/feedbackd %preun driver-external mv %{_bindir}/feedbackd %{_bindir}/feedbackd.external if [ "$1" == "0" ]; then systemctl stop feedbackd.service fi %post driver-emulator mv %{_bindir}/feedbackd.emulator %{_bindir}/feedbackd %preun driver-emulator mv %{_bindir}/feedbackd %{_bindir}/feedbackd.emulator if [ "$1" == "0" ]; then systemctl stop feedbackd.service fi %post driver-gpio mv %{_bindir}/feedbackd.gpio %{_bindir}/feedbackd %preun driver-gpio mv %{_bindir}/feedbackd %{_bindir}/feedbackd.gpio if [ "$1" == "0" ]; then systemctl stop feedbackd.service fi %post driver-standard mv %{_bindir}/feedbackd.standard %{_bindir}/feedbackd %preun driver-standard mv %{_bindir}/feedbackd %{_bindir}/feedbackd.standard if [ "$1" == "0" ]; then systemctl stop feedbackd.service fi %post driver-circle mv %{_bindir}/feedbackd.circle %{_bindir}/feedbackd %preun driver-circle mv %{_bindir}/feedbackd %{_bindir}/feedbackd.circle if [ "$1" == "0" ]; then systemctl stop feedbackd.service fi %post conf-level3 mv %{_sysconfdir}/feedbackd/haptic-level3.conf %{_sysconfdir}/feedbackd/haptic.conf %post conf-level6 mv %{_sysconfdir}/feedbackd/haptic-level6.conf %{_sysconfdir}/feedbackd/haptic.conf %files -n feedbackd %manifest %{name}.manifest %license LICENSE.Apache-2.0 %config %{_sysconfdir}/dbus-1/system.d/feedbackd.conf %{_unitdir}/feedbackd.service %{_unitdir}/multi-user.target.wants/feedbackd.service %{_datadir}/dbus-1/system-services/org.tizen.system.vibrator.service %files driver-external %license LICENSE.Apache-2.0 %manifest %{name}.manifest %{_bindir}/feedbackd.external %files driver-emulator %license LICENSE.Apache-2.0 %manifest %{name}.manifest %{_bindir}/feedbackd.emulator %files driver-gpio %license LICENSE.Apache-2.0 %manifest %{name}.manifest %{_bindir}/feedbackd.gpio %files driver-standard %license LICENSE.Apache-2.0 %manifest %{name}.manifest %{_bindir}/feedbackd.standard %files driver-circle %license LICENSE.Apache-2.0 %manifest %{name}.manifest %{_bindir}/feedbackd.circle %files conf-level3 %license LICENSE.Apache-2.0 %manifest %{name}.manifest %config %{_sysconfdir}/feedbackd/haptic-level3.conf %files conf-level6 %license LICENSE.Apache-2.0 %manifest %{name}.manifest %config %{_sysconfdir}/feedbackd/haptic-level6.conf %files auto-test %license LICENSE.Apache-2.0 %manifest %{name}.manifest %{_bindir}/feedbackd-auto-test