Date: Friday, February 2, 2018 @ 21:26:51
  Author: dvzrv
Revision: 288650

upgpkg: python-pyliblo 0.10.0-3

Providing python2 version in a split-package.

Modified:
  python-pyliblo/trunk/PKGBUILD

----------+
 PKGBUILD |   38 ++++++++++++++++++++++++++++++--------
 1 file changed, 30 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2018-02-02 20:46:48 UTC (rev 288649)
+++ PKGBUILD    2018-02-02 21:26:51 UTC (rev 288650)
@@ -3,30 +3,40 @@
 # Contributor: SpepS <dreamspepser at yahoo dot it>
 
 _name=pyliblo
-pkgname=python-pyliblo
+pkgbase=python-pyliblo
+pkgname=('python-pyliblo' 'python2-pyliblo')
 pkgver=0.10.0
-pkgrel=2
+pkgrel=3
 pkgdesc='Python wrapper for the liblo OSC library'
 arch=('x86_64')
 url="http://das.nasophon.de/pyliblo/";
 license=('LGPL2.1')
-depends=('liblo' 'python')
-makedepends=('cython')
+makedepends=('cython' 'cython2' 'liblo')
 source=("http://das.nasophon.de/download/${_name}-${pkgver}.tar.gz";)
 
sha512sums=('d2a3d47f6c52d310104256d33fbd5d652ae6bc8cde32c2d3b2f3f407b8a4aba99028e57cd466804d266f63468a6c792760f28a43dbabcfa3330e0a852ee4d4e3')
 
-check() {
-  cd "${_name}-${pkgver}"
-  python setup.py test
+
+prepare() {
+  cp -a "${_name}-${pkgver}" "${_name}2-${pkgver}"
 }
 
 build() {
   cd "${_name}-${pkgver}"
   python setup.py build
+  cd ../"${_name}2-${pkgver}"
+  python2 setup.py build
 }
 
-package() {
+check() {
   cd "${_name}-${pkgver}"
+  python setup.py test
+  cd ../"${_name}2-${pkgver}"
+  python2 setup.py test
+}
+
+package_python-pyliblo() {
+  depends=('liblo' 'python')
+  cd "${_name}-${pkgver}"
   python setup.py install --skip-build \
     --optimize=1 \
     --prefix=/usr \
@@ -35,3 +45,15 @@
     -Dm644 {NEWS,README}
 }
 
+package_python2-pyliblo() {
+  depends=('liblo' 'python2')
+  cd "${_name}2-${pkgver}"
+  python2 setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="${pkgdir}/"
+  mv -v "${pkgdir}/usr/bin/dump_osc" "${pkgdir}/usr/bin/dump_osc2"
+  mv -v "${pkgdir}/usr/bin/send_osc" "${pkgdir}/usr/bin/send_osc2"
+  mv -v "${pkgdir}/usr/share/man/man1/dump_osc.1" 
"${pkgdir}/usr/share/man/man1/dump_osc2.1"
+  mv -v "${pkgdir}/usr/share/man/man1/send_osc.1" 
"${pkgdir}/usr/share/man/man1/send_osc2.1"
+}

Reply via email to