Blame breezy.spec

7f084c7
# All package versioning is found here:
7f084c7
# the actual version is composed from these below, including leading 0 for release candidates
7f084c7
#   bzrmajor:  main bzr version
7f084c7
#   Version: bzr version, add subrelease version here
7f084c7
#   bzrrc: release candidate version, if any, line starts with % for rc, # for stable releas (no %).
aded0c8
#   baserelease: rpm release number (0.N for rc candidates, N for stable releases)
15db656
%global brzmajor 3.2
b788a03
%global brzminor .0
7f084c7
#global brzrc b6
15db656
%global baserelease 1
7f084c7
7f084c7
Name:           breezy
7f084c7
Version:        %{brzmajor}%{?brzminor}
7f084c7
Release:        %{baserelease}%{?brzrc:.}%{?brzrc}%{?dist}
7f084c7
Summary:        Friendly distributed version control system
7f084c7
7f084c7
License:        GPLv2+
7f084c7
URL:            http://www.breezy-vcs.org/
7f084c7
Source0:        https://launchpad.net/brz/%{brzmajor}/%{version}%{?brzrc}/+download/%{name}-%{version}%{?brzrc}.tar.gz
7f084c7
Source1:        https://launchpad.net/brz/%{brzmajor}/%{version}%{?brzrc}/+download/%{name}-%{version}%{?brzrc}.tar.gz.asc
7f084c7
Source2:        brz-icon-64.png
7f084c7
7f084c7
BuildRequires:  python3-devel
7f084c7
BuildRequires:  python3-configobj
7f084c7
BuildRequires:  python3-Cython
7f084c7
BuildRequires:  python3-sphinx
7f084c7
BuildRequires:  python3-sphinx-epytext
7f084c7
BuildRequires:  python3-setuptools
7f084c7
BuildRequires:  zlib-devel
7f084c7
BuildRequires:  bash-completion
7f084c7
BuildRequires:  gcc
7f084c7
BuildRequires:  gettext
15db656
BuildRequires:  make
7f084c7
7f084c7
Requires:       python3-paramiko
7f084c7
7f084c7
# This is the name of the command, note that it is brz, not bzr
7f084c7
Provides:       brz = %{version}-%{release}
7f084c7
7f084c7
# breezy is a fork of bzr and replaces it
7f084c7
Provides:       bzr = %{version}-%{release}
7f084c7
Obsoletes:      bzr < 3
7f084c7
Provides:       git-remote-bzr = %{version}-%{release}
7f084c7
Obsoletes:      git-remote-bzr < 3
7f084c7
7f084c7
# This is needed for launchpad support
7f084c7
Recommends:     python3-launchpadlib
7f084c7
7f084c7
# Docs are not needed, but some might want them
7f084c7
Suggests:       %{name}-doc = %{version}-%{release}
7f084c7
7f084c7
%description
7f084c7
Breezy (brz) is a decentralized revision control system, designed to be easy
7f084c7
for developers and end users alike.
7f084c7
7f084c7
By default, Breezy provides support for both the Bazaar and Git file formats.
7f084c7
7f084c7
7f084c7
%package doc
7f084c7
Summary:        Documentation for Breezy
7f084c7
BuildArch:      noarch
7f084c7
7f084c7
%description doc
7f084c7
This package contains the documentation for the Breezy version control system.
7f084c7
7f084c7
%prep
277576b
%autosetup -p0 -n %{name}-%{version}%{?brzrc}
7f084c7
7f084c7
# Remove unused shebangs
7f084c7
sed -i '1{/#![[:space:]]*\/usr\/bin\/\(python\|env\)/d}' \
684b20f
    breezy/__main__.py \
7f084c7
    breezy/git/git_remote_helper.py \
7f084c7
    breezy/git/tests/test_git_remote_helper.py \
7f084c7
    breezy/plugins/bash_completion/bashcomp.py \
684b20f
    breezy/plugins/zsh_completion/zshcomp.py \
7f084c7
    breezy/tests/ssl_certs/create_ssls.py \
7f084c7
    contrib/brz_access
