Requires(post): /usr/bin/vconftool
Requires: %{name}-compat = %{version}-%{release}
-Recommends: %{name}-profile_mobile = %{version}-%{release}
+Recommends: %{name}-driver-standard = %{version}-%{release}
+
+Requires: configuration-compat = %{version}-%{release}
+Recommends: %{name}-conf-level6 = %{version}-%{release}
%description
feedback daemon
%description feedbackd
feedback daemon.
-# if profile = mobile or common or undefined
-%package profile_mobile
-Summary: Deviced binaries targeting mobile profile
+# 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}-profile_wearable
-Conflicts: %{name}-profile_iot
-%description profile_mobile
-Deviced binaries targeting mobile profile. Required by main deviced package
-# if profile = wearable or common or undefined
-%package profile_wearable
-Summary: Deviced binaries targeting wearable profile
+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}-profile_mobile
-Conflicts: %{name}-profile_iot
-%description profile_wearable
-Deviced binaries targeting wearable profile. Required by main deviced package
-# if profile = iot or common or undefined
-%package profile_iot
-Summary: Deviced binaries targeting iot profile
+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}-profile_mobile
-Conflicts: %{name}-profile_wearable
-%description profile_iot
-Deviced binaries targeting iot profile. Required by main deviced package
+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.
%prep
%setup -q
-# Build per profile
-# if profile = mobile or common or undefined
-mkdir -p build_mobile
-pushd build_mobile
+# 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} \
- -DPROFILE=mobile \
- -DSTANDARD_MIX=%{standard_mix} \
- -DGPIO_HAPTIC=off \
+ -DDRIVER=gpio \
#eol
popd
-# if profile = wearable or common or undefined
-mkdir -p build_wearable
-pushd build_wearable
+# if driver = standard or undefined
+mkdir -p build_standard
+pushd build_standard
%cmake .. \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DPROFILE=wearable \
- -DSTANDARD_MIX=%{standard_mix} \
- -DGPIO_HAPTIC=off \
+ -DDRIVER=standard \
#eol
popd
-# Build per profile
-# if profile = iot or common or undefined
-mkdir -p build_iot
-pushd build_iot
+# if driver = circle or undefined
+mkdir -p build_circle
+pushd build_circle
%cmake .. \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DPROFILE=iot \
- -DSTANDARD_MIX=%{standard_mix} \
- -DGPIO_HAPTIC=on \
+ -DDRIVER=circle \
#eol
popd
%build
cp %{SOURCE1} .
-# Build per profile
-# if profile = mobile or common or undefined
-pushd build_mobile
+# Build per driver
+# if driver = external or undefined
+pushd build_external
make %{?jobs:-j%jobs}
popd
-# if profile = wearable or common or undefined
-pushd build_wearable
+# if driver = emulator or undefined
+pushd build_emulator
make %{?jobs:-j%jobs}
popd
-# if profile = iot or common or undefined
-pushd build_iot
+# 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 profile
-# if profile = mobile or common or undefined
-pushd build_mobile
+# Build per driver
+pushd build_external
%make_install
-mv %{buildroot}%{_bindir}/feedbackd %{buildroot}%{_bindir}/feedbackd.mobile
+mv %{buildroot}%{_bindir}/feedbackd %{buildroot}%{_bindir}/feedbackd.external
popd
-# if profile = wearable or common or undefined
-pushd build_wearable
+pushd build_emulator
%make_install
-mv %{buildroot}%{_bindir}/feedbackd %{buildroot}%{_bindir}/feedbackd.wearable
+mv %{buildroot}%{_bindir}/feedbackd %{buildroot}%{_bindir}/feedbackd.emulator
popd
-# if profile = iot or common or undefined
-pushd build_iot
+pushd build_gpio
%make_install
-mv %{buildroot}%{_bindir}/feedbackd %{buildroot}%{_bindir}/feedbackd.iot
+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
systemctl restart feedbackd.service
fi
-%post profile_mobile
-mv %{_bindir}/feedbackd.mobile %{_bindir}/feedbackd
-mv %{_sysconfdir}/feedbackd/haptic-mobile.conf %{_sysconfdir}/feedbackd/haptic.conf
+%post driver-external
+mv %{_bindir}/feedbackd.external %{_bindir}/feedbackd
-%preun profile_mobile
-mv %{_bindir}/feedbackd %{_bindir}/feedbackd.mobile
+%preun driver-external
+mv %{_bindir}/feedbackd %{_bindir}/feedbackd.external
if [ "$1" == "0" ]; then
systemctl stop feedbackd.service
fi
-%post profile_wearable
-mv %{_bindir}/feedbackd.wearable %{_bindir}/feedbackd
-mv %{_sysconfdir}/feedbackd/haptic-wearable.conf %{_sysconfdir}/feedbackd/haptic.conf
+%post driver-emulator
+mv %{_bindir}/feedbackd.emulator %{_bindir}/feedbackd
-%preun profile_wearable
-mv %{_bindir}/feedbackd %{_bindir}/feedbackd.wearable
+%preun driver-emulator
+mv %{_bindir}/feedbackd %{_bindir}/feedbackd.emulator
if [ "$1" == "0" ]; then
systemctl stop feedbackd.service
fi
-%post profile_iot
-mv %{_bindir}/feedbackd.iot %{_bindir}/feedbackd
-mv %{_sysconfdir}/feedbackd/haptic-iot.conf %{_sysconfdir}/feedbackd/haptic.conf
+%post driver-gpio
+mv %{_bindir}/feedbackd.gpio %{_bindir}/feedbackd
-%preun profile_iot
-mv %{_bindir}/feedbackd %{_bindir}/feedbackd.iot
+%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
%{_unitdir}/feedbackd.service
%{_unitdir}/multi-user.target.wants/feedbackd.service
-%files profile_mobile
+%files driver-external
+%license LICENSE
+%manifest %{name}.manifest
+%{_bindir}/feedbackd.external
+
+%files driver-emulator
+%license LICENSE
+%manifest %{name}.manifest
+%{_bindir}/feedbackd.emulator
+
+%files driver-gpio
+%license LICENSE
+%manifest %{name}.manifest
+%{_bindir}/feedbackd.gpio
+
+%files driver-standard
+%license LICENSE
+%manifest %{name}.manifest
+%{_bindir}/feedbackd.standard
+
+%files driver-circle
%license LICENSE
%manifest %{name}.manifest
-%config %{_sysconfdir}/feedbackd/haptic-mobile.conf
-%{_bindir}/feedbackd.mobile
+%{_bindir}/feedbackd.circle
-%files profile_wearable
+%files conf-level3
%license LICENSE
%manifest %{name}.manifest
-%config %{_sysconfdir}/feedbackd/haptic-wearable.conf
-%{_bindir}/feedbackd.wearable
+%config %{_sysconfdir}/feedbackd/haptic-level3.conf
-%files profile_iot
+%files conf-level6
%license LICENSE
%manifest %{name}.manifest
-%config %{_sysconfdir}/feedbackd/haptic-iot.conf
-%{_bindir}/feedbackd.iot
+%config %{_sysconfdir}/feedbackd/haptic-level6.conf