[package] update fftw3 to 3.2.1 (#5391)
[openwrt/svn-archive/archive.git] / libs / popt / Makefile
1 #
2 # Copyright (C) 2006-2009 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:=4
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 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libpopt
21 SECTION:=libs
22 CATEGORY:=Libraries
23 TITLE:=A command line option parsing library
24 URL:=http://rpm5.org/files/popt/
25 endef
26
27 define Build/Configure
28 $(call Build/Configure/Default, \
29 --enable-shared \
30 --enable-static \
31 )
32 endef
33
34 TARGET_CFLAGS += $(FPIC)
35
36 define Build/Compile
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 DESTDIR="$(PKG_INSTALL_DIR)" \
39 all install
40 endef
41
42 define Build/InstallDev
43 mkdir -p $(1)/usr/include
44 $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(1)/usr/include/
45 mkdir -p $(1)/usr/lib
46 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(1)/usr/lib/
47 endef
48
49 define Package/libpopt/install
50 $(INSTALL_DIR) $(1)/usr/lib
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
52 endef
53
54 $(eval $(call RequireCommand,xgettext, \
55 $(PKG_NAME) requires the GNU gettext development package installed on the local system to build. \
56 ))
57
58 $(eval $(call BuildPackage,libpopt))
59