| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= miredo
|
|---|
| 10 | PKG_VERSION:= 0.5.3
|
|---|
| 11 | PKG_RELEASE:= 2
|
|---|
| 12 | PKG_MD5SUM:= bbbbf60db1346af0bbba6602067ed7ab
|
|---|
| 13 | PKG_INIT:= 60
|
|---|
| 14 |
|
|---|
| 15 | PKG_SOURCE_URL:= http://people.via.ecp.fr/~rem/miredo/v0.5/
|
|---|
| 16 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|---|
| 17 |
|
|---|
| 18 | include $(TOPDIR)/mk/package.mk
|
|---|
| 19 |
|
|---|
| 20 | $(eval $(call PKG_template,MIREDO,miredo,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 21 | $(eval $(call PKG_template,MIREDO_SERVER,miredo-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 22 |
|
|---|
| 23 | $(WRKBUILD)/.configured:
|
|---|
| 24 | ( cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 25 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 26 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 27 | CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
|
|---|
| 28 | CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|---|
| 29 | LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
|---|
| 30 | LIBS="-luClibc++ -lc -lm" \
|
|---|
| 31 | ac_cv_file__proc_self_maps=yes \
|
|---|
| 32 | ./configure \
|
|---|
| 33 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 34 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 35 | --build=$(GNU_HOST_NAME) \
|
|---|
| 36 | --program-prefix="" \
|
|---|
| 37 | --program-suffix="" \
|
|---|
| 38 | --prefix=/usr \
|
|---|
| 39 | --exec-prefix=/usr \
|
|---|
| 40 | --bindir=/usr/bin \
|
|---|
| 41 | --datadir=/usr/share \
|
|---|
| 42 | --includedir=/usr/include \
|
|---|
| 43 | --infodir=/usr/share/info \
|
|---|
| 44 | --libdir=/usr/lib \
|
|---|
| 45 | --libexecdir=/usr/lib \
|
|---|
| 46 | --localstatedir=/var \
|
|---|
| 47 | --mandir=/usr/share/man \
|
|---|
| 48 | --sbindir=/usr/sbin \
|
|---|
| 49 | --sysconfdir=/etc \
|
|---|
| 50 | --disable-nls \
|
|---|
| 51 | --disable-shared \
|
|---|
| 52 | --enable-static \
|
|---|
| 53 | --with-gnu-ld \
|
|---|
| 54 | --disable-rpath \
|
|---|
| 55 | --disable-chroot \
|
|---|
| 56 | --enable-teredo-client \
|
|---|
| 57 | --enable-teredo-relay \
|
|---|
| 58 | --enable-teredo-server \
|
|---|
| 59 | --enable-miredo-user=root \
|
|---|
| 60 | );
|
|---|
| 61 | touch $@
|
|---|
| 62 |
|
|---|
| 63 | $(WRKBUILD)/.built:
|
|---|
| 64 | rm -rf $(WRKINST)
|
|---|
| 65 | mkdir -p $(WRKINST)
|
|---|
| 66 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 67 | CXXLINK="\$$(LINK)" \
|
|---|
| 68 | DESTDIR="$(WRKINST)" \
|
|---|
| 69 | all install
|
|---|
| 70 | touch $@
|
|---|
| 71 |
|
|---|
| 72 | $(IPKG_MIREDO):
|
|---|
| 73 | install -d -m0755 $(IDIR_MIREDO)/etc
|
|---|
| 74 | $(CP) $(WRKINST)/etc/miredo.conf-dist $(IDIR_MIREDO)/etc/miredo.conf
|
|---|
| 75 | install -d -m0755 $(IDIR_MIREDO)/etc/init.d
|
|---|
| 76 | install -m0755 ./files/miredo.init \
|
|---|
| 77 | $(IDIR_MIREDO)/etc/init.d/S$(PKG_INIT)miredo
|
|---|
| 78 | install -d -m0755 $(IDIR_MIREDO)/usr/sbin
|
|---|
| 79 | $(CP) $(WRKINST)/usr/sbin/miredo $(IDIR_MIREDO)/usr/sbin/
|
|---|
| 80 | $(RSTRIP) $(IDIR_MIREDO)
|
|---|
| 81 | $(IPKG_BUILD) $(IDIR_MIREDO) $(PACKAGE_DIR)
|
|---|
| 82 |
|
|---|
| 83 | $(IPKG_MIREDO_SERVER):
|
|---|
| 84 | install -d -m0755 $(IDIR_MIREDO_SERVER)/etc/
|
|---|
| 85 | $(CP) $(WRKINST)/etc/miredo-server.conf-dist $(IDIR_MIREDO_SERVER)/etc/miredo-server.conf
|
|---|
| 86 | install -d -m0755 $(IDIR_MIREDO_SERVER)/etc/init.d
|
|---|
| 87 | install -m0755 ./files/miredo-server.init \
|
|---|
| 88 | $(IDIR_MIREDO_SERVER)/etc/init.d/S$(PKG_INIT)miredo-server
|
|---|
| 89 | install -d -m0755 $(IDIR_MIREDO_SERVER)/usr/sbin
|
|---|
| 90 | $(CP) $(WRKINST)/usr/sbin/miredo-server $(IDIR_MIREDO_SERVER)/usr/sbin/
|
|---|
| 91 | $(RSTRIP) $(IDIR_MIREDO_SERVER)
|
|---|
| 92 | $(IPKG_BUILD) $(IDIR_MIREDO_SERVER) $(PACKAGE_DIR)
|
|---|