1c9711577a3aa50ff8405c2bcaa8cf3065a1fe80
[openwrt.git] / package / 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 PKG_LICENSE:=MIT
18
19 PKG_LICENSE:=MIT
20 PKG_LICENSE_FILES:=COPYING
21
22 PKG_FIXUP:=autoreconf
23 PKG_REMOVE_FILES:=autogen.sh aclocal.m4
24
25 PKG_INSTALL:=1
26 PKG_BUILD_PARALLEL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 TARGET_CFLAGS += $(FPIC)
31
32 define Package/libpopt
33   SECTION:=libs
34   CATEGORY:=Libraries
35   TITLE:=A command line option parsing library
36   URL:=http://rpm5.org/files/popt/
37 endef
38
39 define Build/Configure
40         $(call Build/Configure/Default, \
41                 --enable-shared \
42                 --enable-static \
43         )
44 endef
45
46 define Build/InstallDev
47         $(INSTALL_DIR) $(1)/usr/include
48         $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(1)/usr/include/
49         $(INSTALL_DIR) $(1)/usr/lib
50         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(1)/usr/lib/
51 endef
52
53 define Package/libpopt/install
54         $(INSTALL_DIR) $(1)/usr/lib
55         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
56 endef
57
58 $(eval $(call RequireCommand,xgettext, \
59         $(PKG_NAME) requires the GNU gettext development package installed on the local system to build. \
60 ))
61
62 $(eval $(call BuildPackage,libpopt))