add pycairo
[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.1.0
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:=27d179a3c3fbef576566b456a1168246
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.6.23 \
48 ./configure \
49 --copts "$(TARGET_CFLAGS)" \
50 );
51 endef
52
53 define Build/Compile
54 UNAME_S=Linux \
55 UNAME_M=$(ARCH) \
56 UNAME_R=2.6.23 \
57 $(MAKE) -C $(PKG_BUILD_DIR) \
58 $(TARGET_CONFIGURE_OPTS) \
59 DESTDIR="$(PKG_INSTALL_DIR)" \
60 all install
61 endef
62
63
64 define Package/dhcp-relay/install
65 $(INSTALL_DIR) $(1)/usr/sbin
66 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin/
67 endef
68
69 define Package/dhcp-server/install
70 $(INSTALL_DIR) $(1)/usr/sbin
71 $(INSTALL_DIR) $(1)/usr/bin
72 $(INSTALL_DIR) $(1)/usr/local/lib
73 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin/
74 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/omshell $(1)/usr/bin/
75 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/local/lib/*.a $(1)/usr/local/lib
76 $(INSTALL_DIR) $(1)/etc/init.d
77 $(INSTALL_BIN) ./files/dhcpd.init $(1)/etc/init.d/dhcpd
78 endef
79
80 $(eval $(call BuildPackage,dhcp-relay))
81 $(eval $(call BuildPackage,dhcp-server))