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.

167 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:=1
  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
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_FIXUP:=autoreconf
  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. # not everything groks --disable-nls
  86. DISABLE_NLS:=
  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. # can't use -Wformat=2 because MUSL is somewhat broken
  94. TARGET_CFLAGS+=-Wall
  95. MAKE_FLAGS += \
  96. CFLAGS="$(TARGET_CFLAGS)" \
  97. LDFLAGS="$(TARGET_LDFLAGS)"
  98. define Package/lcdproc-clients/install
  99. $(INSTALL_DIR) $(1)/usr/bin
  100. $(INSTALL_DIR) $(1)/etc/init.d
  101. $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdproc/lcdproc $(1)/usr/bin/
  102. $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdexec/lcdexec $(1)/usr/bin/
  103. $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdvc/lcdvc $(1)/usr/bin/
  104. $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdproc/lcdproc.conf $(1)/etc/
  105. $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdexec/lcdexec.conf $(1)/etc/
  106. $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdvc/lcdvc.conf $(1)/etc/
  107. $(INSTALL_BIN) ./files/lcd* $(1)/etc/init.d/
  108. endef
  109. define Package/lcdproc-server/install
  110. $(INSTALL_DIR) $(1)/usr/sbin
  111. $(INSTALL_DIR) $(1)/usr/lib/lcdproc
  112. $(INSTALL_DIR) $(1)/etc/init.d
  113. $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/LCDd $(1)/usr/sbin/
  114. $(CP) $(foreach driver,$(LCDPROC_CORE_DRIVERS),$(PKG_BUILD_DIR)/server/drivers/$(driver).so) $(1)/usr/lib/lcdproc/
  115. $(CP) -p $(PKG_BUILD_DIR)/LCDd.conf $(PKG_BUILD_DIR)/LCDd.conf.orig
  116. sed -i -r \
  117. -e 's!^(DriverPath=).*$$$$!\1/usr/lib/lcdproc/!' \
  118. -e 's!^(Driver=)curses$$$$!\1sdeclcd!' \
  119. $(PKG_BUILD_DIR)/LCDd.conf
  120. $(INSTALL_CONF) $(PKG_BUILD_DIR)/LCDd.conf $(1)/etc/
  121. $(INSTALL_BIN) ./files/LCDd $(1)/etc/init.d/
  122. endef
  123. define Package/lcdproc-drivers/install
  124. $(INSTALL_DIR) $(1)/usr/lib/lcdproc
  125. $(CP) $(foreach driver,$(LCDPROC_OTHER_DRIVERS),$(PKG_BUILD_DIR)/server/drivers/$(driver).so) $(1)/usr/lib/lcdproc/
  126. endef
  127. $(eval $(call BuildPackage,lcdproc-clients))
  128. $(eval $(call BuildPackage,lcdproc-server))
  129. $(eval $(call BuildPackage,lcdproc-drivers))