add mirror
[openwrt.git] / package / radvd / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=radvd
4 PKG_VERSION:=0.7.3
5 PKG_RELEASE:=1
6 PKG_MD5SUM:=56ce3f8cbf5966a0d531c21813320423
7
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)
12 PKG_CAT:=zcat
13 PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
14 PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
15
16 $(DL_DIR)/$(PKG_SOURCE):
17 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
18
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
23
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)" \
28 ./configure \
29 --target=$(GNU_TARGET_NAME) \
30 --host=$(GNU_TARGET_NAME) \
31 --build=$(GNU_HOST_NAME) \
32 --prefix=/usr \
33 --with-logfile=/tmp/radvd.log \
34 --with-pidfile=/tmp/run/radvd.pid \
35 --with-configfile=/etc/radvd.conf \
36 );
37 touch $(PKG_BUILD_DIR)/.configured
38
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=""
41
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)
52
53 $(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK)
54 $(IPKG) install $(PKG_IPK)
55
56 source: $(DL_DIR)/$(PKG_SOURCE)
57 prepare: $(PKG_BUILD_DIR)/.patched
58 compile: $(PKG_IPK)
59 install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list
60
61 clean:
62 rm -rf $(PKG_BUILD_DIR)
63 rm -f $(PKG_IPK)
This page took 0.041761 seconds and 5 git commands to generate.