build system cleanup. move shared include files into $(TOPDIR)/include, move lzma...
[openwrt/svn-archive/archive.git] / libs / popt / Makefile
1 # $Id: Makefile 3843 2006-05-30 18:55:52Z nbd $
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=popt
6 PKG_VERSION:=1.7
7 PKG_RELEASE:=4
8 PKG_MD5SUM:=5988e7aeb0ae4dac8d83561265984cc9
9
10 PKG_SOURCE_URL:=ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/include/package.mk
18
19 define Package/libpopt
20 SECTION:=libs
21 CATEGORY:=Libraries
22 TITLE:=A command line option parsing library
23 DESCRIPTION:=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,--enable-shared --enable-static)
29 endef
30
31 define Build/Compile
32 rm -rf $(PKG_INSTALL_DIR)
33 mkdir -p $(PKG_INSTALL_DIR)
34 $(MAKE) -C $(PKG_BUILD_DIR) \
35 DESTDIR="$(PKG_INSTALL_DIR)" \
36 all install
37 endef
38
39 define Package/libpopt/install
40 install -m0755 -d $(1)/usr/lib
41 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
42 endef
43
44 define Build/InstallDev
45 mkdir -p $(STAGING_DIR)/usr/include
46 $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(STAGING_DIR)/usr/include/
47 mkdir -p $(STAGING_DIR)/usr/lib
48 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(STAGING_DIR)/usr/lib/
49 touch $(STAGING_DIR)/usr/lib/libpopt.so
50 endef
51
52 define Build/UninstallDev
53 rm -rf \
54 $(STAGING_DIR)/usr/include/popt.h \
55 $(STAGING_DIR)/usr/lib/libpopt.{a,so*}
56 endef
57
58 $(eval $(call BuildPackage,libpopt))