Port nfs-server to -ng
[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_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://download.berlios.de/radiusclient-ng/
18 PKG_MD5SUM:=c54eb70e964bdd22dd44b39a9b4df8ca
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libradiusclient-ng
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=A RADIUS client library
29 DESCRIPTION:=A RADIUS client library.\\\
30 Purpose of this project is to build a portable, easy-to-use and standard \\\
31 compliant library suitable for developing free and commercial software \\\
32 that need support for RADIUS protocol (RFCs 2128 and 2139).\\\
33 \\\
34 This package contains shared libraries, needed by other programs.
35 URL:=http://developer.berlios.de/projects/radiusclient-ng/
36 endef
37
38 define Package/libradiusclient-ng/conffiles
39 /etc/radiusclient-ng/issue
40 /etc/radiusclient-ng/port-id-map
41 /etc/radiusclient-ng/radiusclient.conf
42 /etc/radiusclient-ng/servers
43 endef
44
45 define Package/radiusclient-ng
46 SECTION:=net
47 CATEGORY:=Network
48 DEPENDS:=+libradiusclient-ng
49 TITLE:=A RADIUS client
50 DESCRIPTION:=A RADIUS client.\\\
51 Purpose of this project is to build a portable, easy-to-use and standard \\\
52 compliant library suitable for developing free and commercial software \\\
53 that need support for RADIUS protocol (RFCs 2128 and 2139).\\\
54 \\\
55 This package contains a RADIUS client.
56 URL:=http://www.balabit.com/products/syslog_ng/
57 endef
58
59 define Build/Configure
60 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
61 $(TARGET_CONFIGURE_OPTS) \
62 CFLAGS="$(TARGET_CFLAGS)" \
63 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
64 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
65 ac_cv_func_getdomainname=yes \
66 ./configure \
67 --target=$(GNU_TARGET_NAME) \
68 --host=$(GNU_TARGET_NAME) \
69 --build=$(GNU_HOST_NAME) \
70 --program-prefix="" \
71 --program-suffix="" \
72 --prefix=/usr \
73 --exec-prefix=/usr \
74 --bindir=/usr/bin \
75 --datadir=/usr/share \
76 --includedir=/usr/include \
77 --infodir=/usr/share/info \
78 --libdir=/usr/lib \
79 --libexecdir=/usr/lib \
80 --localstatedir=/var \
81 --mandir=/usr/share/man \
82 --sbindir=/usr/sbin \
83 --sysconfdir=/etc \
84 $(DISABLE_LARGEFILE) \
85 $(DISABLE_NLS) \
86 --enable-shared \
87 --enable-static \
88 --disable-rpath \
89 --with-gnu-ld \
90 );
91 endef
92
93 define Build/Compile
94 rm -rf $(PKG_INSTALL_DIR)
95 mkdir -p $(PKG_INSTALL_DIR)
96 $(MAKE) -C $(PKG_BUILD_DIR) \
97 DESTDIR="$(PKG_INSTALL_DIR)" \
98 all install
99 endef
100
101 define Package/libradiusclient-ng/install
102 install -d -m0755 $(1)/etc
103 $(CP) $(PKG_INSTALL_DIR)/etc/radiusclient-ng $(1)/etc/
104 install -d -m0755 $(1)/usr/lib
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng.so.* $(1)/usr/lib/
106 endef
107
108 define Package/radiusclient-ng/install
109 install -d -m0755 $(1)/usr/sbin
110 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rad{acct,iusclient,login,status} $(1)/usr/sbin/
111 endef
112
113 define Build/InstallDev
114 mkdir -p $(STAGING_DIR)/usr/include
115 $(CP) $(PKG_INSTALL_DIR)/usr/include/radiusclient-ng.h $(STAGING_DIR)/usr/include/
116 mkdir -p $(STAGING_DIR)/usr/lib/
117 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng.{a,so}* $(STAGING_DIR)/usr/lib/
118 endef
119
120 define Build/UninstallDev
121 rm -rf \
122 $(STAGING_DIR)/usr/include/radiusclient-ng.h \
123 $(STAGING_DIR)/usr/lib/libradiusclient-ng.{a,so}*
124 endef
125
126 $(eval $(call BuildPackage,libradiusclient-ng))
127 $(eval $(call BuildPackage,radiusclient-ng))