diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2011-08-25 20:57:33 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-08-26 17:06:55 +0000 |
commit | 2a4f6f35dd10b6525ed507799c9f68cccb65edae (patch) | |
tree | 56a9583d98aa1a1dc80a172d781d6c4384a80a91 | |
parent | 0acc17a151637e91ba812a5a2472c3eedc593483 (diff) | |
download | alpine_aports-2a4f6f35dd10b6525ed507799c9f68cccb65edae.tar.bz2 alpine_aports-2a4f6f35dd10b6525ed507799c9f68cccb65edae.tar.xz alpine_aports-2a4f6f35dd10b6525ed507799c9f68cccb65edae.zip |
Initial APKBUILD for pyserial
Package description:
This module encapsulates the access for the serial port. It
provides backends for Python.
-rw-r--r-- | testing/py-serial/APKBUILD | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/testing/py-serial/APKBUILD b/testing/py-serial/APKBUILD new file mode 100644 index 0000000000..200eab121e --- /dev/null +++ b/testing/py-serial/APKBUILD | |||
@@ -0,0 +1,52 @@ | |||
1 | # Contributor: Fabian Affolter <fabian@affolter-engineering.ch> | ||
2 | # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> | ||
3 | pkgname=py-serial | ||
4 | _realname=pyserial | ||
5 | pkgver=2.5 | ||
6 | pkgrel=0 | ||
7 | pkgdesc="Python Serial Port Extension" | ||
8 | url="http://pyserial.sourceforge.net/" | ||
9 | arch="noarch" | ||
10 | license="Python" | ||
11 | depends="python" | ||
12 | makedepends="python-dev" | ||
13 | install="" | ||
14 | subpackages="$pkgname-doc $pkgname-examples" | ||
15 | source="http://pypi.python.org/packages/source/p/"$_realname"/pyserial-$pkgver.tar.gz" | ||
16 | _builddir="$srcdir"/$_realname-$pkgver | ||
17 | |||
18 | build() { | ||
19 | cd "$_builddir" | ||
20 | python setup.py build || return 1 | ||
21 | } | ||
22 | |||
23 | package() { | ||
24 | cd "$_builddir" | ||
25 | python setup.py install --prefix=/usr --root="$pkgdir" || return 1 | ||
26 | } | ||
27 | |||
28 | doc() { | ||
29 | cd "$_builddir" | ||
30 | mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/ || return 1 | ||
31 | # Documentation files | ||
32 | _docs="appendix.rst examples.rst pyparallel.rst pyserial.rst \ | ||
33 | pyserial_api.rst shortintro.rst" | ||
34 | for _doc in $_docs; do | ||
35 | mv "$srcdir"/$_realname-$pkgver/documentation/$_doc \ | ||
36 | "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1 | ||
37 | done | ||
38 | } | ||
39 | |||
40 | examples() { | ||
41 | cd "$_builddir" | ||
42 | mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/examples || return 1 | ||
43 | # Example files | ||
44 | _examples="enhancedserial.py miniterm.py rfc2217_server.py scan.py \ | ||
45 | scanlinux.py tcp_serial_redirect.py port_publisher.py port_publisher.sh" | ||
46 | for _example in $_examples; do | ||
47 | mv "$srcdir"/$_realname-$pkgver/examples/$_example \ | ||
48 | "$subpkgdir"/usr/share/doc/$pkgname/examples/$_example || return 1 | ||
49 | done | ||
50 | } | ||
51 | |||
52 | md5sums="34340820710239bea2ceca7f43ef8cab pyserial-2.5.tar.gz" | ||