diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-24 08:01:31 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-24 08:01:31 +0000 |
commit | b70981b68efcce5256eb11c6cd26ae123b10b6ea (patch) | |
tree | a38be6efae5e2ba15c2e839504632f9b7bfd5f91 /main/portmap | |
parent | 2b4df81538b8398442d5296650905c70341dd8d3 (diff) | |
download | aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.bz2 aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.xz |
moved extra/* to main/
and fixed misc build issues
Diffstat (limited to 'main/portmap')
-rw-r--r-- | main/portmap/APKBUILD | 39 | ||||
-rw-r--r-- | main/portmap/portmap-6.0-tcpd.patch | 18 | ||||
-rw-r--r-- | main/portmap/portmap.confd | 5 | ||||
-rw-r--r-- | main/portmap/portmap.initd | 46 | ||||
-rw-r--r-- | main/portmap/portmap.pre-install | 3 |
5 files changed, 111 insertions, 0 deletions
diff --git a/main/portmap/APKBUILD b/main/portmap/APKBUILD new file mode 100644 index 000000000..7539f314a --- /dev/null +++ b/main/portmap/APKBUILD @@ -0,0 +1,39 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=portmap +pkgver=6.0 +pkgrel=2 +pkgdesc="RPC connection manager" +url="http://neil.brown.name/portmap/" +license="GPL" +depends="uclibc" +makedepends="" +install="$pkgname.pre-install" +subpackages="$pkgname-doc" +source="http://neil.brown.name/$pkgname/$pkgname-$pkgver.tgz + $pkgname-6.0-tcpd.patch + $install + $pkgname.confd + $pkgname.initd" + +build () +{ + cd "$srcdir"/portmap_$pkgver + for i in ../*.patch; do + msg "Applying $i" + patch -p1 < $i || return 1 + done + + make NO_TCP_WRAPPER=NO || return 1 + mkdir -p "$pkgdir"/sbin + mkdir -p "$pkgdir"/usr/share/man/man8 + make BASEDIR="$pkgdir" install + mkdir -p "$pkgdir"/etc/init.d "$pkgdir"/etc/conf.d + install -m 755 "$startdir"/$pkgname.initd $pkgdir/etc/init.d/$pkgname + install -m 644 "$startdir"/$pkgname.confd $pkgdir/etc/conf.d/$pkgname +} + +md5sums="ac108ab68bf0f34477f8317791aaf1ff portmap-6.0.tgz +bdcd217a0d459c75116d0b5aa90a372b portmap-6.0-tcpd.patch +b726a64e91b47244a7539288338c6bbd portmap.pre-install +56b0f47cda2003f3394ef7c37ec4cdff portmap.confd +2944aa0387aba4ed6219d7856e5e8fb0 portmap.initd" diff --git a/main/portmap/portmap-6.0-tcpd.patch b/main/portmap/portmap-6.0-tcpd.patch new file mode 100644 index 000000000..c6af8f8c8 --- /dev/null +++ b/main/portmap/portmap-6.0-tcpd.patch @@ -0,0 +1,18 @@ +Enable compile without tcp-wrappers + +Patch by Timothy Redaelli <drizzt@gentoo.org> + +http://bugs.gentoo.org/178242 + +--- portmap_6.0/pmap_check.c ++++ portmap_6.0/pmap_check.c +@@ -44,7 +44,9 @@ + #include <netinet/in.h> + #include <rpc/rpcent.h> + #endif ++#ifdef HOSTS_ACCESS + #include <tcpd.h> ++#endif + #include <arpa/inet.h> + #include <grp.h> + diff --git a/main/portmap/portmap.confd b/main/portmap/portmap.confd new file mode 100644 index 000000000..c2756c992 --- /dev/null +++ b/main/portmap/portmap.confd @@ -0,0 +1,5 @@ +# /etc/conf.d/portmap: config file for /etc/init.d/portmap + +# Options for `portmap`. +# For a full list, just run `portmap -h`. +#PORTMAP_OPTS="-l" diff --git a/main/portmap/portmap.initd b/main/portmap/portmap.initd new file mode 100644 index 000000000..65d23d748 --- /dev/null +++ b/main/portmap/portmap.initd @@ -0,0 +1,46 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-nds/portmap/files/portmap.rc6,v 1.12 2007/06/13 07:52:44 vapier Exp $ + +depend() { + use net + before inetd + before xinetd +} + +start() { + ebegin "Starting portmap" + start-stop-daemon --start --quiet --exec /sbin/portmap -- ${PORTMAP_OPTS} + local ret=$? + eend ${ret} + # without, if a service depending on portmap is started too fast, + # connecting to portmap will fail -- azarah + sleep 1 + return ${ret} +} + +stop() { + ebegin "Stopping portmap" + start-stop-daemon --stop --quiet --exec /sbin/portmap + eend $? +} + +restart() { + # Dump the portmapper's table before stopping + ebegin "Saving portmap table" + local pmap=$(pmap_dump) + eend $? + + # Stop and restart portmapper + svc_stop + sleep 1 + svc_start + + # Reload the portmapper's table + if [ -n "${pmap}" ] ; then + ebegin "Reloading portmap table" + echo "${pmap}" | pmap_set + eend $? + fi +} diff --git a/main/portmap/portmap.pre-install b/main/portmap/portmap.pre-install new file mode 100644 index 000000000..b0dcfb9c5 --- /dev/null +++ b/main/portmap/portmap.pre-install @@ -0,0 +1,3 @@ +#!/bin/sh + +adduser -h /dev/null -s /bin/false -D rpc 2>/dev/null || true |