%global git_hash 65c3b3f
Name: pycanberra
Summary: A very basic (and incomplete) wrapper for libcanberra
License: LGPLv2
# There's no versioning upstream, it's all about the Git hash
Version: 0
Release: 0.4.git%{git_hash}%{?dist}
URL: https://github.com/psykoyiko/pycanberra/
# There aren't any release yet, I'm creating a git snapshot:
# $ git clone git://github.com/psykoyiko/pycanberra.git
# $ cd pycanberra
# $ GIT_HASH=$(git rev-parse --short HEAD)
# $ git archive --prefix=pycanberra-$GIT_HASH/ --format=tar HEAD | xz > pycanberra-git.$GIT_HASH.tar.xz
Source0: %{name}-git.%{git_hash}.tar.xz
# I submitted these patches upstream, but they haven't been accepted yet
# https://github.com/psykoyiko/pycanberra/pull/2
# I'm pulling them in the package because other packages need pycanberra with
# Python 3 (e.g gnome-clocks)
Patch0: 0001-Do-not-use-the-exceptions-module.patch
Patch1: 0002-Ensure-all-strings-passed-to-libcanberra-are-byte-st.patch
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python3-devel
# This will break at run time when libcanberra bumps its soname :(
Requires: libcanberra
%description
A very basic (and incomplete) wrapper of libcanberra for Python 2.
%package -n python3-canberra
Summary: A very basic (and incomplete) wrapper for libcanberra
%description -n python3-canberra
A very basic (and incomplete) wrapper of libcanberra for Python 3.
%prep
%setup -q -n pycanberra-%{git_hash}
%patch0 -p1
%patch1 -p1
%build
# Nothing to build
%install
install -d %{buildroot}%{python_sitelib}
install -p -m 0644 pycanberra.py %{buildroot}%{python_sitelib}
install -d %{buildroot}%{python3_sitelib}
install -p -m 0644 pycanberra.py %{buildroot}%{python3_sitelib}
%files
%doc COPYING README
%{python_sitelib}/pycanberra.py*
%files -n python3-canberra
%doc COPYING README
%{python3_sitelib}/pycanberra.py
%{python3_sitelib}/__pycache__/pycanberra.cpython-33.py?
%changelog
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.4.git65c3b3f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Feb 06 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 0-0.3.git65c3b3f
- Add a python3 subpackage.
* Tue Oct 02 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 0-0.2.git65c3b3f
- Fix requirement on libcanberra.
* Wed Sep 26 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 0-0.1.git65c3b3f
- Initial package for Fedora.