7c2e77b1219737ebae02d1abf4fe08f99bffdfeb
[openwrt/svn-archive/archive.git] / libs / popt / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=popt
12 PKG_VERSION:=1.7
13 PKG_RELEASE:=4
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/
17 PKG_MD5SUM:=5988e7aeb0ae4dac8d83561265984cc9
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libpopt
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=A command line option parsing library
25 URL:=ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/
26 endef
27
28 define Build/Configure
29 $(call Build/Configure/Default, \
30 --enable-shared \
31 --enable-static \
32 )
33 endef
34
35 define Build/Compile
36 $(MAKE) -C $(PKG_BUILD_DIR) \
37 DESTDIR="$(PKG_INSTALL_DIR)" \
38 all install
39 endef
40
41 define Build/InstallDev
42 mkdir -p $(1)/usr/include
43 $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(1)/usr/include/
44 mkdir -p $(1)/usr/lib
45 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(1)/usr/lib/
46 endef
47
48 define Package/libpopt/install
49 $(INSTALL_DIR) $(1)/usr/lib
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
51 endef
52
53 $(eval $(call BuildPackage,libpopt))
54
55 $(eval $(call RequireCommand,xgettext, \
56 $(PKG_NAME) requires the GNU gettext development package installed on the local system to build. \
57 ))