From 2adcef6a14a79421a9f182bd0eddcd6239286de4 Mon Sep 17 00:00:00 2001 From: blogic Date: Fri, 28 Dec 2007 14:57:16 +0000 Subject: [PATCH] added argtables, signed off by michu-at-neophobdotcom git-svn-id: svn://svn.openwrt.org/openwrt/packages@9979 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- libs/argtable/Makefile | 66 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 libs/argtable/Makefile diff --git a/libs/argtable/Makefile b/libs/argtable/Makefile new file mode 100644 index 000000000..ff403c62b --- /dev/null +++ b/libs/argtable/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=argtable +PKG_VERSION:=2.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)2-7.tar.gz +PKG_SOURCE_URL:=@SF/argtable +PKG_MD5SUM:=a84130293aab3bc09631cbee717ede93 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)2-7 +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/argtable + SECTION:=libs + CATEGORY:=Libraries + TITLE:=A library for parsing GNU style command line options + URL:=http://argtable.sourceforge.net/ +endef + +define Package/argtable/description + Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss. + It enables a program's command line syntax to be defined in the source code as an array of argtable + structs. The command line is then parsed according to that specification and the resulting values + are returned in those same structs where they are accessible to the main program. Both tagged + (-v, --verbose, --foo=bar) and untagged arguments are supported, as are multiple instances of + each argument. +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + +MAKE_FLAGS += \ + -C $(PKG_BUILD_DIR)/src \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install \ + +define Build/InstallDev + mkdir -p $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/argtable2.h $(1)/usr/include/ + mkdir -p $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libargtable2.{a,so*} $(1)/usr/lib/ +endef + +define Build/UninstallDev + rm -rf \ + $(STAGING_DIR)/usr/include/argtable2.h \ + $(STAGING_DIR)/usr/lib/libargtable2.{a,so*} +endef + +define Package/argtable/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libargtable2.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,argtable))