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.

160 lines
4.6 KiB

  1. #
  2. # Copyright (C) 2016 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:=lcdproc
  9. PKG_VERSION:=0.5.9
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/lcdproc/lcdproc/releases/download/v$(PKG_VERSION)/
  13. PKG_HASH:=d48a915496c96ff775b377d2222de3150ae5172bfb84a6ec9f9ceab962f97b83
  14. PKG_MAINTAINER:=Harald Geyer <harald@ccbib.org>, \
  15. Philip Prindeville <philipp@redfish-solutions.com>
  16. PKG_LICENSE:=GPL-2.0-only
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_CPE_ID:=cpe:/a:lcdproc:lcdproc
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/lcdproc/Default
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. URL:=http://lcdproc.org/
  24. endef
  25. define Package/lcdproc/Default-description
  26. LCDProc is a daemon and clients for displaying system information
  27. on various LCD displays
  28. endef
  29. define Package/lcdproc-clients
  30. $(call Package/lcdproc/Default)
  31. TITLE:=LCD Display clients
  32. endef
  33. define Package/lcdproc-clients/description
  34. $(call Package/lcdproc/Default-description)
  35. This package contains the clients distributed by the official lcdproc
  36. project:
  37. * lcdproc -- displays system information
  38. * lcdexec -- displays a menu structure to execute commands
  39. * lcdvc -- shows the content of the system console
  40. endef
  41. define Package/lcdproc-clients/conffiles
  42. /etc/lcdproc.conf
  43. /etc/lcdexec.conf
  44. /etc/lcdvc.conf
  45. endef
  46. define Package/lcdproc-server
  47. $(call Package/lcdproc/Default)
  48. TITLE:=LCD Display server
  49. DEPENDS:=+libpthread
  50. endef
  51. define LCDPROC_CORE_DRIVERS_TEXT
  52. bayrad CFontzPacket CFontz CwLnx ea65 EyeboxOne glk icp_a106 imonlcd
  53. imon irtrans joy lb216 lcdm001 lcterm linux_input MD8800 ms6931
  54. mtc_s16209x MtxOrb NoritakeVFD Olimex_MOD_LCD1x9 pyramid rawserial
  55. serialPOS serialVFD sli SureElec text tyan vlsys_m428 yard2LCD
  56. endef
  57. LCDPROC_CORE_DRIVERS:=$(strip $(LCDPROC_CORE_DRIVERS_TEXT))
  58. define Package/lcdproc-server/description
  59. $(call Package/lcdproc/Default-description)
  60. This package contains the server and a core set of display drivers
  61. without external dependencies:
  62. $(LCDPROC_CORE_DRIVERS_TEXT)
  63. endef
  64. define Package/lcdproc-server/conffiles
  65. /etc/LCDd.conf
  66. endef
  67. define Package/lcdproc-drivers
  68. $(call Package/lcdproc/Default)
  69. TITLE:=LCD Display extra drivers
  70. DEPENDS:=+lcdproc-server +libncurses +libusb-1.0 +libusb-compat +libftdi1 \
  71. +GPIO_SUPPORT:libugpio
  72. endef
  73. define LCDPROC_OTHER_DRIVERS_TEXT
  74. curses futaba glcd hd44780 IOWarrior i2500vfd lis picolcd shuttleVFD ula200
  75. endef
  76. ifeq ($(CONFIG_PACKAGE_kmod-lp),y)
  77. LCDPROC_OTHER_DRIVERS_TEXT+=sdeclcd sed1330 sed1520 stv5730 t6963
  78. endif
  79. LCDPROC_OTHER_DRIVERS:=$(strip $(LCDPROC_OTHER_DRIVERS_TEXT))
  80. define Package/lcdproc-drivers/description
  81. $(call Package/lcdproc/Default-description)
  82. This package contains display drivers with external dependencies:
  83. $(LCDPROC_OTHER_DRIVERS_TEXT)
  84. endef
  85. CONFIGURE_ARGS += \
  86. --disable-libX11 \
  87. --disable-libhid \
  88. --disable-libpng \
  89. --disable-freetype \
  90. --enable-drivers='all,!g15,!g15driver,!glcdlib,!irman,!lirc,!mdm166a,!mx5000,!svga,!xosd'
  91. MAKE_FLAGS += \
  92. CFLAGS="$(TARGET_CFLAGS)" \
  93. LDFLAGS="$(TARGET_LDFLAGS)"
  94. define Package/lcdproc-clients/install
  95. $(INSTALL_DIR) $(1)/usr/bin
  96. $(INSTALL_DIR) $(1)/etc/init.d
  97. $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdproc/lcdproc $(1)/usr/bin/
  98. $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdexec/lcdexec $(1)/usr/bin/
  99. $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdvc/lcdvc $(1)/usr/bin/
  100. $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdproc/lcdproc.conf $(1)/etc/
  101. $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdexec/lcdexec.conf $(1)/etc/
  102. $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdvc/lcdvc.conf $(1)/etc/
  103. $(INSTALL_BIN) ./files/lcd* $(1)/etc/init.d/
  104. endef
  105. define Package/lcdproc-server/install
  106. $(INSTALL_DIR) $(1)/usr/sbin
  107. $(INSTALL_DIR) $(1)/usr/lib/lcdproc
  108. $(INSTALL_DIR) $(1)/etc/init.d
  109. $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/LCDd $(1)/usr/sbin/
  110. $(CP) $(foreach driver,$(LCDPROC_CORE_DRIVERS),$(PKG_BUILD_DIR)/server/drivers/$(driver).so) $(1)/usr/lib/lcdproc/
  111. $(CP) -p $(PKG_BUILD_DIR)/LCDd.conf $(PKG_BUILD_DIR)/LCDd.conf.orig
  112. sed -i -r \
  113. -e 's!^(DriverPath=).*$$$$!\1/usr/lib/lcdproc/!' \
  114. -e 's!^(Driver=)curses$$$$!\1sdeclcd!' \
  115. $(PKG_BUILD_DIR)/LCDd.conf
  116. $(INSTALL_CONF) $(PKG_BUILD_DIR)/LCDd.conf $(1)/etc/
  117. $(INSTALL_BIN) ./files/LCDd $(1)/etc/init.d/
  118. endef
  119. define Package/lcdproc-drivers/install
  120. $(INSTALL_DIR) $(1)/usr/lib/lcdproc
  121. $(CP) $(foreach driver,$(LCDPROC_OTHER_DRIVERS),$(PKG_BUILD_DIR)/server/drivers/$(driver).so) $(1)/usr/lib/lcdproc/
  122. endef
  123. $(eval $(call BuildPackage,lcdproc-clients))
  124. $(eval $(call BuildPackage,lcdproc-server))
  125. $(eval $(call BuildPackage,lcdproc-drivers))