783a67edf163de5076e0ee0fb11f3c2b89a695a8
[openwrt/svn-archive/archive.git] / libs / radiusclient-ng / 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:=radiusclient-ng
12 PKG_VERSION:=0.5.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://download.berlios.de/radiusclient-ng/
17 PKG_MD5SUM:=c54eb70e964bdd22dd44b39a9b4df8ca
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/radiusclient-ng/Default
25 URL:=http://developer.berlios.de/projects/radiusclient-ng/
26 endef
27
28 define Package/libradiusclient-ng
29 $(call Package/radiusclient-ng/Default)
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=RADIUS client library
33 endef
34
35 define Package/libradiusclient-ng/description
36 =
37 Purpose of this project is to build a portable, easy-to-use and standard
38 compliant library suitable for developing free and commercial software
39 that need support for RADIUS protocol (RFCs 2128 and 2139).
40 This package contains shared libraries, needed by other programs.
41 endef
42
43 define Package/libradiusclient-ng/conffiles
44 /etc/radiusclient-ng/issue
45 /etc/radiusclient-ng/port-id-map
46 /etc/radiusclient-ng/radiusclient.conf
47 /etc/radiusclient-ng/servers
48 endef
49
50 define Package/radiusclient-ng
51 $(call Package/radiusclient-ng/Default)
52 SECTION:=net
53 CATEGORY:=Network
54 DEPENDS:=+libradiusclient-ng
55 TITLE:=RADIUS client
56 endef
57
58 define Package/radiusclient-ng/description
59 =
60 Purpose of this project is to build a portable, easy-to-use and standard
61 compliant library suitable for developing free and commercial software
62 that need support for RADIUS protocol (RFCs 2128 and 2139).
63 This package contains a RADIUS client.
64 endef
65
66 define Build/Configure
67 $(call Build/Configure/Default, \
68 --enable-shared \
69 --enable-static \
70 )
71 endef
72
73 define Build/Compile
74 $(MAKE) -C $(PKG_BUILD_DIR) \
75 DESTDIR="$(PKG_INSTALL_DIR)" \
76 all install
77 endef
78
79 define Build/InstallDev
80 mkdir -p $(1)/usr/include
81 $(CP) $(PKG_INSTALL_DIR)/usr/include/radiusclient-ng.h $(1)/usr/include/
82 mkdir -p $(1)/usr/lib/
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng.{a,so}* $(1)/usr/lib/
84 endef
85
86 define Build/UninstallDev
87 rm -rf \
88 $(STAGING_DIR)/usr/include/radiusclient-ng.h \
89 $(STAGING_DIR)/usr/lib/libradiusclient-ng.{a,so}*
90 endef
91
92 define Package/libradiusclient-ng/install
93 $(INSTALL_DIR) $(1)/etc
94 $(CP) $(PKG_INSTALL_DIR)/etc/radiusclient-ng $(1)/etc/
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng.so.* $(1)/usr/lib/
97 endef
98
99 define Package/radiusclient-ng/install
100 $(INSTALL_DIR) $(1)/usr/sbin
101 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rad{acct,iusclient,login,status} $(1)/usr/sbin/
102 endef
103
104 $(eval $(call BuildPackage,libradiusclient-ng))
105 $(eval $(call BuildPackage,radiusclient-ng))