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.

296 lines
6.4 KiB

  1. #
  2. # Copyright (C) 2007-2015 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:=lcd4linux
  9. PKG_RELEASE:=1
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=https://github.com/feckert/lcd4linux
  12. PKG_SOURCE_DATE:=2019-07-19
  13. PKG_SOURCE_VERSION:=0b83bb3a81e7e7f5c0aa1daa6f5b9abca538fd47
  14. PKG_MIRROR_HASH:=26a3469bce0648b276e2c818add7049685c7f461ea9669d23730dfc3a96d9934
  15. PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
  16. PKG_LICENSE:=GPL-2.0-or-later
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=1
  21. PKG_CONFIG_DEPENDS:= \
  22. $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_DRIVER_%,$(LCD4LINUX_DRIVERS)) \
  23. $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_PLUGIN_%,$(LCD4LINUX_PLUGINS)) \
  24. LCD4LINUX_DRIVERS:= \
  25. ASTUSB \
  26. BeckmannEgle \
  27. BWCT \
  28. CrystalFontz \
  29. Curses \
  30. Cwlinux \
  31. D4D \
  32. DPF \
  33. EA232graphic \
  34. EFN \
  35. FutabaVFD \
  36. FW8888 \
  37. G15 \
  38. GLCD2USB \
  39. IRLCD \
  40. $(if $(CONFIG_BROKEN),HD44780) \
  41. $(if $(CONFIG_BROKEN),HD44780-I2C) \
  42. LCD2USB \
  43. $(if $(CONFIG_BROKEN),LCDLinux) \
  44. LCDTerm \
  45. LEDMatrix \
  46. LPH7508 \
  47. $(if $(CONFIG_BROKEN),LUIse) \
  48. LW_ABP \
  49. M50530 \
  50. MatrixOrbital \
  51. MatrixOrbitalGX \
  52. MilfordInstruments \
  53. Newhaven \
  54. Noritake \
  55. NULL \
  56. Pertelian \
  57. PHAnderson \
  58. PICGraphic \
  59. picoLCD \
  60. picoLCDGraphic \
  61. PNG \
  62. PPM \
  63. $(if $(CONFIG_TARGET_rb532),RouterBoard) \
  64. $(if $(CONFIG_BROKEN),SamsungSPF) \
  65. ShuttleVFD \
  66. SimpleLCD \
  67. st2205 \
  68. T6963 \
  69. TeakLCM \
  70. $(if $(CONFIG_TARGET_ar71xx),TEW673GRU) \
  71. Trefon \
  72. USBHUB \
  73. USBLCD \
  74. VNC \
  75. WincorNixdorf \
  76. # ULA200 \
  77. # X11 \
  78. LCD4LINUX_PLUGINS:= \
  79. apm \
  80. asterisk \
  81. button_exec \
  82. cpuinfo \
  83. dbus \
  84. diskstats \
  85. dvb \
  86. event \
  87. exec \
  88. fifo \
  89. file \
  90. gps \
  91. hddtemp \
  92. huawei \
  93. i2c_sensors \
  94. iconv \
  95. imon \
  96. isdn \
  97. kvv \
  98. loadavg \
  99. netdev \
  100. netinfo \
  101. meminfo \
  102. mpd \
  103. mpris_dbus \
  104. mysql \
  105. netdev \
  106. pop3 \
  107. ppp \
  108. proc_stat \
  109. qnaplog \
  110. seti \
  111. statfs \
  112. uname \
  113. uptime \
  114. w1retap \
  115. $(if $(CONFIG_BROKEN),wireless) \
  116. xmms \
  117. # python
  118. include $(INCLUDE_DIR)/package.mk
  119. include $(INCLUDE_DIR)/nls.mk
  120. define Package/lcd4linux/Default
  121. SECTION:=utils
  122. CATEGORY:=Utilities
  123. TITLE:=LCD display utility
  124. URL:=http://lcd4linux.bulix.org/
  125. endef
  126. define Package/lcd4linux/Default/description
  127. LCD4Linux is a small program that grabs information from the kernel and
  128. some subsystems and displays it on an external liquid crystal display.
  129. endef
  130. define Package/lcd4linux-custom
  131. $(call Package/lcd4linux/Default)
  132. DEPENDS:= \
  133. +LCD4LINUX_CUSTOM_NEEDS_libdbus:libdbus \
  134. +LCD4LINUX_CUSTOM_NEEDS_libgd:libgd \
  135. $(if $(ICONV_FULL),+LCD4LINUX_CUSTOM_NEEDS_libiconv:libiconv-full) \
  136. +LCD4LINUX_CUSTOM_NEEDS_libjpeg:libjpeg \
  137. +LCD4LINUX_CUSTOM_NEEDS_libmpdclient:libmpdclient \
  138. +LCD4LINUX_CUSTOM_NEEDS_libmysqlclient:libmysqlclient \
  139. +LCD4LINUX_CUSTOM_NEEDS_libncurses:libncurses \
  140. +LCD4LINUX_CUSTOM_NEEDS_libsqlite3:libsqlite3 \
  141. +LCD4LINUX_CUSTOM_NEEDS_libusb:libusb-compat \
  142. # +LCD4LINUX_CUSTOM_NEEDS_libftdi:libftdi \
  143. # +LCD4LINUX_CUSTOM_NEEDS_libX11:libX11 \
  144. # +LCD4LINUX_CUSTOM_NEEDS_python:python
  145. MENU:=1
  146. PROVIDES:=lcd4linux
  147. VARIANT=custom
  148. endef
  149. define Package/lcd4linux-custom/config
  150. source "$(SOURCE)/Config.in"
  151. endef
  152. define Package/lcd4linux-custom/description
  153. $(call Package/lcd4linux/Default/description)
  154. .
  155. This package contains a customized version of LCD4Linux.
  156. endef
  157. define Package/lcd4linux-full
  158. $(call Package/lcd4linux/Default)
  159. DEPENDS:= @DEVEL \
  160. +libdbus \
  161. +libgd \
  162. $(if $(ICONV_FULL),+libiconv-full) \
  163. +libmpdclient \
  164. +libmysqlclient \
  165. +libncurses \
  166. +libsqlite3 \
  167. +libusb-compat \
  168. # +libftdi \
  169. # +libX11 \
  170. # +python
  171. PROVIDES:=lcd4linux
  172. VARIANT=full
  173. endef
  174. define Package/lcd4linux-full/description
  175. $(call Package/lcd4linux/Default/description)
  176. .
  177. This package contains a version of LCD4Linux built with all supported
  178. drivers and plugins.
  179. endef
  180. CONFIGURE_ARGS+= \
  181. --disable-rpath
  182. TARGET_CFLAGS += -std=gnu89
  183. ifeq ($(BUILD_VARIANT),custom)
  184. LCD4LINUX_CUSTOM_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
  185. $(if $(CONFIG_LCD4LINUX_CUSTOM_DRIVER_$(c)),$(c),) \
  186. ))
  187. ifeq ($(LCD4LINUX_CUSTOM_DRIVERS),)
  188. LCD4LINUX_CUSTOM_DRIVERS:=Sample
  189. endif
  190. LCD4LINUX_CUSTOM_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
  191. $(if $(CONFIG_LCD4LINUX_CUSTOM_PLUGIN_$(c)),$(c)) \
  192. ))
  193. ifeq ($(LCD4LINUX_CUSTOM_PLUGINS),)
  194. LCD4LINUX_CUSTOM_PLUGINS:=sample
  195. endif
  196. CONFIGURE_ARGS+= \
  197. --with-drivers="$(LCD4LINUX_CUSTOM_DRIVERS)" \
  198. --with-plugins="$(LCD4LINUX_CUSTOM_PLUGINS)" \
  199. ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libiconv),)
  200. CONFIGURE_ARGS+= --with-libiconv-prefix="$(ICONV_PREFIX)"
  201. else
  202. CONFIGURE_ARGS+= --without-libiconv-prefix
  203. endif
  204. ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libmysqlclient),)
  205. EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
  206. endif
  207. # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_python),)
  208. # CONFIGURE_ARGS+= --with-python
  209. # else
  210. CONFIGURE_ARGS+= --without-python
  211. # endif
  212. # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libX11),)
  213. # CONFIGURE_ARGS+= --with-x
  214. # else
  215. CONFIGURE_ARGS+= --without-x
  216. # endif
  217. endif
  218. ifeq ($(BUILD_VARIANT),full)
  219. LCD4LINUX_FULL_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
  220. $(c) \
  221. ))
  222. LCD4LINUX_FULL_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
  223. $(c) \
  224. ))
  225. CONFIGURE_ARGS+= \
  226. --with-drivers="$(LCD4LINUX_FULL_DRIVERS)" \
  227. --with-plugins="$(LCD4LINUX_FULL_PLUGINS)" \
  228. --with-libiconv-prefix="$(ICONV_PREFIX)" \
  229. --without-python \
  230. --without-x
  231. EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
  232. endif
  233. define Package/lcd4linux/conffiles
  234. /etc/lcd4linux.conf
  235. endef
  236. define Package/lcd4linux/install
  237. $(INSTALL_DIR) $(1)/usr/bin
  238. $(CP) $(PKG_INSTALL_DIR)/usr/bin/lcd4linux $(1)/usr/bin/
  239. $(INSTALL_DIR) $(1)/etc
  240. $(INSTALL_CONF) $(PKG_BUILD_DIR)/lcd4linux.conf.sample $(1)/etc/lcd4linux.conf
  241. $(INSTALL_DIR) $(1)/etc/init.d
  242. $(INSTALL_BIN) ./files/lcd4linux.init $(1)/etc/init.d/lcd4linux
  243. $(SED) "s|^\(Display 'GLCD2USB'\)|#\1|g" \
  244. -e "s|^\(Layout 'TestLayer'\)|#\1|g" \
  245. -e "s|^#\(Display 'Image'\)|\1|g" \
  246. -e "s|^#\(Layout 'Default'\)|\1|g" \
  247. $(1)/etc/lcd4linux.conf
  248. endef
  249. Package/lcd4linux-custom/conffiles = $(Package/lcd4linux/conffiles)
  250. Package/lcd4linux-custom/install = $(Package/lcd4linux/install)
  251. Package/lcd4linux-full/conffiles = $(Package/lcd4linux/conffiles)
  252. Package/lcd4linux-full/install = $(Package/lcd4linux/install)
  253. $(eval $(call BuildPackage,lcd4linux-custom))
  254. $(eval $(call BuildPackage,lcd4linux-full))