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.

163 lines
4.7 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:=6
  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 +serdisplib
  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_VARS += \
  86. ac_cv_mtab_file="/etc/mtab"
  87. CONFIGURE_ARGS += \
  88. --disable-libX11 \
  89. --disable-libhid \
  90. --disable-libpng \
  91. --disable-freetype \
  92. --enable-drivers='all,!g15,!g15driver,!glcdlib,!irman,!lirc,!mdm166a,!mx5000,!svga,!xosd'
  93. MAKE_FLAGS += \
  94. CFLAGS="$(TARGET_CFLAGS)" \
  95. LDFLAGS="$(TARGET_LDFLAGS)"
  96. define Package/lcdproc-clients/install
  97. $(INSTALL_DIR) $(1)/usr/bin
  98. $(INSTALL_DIR) $(1)/etc/init.d
  99. $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdproc/lcdproc $(1)/usr/bin/
  100. $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdexec/lcdexec $(1)/usr/bin/
  101. $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdvc/lcdvc $(1)/usr/bin/
  102. $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdproc/lcdproc.conf $(1)/etc/
  103. $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdexec/lcdexec.conf $(1)/etc/
  104. $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdvc/lcdvc.conf $(1)/etc/
  105. $(INSTALL_BIN) ./files/lcd* $(1)/etc/init.d/
  106. endef
  107. define Package/lcdproc-server/install
  108. $(INSTALL_DIR) $(1)/usr/sbin
  109. $(INSTALL_DIR) $(1)/usr/lib/lcdproc
  110. $(INSTALL_DIR) $(1)/etc/init.d
  111. $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/LCDd $(1)/usr/sbin/
  112. $(CP) $(foreach driver,$(LCDPROC_CORE_DRIVERS),$(PKG_BUILD_DIR)/server/drivers/$(driver).so) $(1)/usr/lib/lcdproc/
  113. $(CP) -p $(PKG_BUILD_DIR)/LCDd.conf $(PKG_BUILD_DIR)/LCDd.conf.orig
  114. sed -i -r \
  115. -e 's!^(DriverPath=).*$$$$!\1/usr/lib/lcdproc/!' \
  116. -e 's!^(Driver=)curses$$$$!\1sdeclcd!' \
  117. $(PKG_BUILD_DIR)/LCDd.conf
  118. $(INSTALL_CONF) $(PKG_BUILD_DIR)/LCDd.conf $(1)/etc/
  119. $(INSTALL_BIN) ./files/LCDd $(1)/etc/init.d/
  120. endef
  121. define Package/lcdproc-drivers/install
  122. $(INSTALL_DIR) $(1)/usr/lib/lcdproc
  123. $(CP) $(foreach driver,$(LCDPROC_OTHER_DRIVERS),$(PKG_BUILD_DIR)/server/drivers/$(driver).so) $(1)/usr/lib/lcdproc/
  124. endef
  125. $(eval $(call BuildPackage,lcdproc-clients))
  126. $(eval $(call BuildPackage,lcdproc-server))
  127. $(eval $(call BuildPackage,lcdproc-drivers))