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.

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