InstallDev should be using (1) and not (STAGING_DIR)
[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 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/radiusclient-ng/Default
26 DESCRIPTION:=\
27 Purpose of this project is to build a portable, easy-to-use and standard \\\
28 compliant library suitable for developing free and commercial software \\\
29 that need support for RADIUS protocol (RFCs 2128 and 2139).
30 URL:=http://developer.berlios.de/projects/radiusclient-ng/
31 endef
32
33 define Package/libradiusclient-ng
34 $(call Package/radiusclient-ng/Default)
35 SECTION:=libs
36 CATEGORY:=Libraries
37 TITLE:=RADIUS client library
38 DESCRIPTION+=\\\
39 \\\
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 DESCRIPTION+=\\\
57 \\\
58 This package contains a RADIUS client.
59 endef
60
61 define Build/Configure
62 $(call Build/Configure/Default, \
63 --enable-shared \
64 --enable-static \
65 )
66 endef
67
68 define Build/Compile
69 $(MAKE) -C $(PKG_BUILD_DIR) \
70 DESTDIR="$(PKG_INSTALL_DIR)" \
71 all install
72 endef
73
74 define Build/InstallDev
75 mkdir -p $(1)/usr/include
76 $(CP) $(PKG_INSTALL_DIR)/usr/include/radiusclient-ng.h $(1)/usr/include/
77 mkdir -p $(1)/usr/lib/
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng.{a,so}* $(1)/usr/lib/
79 endef
80
81 define Build/UninstallDev
82 rm -rf \
83 $(STAGING_DIR)/usr/include/radiusclient-ng.h \
84 $(STAGING_DIR)/usr/lib/libradiusclient-ng.{a,so}*
85 endef
86
87 define Package/libradiusclient-ng/install
88 $(INSTALL_DIR) $(1)/etc
89 $(CP) $(PKG_INSTALL_DIR)/etc/radiusclient-ng $(1)/etc/
90 $(INSTALL_DIR) $(1)/usr/lib
91 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng.so.* $(1)/usr/lib/
92 endef
93
94 define Package/radiusclient-ng/install
95 $(INSTALL_DIR) $(1)/usr/sbin
96 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rad{acct,iusclient,login,status} $(1)/usr/sbin/
97 endef
98
99 $(eval $(call BuildPackage,libradiusclient-ng))
100 $(eval $(call BuildPackage,radiusclient-ng))