Browse Source

libradcli: added package to replace freeradius-client

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos 9 years ago
parent
commit
cb36792aa2
3 changed files with 85 additions and 55 deletions
  1. 0
    55
      libs/freeradius-client/Makefile
  2. 10
    0
      libs/libradcli/Config.in
  3. 75
    0
      libs/libradcli/Makefile

+ 0
- 55
libs/freeradius-client/Makefile View File

@@ -1,55 +0,0 @@
1
-#
2
-# Copyright (C) 2011 OpenWrt.org
3
-#
4
-# This is free software, licensed under the GNU General Public License v2.
5
-# See /LICENSE for more information.
6
-#
7
-
8
-include $(TOPDIR)/rules.mk
9
-
10
-PKG_NAME:=freeradius-client
11
-PKG_VERSION:=1.1.7
12
-PKG_RELEASE:=1
13
-
14
-PKG_SOURCE:=freeradius-client-$(PKG_VERSION).tar.gz
15
-PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/freeradius/
16
-PKG_MD5SUM:=43b4d21715b613dc4fe8ef128467fe78
17
-
18
-PKG_INSTALL:=1
19
-
20
-include $(INCLUDE_DIR)/package.mk
21
-
22
-define Package/freeradius-client
23
-  SECTION:=libs
24
-  CATEGORY:=Libraries
25
-  TITLE:=A library for radius clients
26
-  URL:=http://freeradius.org/freeradius-client/
27
-  MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
28
-endef
29
-
30
-define Package/freeradius-client/decription
31
-  FreeRADIUS Client is a framework and library for writing RADIUS
32
-  Clients. The library lets you develop a RADIUS-aware application
33
-  in less than 50 lines of C code. It is highly portable and runs on
34
-  Linux, many BSD variants and Solaris.
35
-endef
36
-
37
-define Build/InstallDev
38
-	$(INSTALL_DIR) $(1)/usr/include
39
-	$(CP) \
40
-		$(PKG_INSTALL_DIR)/usr/include/freeradius-client.h \
41
-		$(1)/usr/include/
42
-	$(INSTALL_DIR) $(1)/usr/lib
43
-	$(CP) \
44
-		$(PKG_INSTALL_DIR)/usr/lib/libfreeradius-client.{a,so*} \
45
-		$(1)/usr/lib/
46
-endef
47
-
48
-define Package/freeradius-client/install
49
-	$(INSTALL_DIR) $(1)/usr/lib
50
-	$(CP) \
51
-		$(PKG_INSTALL_DIR)/usr/lib/libfreeradius-client.so.* \
52
-		$(1)/usr/lib/
53
-endef
54
-
55
-$(eval $(call BuildPackage,freeradius-client))

+ 10
- 0
libs/libradcli/Config.in View File

@@ -0,0 +1,10 @@
1
+# radcli avanced configuration
2
+
3
+menu "Configuration"
4
+	depends on PACKAGE_libradcli
5
+
6
+config RADCLI_TLS
7
+	bool "enable TLS support"
8
+	default y
9
+
10
+endmenu

+ 75
- 0
libs/libradcli/Makefile View File

@@ -0,0 +1,75 @@
1
+#
2
+# Copyright (C) 2015 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=libradcli
11
+PKG_VERSION:=1.2.1
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=radcli-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=https://github.com/radcli/radcli/releases/download/radcli_1_2_1/
16
+PKG_MD5SUM:=48f917ed3822ed2d91a5e90309a80812
17
+PKG_BUILD_DIR:=$(BUILD_DIR)/radcli-$(PKG_VERSION)
18
+
19
+PKG_INSTALL:=1
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+
23
+define Package/libradcli
24
+  SECTION:=libs
25
+  CATEGORY:=Libraries
26
+  TITLE:=A library for radius clients
27
+  URL:=http://radcli.github.io/radcli/
28
+  MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
29
+  DEPENDS:= +RADCLI_TLS:libgnutls +libnettle
30
+endef
31
+
32
+define Package/libradcli/decription
33
+  The radcli library is a library for writing RADIUS Clients. The library's
34
+  approach is to allow writing RADIUS-aware application in less than 50 lines
35
+  of C code. It was based originally on freeradius-client and is source 
36
+  compatible with it.
37
+endef
38
+
39
+CONFIGURE_ARGS+= \
40
+	--enable-legacy-compat
41
+
42
+ifneq ($(CONFIG_RADCLI_TLS),y)
43
+CONFIGURE_ARGS += --without-tls
44
+endif
45
+
46
+define Build/InstallDev
47
+	$(INSTALL_DIR) $(1)/usr/include/radcli
48
+	$(CP) \
49
+		$(PKG_INSTALL_DIR)/usr/include/radcli/radcli.h \
50
+		$(PKG_INSTALL_DIR)/usr/include/radcli/version.h \
51
+		$(1)/usr/include/radcli
52
+	$(CP) \
53
+		$(PKG_INSTALL_DIR)/usr/include/freeradius-client.h \
54
+		$(1)/usr/include/
55
+	$(INSTALL_DIR) $(1)/usr/lib
56
+	$(CP) \
57
+		$(PKG_INSTALL_DIR)/usr/lib/libradcli.so* \
58
+		$(PKG_INSTALL_DIR)/usr/lib/libfreeradius-client.so \
59
+		$(1)/usr/lib/
60
+endef
61
+
62
+define Package/libradcli/conffiles
63
+/etc/radcli/radiusclient.conf
64
+endef
65
+
66
+define Package/libradcli/install
67
+	$(INSTALL_DIR) $(1)/etc/radcli
68
+	$(INSTALL_CONF) $(PKG_BUILD_DIR)/etc/radiusclient.conf $(1)/etc/radcli/
69
+	$(INSTALL_DIR) $(1)/usr/lib
70
+	$(CP) \
71
+		$(PKG_INSTALL_DIR)/usr/lib/libradcli.so.* \
72
+		$(1)/usr/lib/
73
+endef
74
+
75
+$(eval $(call BuildPackage,libradcli))