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