fix openswan -- do NOT strip the kernel modules
[openwrt.git] / openwrt / 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 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
10 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
11 PKG_CAT:=zcat
12 PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
13 PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
14
15 $(DL_DIR)/$(PKG_SOURCE):
16 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
17
18 $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE)
19 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
20 $(PATCH) $(PKG_BUILD_DIR) ./patches
21 touch $(PKG_BUILD_DIR)/.patched
22
23 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
24 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
25 $(TARGET_CONFIGURE_OPTS) \
26 CFLAGS="$(TARGET_CFLAGS)" \
27 ./configure \
28 --target=$(GNU_TARGET_NAME) \
29 --host=$(GNU_TARGET_NAME) \
30 --build=$(GNU_HOST_NAME) \
31 --prefix=/usr \
32 --with-logfile=/tmp/radvd.log \
33 --with-pidfile=/tmp/run/radvd.pid \
34 --with-configfile=/etc/radvd.conf \
35 );
36 touch $(PKG_BUILD_DIR)/.configured
37
38 $(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.configured
39 $(MAKE) $(TARGET_CONFIGURE_OPTS) LD=$(TARGET_CC) LDFLAGS=-L$(PKG_BUILD_DIR) -C $(PKG_BUILD_DIR) radvd_LDADD=""
40
41 $(PKG_IPK): $(PKG_BUILD_DIR)/$(PKG_NAME)
42 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
43 mkdir -p $(PKG_IPK_DIR)/usr/sbin $(PKG_IPK_DIR)/etc/init.d
44 install -m 755 $(PKG_BUILD_DIR)/radvd $(PKG_IPK_DIR)/usr/sbin/
45 install -m 755 $(PKG_BUILD_DIR)/radvdump $(PKG_IPK_DIR)/usr/sbin/
46 install -m 755 ./files/S51radvd $(PKG_IPK_DIR)/etc/init.d/
47 install -m 644 ./files/radvd.conf.example $(PKG_IPK_DIR)/etc/
48 $(STRIP) $(PKG_IPK_DIR)/usr/sbin/*
49 mkdir -p $(PACKAGE_DIR)
50 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
51
52 $(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK)
53 $(IPKG) install $(PKG_IPK)
54
55 source: $(DL_DIR)/$(PKG_SOURCE)
56 prepare: $(PKG_BUILD_DIR)/.patched
57 compile: $(PKG_IPK)
58 install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list
59
60 clean:
61 rm -rf $(PKG_BUILD_DIR)
62 rm -f $(PKG_IPK)
This page took 0.040065 seconds and 5 git commands to generate.