Port palantir to -ng
[openwrt/svn-archive/archive.git] / libs / bzip2 / 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:=bzip2
12 PKG_VERSION:=1.0.3
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=8a716bebecb6e647d2e8a29ea5d8447f
15
16 PKG_SOURCE_URL:=http://www.bzip.org/$(PKG_VERSION)/
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libbzip2
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=bzip2 is a freely available, patent free, high-quality data compressor.
29 DESCRIPTION:=bzip2 is a freely available, patent free, high-quality data compressor.
30 URL:=http://www.bzip.org
31 endef
32
33 define Build/Compile
34 rm -rf $(PKG_INSTALL_DIR)
35 mkdir -p $(PKG_INSTALL_DIR)
36 $(MAKE) -C $(PKG_BUILD_DIR) \
37 $(TARGET_CONFIGURE_OPTS) \
38 CC="$(TARGET_CC)" \
39 DESTDIR="$(PKG_INSTALL_DIR)" \
40 libbz2.a
41 endef
42
43 define Build/InstallDev
44 mkdir -p $(STAGING_DIR)/usr/include
45 $(CP) $(PKG_BUILD_DIR)/bzlib.h $(STAGING_DIR)/usr/include/
46 mkdir -p $(STAGING_DIR)/usr/lib
47 $(CP) $(PKG_BUILD_DIR)/libbz2.a $(STAGING_DIR)/usr/lib/
48 endef
49
50 define Build/UninstallDev
51 rm -rf \
52 $(STAGING_DIR)/usr/include/bzlib.h \
53 $(STAGING_DIR)/usr/lib/libbz2.a
54 endef
55
56 $(eval $(call BuildPackage,libbzip2))