# All package versioning is found here: # the actual version is composed from these below, including leading 0 for release candidates # bzrmajor: main bzr version # Version: bzr version, add subrelease version here # bzrrc: release candidate version, if any, line starts with % for rc, # for stable releas (no %). # release: rpm subrelease (0.N for rc candidates, N for stable releases) %global brzmajor 3.0 %global brzminor .1 #global brzrc b6 %global baserelease 1 Name: breezy Version: %{brzmajor}%{?brzminor} Release: %{baserelease}%{?brzrc:.}%{?brzrc}%{?dist} Summary: Friendly distributed version control system License: GPLv2+ URL: http://www.breezy-vcs.org/ Source0: https://launchpad.net/brz/%{brzmajor}/%{version}%{?brzrc}/+download/%{name}-%{version}%{?brzrc}.tar.gz Source1: https://launchpad.net/brz/%{brzmajor}/%{version}%{?brzrc}/+download/%{name}-%{version}%{?brzrc}.tar.gz.asc Source2: brz-icon-64.png BuildRequires: python3-devel BuildRequires: python3-configobj BuildRequires: python3-Cython BuildRequires: python3-sphinx BuildRequires: python3-sphinx-epytext BuildRequires: python3-setuptools BuildRequires: zlib-devel BuildRequires: bash-completion BuildRequires: gcc BuildRequires: gettext Requires: python3-paramiko # This is the name of the command, note that it is brz, not bzr Provides: brz = %{version}-%{release} # breezy is a fork of bzr and replaces it Provides: bzr = %{version}-%{release} Obsoletes: bzr < 3 Provides: git-remote-bzr = %{version}-%{release} Obsoletes: git-remote-bzr < 3 # This is needed for launchpad support Recommends: python3-launchpadlib # Docs are not needed, but some might want them Suggests: %{name}-doc = %{version}-%{release} %description Breezy (brz) is a decentralized revision control system, designed to be easy for developers and end users alike. By default, Breezy provides support for both the Bazaar and Git file formats. %package doc Summary: Documentation for Breezy BuildArch: noarch %description doc This package contains the documentation for the Breezy version control system. %prep %autosetup -p1 -n %{name}-%{version}%{?brzrc} # Remove unused shebangs sed -i '1{/#![[:space:]]*\/usr\/bin\/\(python\|env\)/d}' \ breezy/_patiencediff_py.py \ breezy/git/git_remote_helper.py \ breezy/git/tests/test_git_remote_helper.py \ breezy/patiencediff.py \ breezy/plugins/bash_completion/bashcomp.py \ breezy/tests/ssl_certs/create_ssls.py \ contrib/brz_access # Remove Cython generated .c files find . -name '*_pyx.c' -exec rm \{\} \; %build %py3_build chmod a-x contrib/bash/brzbashprompt.sh # Build documents make docs-sphinx PYTHON=%{__python3} rm doc/*/_build/html/.buildinfo rm -f doc/*/_build/html/_static/*/Makefile pushd doc for dir in *; do test -d $dir/_build/html && mv $dir/_build/html ../$dir done popd %install %py3_install chmod -R a+rX contrib chmod 0644 contrib/debian/init.d chmod 0644 contrib/bzr_ssh_path_limiter # note the bzr here chmod 0644 contrib/brz_access chmod 0755 %{buildroot}%{python3_sitearch}/%{name}/*.so bashcompdir=$(pkg-config --variable=completionsdir bash-completion) install -Dpm 0644 contrib/bash/brz %{buildroot}$bashcompdir/brz rm contrib/bash/brz install -d %{buildroot}%{_datadir}/pixmaps install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/brz.png # weird man page location mv %{buildroot}%{_prefix}/man %{buildroot}%{_datadir} # backwards compatible symbolic links ln -s brz %{buildroot}%{_bindir}/bzr echo ".so man1/brz.1" > %{buildroot}%{_mandir}/man1/bzr.1 # locales: all the .po files have empty msgstrs, so this doesn't do anything #mv %%{name}/locale %%{buildroot}%%{_datadir} #%%find_lang %%{name} %files # ... -f %%{name}.lang %license COPYING.txt %doc NEWS README.rst TODO contrib/ %{_bindir}/brz %{_bindir}/bzr %{_bindir}/bzr-*-pack %{_bindir}/git-remote-bzr %{_mandir}/man1/* %{python3_sitearch}/%{name}/ %{python3_sitearch}/*.egg-info/ %{_datadir}/bash-completion/ %{_datadir}/pixmaps/brz.png %files doc %license COPYING.txt %doc en developers %changelog * Wed Sep 04 2019 Miro HronĨok - 3.0.1-1 - Package breezy