File obs-utils-mge.spec of Package obs-utils-mge
#
# spec file for package obs-utils-mge
#
# Copyright (C) 2022-2026 Mark Grant <m.grant.prg@gmail.com>
#
#
# openSUSE Leap has a peculiar release field and inconsistent versioning macros.
# Prior to 16.0 sle_version must be used to provide the version, it has the
# format 150600. For 16.0 and subsequent releases, suse_version must be used,
# it has the format 1600. N.B. This is all true of osc builds, OBS seems to work
# probably because it overrides the spec file Release field.
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1600
%define major %(version=%{?suse_version}; echo ${version::2})
%define minor %(version=%{?suse_version}; echo ${version:(-1)})
%else
%define major %(version=%{?sle_version}; echo ${version::2})
%define minor %(version=%{?sle_version}; echo ${version:(-3):1})
%endif
%endif
# Enter the Release numerics here.
%define pkg_release 0.0
Name: obs-utils-mge
Version: 1.3.0
%if 0%{?is_opensuse}
Release: lp%{?major}%{?minor}.%{?pkg_release}
%else
Release: %{?pkg_release}
%endif
License: GPL-3.0
Summary: openSUSE Build Service utilities
Url: https://github.com/m-grant-prg/%{name}/wiki
Group: Development/Tools/Building
Source0: https://github.com/m-grant-prg/%{name}/release/%{name}-%{version}.tar.gz
BuildRequires: autoconf, automake, make
BuildRequires: bash, tar
BuildRequires: txt2manwrap
Requires: bash, tar
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
Helper scripts for use with the openSUSE Build Service.
%prep
%setup -q -n %{name}-%{version}
%build
autoreconf -if
%configure docdir=%{_docdir}/%{name}
make %{?jobs:-j%jobs}
%install
%make_install
%files
%defattr(-,root,root,-)
%license COPYING
%doc %{_docdir}/%{name}
#doc README.md
%config %{_sysconfdir}/%{name}.conf
%{_datadir}/bash-completion/completions/oscbuilder
%{_mandir}/man1/oscbuilder.1.gz
%{_bindir}/oscbuilder
%changelog