--- /dev/null
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ptrtd
+PKG_VERSION:=0.5.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://v6web.litech.org/ptrtd/dist/
+PKG_MD5SUM:=bfe026445fdc4fe509a9c70ec4551744
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ptrtd
+ SECTION:=ipv6
+ CATEGORY:=IPv6
+ DEPENDS:=+kmod-ipv6 +kmod-tun +ip
+ TITLE:=Portable Transport Relay Translator Daemon
+ DESCRIPTION:=\
+ The Portable Transport Relay Translator Daemon (pTRTd)\\\
+ is a method of allowing IPv6 hosts to communicate with IPv4 hosts.
+ URL:=http://v6web.litech.org/ptrtd/
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ CC=$(TARGET_CC) \
+ all
+endef
+
+define Package/ptrtd/install
+ $(INSTALL_DIR) $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) ./files/ptrtd.init $(1)/etc/init.d/ptrtd
+endef
+
+$(eval $(call BuildPackage,ptrtd))
--- /dev/null
+--- ptrtd-0.5.2/ptrtd.old 2007-02-22 16:10:57.896689015 +0100
++++ ptrtd-0.5.2/ptrtd.c 2007-02-22 16:11:39.194388792 +0100
+@@ -201,13 +201,13 @@
+ if( do_config )
+ {
+ printf( "Tunnel: %s\n", ifname );
+- sprintf( cmd, "/sbin/ip link set %s up", ifname );
++ sprintf( cmd, "/usr/sbin/ip link set %s up", ifname );
+ printf( "command: %s\n", cmd );
+ system( cmd );
+- sprintf( cmd, "/sbin/ip addr add fe80::1/64 dev %s", ifname );
++ sprintf( cmd, "/usr/sbin/ip addr add fe80::1/64 dev %s", ifname );
+ printf( "command: %s\n", cmd );
+ system( cmd );
+- sprintf( cmd, "/sbin/ip route add %s/%d dev %s via fe80::5",
++ sprintf( cmd, "/usr/sbin/ip route add %s/%d dev %s via fe80::5",
+ prefix, plen, ifname );
+ printf( "command: %s\n", cmd );
+ system( cmd );
+--- ptrtd-0.5.2/tap802ipd.old 2007-02-22 16:11:22.600920230 +0100
++++ ptrtd-0.5.2/tap802ipd.c 2007-02-22 16:11:51.040581581 +0100
+@@ -125,16 +125,16 @@
+
+ tap_get_name( (struct iface *)tap_iface, ifname );
+ printf( "Tunnel: %s\n", ifname );
+- sprintf( cmd, "/sbin/ip link set %s address %02x:%02x:%02x:%02x:%02x:%02x up\n", ifname,
++ sprintf( cmd, "/usr/sbin/ip link set %s address %02x:%02x:%02x:%02x:%02x:%02x up\n", ifname,
+ ip_iface->hwaddr[0], ip_iface->hwaddr[1],
+ ip_iface->hwaddr[2], ip_iface->hwaddr[3],
+ ip_iface->hwaddr[4], ip_iface->hwaddr[5] );
+ printf( "command: %s\n", cmd );
+ system( cmd );
+- //sprintf( cmd, "/sbin/ip addr add fe80::1/64 dev %s", ifname );
++ //sprintf( cmd, "/usr/sbin/ip addr add fe80::1/64 dev %s", ifname );
+ //printf( "command: %s\n", cmd );
+ //system( cmd );
+- //sprintf( cmd, "/sbin/ip route add %s/%d dev %s via fe80::5", prefix, plen, ifname );
++ //sprintf( cmd, "/usr/sbin/ip route add %s/%d dev %s via fe80::5", prefix, plen, ifname );
+ //printf( "command: %s\n", cmd );
+ //system( cmd );
+ }