[arch-commits] Commit in (4 files)

Levente Polyak anthraxx at archlinux.org
Fri Oct 23 23:21:12 UTC 2015


    Date: Saturday, October 24, 2015 @ 01:21:12
  Author: anthraxx
Revision: 144834

addpkg: python-netaddr 0.7.18-3

Added:
  python-netaddr/
  python-netaddr/repos/
  python-netaddr/trunk/
  python-netaddr/trunk/PKGBUILD

----------+
 PKGBUILD |   61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

Added: python-netaddr/trunk/PKGBUILD
===================================================================
--- python-netaddr/trunk/PKGBUILD	                        (rev 0)
+++ python-netaddr/trunk/PKGBUILD	2015-10-23 23:21:12 UTC (rev 144834)
@@ -0,0 +1,61 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Sebastien LEDUC <sebastien at sleduc.fr>
+# Contributor: Gilles CHAUVIN <gcnweb at gmail dot com>
+
+pkgbase=python-netaddr
+pkgname=('python-netaddr' 'python2-netaddr')
+_pyname=netaddr
+pkgver=0.7.18
+pkgrel=3
+pkgdesc="A pure Python network address representation and manipulation library"
+url="https://github.com/drkjam/netaddr"
+arch=('any')
+license=('BSD')
+makedepends=('python-sphinx' 'python2-sphinx')
+checkdepends=('python-pytest' 'python2-pytest')
+source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/drkjam/${_pyname}/archive/${_pyname}-${pkgver}.tar.gz)
+sha512sums=('34da8f1b61925b4fb1997faff42aea047fad21c7bcda7a111dabe9b06773f6dfa501bee0fa1006c0e8bef02850bd16a68542330f0b793620ff068401f444d527')
+
+prepare() {
+  cd ${_pyname}-${_pyname}-${pkgver}
+  sed -r 's|#!/usr/bin/env python||g' -i netaddr/eui/ieee.py netaddr/ip/iana.py
+}
+
+build() {
+  cd ${_pyname}-${_pyname}-${pkgver}/docs
+  make man text
+}
+
+check() {
+  cd ${_pyname}-${_pyname}-${pkgver}
+  py.test
+  py.test2
+}
+
+package_python-netaddr() {
+  depends=('python')
+  optdepends=('ipython: netaddr interractive command support')
+
+  cd ${_pyname}-${_pyname}-${pkgver}
+  python setup.py install -O1 --root="${pkgdir}"
+  install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -Dm 644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
+  install -Dm 644 docs/build/text/* -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 docs/build/man/netaddr.1 "${pkgdir}/usr/share/man/man1/netaddr.1"
+}
+
+package_python2-netaddr() {
+  depends=('python2')
+  optdepends=('ipython2: netaddr interractive command supprt')
+
+  cd ${_pyname}-${_pyname}-${pkgver}
+  python2 setup.py install -O1 --root="${pkgdir}"
+  mv "${pkgdir}"/usr/bin/netaddr{,2}
+  sed -r 's|(env python)|\12|g' -i "${pkgdir}/usr/bin/netaddr2"
+  install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -Dm 644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
+  install -Dm 644 docs/build/text/* -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 docs/build/man/netaddr.1 "${pkgdir}/usr/share/man/man1/netaddr2.1"
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list