From 8fd30d1b063417acfe151e63a058adc08df3c525 Mon Sep 17 00:00:00 2001 From: Eivind Uggedal Date: Wed, 5 Aug 2015 13:15:27 +0000 Subject: [PATCH] uwsgi: uwsgi-python and uwsgi-python3.4 subpackages --- srcpkgs/uwsgi-python | 1 + srcpkgs/uwsgi-python3.4 | 1 + srcpkgs/uwsgi/template | 51 +++++++++++++++++++++++++++++++---------- 3 files changed, 41 insertions(+), 12 deletions(-) create mode 120000 srcpkgs/uwsgi-python create mode 120000 srcpkgs/uwsgi-python3.4 diff --git a/srcpkgs/uwsgi-python b/srcpkgs/uwsgi-python new file mode 120000 index 0000000000..2d8a4b6714 --- /dev/null +++ b/srcpkgs/uwsgi-python @@ -0,0 +1 @@ +uwsgi \ No newline at end of file diff --git a/srcpkgs/uwsgi-python3.4 b/srcpkgs/uwsgi-python3.4 new file mode 120000 index 0000000000..2d8a4b6714 --- /dev/null +++ b/srcpkgs/uwsgi-python3.4 @@ -0,0 +1 @@ +uwsgi \ No newline at end of file diff --git a/srcpkgs/uwsgi/template b/srcpkgs/uwsgi/template index c1b233aed8..71fe87f05b 100644 --- a/srcpkgs/uwsgi/template +++ b/srcpkgs/uwsgi/template @@ -1,22 +1,49 @@ # Template file for 'uwsgi' pkgname=uwsgi version=2.0.11.1 -revision=4 -build_style=python-module -hostmakedepends="python-devel python-setuptools" -makedepends="sqlite-devel python-devel python-setuptools libxml2-devel" -pycompile_module="uwsgidecorators.py" +revision=5 +hostmakedepends="python python3.4" +makedepends="python-devel python3.4-devel" short_desc="Fast, self-healing application container server" -maintainer="Juan RP " +maintainer="Eivind Uggedal " license="GPL-2" homepage="http://projects.unbit.it/uwsgi" -distfiles="http://projects.unbit.it/downloads/uwsgi-$version.tar.gz" +distfiles="http://projects.unbit.it/downloads/uwsgi-$version.tar.gz checksum=75a7d3138cfa9cd81a760c2f8a43f3d80961edc8e4f27043dc1412206c926287 +_libdir=usr/lib/uwsgi + pre_configure() { - case "$XBPS_TARGET_MACHINE" in - *-musl) - sed -e 's/ugreen,//' -i buildconf/base.ini - ;; - esac + sed -e "s|uc.get('plugin_dir')|'.'|" \ + -i uwsgiconfig.py + sed -e "s|\(plugin_dir =\).*|\1 /$_libdir|" \ + -i buildconf/base.ini +} + +do_build() { + python uwsgiconfig.py --build core + python uwsgiconfig.py --plugin plugins/python core python + python3.4 uwsgiconfig.py --plugin plugins/python core python3 +} + +do_install() { + mkdir -p $PKGDESTDIR/usr/bin $PKGDESTDIR/$_libdir + cp uwsgi $PKGDESTDIR/usr/bin + cp *_plugin.so $PKGDESTDIR/$_libdir +} + +uwsgi-python_package() { + short_desc="$short_desc (Python2 plugin)" + + pkg_install() { + vmove $_libdir/python_plugin.so + } +} + +uwsgi-python3.4_package() { + short_desc="$short_desc (Python3.4 plugin)" + + pkg_install() { + vmove $_libdir/python3_plugin.so + } }