port radvd to buildroot-ng
[openwrt/svn-archive/archive.git] / net / 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:=0.7.3
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:=56ce3f8cbf5966a0d531c21813320423
20 PKG_CAT:=zcat
21
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 PKG_INIT_PRIO=51
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/radvd
29 SECTION:=net
30 CATEGORY:=Network
31 TITLE:=IPv6 Routing Advertisement Daemon
32 DESCRIPTION:=IPv6 Routing Advertisement Daemon.
33 URL:=http://v6web.litech.org/radvd/
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 -d -m0755 $(1)/etc
82 install -m0644 ./files/radvd.conf $(1)/etc/radvd.conf
83 install -d -m0755 $(1)/etc/init.d
84 install -m0755 ./files/radvd.init $(1)/etc/init.d/S$(PKG_INIT_PRIO)radvd
85 install -d -m0755 $(1)/usr/sbin
86 install -m 755 $(PKG_INSTALL_DIR)/usr/sbin/radvd $(1)/usr/sbin/
87 install -m 755 $(PKG_INSTALL_DIR)/usr/sbin/radvdump $(1)/usr/sbin/
88 endef
89
90 $(eval $(call BuildPackage,radvd))