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.

87 lines
2.6 KiB

  1. #
  2. # Copyright (C) 2006-2017 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:=qrencode
  9. PKG_VERSION:=4.1.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://fukuchi.org/works/qrencode
  13. PKG_HASH:=ac7eff020d94be016d5b93bc6567f10a4a4692dcced901a384300f589a6cad0a
  14. PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
  15. PKG_LICENSE:=LGPL-2.1-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_qrencode
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/libqrencode
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=Library for encoding data in a QR Code symbol
  25. URL:=https://fukuchi.org/works/qrencode/
  26. endef
  27. define Package/libqrencode/description
  28. Libqrencode is a C library for encoding data in a QR Code symbol,
  29. a kind of 2D symbology that can be scanned by handy terminals such
  30. as a mobile phone with CCD. The capacity of QR Code is up to 7000
  31. digits or 4000 characters, and is highly robust.
  32. endef
  33. define Package/qrencode
  34. SECTION:=utils
  35. CATEGORY:=Utilities
  36. TITLE:=qrencode binary for producing qr codes
  37. URL:=http://fukuchi.org/works/qrencode/
  38. DEPENDS:=+libqrencode
  39. endef
  40. define Package/qrencode/description
  41. Qrencode is a C program for encoding data in a QR Code symbol,
  42. a kind of 2D symbology that can be scanned by handy terminals such
  43. as a mobile phone with CCD. The capacity of QR Code is up to 7000
  44. digits or 4000 characters, and is highly robust.
  45. endef
  46. CMAKE_OPTIONS += \
  47. -DCMAKE_DISABLE_FIND_PACKAGE_PNG=ON \
  48. -DWITHOUT_PNG=ON \
  49. -DWITH_TOOLS=O$(if $(CONFIG_PACKAGE_qrencode),N,FF) \
  50. -DWITH_TESTS=OFF \
  51. -DBUILD_SHARED_LIBS=ON
  52. TARGET_CFLAGS += -flto
  53. TARGET_LDFLAGS += -Wl,--gc-sections
  54. define Build/InstallDev
  55. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
  56. $(CP) $(PKG_INSTALL_DIR)/usr/include/qrencode.h $(1)/usr/include/
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libqrencode.so* $(1)/usr/lib/
  58. $(CP) $(PKG_BUILD_DIR)/libqrencode.pc $(1)/usr/lib/pkgconfig/
  59. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libqrencode.pc
  60. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libqrencode.pc
  61. endef
  62. define Package/libqrencode/install
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libqrencode.so* $(1)/usr/lib/
  65. endef
  66. define Package/qrencode/install
  67. $(INSTALL_DIR) $(1)/usr/bin
  68. $(CP) $(PKG_INSTALL_DIR)/usr/bin/qrencode $(1)/usr/bin/
  69. endef
  70. $(eval $(call BuildPackage,libqrencode))
  71. $(eval $(call BuildPackage,qrencode))