include the new ntpclient init script
[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.0
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:=8bce4a21757cf069f5a69e2f9bee9e5b
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 Package/radvd/conffiles
37 /etc/radvd.conf
38 endef
39
40 define Build/Configure
41 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
42 $(TARGET_CONFIGURE_OPTS) \
43 CFLAGS="$(TARGET_CFLAGS)" \
44 ./configure \
45 --target=$(GNU_TARGET_NAME) \
46 --host=$(GNU_TARGET_NAME) \
47 --build=$(GNU_HOST_NAME) \
48 --program-prefix="" \
49 --program-suffix="" \
50 --prefix=/usr \
51 --exec-prefix=/usr \
52 --bindir=/usr/bin \
53 --datadir=/usr/share \
54 --includedir=/usr/include \
55 --infodir=/usr/share/info \
56 --libdir=/usr/lib \
57 --libexecdir=/usr/lib \
58 --localstatedir=/var \
59 --mandir=/usr/share/man \
60 --sbindir=/usr/sbin \
61 --sysconfdir=/etc \
62 $(DISABLE_LARGEFILE) \
63 $(DISABLE_NLS) \
64 --with-configfile=/etc/radvd.conf \
65 --with-logfile=/var/log/radvd.log \
66 --with-pidfile=/var/run/radvd.pid \
67 );
68 endef
69
70 define Build/Compile
71 rm -rf $(PKG_INSTALL_DIR)
72 mkdir -p $(PKG_INSTALL_DIR)
73 $(MAKE) -C $(PKG_BUILD_DIR) \
74 radvd_LDADD=""
75 $(MAKE) -C $(PKG_BUILD_DIR) \
76 DESTDIR="$(PKG_INSTALL_DIR)" \
77 install
78 endef
79
80 define Package/radvd/install
81 $(INSTALL_DIR) $(1)/etc
82 $(INSTALL_DATA) ./files/radvd.conf $(1)/etc/radvd.conf
83 $(INSTALL_DIR) $(1)/etc/init.d
84 $(INSTALL_BIN) ./files/radvd.init $(1)/etc/init.d/radvd
85 $(INSTALL_DIR) $(1)/usr/sbin
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvd $(1)/usr/sbin/
87 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvdump $(1)/usr/sbin/
88 endef
89
90 $(eval $(call BuildPackage,radvd))