src/haptic/external.c
src/haptic/emulator.c
src/haptic/circle.c
- src/haptic/gpio_haptic.c
)
+
IF(STANDARD_MIX STREQUAL on)
SET(SRCS ${SRCS} src/haptic/standard-mix.c)
ELSE()
capi-base-common
gio-2.0
capi-system-info
- capi-system-peripheral-io
)
+IF(GPIO_HAPTIC STREQUAL on)
+ SET(SRCS ${SRCS} src/haptic/gpio_haptic.c)
+ SET(PKG_MODULES ${PKG_MODULES} capi-system-peripheral-io)
+ENDIF()
+
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs2 REQUIRED ${PKG_MODULES})
FILES_MATCHING
PATTERN "feedbackd.service")
-IF(PROFILE STREQUAL wearable)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/haptic/haptic-wearable.conf DESTINATION /etc/feedbackd)
-ELSE()
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/haptic/haptic-mobile.conf DESTINATION /etc/feedbackd)
-ENDIF()
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/haptic/haptic-${PROFILE}.conf DESTINATION /etc/feedbackd)
Summary: Deviced binaries targeting mobile profile
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
Summary: Deviced binaries targeting wearable profile
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
+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
%prep
%setup -q
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DPROFILE=mobile \
-DSTANDARD_MIX=%{standard_mix} \
+ -DGPIO_HAPTIC=off \
#eol
popd
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DPROFILE=wearable \
-DSTANDARD_MIX=%{standard_mix} \
+ -DGPIO_HAPTIC=off \
+ #eol
+popd
+
+# Build per profile
+# if profile = iot or common or undefined
+mkdir -p build_iot
+pushd build_iot
+%cmake .. \
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DPROFILE=iot \
+ -DSTANDARD_MIX=%{standard_mix} \
+ -DGPIO_HAPTIC=on \
#eol
popd
make %{?jobs:-j%jobs}
popd
+# if profile = iot or common or undefined
+pushd build_iot
+make %{?jobs:-j%jobs}
+popd
+
%install
rm -rf %{buildroot}
# Build per profile
mv %{buildroot}%{_bindir}/feedbackd %{buildroot}%{_bindir}/feedbackd.wearable
popd
-%install_service multi-user.target.wants feedbackd.service
+# if profile = iot or common or undefined
+pushd build_iot
+%make_install
+mv %{buildroot}%{_bindir}/feedbackd %{buildroot}%{_bindir}/feedbackd.iot
+popd
-%post profile_mobile
-mv %{_bindir}/feedbackd.mobile %{_bindir}/feedbackd
-mv %{_sysconfdir}/feedbackd/haptic-mobile.conf %{_sysconfdir}/feedbackd/haptic.conf
+%install_service multi-user.target.wants feedbackd.service
+%post
systemctl daemon-reload
if [ "$1" == "1" ]; then
systemctl restart feedbackd.service
fi
+%post profile_mobile
+mv %{_bindir}/feedbackd.mobile %{_bindir}/feedbackd
+mv %{_sysconfdir}/feedbackd/haptic-mobile.conf %{_sysconfdir}/feedbackd/haptic.conf
+
%preun profile_mobile
mv %{_bindir}/feedbackd %{_bindir}/feedbackd.mobile
mv %{_bindir}/feedbackd.wearable %{_bindir}/feedbackd
mv %{_sysconfdir}/feedbackd/haptic-wearable.conf %{_sysconfdir}/feedbackd/haptic.conf
-systemctl daemon-reload
-if [ "$1" == "1" ]; then
- systemctl restart feedbackd.service
-fi
-
%preun profile_wearable
mv %{_bindir}/feedbackd %{_bindir}/feedbackd.wearable
systemctl stop feedbackd.service
fi
+%post profile_iot
+mv %{_bindir}/feedbackd.iot %{_bindir}/feedbackd
+mv %{_sysconfdir}/feedbackd/haptic-iot.conf %{_sysconfdir}/feedbackd/haptic.conf
+
+%preun profile_iot
+mv %{_bindir}/feedbackd %{_bindir}/feedbackd.iot
+
+if [ "$1" == "0" ]; then
+ systemctl stop feedbackd.service
+fi
+
%files -n feedbackd
%manifest %{name}.manifest
%license LICENSE
%manifest %{name}.manifest
%config %{_sysconfdir}/feedbackd/haptic-wearable.conf
%{_bindir}/feedbackd.wearable
+
+%files profile_iot
+%license LICENSE
+%manifest %{name}.manifest
+%config %{_sysconfdir}/feedbackd/haptic-iot.conf
+%{_bindir}/feedbackd.iot
+