You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2006-2014 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:=jpeg
  9. PKG_VERSION:=6b
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/libjpeg
  13. PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547
  14. PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
  15. PKG_LICENSE:=IJG
  16. PKG_LICENSE_FILES:=README
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_BUILD_DEPENDS:=libltdl
  19. include $(INCLUDE_DIR)/host-build.mk
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/jpeg/Default
  22. TITLE:=The Independent JPEG Group's JPEG
  23. URL:=http://www.ijg.org/
  24. endef
  25. define Package/libjpeg
  26. $(call Package/jpeg/Default)
  27. SECTION:=libs
  28. CATEGORY:=Libraries
  29. TITLE+= runtime library
  30. endef
  31. define Package/jpeg-tools
  32. $(call Package/jpeg/Default)
  33. SECTION:=utils
  34. CATEGORY:=Utilities
  35. DEPENDS:=+libjpeg
  36. TITLE+= manipulation tools
  37. endef
  38. TARGET_CFLAGS += $(FPIC)
  39. CONFIGURE_ARGS += \
  40. --enable-shared \
  41. --enable-static \
  42. HOST_CONFIGURE_ARGS += \
  43. --enable-shared \
  44. --enable-static \
  45. define Build/Prepare
  46. $(call Build/Prepare/Default)
  47. (cd $(PKG_BUILD_DIR); \
  48. rm -f ltconfig ltmain.sh libtool; \
  49. ln -s `which true` ltconfig; \
  50. ln -s $(STAGING_DIR)/host/bin/libtool libtool; \
  51. )
  52. endef
  53. define Build/Compile
  54. $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/{include,lib,bin,man/man1}
  55. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  56. LIBTOOL="./libtool --tag=CC" \
  57. prefix="$(PKG_INSTALL_DIR)/usr" \
  58. exec_prefix="$(PKG_INSTALL_DIR)/usr" \
  59. all
  60. $(MAKE) -C $(PKG_BUILD_DIR) \
  61. prefix="$(PKG_INSTALL_DIR)/usr" \
  62. exec_prefix="$(PKG_INSTALL_DIR)/usr" \
  63. install install-headers install-lib
  64. endef
  65. define Build/InstallDev
  66. $(INSTALL_DIR) $(1)/usr/include
  67. $(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(1)/usr/include/
  68. $(CP) $(PKG_BUILD_DIR)/jpegint.h $(1)/usr/include/
  69. $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/
  72. endef
  73. define Package/libjpeg/install
  74. $(INSTALL_DIR) $(1)/usr/lib
  75. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(1)/usr/lib/
  76. endef
  77. define Package/jpeg-tools/install
  78. $(INSTALL_DIR) $(1)/usr/bin
  79. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/*jpeg* $(1)/usr/bin/
  80. endef
  81. $(eval $(call HostBuild))
  82. $(eval $(call BuildPackage,libjpeg))
  83. $(eval $(call BuildPackage,jpeg-tools))