4afdd3f9bcea24f2cce020e5efa50d60213698dd
[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
46 define Package/radiusclient-ng
47 SECTION:=libs
48 CATEGORY:=Libraries
49 DEPENDS:=libradiusclient-ng
50 TITLE:=A RADIUS client
51 DESCRIPTION:=A RADIUS client.\\\
52 Purpose of this project is to build a portable, easy-to-use and standard \\\
53 compliant library suitable for developing free and commercial software \\\
54 that need support for RADIUS protocol (RFCs 2128 and 2139).\\\
55 \\\
56 This package contains a RADIUS client.
57 URL:=http://www.balabit.com/products/syslog_ng/
58 endef
59
60 define Build/Configure
61 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
62 $(TARGET_CONFIGURE_OPTS) \
63 CFLAGS="$(TARGET_CFLAGS)" \
64 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
65 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
66 ac_cv_func_getdomainname=yes \
67 ./configure \
68 --target=$(GNU_TARGET_NAME) \
69 --host=$(GNU_TARGET_NAME) \
70 --build=$(GNU_HOST_NAME) \
71 --program-prefix="" \
72 --program-suffix="" \
73 --prefix=/usr \
74 --exec-prefix=/usr \
75 --bindir=/usr/bin \
76 --datadir=/usr/share \
77 --includedir=/usr/include \
78 --infodir=/usr/share/info \
79 --libdir=/usr/lib \
80 --libexecdir=/usr/lib \
81 --localstatedir=/var \
82 --mandir=/usr/share/man \
83 --sbindir=/usr/sbin \
84 --sysconfdir=/etc \
85 $(DISABLE_LARGEFILE) \
86 $(DISABLE_NLS) \
87 --enable-shared \
88 --enable-static \
89 --disable-rpath \
90 --with-gnu-ld \
91 );
92 endef
93
94 define Build/Compile
95 rm -rf $(PKG_INSTALL_DIR)
96 mkdir -p $(PKG_INSTALL_DIR)
97 $(MAKE) -C $(PKG_BUILD_DIR) \
98 DESTDIR="$(PKG_INSTALL_DIR)" \
99 all install
100 endef
101
102 define Package/libradiusclient-ng/install
103 install -d -m0755 $(1)/etc
104 $(CP) $(PKG_INSTALL_DIR)/etc/radiusclient-ng $(1)/etc/
105 install -d -m0755 $(1)/usr/lib
106 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng.so.* $(1)/usr/lib/
107 endef
108
109 define Package/radiusclient-ng/install
110 install -d -m0755 $(1)/usr/sbin
111 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rad{acct,iusclient,login,status} $(1)/usr/sbin/
112 endef
113
114 define Build/InstallDev
115 mkdir -p $(STAGING_DIR)/usr/include
116 $(CP) $(PKG_INSTALL_DIR)/usr/include/radiusclient-ng.h $(STAGING_DIR)/usr/include/
117 mkdir -p $(STAGING_DIR)/usr/lib/
118 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng.{a,so}* $(STAGING_DIR)/usr/lib/
119 endef
120
121 define Build/UninstallDev
122 rm -rf \
123 $(STAGING_DIR)/usr/include/radiusclient-ng.h \
124 $(STAGING_DIR)/usr/lib/libradiusclient-ng.{a,so}*
125 endef
126
127 $(eval $(call BuildPackage,libradiusclient-ng))
128 $(eval $(call BuildPackage,radiusclient-ng))