From: Joseph Roback <openwrt-devel@roback.cc>
[openwrt/svn-archive/archive.git] / libs / popt / Makefile
1 #
2 # Copyright (C) 2006-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:=popt
11 PKG_VERSION:=1.7
12 PKG_RELEASE:=5
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
16 PKG_MD5SUM:=5988e7aeb0ae4dac8d83561265984cc9
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20 PKG_BUILD_PARALLEL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 TARGET_CFLAGS += $(FPIC)
25
26 define Package/libpopt
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=A command line option parsing library
30 URL:=http://rpm5.org/files/popt/
31 endef
32
33 define Build/Configure
34 $(call Build/Configure/Default, \
35 --enable-shared \
36 --enable-static \
37 )
38 endef
39
40 define Build/InstallDev
41 $(INSTALL_DIR) $(1)/usr/include
42 $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(1)/usr/include/
43 $(INSTALL_DIR) $(1)/usr/lib
44 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(1)/usr/lib/
45 endef
46
47 define Package/libpopt/install
48 $(INSTALL_DIR) $(1)/usr/lib
49 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
50 endef
51
52 $(eval $(call RequireCommand,xgettext, \
53 $(PKG_NAME) requires the GNU gettext development package installed on the local system to build. \
54 ))
55
56 $(eval $(call BuildPackage,libpopt))
57