%global srcname tesstractor Name: %{srcname} Version: 0.5.1 Release: 1%{?dist} Summary: Read data from TESS photometers License: GPLv3+ URL: https://github.com/guaix-ucm/tesstractor Source0: https://pypi.python.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz Source1: tesstractor.service BuildArch: noarch BuildRequires: python3-devel python3-setuptools BuildRequires: systemd-rpm-macros %{?systemd_requires} %description Tesstractor is a software designed to read data\ from TESS and SQM-LU photometers %prep %autosetup -n %{srcname}-%{version} %build %py3_build %install %py3_install mkdir -p %{buildroot}/%{_unitdir} mkdir -p %{buildroot}/%{_sysconfdir}/tesstractor mkdir -p %{buildroot}/%{_sharedstatedir}/tesstractor cp -a %{SOURCE1} %{buildroot}/%{_unitdir} cp -a tesstractor/base.ini %{buildroot}/%{_sysconfdir}/tesstractor/config.ini %check PYTEST_ADDOPTS='-p no:cacheprovider' export PYTEST_ADDOPTS pushd %{buildroot}%{python3_sitelib} : # py.test-%{python3_version} -v %{srcname} popd %post %systemd_post %{srcname}.service %preun %systemd_preun %{srcname}.service %postun %systemd_postun_with_restart ${srcname}.service %files %doc README.md %license LICENSE.txt %{_bindir}/tesstractor %dir %{_sysconfdir}/tesstractor %config(noreplace) %{_sysconfdir}/tesstractor/config.ini %dir %{_sharedstatedir}/tesstractor %{python3_sitelib}/tesstractor* %{_unitdir}/tesstractor.service %changelog * Mon Mar 04 2019 Sergio Pascual - 0.5.1-1 - Initial SPEC