Move radvd to ipv6 section
[packages.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:=142bb9d126a67215597d115ed551955e79889fad
20 PKG_CAT:=zcat
21
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/radvd
27   SECTION:=net
28   CATEGORY:=Network
29   TITLE:=IPv6 Routing Advertisement Daemon
30   DESCRIPTION:=IPv6 Routing Advertisement Daemon.
31   URL:=http://v6web.litech.org/radvd/
32 endef
33
34 define Package/radvd/conffiles
35 /etc/radvd.conf
36 endef
37
38 define Build/Configure
39         (cd $(PKG_BUILD_DIR); rm -f config.cache; \
40                 $(TARGET_CONFIGURE_OPTS) \
41                 CFLAGS="$(TARGET_CFLAGS)" \
42                 ./configure \
43                         --target=$(GNU_TARGET_NAME) \
44                         --host=$(GNU_TARGET_NAME) \
45                         --build=$(GNU_HOST_NAME) \
46                         --program-prefix="" \
47                         --program-suffix="" \
48                         --prefix=/usr \
49                         --exec-prefix=/usr \
50                         --bindir=/usr/bin \
51                         --datadir=/usr/share \
52                         --includedir=/usr/include \
53                         --infodir=/usr/share/info \
54                         --libdir=/usr/lib \
55                         --libexecdir=/usr/lib \
56                         --localstatedir=/var \
57                         --mandir=/usr/share/man \
58                         --sbindir=/usr/sbin \
59                         --sysconfdir=/etc \
60                         $(DISABLE_LARGEFILE) \
61                         $(DISABLE_NLS) \
62                         --with-configfile=/etc/radvd.conf \
63                         --with-logfile=/var/log/radvd.log \
64                         --with-pidfile=/var/run/radvd.pid \
65         );
66 endef
67
68 define Build/Compile
69         rm -rf $(PKG_INSTALL_DIR)
70         mkdir -p $(PKG_INSTALL_DIR)
71         $(MAKE) -C $(PKG_BUILD_DIR) \
72                 radvd_LDADD=""
73         $(MAKE) -C $(PKG_BUILD_DIR) \
74                 DESTDIR="$(PKG_INSTALL_DIR)" \
75                 install
76 endef
77
78 define Package/radvd/install
79         $(INSTALL_DIR) $(1)/etc
80         $(INSTALL_DATA) ./files/radvd.conf $(1)/etc/radvd.conf
81         $(INSTALL_DIR) $(1)/etc/init.d
82         $(INSTALL_BIN) ./files/radvd.init $(1)/etc/init.d/radvd
83         $(INSTALL_DIR) $(1)/usr/sbin
84         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvd $(1)/usr/sbin/
85         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvdump $(1)/usr/sbin/
86 endef
87
88 $(eval $(call BuildPackage,radvd))