%define _basever 0.0.0 %define _git_refspec fd3f80637fd38e502e51e0f42b815c80e2375940 %define _git_refspec_short %(echo %{_git_refspec} | cut -c -7) Name: waydroid-sensors Version: %{_basever}git.%(date +%Y%m%d).%{_git_refspec_short} Release: 2%{?dist} License: GPLv3 Summary: Waydroid sensors daemon BuildRequires: cmake BuildRequires: glib2-devel BuildRequires: libgbinder-devel libglibutil-devel BuildRequires: cmake(Qt5Core) cmake(Qt5Network) Source0: https://github.com/waydroid/%{name}/archive/%{_git_refspec}/%{name}-%{_git_refspec_short}.tar.gz %description Sensors library for Waydroid %prep %setup -qn %{name}-%{_git_refspec} %build %{set_build_flags} mkdir build/ pushd build/ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. make %{?_smp_mflags} popd %install pushd build/ %make_install popd %files %{_bindir}/waydroid-sensord