[vlc-devel] commit: python bindings: .deb and .rpm packaging files (Jason Scheunemann )

git version control git at videolan.org
Fri Jul 10 15:54:22 CEST 2009


vlc | branch: master | Jason Scheunemann <jason.scheunemann at yahoo.com> | Fri Jul 10 15:53:25 2009 +0200| [5a3616613b312a7a74e58671b9bab41e68988d5b] | committer: Olivier Aubert 

python bindings: .deb and .rpm packaging files

Signed-off-by: Olivier Aubert <olivier.aubert at liris.cnrs.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5a3616613b312a7a74e58671b9bab41e68988d5b
---

 bindings/python/debian/control  |   15 ++++++++
 bindings/python/debian/rules    |    8 ++++
 bindings/python/python-vlc.spec |   71 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 94 insertions(+), 0 deletions(-)

diff --git a/bindings/python/debian/control b/bindings/python/debian/control
new file mode 100644
index 0000000..4d12ac3
--- /dev/null
+++ b/bindings/python/debian/control
@@ -0,0 +1,15 @@
+Source: python-vlc
+Section: contrib/libs
+Priority: optional
+Maintainer: Jason Scheunemann <jason.scheunemann at yahoo.com>
+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 0000000..528517d
--- /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 0000000..1db4278
--- /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 <olivier.aubert at liris.cnrs.fr>
+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




More information about the vlc-devel mailing list