2018-03-20 08:26:08 +01:00
|
|
|
#
|
2018-10-09 09:31:50 +02:00
|
|
|
# spec file for package obs-service-replace_using_package_version
|
2018-03-20 08:26:08 +01:00
|
|
|
#
|
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
|
|
#
|
|
|
|
# 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 http://bugs.opensuse.org/
|
2018-10-09 09:31:50 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2018-03-20 08:26:08 +01:00
|
|
|
#
|
|
|
|
%define service replace_using_package_version
|
|
|
|
|
|
|
|
Name: obs-service-%{service}
|
2018-10-09 09:31:50 +02:00
|
|
|
Version: 0.0.2
|
2018-03-20 08:26:08 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: An OBS service: Replaces a regex with the version value of a package
|
2018-03-20 16:09:28 +01:00
|
|
|
License: GPL-3.0-or-later
|
2018-03-20 08:26:08 +01:00
|
|
|
Group: Development/Tools/Building
|
|
|
|
Url: https://github.com/openSUSE/obs-service-%{service}
|
2018-03-20 18:16:00 +01:00
|
|
|
Source0: %{service}.tar
|
2018-03-20 08:26:08 +01:00
|
|
|
%if 0%{?suse_version} > 1315
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
Requires: python3-docopt
|
2018-10-09 09:31:50 +02:00
|
|
|
Requires: python3-setuptools
|
2018-03-20 08:26:08 +01:00
|
|
|
%else
|
|
|
|
BuildRequires: python-setuptools
|
|
|
|
Requires: python-docopt
|
2018-10-09 09:31:50 +02:00
|
|
|
Requires: python-setuptools
|
2018-03-20 08:26:08 +01:00
|
|
|
%endif
|
|
|
|
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
|
2018-03-20 18:16:00 +01:00
|
|
|
%setup -q -n %{service}
|
2018-03-20 08:26:08 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%if 0%{?suse_version} > 1315
|
|
|
|
# Build Python 3 version
|
|
|
|
python3 setup.py build
|
|
|
|
%else
|
|
|
|
# Build Python 2 version
|
|
|
|
python2 setup.py build
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
|
|
|
%if 0%{?suse_version} > 1315
|
|
|
|
# Install Python 3 version
|
|
|
|
python3 setup.py install --root %{buildroot} \
|
|
|
|
--install-script %{_prefix}/lib/obs/service \
|
|
|
|
--install-data %{_prefix}/lib/obs/service
|
|
|
|
%else
|
|
|
|
# Install Python 2 version
|
|
|
|
python2 setup.py install --root %{buildroot} \
|
|
|
|
--install-script %{_prefix}/lib/obs/service \
|
|
|
|
--install-data %{_prefix}/lib/obs/service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2018-03-20 18:16:00 +01:00
|
|
|
%dir %{_prefix}/lib/obs
|
2018-03-20 08:26:08 +01:00
|
|
|
%dir %{_prefix}/lib/obs/service
|
|
|
|
%{_prefix}/lib/obs/service
|
|
|
|
|
2018-03-20 16:09:28 +01:00
|
|
|
%if 0%{?suse_version} < 1500
|
|
|
|
%doc LICENSE
|
|
|
|
%else
|
|
|
|
%license LICENSE
|
|
|
|
%endif
|
|
|
|
|
2018-03-20 08:26:08 +01:00
|
|
|
%changelog
|