From 975487039fa24d115d7e67796c8ded5ee8476db5 Mon Sep 17 00:00:00 2001 From: nico Date: Sun, 23 Jul 2006 17:42:26 +0000 Subject: [PATCH] port radiusclient-ng to buildroot-ng git-svn-id: svn://svn.openwrt.org/openwrt/packages@4242 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- libs/radiusclient-ng/Makefile | 128 +++++++++++++++++++++ .../radiusclient-ng/patches/01-cross_compile.patch | 29 +++++ 2 files changed, 157 insertions(+) create mode 100644 libs/radiusclient-ng/Makefile create mode 100644 libs/radiusclient-ng/patches/01-cross_compile.patch diff --git a/libs/radiusclient-ng/Makefile b/libs/radiusclient-ng/Makefile new file mode 100644 index 000000000..4afdd3f9b --- /dev/null +++ b/libs/radiusclient-ng/Makefile @@ -0,0 +1,128 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=radiusclient-ng +PKG_VERSION:=0.5.2 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://download.berlios.de/radiusclient-ng/ +PKG_MD5SUM:=c54eb70e964bdd22dd44b39a9b4df8ca +PKG_CAT:=zcat + +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/libradiusclient-ng + SECTION:=libs + CATEGORY:=Libraries + TITLE:=A RADIUS client library + DESCRIPTION:=A RADIUS client library.\\\ + Purpose of this project is to build a portable, easy-to-use and standard \\\ + compliant library suitable for developing free and commercial software \\\ + that need support for RADIUS protocol (RFCs 2128 and 2139).\\\ + \\\ + This package contains shared libraries, needed by other programs. + URL:=http://developer.berlios.de/projects/radiusclient-ng/ +endef + +define Package/libradiusclient-ng/conffiles +/etc/radiusclient-ng/issue +/etc/radiusclient-ng/port-id-map +/etc/radiusclient-ng/radiusclient.conf +/etc/radiusclient-ng/servers +endef + + +define Package/radiusclient-ng + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=libradiusclient-ng + TITLE:=A RADIUS client + DESCRIPTION:=A RADIUS client.\\\ + Purpose of this project is to build a portable, easy-to-use and standard \\\ + compliant library suitable for developing free and commercial software \\\ + that need support for RADIUS protocol (RFCs 2128 and 2139).\\\ + \\\ + This package contains a RADIUS client. + URL:=http://www.balabit.com/products/syslog_ng/ +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); rm -f config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + ac_cv_func_getdomainname=yes \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc \ + $(DISABLE_LARGEFILE) \ + $(DISABLE_NLS) \ + --enable-shared \ + --enable-static \ + --disable-rpath \ + --with-gnu-ld \ + ); +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/libradiusclient-ng/install + install -d -m0755 $(1)/etc + $(CP) $(PKG_INSTALL_DIR)/etc/radiusclient-ng $(1)/etc/ + install -d -m0755 $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng.so.* $(1)/usr/lib/ +endef + +define Package/radiusclient-ng/install + install -d -m0755 $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rad{acct,iusclient,login,status} $(1)/usr/sbin/ +endef + +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/radiusclient-ng.h $(STAGING_DIR)/usr/include/ + mkdir -p $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng.{a,so}* $(STAGING_DIR)/usr/lib/ +endef + +define Build/UninstallDev + rm -rf \ + $(STAGING_DIR)/usr/include/radiusclient-ng.h \ + $(STAGING_DIR)/usr/lib/libradiusclient-ng.{a,so}* +endef + +$(eval $(call BuildPackage,libradiusclient-ng)) +$(eval $(call BuildPackage,radiusclient-ng)) diff --git a/libs/radiusclient-ng/patches/01-cross_compile.patch b/libs/radiusclient-ng/patches/01-cross_compile.patch new file mode 100644 index 000000000..fa45afb12 --- /dev/null +++ b/libs/radiusclient-ng/patches/01-cross_compile.patch @@ -0,0 +1,29 @@ +diff -urN radiusclient-ng-0.5.2/configure radiusclient-ng-0.5.2.new/configure +--- radiusclient-ng-0.5.2/configure 2005-11-07 22:18:59.000000000 +0100 ++++ radiusclient-ng-0.5.2.new/configure 2006-03-10 01:51:59.489383320 +0100 +@@ -23791,8 +23791,7 @@ + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++See \`config.log' for more details." >&2;} } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +diff -urN radiusclient-ng-0.5.2/etc/Makefile.in radiusclient-ng-0.5.2.new/etc/Makefile.in +--- radiusclient-ng-0.5.2/etc/Makefile.in 2005-11-08 00:15:35.000000000 +0100 ++++ radiusclient-ng-0.5.2.new/etc/Makefile.in 2006-03-10 01:58:29.345116240 +0100 +@@ -376,9 +376,9 @@ + <$(srcdir)/radiusclient.conf.in >radiusclient.conf + + install-data-local: servers +- $(mkinstalldirs) $(pkgsysconfdir); \ +- echo " $(INSTALL) -m 600 $(srcdir)/servers $(pkgsysconfdir)/servers"; \ +- $(INSTALL) -m 600 $(srcdir)/servers $(pkgsysconfdir)/servers ++ $(mkinstalldirs) $(DESTDIR)/$(pkgsysconfdir); \ ++ echo " $(INSTALL) -m 600 $(srcdir)/servers $(DESTDIR)/$(pkgsysconfdir)/servers"; \ ++ $(INSTALL) -m 600 $(srcdir)/servers $(DESTDIR)/$(pkgsysconfdir)/servers + + uninstall-local: + rm -f $(pkgsysconfdir)/servers -- 2.11.0