Subject: [alpine-devel] MediaProxy package

From: Andrew Manison <[email-masked]>
Date: Fri, 13 Nov 2009 21:03:13 -0500

Hi,

Here is the patch for MediaProxy. It required creating packages for a 
couple of Python installation packages as well. Hopefully this will all 
work.

Andrew

>From 5702f704eac4fa18d7ff2dc328847a9566c2ac2f Mon Sep 17 00:00:00 2001
From: Andrew Manison <[email-masked]>
Date: Sat, 14 Nov 2009 01:44:03 +0000
Subject: [PATCH] Added mediaproxy and required Python packages

---
 testing/mediaproxy/APKBUILD          |   28 ++++++++++++++++++++++++++++
 testing/python26-buildutils/APKBUILD |   27 +++++++++++++++++++++++++++
 testing/python26-setuptools/APKBUILD |   31 +++++++++++++++++++++++++++++++
 3 files changed, 86 insertions(+), 0 deletions(-)
 create mode 100644 testing/mediaproxy/APKBUILD
 create mode 100644 testing/python26-buildutils/APKBUILD
 create mode 100644 testing/python26-setuptools/APKBUILD

diff --git a/testing/mediaproxy/APKBUILD b/testing/mediaproxy/APKBUILD
new file mode 100644
index 0000000..6874a6d
--- /dev/null
+++ b/testing/mediaproxy/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: 
+# Maintainer: 
+pkgname=mediaproxy
+pkgver=2.3.8
+pkgrel=0
+pkgdesc="MediaProxy"
+url="www.ag-projects.com/MediaProxy/"
+license="GPL"
+depends="python"
+makedepends="libnetfilter_conntrack-dev libnfnetlink-dev python26-buildutils python26-setuptools"
+install=
+subpackages=""
+#subpackages="$pkgname-dev $pkgname-doc"
+source="http://download.ag-projects.com/MediaProxy/$pkgname-$pkgver.tar.gz"
+
+# append extra dependencies to -dev subpackage
+# remove if not used.
+# depends_dev="somepackage-dev"
+
+build() {
+	cd "$srcdir"/$pkgname-$pkgver
+
+	mkdir -p $pkgdir/usr/lib/python2.6/site-packages
+	python setup.py install --root=$pkgdir
+	echo "/usr/lib/python2.6/site-packages/$_pkgname-$pkgver-py2.6.egg" > $pkgdir/usr/lib/python2.6/site-packages/$_pkgname.pth
+}
+
+md5sums="8914a2b69415946e5ffdb843823b3ef1  mediaproxy-2.3.8.tar.gz"
diff --git a/testing/python26-buildutils/APKBUILD b/testing/python26-buildutils/APKBUILD
new file mode 100644
index 0000000..4bee0ca
--- /dev/null
+++ b/testing/python26-buildutils/APKBUILD
@@ -0,0 +1,27 @@
+# Contributor: Andrew Manison <[email-masked]>
+# Maintainer: 
+pkgname=python26-buildutils
+_pkgname=`echo $pkgname |sed -e 's,^python26-,,'`
+pkgver=0.3
+pkgrel=0
+pkgdesc="buildutils is a collection of enhancements to the Python distutils"
+url="http://pypi.python.org/pypi/buildutils/0.3"
+license="GPL"
+depends="python python26-setuptools"
+makedepends=""
+install=
+subpackages=""
+source="http://pypi.python.org/packages/source/b/$_pkgname/$_pkgname-$pkgver.tar.gz"
+
+# append extra dependencies to -dev subpackage
+# remove if not used.
+# depends_dev="somepackage-dev"
+
+build() {
+	cd $srcdir/$_pkgname-$pkgver
+	mkdir -p $pkgdir/usr/lib/python2.6/site-packages
+	python setup.py install --root=$pkgdir
+	echo "/usr/lib/python2.6/site-packages/$_pkgname-$pkgver-py2.6.egg" > $pkgdir/usr/lib/python2.6/site-packages/$_pkgname.pth
+}
+
+md5sums="fec620dee05f591edad386366b52e17b  buildutils-0.3.tar.gz"
diff --git a/testing/python26-setuptools/APKBUILD b/testing/python26-setuptools/APKBUILD
new file mode 100644
index 0000000..27d956f
--- /dev/null
+++ b/testing/python26-setuptools/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Andrew Manison <[email-masked]>
+# Maintainer: 
+pkgname=python26-setuptools
+_pkgname=`echo $pkgname |sed -e 's,^python26-,,'`
+pkgver=0.6c11
+pkgrel=0
+pkgdesc="setuptools is a collection of enhancements to the Python distutils"
+url="http://pypi.python.org/pypi/setuptools"
+license="PSF"
+depends="python"
+makedepends=""
+install=
+subpackages=""
+source="http://pypi.python.org/packages/source/s/$_pkgname/$_pkgname-$pkgver.tar.gz"
+
+# append extra dependencies to -dev subpackage
+# remove if not used.
+# depends_dev="somepackage-dev"
+
+build() {
+	cd $srcdir/$_pkgname-$pkgver
+	mkdir -p $pkgdir/usr/lib/python2.6/site-packages
+	python setup.py install --root=$pkgdir
+	echo "/usr/lib/python2.6/site-packages/$_pkgname-$pkgver-py2.6.egg" > $pkgdir/usr/lib/python2.6/site-packages/$_pkgname.pth
+
+	# we don't provide a non-suffixed easy_install
+	echo "Removing non-suffixed easy_install ( $pkgdir/usr/bin/easy_install)"
+	rm $pkgdir/usr/bin/easy_install
+}
+
+md5sums="7df2a529a074f613b509fb44feefe74e  setuptools-0.6c11.tar.gz"
-- 
1.6.5.2

---

From: Natanael Copa <[email-masked]>
Date: Mon, 16 Nov 2009 11:51:00 +0100

> couple of Python installation packages as well. Hopefully this will all 

Looks great! I committed and did some minor fixes, like adding
python-dev to makedepends and quoting "$srcdir" and "$pkgdir" incase
someone should have their aports tree in ~/"My Alpine Projects/aports"
or similar.

...
> +_pkgname=`echo $pkgname |sed -e 's,^python26-,,'`
...

I'll change that to:

_pkgname=${pkgname#python26-}

We parse all APKBUILDS to trace dependencies. If every APKBUILD does a
fork or two that process would be slow at some point so we try to avoid
forks in global scope.

> +pkgver=0.6c11

Just so you know, apk-tools consider 0.6c9 > 0.6c11. When letter after
digit is found it does string sort. (for things like lha-1.14i)

not sure what the c in there means, but if its patch-level then suffix
_p11 would be the right thing.

oh.. I needed to add python-dev to makedepends.

Thanks alot!

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---