[packages] miredo: various fixes and cleanup

* force use of shared libraries, remove obsolete configure args
 * add a miredo-common package for shared libraries (libteredo & libtun) (closes: #7761)
 * install config file in /etc/miredo/ (default) instead of /etc/
 * use default config file location in initscripts, remove useless ipv6 & tun modules loading in start functions
 * use PKG_INSTALL
 * bump release number


git-svn-id: svn://svn.openwrt.org/openwrt/packages@22639 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2010-08-14 14:20:10 +00:00
parent 6074919590
commit 339aff67f8
3 changed files with 27 additions and 22 deletions

View File

@ -9,51 +9,57 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=miredo PKG_NAME:=miredo
PKG_VERSION:=1.1.7 PKG_VERSION:=1.1.7
PKG_RELEASE:=3 PKG_RELEASE:=4
PKG_SOURCE_URL:=http://www.remlab.net/files/miredo/ PKG_SOURCE_URL:=http://www.remlab.net/files/miredo/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_MD5SUM:=4fb5e7df6a6255528e4c5380401ad3ea PKG_MD5SUM:=4fb5e7df6a6255528e4c5380401ad3ea
PKG_FIXUP:=libtool PKG_FIXUP:=libtool
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
define Package/miredo/Default define Package/miredo/Default
SECTION:=ipv6 SECTION:=ipv6
CATEGORY:=IPv6 CATEGORY:=IPv6
DEPENDS:=+libpthread +uclibcxx +kmod-ipv6 +kmod-tun
SUBMENU:=miredo: Teredo (IPv6 tunneling over UDP through NAT) SUBMENU:=miredo: Teredo (IPv6 tunneling over UDP through NAT)
URL:=http://www.simphalempin.com/dev/miredo/ URL:=http://www.simphalempin.com/dev/miredo/
endef endef
define Package/miredo-common
$(call Package/miredo/Default)
TITLE:=Teredo (IPv6 tunneling over UDP through NAT) shared libraries
DEPENDS+= +libpthread +uclibcxx +kmod-ipv6 +kmod-tun
endef
define Package/miredo-server define Package/miredo-server
$(call Package/miredo/Default) $(call Package/miredo/Default)
TITLE:=Teredo (IPv6 tunneling over UDP through NAT) server daemon TITLE:=Teredo (IPv6 tunneling over UDP through NAT) server daemon
DEPENDS+= +miredo-common
endef endef
define Package/miredo-server/conffiles define Package/miredo-server/conffiles
/etc/miredo-server.conf /etc/miredo/miredo-server.conf
endef endef
define Package/miredo-client define Package/miredo-client
$(call Package/miredo/Default) $(call Package/miredo/Default)
TITLE:=Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon TITLE:=Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon
DEPENDS+= +miredo-common
endef endef
define Package/miredo-client/conffiles define Package/miredo-client/conffiles
/etc/miredo.conf /etc/miredo/miredo.conf
endef endef
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--disable-shared \ --enable-shared \
--enable-static \ --enable-static \
--with-gnu-ld \ --with-gnu-ld \
--disable-rpath \ --disable-rpath \
--disable-chroot \ --disable-chroot \
--enable-teredo-client \ --enable-teredo-client \
--enable-teredo-relay \
--enable-teredo-server \
--enable-miredo-user=root \ --enable-miredo-user=root \
--without-Judy \ --without-Judy \
@ -63,16 +69,18 @@ CONFIGURE_VARS += \
LIBS="-nodefaultlibs -luClibc++ -lm" \ LIBS="-nodefaultlibs -luClibc++ -lm" \
ac_cv_file__proc_self_maps=yes\ ac_cv_file__proc_self_maps=yes\
define Build/Compile # XXX: override (:=), don't append (+=)
$(MAKE) -C $(PKG_BUILD_DIR) \ MAKE_FLAGS := \
CXXLINK="\$$$$(LINK)" \ CXXLINK="\$$$$(LINK)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install define Package/miredo-common/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{teredo,tun6}.so.* $(1)/usr/lib/
endef endef
define Package/miredo-server/install define Package/miredo-server/install
$(INSTALL_DIR) $(1)/etc/ $(INSTALL_DIR) $(1)/etc/miredo
$(CP) $(PKG_INSTALL_DIR)/usr/share/doc/miredo/examples/miredo-server.conf $(1)/etc/miredo-server.conf $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/miredo/examples/miredo-server.conf $(1)/etc/miredo/miredo-server.conf
$(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/miredo-server.init $(1)/etc/init.d/miredo-server $(INSTALL_BIN) ./files/miredo-server.init $(1)/etc/init.d/miredo-server
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
@ -80,13 +88,14 @@ define Package/miredo-server/install
endef endef
define Package/miredo-client/install define Package/miredo-client/install
$(INSTALL_DIR) $(1)/etc $(INSTALL_DIR) $(1)/etc/miredo
$(CP) $(PKG_INSTALL_DIR)/usr/share/doc/miredo/examples/miredo.conf $(1)/etc/miredo.conf $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/miredo/examples/miredo.conf $(1)/etc/miredo/miredo.conf
$(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/miredo.init $(1)/etc/init.d/miredo $(INSTALL_BIN) ./files/miredo.init $(1)/etc/init.d/miredo
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo $(1)/usr/sbin/
endef endef
$(eval $(call BuildPackage,miredo-common))
$(eval $(call BuildPackage,miredo-server)) $(eval $(call BuildPackage,miredo-server))
$(eval $(call BuildPackage,miredo-client)) $(eval $(call BuildPackage,miredo-client))

View File

@ -5,9 +5,7 @@ START=50
PID_F=/var/run/miredo-server.pid PID_F=/var/run/miredo-server.pid
start() { start() {
insmod ipv6 2>/dev/null miredo-server
insmod tun 2>/dev/null
miredo-server -c /etc/miredo-server.conf
} }
stop() { stop() {

View File

@ -5,9 +5,7 @@ START=50
PID_F=/var/run/miredo.pid PID_F=/var/run/miredo.pid
start() { start() {
insmod ipv6 2>/dev/null miredo
insmod tun 2>/dev/null
miredo -c /etc/miredo.conf
} }
stop() { stop() {