From: Jason Scheunemann Date: Fri, 10 Jul 2009 13:53:25 +0000 (+0200) Subject: python bindings: .deb and .rpm packaging files X-Git-Tag: 1.1.0-ff~5036 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=5a3616613b312a7a74e58671b9bab41e68988d5b;p=vlc python bindings: .deb and .rpm packaging files Signed-off-by: Olivier Aubert --- diff --git a/bindings/python/debian/control b/bindings/python/debian/control new file mode 100644 index 0000000000..4d12ac3d24 --- /dev/null +++ b/bindings/python/debian/control @@ -0,0 +1,15 @@ +Source: python-vlc +Section: contrib/libs +Priority: optional +Maintainer: Jason Scheunemann +Build-Depends: cdbs, debhelper (>= 7), python-central (>=0.5.6), python-setuptools, python-dev, libvlc-dev (>= 1.0.0) +XS-Python-Version: 2.5 +Standards-Version: 3.8.0 +Homepage: http://wiki.videolan.org/PythonBinding + +Package: python-vlc +Architecture: any +XB-Python-Version: ${python:Versions} +Depends: ${python:Depends}, ${misc:Depends}, vlc (>= 1.0.0) +Description: VLC bindings for python. + VLC bindings for python. diff --git a/bindings/python/debian/rules b/bindings/python/debian/rules new file mode 100755 index 0000000000..528517d6d9 --- /dev/null +++ b/bindings/python/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +DEB_PYTHON_SYSTEM=pycentral + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk + +# Add here any variable or target overrides you need. diff --git a/bindings/python/python-vlc.spec b/bindings/python/python-vlc.spec new file mode 100644 index 0000000000..1db4278034 --- /dev/null +++ b/bindings/python/python-vlc.spec @@ -0,0 +1,71 @@ +%define name python-vlc +%define version 1.0.0.90 +%define unmangled_version 1.0.0.90 +%define release 1 +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +Summary: VLC bindings for python. +Name: %{name} +Version: %{version} +Release: %{release} +Source0: %{name}-%{unmangled_version}.tar.gz +License: GPL +Group: Development/Libraries +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +Prefix: %{_prefix} +Vendor: Olivier Aubert +Url: http://wiki.videolan.org/PythonBinding + +%description +VLC bindings for python. + +This module provides bindings for the native libvlc API of the VLC +video player. Documentation can be found on the VLC wiki : +http://wiki.videolan.org/ExternalAPI + +This module also provides a MediaControl object, which implements an +API inspired from the OMG Audio/Video Stream 1.0 specification. +Documentation can be found on the VLC wiki : +http://wiki.videolan.org/PythonBinding + +Example session (for the MediaControl API): + +import vlc +mc=vlc.MediaControl(['--verbose', '1']) +mc.playlist_add_item('movie.mpg') + +# Start the movie at 2000ms +p=vlc.Position() +p.origin=vlc.RelativePosition +p.key=vlc.MediaTime +p.value=2000 +mc.start(p) +# which could be abbreviated as +# mc.start(2000) +# for the default conversion from int is to make a RelativePosition in MediaTime + +# Display some text during 2000ms +mc.display_text('Some useless information', 0, 2000) + +# Pause the video +mc.pause(0) + +# Get status information +mc.get_stream_information() + + +%prep +%setup -n %{name}-%{unmangled_version} + +%build +env CFLAGS="$RPM_OPT_FLAGS" python setup.py build + +%install +python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f INSTALLED_FILES +%defattr(-,root,root) +%{python_sitelib}/vlcwidget.pyo