aboutsummaryrefslogtreecommitdiffstats
path: root/main/ser2net/APKBUILD
blob: 6df4b68713e67b1bab15c6624eb75aea6b773c61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ser2net
pkgver=2.10.0
pkgrel=1
pkgdesc="A proxy that allows telnet/tcp connections to be made to serial ports"
url="http://sourceforge.net/projects/ser2net"
arch="all"
license="GPL"
depends=""
depends_dev=""
makedepends="$depends_dev linux-headers"
install=""
subpackages="$pkgname-doc"
source="http://heanet.dl.sourceforge.net/project/ser2net/ser2net/ser2net-$pkgver.tar.gz
	TIOCSRS485.patch
	${pkgname}.confd
	${pkgname}.initd"

_builddir="$srcdir"/ser2net-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
        install -D -m755 "$srcdir"/ser2net.initd \
		"$pkgdir"/etc/init.d/ser2net
	install -D -m644 "$srcdir"/ser2net.confd \
		"$pkgdir"/etc/conf.d/ser2net
	install -D -m644 ser2net.conf \
		"$pkgdir"/etc/ser2net.conf
	rm -f "$pkgdir"/usr/lib/*.la
}

md5sums="cd937041144de83d41d811521e72158c  ser2net-2.10.0.tar.gz
cfeb58eb6b059e5ff09357062ad0699d  TIOCSRS485.patch
100fc9cc68a766afde182d14a26bfec0  ser2net.confd
59af9bceac660472e368dc7e318ae17d  ser2net.initd"
sha256sums="98f6193225338e25f35302fef5e1f16688693ed43e7b3c3e9e09187eb54547ac  ser2net-2.10.0.tar.gz
444eea3752a3209ccbba87cf2374843011595ebf495b7e4e807e39e0d08412a7  TIOCSRS485.patch
3058368970e77b8b7fcf6fca9f3530b683d9e9c27c431531f8566dde01dab849  ser2net.confd
0d301873d55826095cc6ee3f526e5a797b797c95fdc23ac58166aa5cc3cbf80d  ser2net.initd"
sha512sums="dd3e37619b10d8bf20d738e90c253bc2d109e0a57ee9f3a8b2a85a69399afa5a8459a4602b2856f0b655427023a36c78330851bf7f8d8da0f28d1fe22c1d5e10  ser2net-2.10.0.tar.gz
c545b47f49857f2a83b7250c0f3d80787e29cc2f4ca2d9b579df9f41f50ba60da26f53ec75659eede712b182cac616e438af60fd6d11c8c4acc006f7827ee9e6  TIOCSRS485.patch
15054f7aa604f93bd5a54c2bb96c9a3168905be5ace50bcd2ebeeaf9dc9ae19426388e6118e9e4850125349090ee29542c24487e64c349593a76366be4a5e501  ser2net.confd
2b8dc01055222743398fc8ea6bf66b3aabc92661522284c8669d8114a32d376c03038e33fc9802c1cf93290a4ac4f07a4ca806056b98d1ecaff3cbc2614d3b7b  ser2net.initd"