[PATCH] IPv6 Router Advertisement Daemon 1.1 with UCI Support
[openwrt/svn-archive/archive.git] / ipv6 / radvd / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=radvd
12 PKG_VERSION:=1.1
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://v6web.litech.org/radvd/dist \
18 http://download.sourcemage.org/mirror
19 PKG_MD5SUM:=9ee449e4b89171432cb9e9100e0b5648
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/radvd
26 SECTION:=ipv6
27 CATEGORY:=IPv6
28 TITLE:=IPv6 Routing Advertisement Daemon
29 URL:=http://v6web.litech.org/radvd/
30 endef
31
32 define Package/radvd/description
33 IPv6 Routing Advertisement Daemon.
34 endef
35
36 define Build/Configure
37 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
38 $(TARGET_CONFIGURE_OPTS) \
39 CFLAGS="$(TARGET_CFLAGS)" \
40 ./configure \
41 --target=$(GNU_TARGET_NAME) \
42 --host=$(GNU_TARGET_NAME) \
43 --build=$(GNU_HOST_NAME) \
44 --program-prefix="" \
45 --program-suffix="" \
46 --prefix=/usr \
47 --exec-prefix=/usr \
48 --bindir=/usr/bin \
49 --datadir=/usr/share \
50 --includedir=/usr/include \
51 --infodir=/usr/share/info \
52 --libdir=/usr/lib \
53 --libexecdir=/usr/lib \
54 --localstatedir=/var \
55 --mandir=/usr/share/man \
56 --sbindir=/usr/sbin \
57 --sysconfdir=/etc \
58 $(DISABLE_LARGEFILE) \
59 $(DISABLE_NLS) \
60 --with-configfile=/etc/radvd.conf \
61 --with-logfile=/var/log/radvd.log \
62 --with-pidfile=/var/run/radvd.pid \
63 );
64 endef
65
66 define Build/Compile
67 rm -rf $(PKG_INSTALL_DIR)
68 mkdir -p $(PKG_INSTALL_DIR)
69 $(MAKE) -C $(PKG_BUILD_DIR) \
70 radvd_LDADD=""
71 $(MAKE) -C $(PKG_BUILD_DIR) \
72 DESTDIR="$(PKG_INSTALL_DIR)" \
73 install
74 endef
75
76 define Package/radvd/install
77 $(INSTALL_DIR) $(1)/etc/config
78 $(INSTALL_DATA) ./files/radvd.config $(1)/etc/config/radvd
79 $(INSTALL_DIR) $(1)/etc/init.d
80 $(INSTALL_BIN) ./files/radvd.init $(1)/etc/init.d/radvd
81 $(INSTALL_DIR) $(1)/usr/sbin
82 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvd $(1)/usr/sbin/
83 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvdump $(1)/usr/sbin/
84 endef
85
86 $(eval $(call BuildPackage,radvd))