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.

91 lines
2.1 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:=9c
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.ijg.org/files
  13. PKG_HASH:=650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122
  14. PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
  15. PKG_LICENSE:=IJG
  16. PKG_LICENSE_FILES:=README
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_BUILD_DEPENDS:=libtool
  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. SUBMENU:=Image Manipulation
  36. DEPENDS:=+libjpeg
  37. TITLE+= manipulation tools
  38. endef
  39. TARGET_CFLAGS += $(FPIC)
  40. CONFIGURE_ARGS += \
  41. --enable-shared \
  42. --enable-static \
  43. HOST_CONFIGURE_ARGS += \
  44. --enable-shared \
  45. --enable-static \
  46. define Build/Compile
  47. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  48. LIBTOOL="./libtool --tag=CC" \
  49. prefix="$(PKG_INSTALL_DIR)/usr" \
  50. exec_prefix="$(PKG_INSTALL_DIR)/usr" \
  51. all
  52. $(MAKE) -C $(PKG_BUILD_DIR) \
  53. DESTDIR="$(PKG_INSTALL_DIR)" \
  54. install
  55. endef
  56. define Build/InstallDev
  57. $(INSTALL_DIR) $(1)/usr/include
  58. $(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(1)/usr/include/
  59. $(CP) $(PKG_BUILD_DIR)/jpegint.h $(1)/usr/include/
  60. $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/
  61. $(INSTALL_DIR) $(1)/usr/lib
  62. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/
  63. endef
  64. define Package/libjpeg/install
  65. $(INSTALL_DIR) $(1)/usr/lib
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(1)/usr/lib/
  67. endef
  68. define Package/jpeg-tools/install
  69. $(INSTALL_DIR) $(1)/usr/bin
  70. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/*jpeg* $(1)/usr/bin/
  71. endef
  72. $(eval $(call HostBuild))
  73. $(eval $(call BuildPackage,libjpeg))
  74. $(eval $(call BuildPackage,jpeg-tools))