nuke $Id$ in /packages as well
[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
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:=ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/
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:=ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/
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 BuildPackage,libpopt))
55
56 $(eval $(call RequireCommand,xgettext, \
57 $(PKG_NAME) requires the GNU gettext development package installed on the local system to build. \
58 ))