packages/sslh: use new service functions, with quirks to allow more than one instance...
[packages.git] / net / keepalived / Makefile
1 #
2 # Copyright (C) 2006-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=keepalived
11 PKG_VERSION:=1.1.19
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:= http://www.keepalived.org/software
16 PKG_MD5SUM:=a35b8d9d462810f7650d292bd7457523
17
18 include $(INCLUDE_DIR)/package.mk
19 include $(INCLUDE_DIR)/kernel.mk
20
21 define Package/keepalived
22   SECTION:=net
23   CATEGORY:=Network
24   TITLE:=Failover and monitoring daemon for LVS clusters
25   URL:=http://www.keepalived.org/
26   DEPENDS:=+libpopt +libopenssl
27 endef
28
29 define Package/keepalived/description
30  Failover and monitoring daemon for Linux Virtual Server (LVS) clusters.
31 endef
32
33 define Package/keepalived/conffiles
34 /etc/keepalived/keepalived.conf
35 endef
36
37 acvar=$(subst -,_,$(subst .,_,$(subst /,_,$(1))))
38
39 CONFIGURE_ARGS+= \
40         --enable-shared \
41         --disable-static \
42         --disable-debug \
43         --disable-strip \
44         --disable-lvs \
45         --disable-lvs-syncd \
46         --with-kernel-dir="$(LINUX_DIR)"
47
48 CONFIGURE_VARS+= \
49         ac_cv_file_$(call acvar,$(LINUX_DIR)/net/core/link_watch.c)=yes
50
51 define Build/Compile
52         $(MAKE) -C $(PKG_BUILD_DIR) \
53                 DESTDIR="$(PKG_INSTALL_DIR)" \
54                 STRIP="/bin/true" \
55                 all install
56 endef
57
58 define Package/keepalived/install
59         $(INSTALL_DIR) $(1)/usr/sbin
60         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keepalived $(1)/usr/sbin/
61         $(INSTALL_DIR) $(1)/usr/bin
62         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/genhash $(1)/usr/bin/
63         $(INSTALL_DIR) $(1)/etc/keepalived
64         $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/keepalived/keepalived.conf $(1)/etc/keepalived/
65         $(INSTALL_DIR) $(1)/etc/init.d
66         $(INSTALL_BIN) ./files/keepalived.init $(1)/etc/init.d/keepalived
67 endef
68
69 $(eval $(call BuildPackage,keepalived))