2011-06-29 06:16:32 +00:00
|
|
|
#
|
2017-04-12 14:43:36 +00:00
|
|
|
# spec file for package obs-service-tar_scm
|
2011-06-29 06:16:32 +00:00
|
|
|
#
|
2019-01-14 10:33:16 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-06-29 06:16:32 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-09-19 08:19:11 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-06-29 06:16:32 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-03-06 15:59:59 +00:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
%define locale_package glibc-locale-base
|
|
|
|
%else
|
|
|
|
%define locale_package glibc-locale
|
|
|
|
%endif
|
|
|
|
%endif
|
2019-03-06 22:47:56 +00:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
|
2019-03-06 15:59:59 +00:00
|
|
|
%define locale_package glibc-langpack-en
|
|
|
|
%endif
|
|
|
|
|
2017-04-12 14:43:36 +00:00
|
|
|
%bcond_without obs_scm_testsuite
|
2016-04-08 07:10:41 +00:00
|
|
|
|
2017-04-12 14:43:36 +00:00
|
|
|
Name: obs-service-tar_scm
|
2019-03-06 15:59:59 +00:00
|
|
|
%define version_unconverted 0.10.6.1551887937.e42c270
|
|
|
|
Version: 0.10.6.1551887937.e42c270
|
2012-12-03 15:29:20 +00:00
|
|
|
Release: 0
|
2017-04-20 06:24:11 +00:00
|
|
|
Summary: An OBS source service: create tar ball from svn/git/hg
|
2018-03-09 07:40:44 +00:00
|
|
|
License: GPL-2.0-or-later
|
2012-02-14 08:38:12 +00:00
|
|
|
Group: Development/Tools/Building
|
2017-04-12 14:43:36 +00:00
|
|
|
Url: https://github.com/openSUSE/obs-service-tar_scm
|
|
|
|
Source: %{name}-%{version}.tar.gz
|
2016-05-20 05:52:54 +00:00
|
|
|
# Fix build on Ubuntu by disabling mercurial tests, not applied in rpm
|
|
|
|
# based distributions
|
2016-07-27 15:31:54 +00:00
|
|
|
#Patch0: 0001-Debianization-disable-running-mercurial-tests.patch
|
2017-04-18 09:27:21 +00:00
|
|
|
%if %{with obs_scm_testsuite}
|
2019-03-06 15:59:59 +00:00
|
|
|
BuildRequires: %{locale_package}
|
2012-02-16 16:16:22 +00:00
|
|
|
BuildRequires: bzr
|
2015-07-24 09:23:11 +00:00
|
|
|
BuildRequires: git-core
|
2012-02-16 16:16:22 +00:00
|
|
|
BuildRequires: mercurial
|
2018-03-09 07:40:44 +00:00
|
|
|
BuildRequires: subversion
|
2018-09-24 12:23:25 +00:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
|
2017-10-11 06:50:26 +00:00
|
|
|
%define py_compile(O) \
|
|
|
|
find %1 -name '*.pyc' -exec rm -f {} \\; \
|
|
|
|
python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
|
|
|
|
%{-O: \
|
|
|
|
find %1 -name '*.pyo' -exec rm -f {} \\; \
|
|
|
|
python -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
|
|
|
|
}
|
|
|
|
|
2017-03-24 16:44:55 +00:00
|
|
|
BuildRequires: PyYAML
|
|
|
|
%else
|
2017-02-28 15:43:11 +00:00
|
|
|
BuildRequires: python-PyYAML
|
2017-03-24 16:44:55 +00:00
|
|
|
%endif
|
2016-06-29 13:23:15 +00:00
|
|
|
BuildRequires: python-dateutil
|
2014-10-05 11:44:20 +00:00
|
|
|
BuildRequires: python-lxml
|
2016-06-29 13:23:15 +00:00
|
|
|
BuildRequires: python-mock
|
2019-02-19 15:53:05 +00:00
|
|
|
BuildRequires: python-six
|
2018-05-23 08:03:50 +00:00
|
|
|
BuildRequires: python-unittest2
|
2017-04-18 09:27:21 +00:00
|
|
|
%endif
|
|
|
|
BuildRequires: python >= 2.6
|
2015-07-24 09:23:11 +00:00
|
|
|
Requires: git-core
|
2019-01-14 10:58:06 +00:00
|
|
|
|
2018-05-23 08:00:31 +00:00
|
|
|
%if 0%{?suse_version} >= 1315
|
2018-03-09 07:40:44 +00:00
|
|
|
Recommends: bzr
|
|
|
|
Recommends: mercurial
|
|
|
|
Recommends: subversion
|
2018-05-23 08:00:31 +00:00
|
|
|
%endif
|
2017-04-12 16:00:24 +00:00
|
|
|
Requires: obs-service-obs_scm-common = %version-%release
|
2017-04-12 14:06:22 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
This is a source service for openSUSE Build Service.
|
|
|
|
|
|
|
|
It supports downloading from svn, git, hg and bzr repositories.
|
|
|
|
|
|
|
|
%package -n obs-service-obs_scm-common
|
2017-04-20 06:24:11 +00:00
|
|
|
Summary: Common parts of SCM handling services
|
2017-04-12 14:06:22 +00:00
|
|
|
Group: Development/Tools/Building
|
2019-03-06 15:59:59 +00:00
|
|
|
Requires: %{locale_package}
|
2017-04-12 14:06:22 +00:00
|
|
|
Requires: python-dateutil
|
2017-04-14 11:50:02 +00:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
|
|
|
|
Requires: PyYAML
|
|
|
|
%else
|
|
|
|
Requires: python-PyYAML
|
2017-04-20 09:27:04 +00:00
|
|
|
%if 0%{?suse_version} < 1315
|
|
|
|
Requires: python-argparse
|
|
|
|
%endif
|
2017-04-14 11:50:02 +00:00
|
|
|
%endif
|
2017-04-12 14:06:22 +00:00
|
|
|
|
2017-05-10 21:39:29 +00:00
|
|
|
%if 0%{?fedora_version} >= 25
|
|
|
|
Requires: python2
|
|
|
|
%endif
|
|
|
|
|
2017-04-12 14:06:22 +00:00
|
|
|
%description -n obs-service-obs_scm-common
|
|
|
|
|
|
|
|
%package -n obs-service-tar
|
|
|
|
Summary: Creates a tar archive from local directory
|
|
|
|
Group: Development/Tools/Building
|
|
|
|
Requires: obs-service-obs_scm-common = %version-%release
|
|
|
|
Provides: obs-service-tar_scm:/usr/lib/obs/service/tar.service
|
2019-02-19 15:53:05 +00:00
|
|
|
%if (0%{?fedora_version} && 0%{?fedora_version} < 26) || 0%{?centos} == 6 || 0%{?centos} == 7
|
|
|
|
BuildRequires: python-argparse
|
|
|
|
Requires: python-argparse
|
|
|
|
%endif
|
2017-04-12 14:06:22 +00:00
|
|
|
|
|
|
|
%description -n obs-service-tar
|
2017-04-20 06:24:11 +00:00
|
|
|
Creates a tar archive from local directory
|
2017-04-12 14:06:22 +00:00
|
|
|
|
2017-04-12 14:43:36 +00:00
|
|
|
%package -n obs-service-obs_scm
|
2017-04-20 06:24:11 +00:00
|
|
|
Summary: Creates a OBS cpio from a remote SCM resource
|
2017-04-12 14:06:22 +00:00
|
|
|
Group: Development/Tools/Building
|
2017-04-12 18:24:18 +00:00
|
|
|
Provides: obs-service-tar_scm:/usr/lib/obs/service/obs_scm.service
|
2017-04-12 14:06:22 +00:00
|
|
|
Requires: git-core
|
2018-05-23 08:08:14 +00:00
|
|
|
%if 0%{?suse_version} >= 1315
|
2018-03-09 07:40:44 +00:00
|
|
|
Recommends: bzr
|
|
|
|
Recommends: mercurial
|
|
|
|
Recommends: subversion
|
2018-05-23 08:08:14 +00:00
|
|
|
%endif
|
2017-04-12 14:06:22 +00:00
|
|
|
Requires: obs-service-obs_scm-common = %version-%release
|
|
|
|
|
2017-04-12 14:43:36 +00:00
|
|
|
%description -n obs-service-obs_scm
|
2017-04-20 06:24:11 +00:00
|
|
|
Creates a OBS cpio from a remote SCM resource.
|
|
|
|
|
|
|
|
This can be used to work directly in local git checkout and can be packaged
|
|
|
|
into a tar ball during build time.
|
2017-04-12 14:06:22 +00:00
|
|
|
|
|
|
|
%package -n obs-service-appimage
|
|
|
|
Summary: Handles source downloads defined in appimage.yml files
|
|
|
|
Group: Development/Tools/Building
|
|
|
|
Requires: git-core
|
2018-05-23 08:08:14 +00:00
|
|
|
%if 0%{?suse_version} >= 1315
|
2018-03-09 07:40:44 +00:00
|
|
|
Recommends: bzr
|
|
|
|
Recommends: mercurial
|
|
|
|
Recommends: subversion
|
2018-09-19 08:19:11 +00:00
|
|
|
Recommends: obs-service-download_files
|
2018-05-23 08:08:14 +00:00
|
|
|
%endif
|
2017-04-12 14:06:22 +00:00
|
|
|
Requires: obs-service-obs_scm-common = %version-%release
|
|
|
|
|
|
|
|
%description -n obs-service-appimage
|
2017-04-20 06:24:11 +00:00
|
|
|
Experimental appimage support: This parses appimage.yml files for SCM
|
|
|
|
resources and packages them.
|
2017-04-12 14:06:22 +00:00
|
|
|
|
|
|
|
%package -n obs-service-snapcraft
|
|
|
|
Summary: Handles source downloads defined in snapcraft.yaml files
|
|
|
|
Group: Development/Tools/Building
|
|
|
|
Provides: obs-service-tar_scm:/usr/lib/obs/service/snapcraft.service
|
|
|
|
Requires: git-core
|
2018-05-23 08:08:14 +00:00
|
|
|
%if 0%{?suse_version} >= 1315
|
2018-03-09 07:40:44 +00:00
|
|
|
Recommends: bzr
|
|
|
|
Recommends: mercurial
|
|
|
|
Recommends: subversion
|
2018-09-19 08:19:11 +00:00
|
|
|
Recommends: obs-service-download_files
|
2018-05-23 08:08:14 +00:00
|
|
|
%endif
|
2017-04-12 14:06:22 +00:00
|
|
|
Requires: obs-service-obs_scm-common = %version-%release
|
2010-10-18 12:49:18 +00:00
|
|
|
|
2017-04-12 14:06:22 +00:00
|
|
|
%description -n obs-service-snapcraft
|
2017-04-20 06:24:11 +00:00
|
|
|
Experimental snapcraft support: This parses snapcraft.yaml files for SCM
|
|
|
|
resources and packages them.
|
2010-10-18 12:49:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2016-04-08 07:10:41 +00:00
|
|
|
%setup -q -n obs-service-tar_scm-%version
|
2010-10-18 12:49:18 +00:00
|
|
|
|
|
|
|
%build
|
2017-10-11 06:50:26 +00:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
|
|
|
|
%py_compile .
|
|
|
|
%else
|
2017-07-09 11:09:20 +00:00
|
|
|
%py_compile %{buildroot}
|
2017-10-11 06:50:26 +00:00
|
|
|
%endif
|
2010-10-18 12:49:18 +00:00
|
|
|
|
|
|
|
%install
|
2014-08-08 09:13:27 +00:00
|
|
|
make install DESTDIR="%{buildroot}" PREFIX="%{_prefix}" SYSCFG="%{_sysconfdir}"
|
2012-02-16 11:06:33 +00:00
|
|
|
|
2017-04-12 14:43:36 +00:00
|
|
|
%if %{with obs_scm_testsuite}
|
2012-12-04 09:31:19 +00:00
|
|
|
%if 0%{?suse_version} >= 1220
|
2017-07-09 11:09:20 +00:00
|
|
|
|
2012-02-15 16:34:15 +00:00
|
|
|
%check
|
2014-10-05 11:44:20 +00:00
|
|
|
# No need to run PEP8 tests here; that would require a potentially
|
|
|
|
# brittle BuildRequires: python-pep8, and any style issues are already
|
|
|
|
# caught by Travis CI.
|
2017-04-12 18:38:24 +00:00
|
|
|
make test
|
2017-04-12 14:43:36 +00:00
|
|
|
%endif
|
2012-12-04 09:31:19 +00:00
|
|
|
%endif
|
2012-02-15 16:34:15 +00:00
|
|
|
|
2010-10-18 12:49:18 +00:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2017-04-12 16:03:02 +00:00
|
|
|
%{_prefix}/lib/obs/service/tar_scm.service
|
2017-04-12 14:06:22 +00:00
|
|
|
|
|
|
|
%files -n obs-service-obs_scm-common
|
|
|
|
%defattr(-,root,root)
|
2012-12-03 15:29:20 +00:00
|
|
|
%dir %{_prefix}/lib/obs
|
2017-04-12 14:06:22 +00:00
|
|
|
%dir %{_prefix}/lib/obs/service
|
|
|
|
%{_prefix}/lib/obs/service/TarSCM
|
2017-04-12 18:24:18 +00:00
|
|
|
%{_prefix}/lib/obs/service/tar_scm
|
2012-12-03 15:29:20 +00:00
|
|
|
%dir %{_sysconfdir}/obs
|
|
|
|
%dir %{_sysconfdir}/obs/services
|
|
|
|
%config(noreplace) %{_sysconfdir}/obs/services/*
|
2010-10-18 12:49:18 +00:00
|
|
|
|
2017-04-12 14:06:22 +00:00
|
|
|
%files -n obs-service-tar
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_prefix}/lib/obs/service/tar
|
|
|
|
%{_prefix}/lib/obs/service/tar.service
|
|
|
|
|
2017-04-12 16:03:02 +00:00
|
|
|
%files -n obs-service-obs_scm
|
2017-04-12 14:06:22 +00:00
|
|
|
%defattr(-,root,root)
|
2017-04-12 16:03:02 +00:00
|
|
|
%{_prefix}/lib/obs/service/obs_scm
|
|
|
|
%{_prefix}/lib/obs/service/obs_scm.service
|
2017-04-12 14:06:22 +00:00
|
|
|
|
|
|
|
%files -n obs-service-appimage
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_prefix}/lib/obs/service/appimage*
|
|
|
|
|
|
|
|
%files -n obs-service-snapcraft
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_prefix}/lib/obs/service/snapcraft*
|
|
|
|
|
2011-06-29 06:16:32 +00:00
|
|
|
%changelog
|