[backfire/packages] merge r28424
[openwrt/svn-archive/archive.git] / libs / argtable / Makefile
1 #
2 # Copyright (C) 2007-2010 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:=argtable
11 PKG_VERSION:=2.12
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)2-12.tar.gz
15 PKG_SOURCE_URL:=@SF/argtable
16 PKG_MD5SUM:=291e249ea60f4d0637e467356a8ae41a
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)2-12
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/argtable
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=A library for parsing GNU style command line options
28 URL:=http://argtable.sourceforge.net/
29 endef
30
31 define Package/argtable/description
32 Argtable is an ANSI C library for parsing GNU style command line options
33 with a minimum of fuss. It enables a program's command line syntax to be
34 defined in the source code as an array of argtable structs. The command
35 line is then parsed according to that specification and the resulting
36 values are returned in those same structs where they are accessible to
37 the main program. Both tagged (-v, --verbose, --foo=bar) and untagged
38 arguments are supported, as are multiple instances of each argument.
39 endef
40
41 TARGET_CFLAGS += $(FPIC)
42 CONFIGURE_ARGS += \
43 --enable-shared \
44 --enable-static \
45
46 MAKE_PATH = ./src
47
48 define Build/InstallDev
49 $(INSTALL_DIR) $(1)/usr/include
50 $(CP) $(PKG_INSTALL_DIR)/usr/include/argtable2.h $(1)/usr/include/
51 $(INSTALL_DIR) $(1)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libargtable2.{a,so*} $(1)/usr/lib/
53 endef
54
55 define Package/argtable/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libargtable2.so.* $(1)/usr/lib/
58 endef
59
60 $(eval $(call BuildPackage,argtable))