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.

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