obs-service-replace_using_p.../obs-service-replace_using_package_version.spec
Dan Čermák 7762b681ec Accepting request 1034808 from home:dcassany:branches:Virtualization:containers
- Update to version 1667988064.d72b7ba:
  * Bump version: 0.0.3 → 0.0.4
  * Update obs-service-replace_using_package_version.spec
  * Adapt spec to the current project setup
  * Bump actions/setup-python from 4.1.0 to 4.3.0
  * Bump actions/setup-python from 3 to 4.1.0
  * Bump pytest-cov from 3.0.0 to 4.0.0
  * Bump flake8 from 4.0.1 to 5.0.1
  * Bump tox from 3.25.0 to 3.25.1
  * Bump tox from 3.24.5 to 3.25.0
  * Bump actions/cache from 2 to 3
  * Bump actions/checkout from 2 to 3
  * Bump actions/setup-python from 2 to 3
  * Bump pytest from 7.0.0 to 7.0.1
  * Bump pytest from 6.2.5 to 7.0.0
  * Switch from custom run_command to using check_output
  * Remove additional space from pyproject.toml
  * Replace travis CI badge with GitHub Actions badge
  * Make the file parameter default to the build recipe
  * Add integration tests using pytest_container
  * Bump coverage from 6.3 to 6.3.1
  * Switch from travis-ci to github actions
  * Remove trailing whitespace
  * Switch to poetry instead of using setup.py
  * Correct spelling & gramar in .service
  * Add missing closing description element to .service
  * Follow the python package naming conventions

OBS-URL: https://build.opensuse.org/request/show/1034808
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/obs-service-replace_using_package_version?expand=0&rev=12
2022-11-09 10:24:10 +00:00

63 lines
1.9 KiB
RPMSpec

#
# spec file
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define service replace_using_package_version
Name: obs-service-%{service}
Version: 0.0.4
Release: 0
Summary: An OBS service: Replaces a regex with the version value of a package
License: GPL-3.0-or-later
Group: Development/Tools/Building
URL: https://github.com/openSUSE/obs-service-%{service}
Source0: %{service}.py
Source1: %{service}.service
Source2: LICENSE
BuildRequires: sed
Requires: python3-docopt
Requires: python3-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
This service replaces a given regex with the version value of
a given package. Can be used to align the version of you package or image
to the version of another package.
%prep
cp %{S:0} .
cp %{S:1} .
cp %{S:2} .
%build
sed -i "s|#!/usr/bin/env python3|#!/usr/bin/python3|g" %{service}.py
%install
install -D -m 755 %{service}.py %{buildroot}%{_prefix}/lib/obs/service/%{service}
install -D -m 644 %{service}.service %{buildroot}%{_prefix}/lib/obs/service/%{service}.service
%files
%defattr(-,root,root)
%dir %{_prefix}/lib/obs
%dir %{_prefix}/lib/obs/service
%{_prefix}/lib/obs/service
%license LICENSE
%changelog