7f084c7
7f084c7
# Remove Cython generated .c files
7f084c7
find . -name '*_pyx.c' -exec rm \{\} \;
7f084c7
7f084c7
%build
7f084c7
%py3_build
7f084c7
7f084c7
chmod a-x contrib/bash/brzbashprompt.sh
7f084c7
7f084c7
# Build documents
7f084c7
make docs-sphinx PYTHON=%{__python3}
7f084c7
rm doc/*/_build/html/.buildinfo
7f084c7
rm -f doc/*/_build/html/_static/*/Makefile
7f084c7
pushd doc
7f084c7
for dir in *; do
7f084c7
  test -d $dir/_build/html && mv $dir/_build/html ../$dir
7f084c7
done
7f084c7
popd
7f084c7
7f084c7
7f084c7
%install
7f084c7
%py3_install
7f084c7
chmod -R a+rX contrib
7f084c7
chmod 0644 contrib/debian/init.d
7f084c7
chmod 0644 contrib/bzr_ssh_path_limiter  # note the bzr here
7f084c7
chmod 0644 contrib/brz_access
7f084c7
chmod 0755 %{buildroot}%{python3_sitearch}/%{name}/*.so
7f084c7
7f084c7
bashcompdir=$(pkg-config --variable=completionsdir bash-completion)
7f084c7
install -Dpm 0644 contrib/bash/brz %{buildroot}$bashcompdir/brz
7f084c7
rm contrib/bash/brz
7f084c7
7f084c7
install -d %{buildroot}%{_datadir}/pixmaps
7f084c7
install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/brz.png
7f084c7
7f084c7
# weird man page location
7f084c7
mv %{buildroot}%{_prefix}/man %{buildroot}%{_datadir}
7f084c7
7f084c7
# move git-remote-bzr to avoid conflict
7f084c7
mv %{buildroot}%{_bindir}/git-remote-bzr %{buildroot}%{_bindir}/git-remote-brz
7f084c7
mv %{buildroot}%{_mandir}/man1/git-remote-bzr.1 %{buildroot}%{_mandir}/man1/git-remote-brz.1
7f084c7
7f084c7
# backwards compatible symbolic links
7f084c7
ln -s brz %{buildroot}%{_bindir}/bzr
7f084c7
ln -s git-remote-brz %{buildroot}%{_bindir}/git-remote-bzr
7f084c7
echo ".so man1/brz.1" > %{buildroot}%{_mandir}/man1/bzr.1
7f084c7
echo ".so man1/git-remote-brz.1" > %{buildroot}%{_mandir}/man1/git-remote-bzr.1
7f084c7
7f084c7
# locales: all the .po files have empty msgstrs, so this doesn't do anything
7f084c7
#mv %%{name}/locale %%{buildroot}%%{_datadir}
7f084c7
#%%find_lang %%{name}
7f084c7
7f084c7
7f084c7
%files
7f084c7
# ... -f %%{name}.lang
7f084c7
%license COPYING.txt
7f084c7
%doc NEWS README.rst TODO contrib/
7f084c7
%{_bindir}/brz
7f084c7
%{_bindir}/bzr-*-pack
7f084c7
%{_bindir}/git-remote-brz
7f084c7
%{_bindir}/bzr
7f084c7
%{_bindir}/git-remote-bzr
7f084c7
%{_mandir}/man1/*
7f084c7
%{python3_sitearch}/%{name}/
7f084c7
%{python3_sitearch}/*.egg-info/
7f084c7
%{_datadir}/bash-completion/
7f084c7
%{_datadir}/pixmaps/brz.png
7f084c7
7f084c7
7f084c7
%files doc
7f084c7
%license COPYING.txt
7f084c7
%doc en developers
7f084c7
7f084c7
7f084c7
%changelog
15db656
* Wed May 05 2021 Ondrej Pohorelsky <opohorel@redhat.com> - 3.2.0-1
15db656
- Update to 3.2.0
15db656
87e1089
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-2
87e1089
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
87e1089
b788a03
* Mon Oct 26 2020 Ondrej Pohorelsky <opohorel@redhat.com> - 3.1.0-1
b788a03
- Update to 3.1.0
b788a03
63e5622
* Thu Oct 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-5
63e5622
- Replace bazaar in ELN as well
63e5622
92bfb6a
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-4
92bfb6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
92bfb6a
35946d4
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-3
35946d4
- Rebuilt for Python 3.9
35946d4
485e53e
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
485e53e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
485e53e
aded0c8
* Sun Dec 01 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-1
aded0c8
- Update to 3.0.2
aded0c8
514c489
* Thu Oct 24 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.1-4
514c489
- On Fedora 32+, replace bazaar with breezy
514c489
  https://fedoraproject.org/wiki/Changes/ReplaceBazaarWithBreezy
514c489
277576b
* Thu Oct 17 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.1-3
277576b
- Reenable all extension modules
277576b
0eae794
* Thu Oct 10 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.1-2
0eae794
- Disable the _static_tuple_c extension module to workaround Python 3.8 problems (#1760260)
0eae794
- Other disabled modules depending on the above:
0eae794
  _chk_map_pyx, _dirstate_helpers_pyx, _bencode_pyx, _btree_serializer_pyx
0eae794
7f084c7
* Wed Sep 04 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.1-1
7f084c7
- Package breezy