Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #
  2. # Copyright (C) 2007-2008 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=bzip2
  9. PKG_VERSION:=1.0.6
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://distfiles.gentoo.org/distfiles/ \
  13. http://distcache.freebsd.org/ports-distfiles/
  14. PKG_HASH:=a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd
  15. PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
  16. PKG_LICENSE:=BZIP2
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_CPE_ID:=cpe:/a:bzip:bzip2
  19. include $(INCLUDE_DIR)/host-build.mk
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/bzip2/Default
  22. SUBMENU:=Compression
  23. URL:=http://www.bzip.org/
  24. endef
  25. define Package/libbz2
  26. $(call Package/bzip2/Default)
  27. SECTION:=libs
  28. CATEGORY:=Libraries
  29. DEPENDS:=
  30. TITLE:=bzip2 library.
  31. endef
  32. define Package/libbz2/description
  33. bzip2 is a freely available, patent free, high-quality
  34. data compressor. This packages provides libbz2 library.
  35. endef
  36. define Package/bzip2
  37. $(call Package/bzip2/Default)
  38. SECTION:=utils
  39. CATEGORY:=Utilities
  40. DEPENDS:=+libbz2
  41. TITLE:=bzip2 is a compression utility.
  42. endef
  43. define Package/bzip2/description
  44. bzip2 is a freely available, patent free, high-quality
  45. data compressor. This package provides the binary.
  46. endef
  47. TARGET_CFLAGS += \
  48. $(FPIC) \
  49. $(TARGET_LDFLAGS)
  50. CONFIGURE_ARGS += --prefix=/usr
  51. MAKE_FLAGS += \
  52. -f Makefile-libbz2_so \
  53. CFLAGS="$(TARGET_CFLAGS)" \
  54. all
  55. define Build/InstallDev
  56. $(INSTALL_DIR) $(1)/usr/include
  57. $(CP) $(PKG_BUILD_DIR)/bzlib.h $(1)/usr/include/
  58. $(INSTALL_DIR) $(1)/usr/lib
  59. $(CP) $(PKG_BUILD_DIR)/libbz2.so.$(PKG_VERSION) $(1)/usr/lib/
  60. $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so.1.0
  61. $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so
  62. endef
  63. define Package/libbz2/install
  64. $(INSTALL_DIR) $(1)/usr/lib/
  65. $(CP) $(PKG_BUILD_DIR)/libbz2.so.$(PKG_VERSION) $(1)/usr/lib/
  66. $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so.1.0
  67. endef
  68. define Package/bzip2/install
  69. $(INSTALL_DIR) $(1)/usr/bin/
  70. $(INSTALL_BIN) $(PKG_BUILD_DIR)/bzip2-shared $(1)/usr/bin/bzip2
  71. $(INSTALL_DIR) $(1)/bin/
  72. $(LN) ../usr/bin/bzip2 $(1)/bin/bzip2
  73. endef
  74. HOST_CFLAGS += \
  75. $(FPIC) \
  76. $(HOST_LDFLAGS)
  77. HOST_MAKE_FLAGS+= \
  78. CFLAGS="$(HOST_CFLAGS)" \
  79. all
  80. HOST_CONFIGURE_ARGS+= \
  81. --prefix=$(STAGING_DIR_HOSTPKG)
  82. define Host/Install
  83. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
  84. $(MAKE) -C $(HOST_BUILD_DIR) PREFIX=$(STAGING_DIR_HOSTPKG)/ install
  85. endef
  86. $(eval $(call HostBuild))
  87. $(eval $(call BuildPackage,libbz2))
  88. $(eval $(call BuildPackage,bzip2))