remove PKG_CAT from packages
[openwrt/svn-archive/archive.git] / net / dhcp / 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:=dhcp
12 PKG_VERSION:=3.0.6
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/
17 PKG_MD5SUM:=724bad21ad8b638abadd5fcc07df1a0f
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/dhcp/Default
25 SECTION:=net
26 CATEGORY:=Network
27 TITLE:=ISC's DHCP
28 URL:=http://www.isc.org/
29 endef
30
31 define Package/dhcp-relay
32 $(call Package/dhcp/Default)
33 TITLE+= relay
34 endef
35
36 define Package/dhcp-server
37 $(call Package/dhcp/Default)
38 TITLE+= server
39 endef
40
41
42 define Build/Configure
43 # it's not GNU autoconf stuff
44 (cd $(PKG_BUILD_DIR) ; \
45 UNAME_S=Linux \
46 UNAME_M=$(ARCH) \
47 UNAME_R=2.4.34 \
48 ./configure \
49 --copts "$(TARGET_CFLAGS)" \
50 linux-2.2 \
51 );
52 endef
53
54 define Build/Compile
55 UNAME_S=Linux \
56 UNAME_M=$(ARCH) \
57 UNAME_R=2.4.34 \
58 $(MAKE) -C $(PKG_BUILD_DIR) \
59 $(TARGET_CONFIGURE_OPTS) \
60 DESTDIR="$(PKG_INSTALL_DIR)" \
61 all install
62 endef
63
64
65 define Package/dhcp-relay/install
66 $(INSTALL_DIR) $(1)/usr/sbin
67 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin/
68 endef
69
70 define Package/dhcp-server/install
71 $(INSTALL_DIR) $(1)/usr/sbin
72 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin/
73 $(INSTALL_DIR) $(1)/etc/init.d
74 $(INSTALL_BIN) ./files/dhcpd.init $(1)/etc/init.d/dhcpd
75 endef
76
77 $(eval $(call BuildPackage,dhcp-relay))
78 $(eval $(call BuildPackage,dhcp-server))