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.

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