1 include $(TOPDIR
)/rules.mk
6 PKG_MD5SUM
:=56ce3f8cbf5966a0d531c21813320423
8 PKG_SOURCE_URL
:=http
://v6web.litech.org
/radvd
/dist \
9 http
://download.sourcemage.org
/mirror
10 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
11 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
13 PKG_IPK
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
14 PKG_IPK_DIR
:=$(PKG_BUILD_DIR
)/ipkg
16 $(DL_DIR
)/$(PKG_SOURCE
):
17 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
19 $(PKG_BUILD_DIR
)/.patched
: $(DL_DIR
)/$(PKG_SOURCE
)
20 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
21 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
22 touch
$(PKG_BUILD_DIR
)/.patched
24 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.patched
25 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
26 $(TARGET_CONFIGURE_OPTS
) \
27 CFLAGS
="$(TARGET_CFLAGS)" \
29 --target
=$(GNU_TARGET_NAME
) \
30 --host
=$(GNU_TARGET_NAME
) \
31 --build
=$(GNU_HOST_NAME
) \
33 --with-logfile
=/tmp
/radvd.log \
34 --with-pidfile
=/tmp
/run
/radvd.pid \
35 --with-configfile
=/etc
/radvd.conf \
37 touch
$(PKG_BUILD_DIR
)/.configured
39 $(PKG_BUILD_DIR
)/$(PKG_NAME
): $(PKG_BUILD_DIR
)/.configured
40 $(MAKE
) $(TARGET_CONFIGURE_OPTS
) LD
=$(TARGET_CC
) LDFLAGS
=-L
$(PKG_BUILD_DIR
) -C
$(PKG_BUILD_DIR
) radvd_LDADD
=""
42 $(PKG_IPK
): $(PKG_BUILD_DIR
)/$(PKG_NAME
)
43 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
44 mkdir
-p
$(PKG_IPK_DIR
)/usr
/sbin
$(PKG_IPK_DIR
)/etc
/init.d
45 install -m
755 $(PKG_BUILD_DIR
)/radvd
$(PKG_IPK_DIR
)/usr
/sbin
/
46 install -m
755 $(PKG_BUILD_DIR
)/radvdump
$(PKG_IPK_DIR
)/usr
/sbin
/
47 install -m
755 .
/files
/S51radvd
$(PKG_IPK_DIR
)/etc
/init.d
/
48 install -m
644 .
/files
/radvd.conf.example
$(PKG_IPK_DIR
)/etc
/
49 $(STRIP
) $(PKG_IPK_DIR
)/usr
/sbin
/*
50 mkdir
-p
$(PACKAGE_DIR
)
51 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
53 $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
: $(PKG_IPK
)
54 $(IPKG
) install $(PKG_IPK
)
56 source
: $(DL_DIR
)/$(PKG_SOURCE
)
57 prepare
: $(PKG_BUILD_DIR
)/.patched
59 install: $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
62 rm -rf
$(PKG_BUILD_DIR
)