From dde7047b558af0398012e85f4a3b450e604f8a3d Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Sun, 18 Dec 2011 09:04:41 +0000 Subject: [PATCH] rstyoutube is a package for embedding YouTube videos in reStructuredText documents. WWW: http://bitbucket.org/cliff/rstyoutube PR: ports/163343 Submitted by: Olivier Duchateau --- textproc/Makefile | 1 + textproc/py-rstyoutube/Makefile | 22 ++++++++++++++ textproc/py-rstyoutube/distinfo | 2 ++ textproc/py-rstyoutube/files/patch-setup.py | 33 +++++++++++++++++++++ textproc/py-rstyoutube/pkg-descr | 4 +++ textproc/py-rstyoutube/pkg-plist | 2 ++ 6 files changed, 64 insertions(+) create mode 100644 textproc/py-rstyoutube/Makefile create mode 100644 textproc/py-rstyoutube/distinfo create mode 100644 textproc/py-rstyoutube/files/patch-setup.py create mode 100644 textproc/py-rstyoutube/pkg-descr create mode 100644 textproc/py-rstyoutube/pkg-plist diff --git a/textproc/Makefile b/textproc/Makefile index 4e74d79ffb3e..ea8a46026f51 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1121,6 +1121,7 @@ SUBDIR += py-rdflib SUBDIR += py-reverend SUBDIR += py-rss2gen + SUBDIR += py-rstyoutube SUBDIR += py-rxp SUBDIR += py-sgrep SUBDIR += py-sphinx diff --git a/textproc/py-rstyoutube/Makefile b/textproc/py-rstyoutube/Makefile new file mode 100644 index 000000000000..6470068deae3 --- /dev/null +++ b/textproc/py-rstyoutube/Makefile @@ -0,0 +1,22 @@ +# New ports collection makefile for: py-rstyoutube +# Date created: 2011-12-16 +# Whom: Olivier Duchateau +# +# $FreeBSD$ +# + +PORTNAME= rstyoutube +PORTVERSION= 0.1.1 +CATEGORIES= textproc python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= duchateau.olivier@gmail.com +COMMENT= Embed YouTube videos in reStructuredText documents + +RUN_DEPENDS= ${PYTHON_SITELIBDIR}/docutils/__init__.py:${PORTSDIR}/textproc/py-docutils + +USE_PYTHON= yes +USE_PYDISTUTILS= easy_install + +.include diff --git a/textproc/py-rstyoutube/distinfo b/textproc/py-rstyoutube/distinfo new file mode 100644 index 000000000000..c002b05424e1 --- /dev/null +++ b/textproc/py-rstyoutube/distinfo @@ -0,0 +1,2 @@ +SHA256 (rstyoutube-0.1.1.tar.gz) = c7d4cb761680be01c0f5630805db87c01125c89cf6209784ac23806910f90ecd +SIZE (rstyoutube-0.1.1.tar.gz) = 3730 diff --git a/textproc/py-rstyoutube/files/patch-setup.py b/textproc/py-rstyoutube/files/patch-setup.py new file mode 100644 index 000000000000..7fab0a11e2e7 --- /dev/null +++ b/textproc/py-rstyoutube/files/patch-setup.py @@ -0,0 +1,33 @@ +--- setup.py.orig 2011-12-15 22:08:27.000000000 +0100 ++++ setup.py 2011-12-16 21:07:37.000000000 +0100 +@@ -1,6 +1,21 @@ + #!/usr/bin/env python + + from setuptools import setup ++import glob ++import os ++ ++def rename_script(files): ++ import shutil ++ ++ if files: ++ dirname = os.path.abspath(os.path.join('bin', '_script')) ++ if not os.path.exists(dirname): ++ os.makedirs(dirname) ++ for file in files: ++ shutil.copyfile(file, os.path.join(dirname, os.path.basename(file[:-3]).replace('+', '_'))) ++ ++# Rename script file (without .py) ++rename_script(glob.glob('bin/*.py')) + + setup( + name='rstyoutube', +@@ -11,7 +26,7 @@ + author_email='jcd@sdf.lonestar.org', + url='http://bitbucket.org/cliff/rstyoutube', + py_modules=['rstyoutube'], +- scripts=['bin/rst2html+youtube.py'], ++ scripts= glob.glob('bin/_script/*'), + license='LICENSE.txt', + install_requires=[ + 'docutils', diff --git a/textproc/py-rstyoutube/pkg-descr b/textproc/py-rstyoutube/pkg-descr new file mode 100644 index 000000000000..ebfb324ace25 --- /dev/null +++ b/textproc/py-rstyoutube/pkg-descr @@ -0,0 +1,4 @@ +rstyoutube is a package for embedding YouTube videos in reStructuredText +documents. + +WWW: http://bitbucket.org/cliff/rstyoutube diff --git a/textproc/py-rstyoutube/pkg-plist b/textproc/py-rstyoutube/pkg-plist new file mode 100644 index 000000000000..d205a4064ade --- /dev/null +++ b/textproc/py-rstyoutube/pkg-plist @@ -0,0 +1,2 @@ +bin/rst2html_youtube +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%