aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2011-08-25 20:57:33 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-08-26 17:06:55 +0000
commit2a4f6f35dd10b6525ed507799c9f68cccb65edae (patch)
tree56a9583d98aa1a1dc80a172d781d6c4384a80a91
parent0acc17a151637e91ba812a5a2472c3eedc593483 (diff)
downloadalpine_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/APKBUILD52
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>
3pkgname=py-serial
4_realname=pyserial
5pkgver=2.5
6pkgrel=0
7pkgdesc="Python Serial Port Extension"
8url="http://pyserial.sourceforge.net/"
9arch="noarch"
10license="Python"
11depends="python"
12makedepends="python-dev"
13install=""
14subpackages="$pkgname-doc $pkgname-examples"
15source="http://pypi.python.org/packages/source/p/"$_realname"/pyserial-$pkgver.tar.gz"
16_builddir="$srcdir"/$_realname-$pkgver
17
18build() {
19 cd "$_builddir"
20 python setup.py build || return 1
21}
22
23package() {
24 cd "$_builddir"
25 python setup.py install --prefix=/usr --root="$pkgdir" || return 1
26}
27
28doc() {
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
40examples() {
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
52md5sums="34340820710239bea2ceca7f43ef8cab pyserial-2.5.tar.gz"