# SUSE guys use OBS to automatically handle release numbers, # when rebasing check what they are using on # https://download.opensuse.org/repositories/openSUSE:/Tools/Fedora_37/src/ # update the obsrel to match the upstream release number # FIXME: stop doing this once osc 1.0 is properly released %dnl %global obsrel 332.4 # osc plugin support %global osc_plugin_dir %{_prefix}/lib/osc-plugins # for obs source services %global obsroot %{_prefix}/lib/obs %global obs_srcsvc_dir %{obsroot}/service # Real release number %global baserelease 1 # github fails to create a version including a ~ %global gh_ver 1.0.0b5 Name: osc Summary: Open Build Service Commander Version: 1.0.0~b5 # Bump the release as necessary to ensure we're one level up from upstream Release: %mkrel 1 License: GPL-2.0-or-later URL: https://github.com/openSUSE/%{name} Source: %{URL}/archive/%{gh_ver}/%{name}-%{version}.tar.gz BuildRequires: diffstat BuildRequires: python3-devel BuildRequires: python3-distro BuildRequires: python3-rpm BuildRequires: python3-progressbar2 BuildRequires: python3-setuptools BuildRequires: python3-pip BuildRequires: python3-cryptography BuildRequires: python3-urllib3 BuildRequires: python3-pytest BuildRequires: argparse-manpage Requires: python3-distro Requires: python3-rpm Requires: python3-cryptography Requires: python3-urllib3 Requires: python3-lxml Requires: python3-progressbar2 Requires: python3-pytest # for MFA via ssh Recommends: openssh Requires: obs-service-source_validator BuildArch: noarch %description Commandline client for the Open Build Service. See http://en.opensuse.org/openSUSE:OSC , as well as http://en.opensuse.org/openSUSE:Build_Service_Tutorial for a general introduction. %prep %autosetup -p1 -n %{name}-%{gh_ver} %build %py3_build # write rpm macros 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=get_parser \ --project-name=osc \ --prog=osc \ --description="openSUSE Commander" \ --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 # mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/ install -Dm0644 contrib/complete.csh %{buildroot}%{_sysconfdir}/profile.d/osc.csh install -Dm0644 contrib/complete.sh %{buildroot}%{_datadir}/bash-completion/completions/osc install -Dm0755 contrib/osc.complete %{buildroot}%{_datadir}/osc/complete install -Dm0644 contrib/osc.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/osc.fish 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 %check %{pytest} %files %doc AUTHORS README.md NEWS %license COPYING %{_bindir}/osc* %{python3_sitelib}/osc* %{_sysconfdir}/profile.d/osc.csh %{_datadir}/bash-completion/completions/osc %{_datadir}/fish/vendor_completions.d/osc.fish %dir %{_localstatedir}/lib/osc-plugins %{_mandir}/man1/osc.* %{_datadir}/osc %{_rpmconfigdir}/macros.d/macros.osc %dir %{obsroot} %dir %{obs_srcsvc_dir} %dir %{osc_plugin_dir}