lrossett / centos / centpkg

Forked from centos/centpkg 3 years ago
Clone
1e8da7
# In order to use unversioned python macros in the spec file, we need to
1e8da7
# explicitly define %%__python.  It is already defined on el7.
1e8da7
%if %{undefined el7}
1e8da7
%if %{defined el8}
1e8da7
%global __python %{_libexecdir}/platform-python
1e8da7
%else
1e8da7
%global __python %{python3}
1e8da7
%endif
1e8da7
%endif
1e8da7
3bff02
  
3bff02
%define compdir %(pkg-config --variable=completionsdir bash-completion)
3bff02
%if "%{compdir}" == ""
3bff02
%define compdir "/etc/bash_completion.d"
3bff02
%endif
3bff02
622a50
Name:           centpkg
df8083
Version:        0.5.1
3bff02
Release:        3%{?dist}
622a50
Summary:        CentOS utility for working with dist-git
622a50
License:        GPLv2+
c7c04a
URL:            https://git.centos.org/centos/centpkg
53d6d3
Source0:        %{url}/archive/%{version}/centpkg-%{version}.tar.gz
7e0e80
BuildArch:      noarch
Brian Stinson 10bb17
3bff02
BuildRequires:  pkgconfig
3bff02
BuildRequires:  bash-completion
3bff02
1e8da7
%if %{defined el7}
1e8da7
BuildRequires:  python-devel
James Antill cf286c
BuildRequires:  python-setuptools
53d6d3
# The equivalent dependencies are added automatically everywhere except el7.
53d6d3
Requires:       python-pycurl
53d6d3
Requires:       pyOpenSSL
53d6d3
Requires:       python-rpkg
53d6d3
Requires:       python-six
James Antill cf286c
%else
1e8da7
BuildRequires:  python3-devel
1e8da7
BuildRequires:  python3-setuptools
74122f
BuildRequires:  python3-rpkg
James Antill cf286c
%endif
Brian Stinson 10bb17
c7ea65
Brian Stinson 10bb17
%description
c7ea65
Provides the centpkg command for working with dist-git.
Brian Stinson 10bb17
Brian Stinson 10bb17
a79c47
%package sig
a79c47
Summary:        CentOS SIG utility for working with dist-git
a79c47
Requires:       %{name} = %{version}-%{release}
Brian Stinson 10bb17
Brian Stinson 10bb17
a79c47
%description sig
a79c47
Provides the centpkg-sig command for working with dist-git.
Brian Stinson 10bb17
c7ea65
Brian Stinson 10bb17
%prep
c7c04a
%autosetup
Brian Stinson 10bb17
Brian Stinson 10bb17
Brian Stinson 10bb17
%build
1e8da7
%py_build
74122f
%{__python} doc/centpkg_man_page.py > centpkg.1
Brian Stinson 10bb17
Brian Stinson 10bb17
Brian Stinson 10bb17
%install
1e8da7
%py_install
74122f
%if %{undefined el7}
74122f
%{__install} -d %{buildroot}%{_mandir}/man1
74122f
%{__install} -p -m 0644 centpkg.1 %{buildroot}%{_mandir}/man1
74122f
%endif
8f9bd3
install -D -p -m 0644 src/centpkg.conf     %{buildroot}%{_sysconfdir}/rpkg/centpkg.conf
8f9bd3
install -D -p -m 0644 src/centpkg-sig.conf %{buildroot}%{_sysconfdir}/rpkg/centpkg-sig.conf
3bff02
mv src/centpkg.bash %{buildroot}%{compdir}/centpkg
Brian Stinson 10bb17
Brian Stinson 10bb17
%files
599d78
%license COPYING
599d78
%doc README.md
30b0f4
%config(noreplace) %{_sysconfdir}/rpkg/centpkg.conf
3bff02
%(dirname %{compdir})
Brian Stinson 10bb17
%{_bindir}/%{name}
1e8da7
%{python_sitelib}/%{name}
1e8da7
%{python_sitelib}/%{name}-%{version}-py%{python_version}.egg-info
Brian Stinson 10bb17
Brian Stinson 10bb17
a79c47
%files sig
a79c47
%{_bindir}/%{name}-sig
a79c47
%config(noreplace) %{_sysconfdir}/rpkg/centpkg-sig.conf
Brian Stinson 10bb17
Brian Stinson 10bb17
Brian Stinson 10bb17
%changelog
3bff02
* Thur Apr 08 2021 Leonardo Rossetti <lrossett@redhat.com> - 0.5.1-3
3bff02
- Add bash completion support
74122f
- Add manpage support
3bff02
53d6d3
* Thu Mar 25 2021 Carl George <carl@george.computer> - 0.5.1-2
53d6d3
- Add missing el7 requirements
53d6d3
df8083
* Thu Mar 25 2021 Carl George <carl@george.computer> - 0.5.1-1
df8083
- Latest version
df8083
Michal Konečný 0d832c
* Thu Feb 25 2021 mkonecny@redhat.com 0.5.0-1
Michal Konečný 0d832c
- Add centpkg-sig command
Michal Konečný 0d832c
894f00
* Mon Nov 28 2016 brian@bstinson.com 0.4.6-1
894f00
- Tracking updates to rpkg (thanks pavlix)
894f00
- Fix the URL building code in the sources method
894f00
Brian Stinson 38f04b
* Sat Jan 31 2015 Brian Stinson bstinson@ksu.edu - 0.4.4-1
Brian Stinson 38f04b
- New version correcting the anonymous pull URLs
Brian Stinson 38f04b
Brian Stinson 3382ae
* Sun Dec 14 2014 Brian Stinson bstinson@ksu.edu - 0.4.3-1
Brian Stinson 3382ae
- Use the authenticated git url for centpkg pulls
Brian Stinson 3382ae
Brian Stinson d3f316
* Sun Dec 14 2014 Brian Stinson bstinson@ksu.edu - 0.4.2-1
Brian Stinson d3f316
- Fix the koji config path in centpkg.conf
Brian Stinson d3f316
Brian Stinson 02cccf
* Sun Dec 14 2014 Brian Stinson bstinson@ksu.edu - 0.4.1-1
Brian Stinson 02cccf
- Fix a disttag regression and add a "patch" version number
Brian Stinson 02cccf
Brian Stinson f2820f
* Sat Nov 23 2014 Brian Stinson bstinson@ksu.edu - 0.2-1
Brian Stinson f2820f
- The srpm workflow to the CBS works now
Brian Stinson f2820f
Brian Stinson 10bb17
* Sat Jul 05 2014 Brian Stinson bstinson@ksu.edu - 0.1-2
Brian Stinson 10bb17
- Update readme and add exception checking when running toplevel commands
Brian Stinson 10bb17
Brian Stinson 10bb17
* Sat Jul 05 2014 Brian Stinson bstinson@ksu.edu - 0.1-1
622a50
- Local builds and mockbuilds work