158 lines
5.0 KiB
RPMSpec
158 lines
5.0 KiB
RPMSpec
%global osc_plugin_dir %{_prefix}/lib/osc-plugins
|
|
%global obsroot %{_prefix}/lib/obs
|
|
%global obs_srcsvc_dir %{obsroot}/service
|
|
|
|
Name: osc
|
|
Version: 1.15.1
|
|
Release: 1
|
|
Summary: The Command Line Interface to work with an Open Build Service
|
|
License: GPL-2.0-or-later
|
|
Url: https://github.com/openSUSE/osc
|
|
Source: https://github.com/openSUSE/osc/archive/%{version}/%{name}-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
BuildRequires: python3-devel python3-distro python3-rpm python3-setuptools diffstat
|
|
BuildRequires: python3-cryptography python3-urllib3 python3-argparse-manpage
|
|
BuildRequires: python3-ruamel-yaml git-core
|
|
Requires: python3-distro python3-rpm python3-lxml vim
|
|
Requires: python3-urllib3 python3-progressbar2
|
|
Recommends: obs-build
|
|
Recommends: obs-service-source_validator
|
|
Conflicts: obs-build < 20191205
|
|
|
|
%description
|
|
The osc is an opensuse-commander with svn like handling.
|
|
It's a command line interface to work with an Open Build Service.
|
|
|
|
%package help
|
|
Summary: Help package for %{name}
|
|
BuildArch: noarch
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description help
|
|
This package contains some man help files for %{name}.
|
|
|
|
%prep
|
|
%autosetup -p1 -n osc-%{version}
|
|
|
|
%build
|
|
%py3_build
|
|
|
|
cat << EOF > macros.osc
|
|
%%osc_plugin_dir %{osc_plugin_dir}
|
|
EOF
|
|
|
|
# build man page
|
|
PYTHONPATH=. argparse-manpage \
|
|
--output=osc.1 \
|
|
--format=single-commands-section \
|
|
--module=osc.commandline \
|
|
--function=argparse_manpage_get_parser \
|
|
--project-name=osc \
|
|
--prog=osc \
|
|
--description="Command-line client for Open Build Service" \
|
|
--author="Contributors to the osc project. See the project's GIT history for the complete list." \
|
|
--url="https://github.com/openSUSE/osc/"
|
|
|
|
PYTHONPATH=. argparse-manpage \
|
|
--output=git-obs.1 \
|
|
--format=single-commands-section \
|
|
--module=osc.commandline_git \
|
|
--function=argparse_manpage_get_parser \
|
|
--project-name=osc \
|
|
--prog=git-obs \
|
|
--description="Git based command-line client for Open Build Service" \
|
|
--author="Contributors to the osc project. See the project's GIT history for the complete list." \
|
|
--url="https://github.com/openSUSE/osc/"
|
|
|
|
|
|
|
|
%install
|
|
%py3_install
|
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/lib/osc-plugins
|
|
|
|
install -Dm0644 contrib/complete.csh %{buildroot}%{_sysconfdir}/profile.d/osc.csh
|
|
install -Dm0644 contrib/git-obs-complete.zsh %{buildroot}%{_datadir}/zsh/site-functions/git-obs.zsh
|
|
|
|
install -Dm0644 contrib/complete.sh %{buildroot}%{_datadir}/bash-completion/completions/osc
|
|
install -Dm0644 contrib/git-obs-complete.bash %{buildroot}%{_datadir}/bash-completion/completions/git-obs.bash
|
|
|
|
install -Dm0755 contrib/osc.complete %{buildroot}%{_datadir}/osc/complete
|
|
|
|
install -Dm0644 contrib/osc.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/osc.fish
|
|
install -Dm0644 contrib/git-obs-complete.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/git-obs.fish
|
|
|
|
mkdir -p %{buildroot}%{_libexecdir}/git
|
|
ln -s %{_bindir}/git-obs %{buildroot}%{_libexecdir}/git/obs
|
|
|
|
mkdir -p %{buildroot}%{obs_srcsvc_dir}
|
|
|
|
mkdir -p %{buildroot}%{osc_plugin_dir}
|
|
|
|
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
|
|
|
|
# install rpm macros
|
|
install -Dm0644 macros.osc %{buildroot}%{_rpmmacrodir}/macros.osc
|
|
|
|
# install man page
|
|
install -Dm0644 osc.1 %{buildroot}%{_mandir}/man1/osc.1
|
|
install -Dm0644 git-obs.1 %{buildroot}%{_mandir}/man1/git-obs.1
|
|
|
|
# inject argcomplete marker to the generated git-obs executable
|
|
sed -i '3i # PYTHON_ARGCOMPLETE_OK' %{buildroot}%{_bindir}/git-obs
|
|
|
|
%check
|
|
python3 setup.py test
|
|
|
|
%files
|
|
%doc AUTHORS README.md NEWS
|
|
%license COPYING
|
|
%{_bindir}/osc*
|
|
%{_bindir}/git-obs
|
|
%{_libexecdir}/git/obs
|
|
%{python3_sitelib}/osc*
|
|
%{_sysconfdir}/profile.d/osc.csh
|
|
%{_datadir}/zsh/site-functions/git-obs.zsh
|
|
%{_datadir}/bash-completion/completions/osc
|
|
%{_datadir}/bash-completion/completions/git-obs.bash
|
|
%{_datadir}/fish/vendor_completions.d/osc.fish
|
|
%{_datadir}/fish/vendor_completions.d/git-obs.fish
|
|
%dir %{_localstatedir}/lib/osc-plugins
|
|
%{_datadir}/osc
|
|
%{_rpmconfigdir}/macros.d/macros.osc
|
|
%dir %{_prefix}/lib/obs
|
|
%dir %{_prefix}/lib/obs/service
|
|
%dir %{_prefix}/lib/osc-plugins
|
|
|
|
%files help
|
|
%{_mandir}/man1/osc.*
|
|
%{_mandir}/man1/git-obs.*
|
|
|
|
%changelog
|
|
* Mon May 12 2025 wangkai <13474090681@163.com> - 1.15.1-1
|
|
- Update to 1.15.1
|
|
|
|
* Tue Sep 10 2024 wangkai <13474090681@163.com> - 1.9.1-1
|
|
- Update to 1.9.1 for fix CVE-2024-22034
|
|
|
|
* Wed Oct 18 2023 wangkai <13474090681@163.com> - 1.4.2-1
|
|
- Upgrade to 1.4.2
|
|
|
|
* Thu Aug 31 2023 chenchen <chen_aka_jan@163.com> - 1.3.1-1
|
|
- Upgrade to 1.3.1
|
|
|
|
* Wed Apr 27 2022 xigaoxinyan <xigaoxinyan@h-partners.com> - 0.175.0-1
|
|
- Upgrade to 0.175.0
|
|
|
|
* Thu Sep 17 2020 maminjie <maminjie1@huawei.com> - 0.169.1-3
|
|
- Add vim to Requires list
|
|
|
|
* Fri Sep 11 2020 maminjie <maminjie1@huawei.com> - 0.169.1-2
|
|
- Rebuilt for Python 3.8.5
|
|
|
|
* Wed Aug 05 2020 yaokai <yaokai13@huawei.com> - 0.169.1-1
|
|
- Upgrade to 0.169.1 to fix CVE-2019-3681
|
|
|
|
* Wed Nov 27 2019 catastrowings <jianghuhao1994@163.com> - 0.163.0-237.1.2
|
|
- Update to 0.163.0
|