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.

294 lines
6.3 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:=7
  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_BROKEN),SamsungSPF) \
  64. ShuttleVFD \
  65. SimpleLCD \
  66. st2205 \
  67. T6963 \
  68. TeakLCM \
  69. Trefon \
  70. USBHUB \
  71. USBLCD \
  72. VNC \
  73. WincorNixdorf \
  74. # ULA200 \
  75. # X11 \
  76. LCD4LINUX_PLUGINS:= \
  77. apm \
  78. asterisk \
  79. button_exec \
  80. cpuinfo \
  81. dbus \
  82. diskstats \
  83. dvb \
  84. event \
  85. exec \
  86. fifo \
  87. file \
  88. gps \
  89. hddtemp \
  90. huawei \
  91. i2c_sensors \
  92. iconv \
  93. imon \
  94. isdn \
  95. kvv \
  96. loadavg \
  97. netdev \
  98. netinfo \
  99. meminfo \
  100. mpd \
  101. mpris_dbus \
  102. mysql \
  103. netdev \
  104. pop3 \
  105. ppp \
  106. proc_stat \
  107. qnaplog \
  108. seti \
  109. statfs \
  110. uname \
  111. uptime \
  112. w1retap \
  113. $(if $(CONFIG_BROKEN),wireless) \
  114. xmms \
  115. # python
  116. include $(INCLUDE_DIR)/package.mk
  117. include $(INCLUDE_DIR)/nls.mk
  118. define Package/lcd4linux/Default
  119. SECTION:=utils
  120. CATEGORY:=Utilities
  121. TITLE:=LCD display utility
  122. URL:=http://lcd4linux.bulix.org/
  123. endef
  124. define Package/lcd4linux/Default/description
  125. LCD4Linux is a small program that grabs information from the kernel and
  126. some subsystems and displays it on an external liquid crystal display.
  127. endef
  128. define Package/lcd4linux-custom
  129. $(call Package/lcd4linux/Default)
  130. DEPENDS:= \
  131. +LCD4LINUX_CUSTOM_NEEDS_libdbus:libdbus \
  132. +LCD4LINUX_CUSTOM_NEEDS_libgd:libgd \
  133. $(if $(ICONV_FULL),+LCD4LINUX_CUSTOM_NEEDS_libiconv:libiconv-full) \
  134. +LCD4LINUX_CUSTOM_NEEDS_libjpeg:libjpeg \
  135. +LCD4LINUX_CUSTOM_NEEDS_libmpdclient:libmpdclient \
  136. +LCD4LINUX_CUSTOM_NEEDS_libmysqlclient:libmysqlclient \
  137. +LCD4LINUX_CUSTOM_NEEDS_libncurses:libncurses \
  138. +LCD4LINUX_CUSTOM_NEEDS_libsqlite3:libsqlite3 \
  139. +LCD4LINUX_CUSTOM_NEEDS_libusb:libusb-compat \
  140. # +LCD4LINUX_CUSTOM_NEEDS_libftdi:libftdi \
  141. # +LCD4LINUX_CUSTOM_NEEDS_libX11:libX11 \
  142. # +LCD4LINUX_CUSTOM_NEEDS_python:python
  143. MENU:=1
  144. PROVIDES:=lcd4linux
  145. VARIANT=custom
  146. endef
  147. define Package/lcd4linux-custom/config
  148. source "$(SOURCE)/Config.in"
  149. endef
  150. define Package/lcd4linux-custom/description
  151. $(call Package/lcd4linux/Default/description)
  152. .
  153. This package contains a customized version of LCD4Linux.
  154. endef
  155. define Package/lcd4linux-full
  156. $(call Package/lcd4linux/Default)
  157. DEPENDS:= @DEVEL \
  158. +libdbus \
  159. +libgd \
  160. $(if $(ICONV_FULL),+libiconv-full) \
  161. +libmpdclient \
  162. +libmysqlclient \
  163. +libncurses \
  164. +libsqlite3 \
  165. +libusb-compat \
  166. # +libftdi \
  167. # +libX11 \
  168. # +python
  169. PROVIDES:=lcd4linux
  170. VARIANT=full
  171. endef
  172. define Package/lcd4linux-full/description
  173. $(call Package/lcd4linux/Default/description)
  174. .
  175. This package contains a version of LCD4Linux built with all supported
  176. drivers and plugins.
  177. endef
  178. CONFIGURE_ARGS+= \
  179. --disable-rpath
  180. TARGET_CFLAGS += -std=gnu89
  181. ifeq ($(BUILD_VARIANT),custom)
  182. LCD4LINUX_CUSTOM_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
  183. $(if $(CONFIG_LCD4LINUX_CUSTOM_DRIVER_$(c)),$(c),) \
  184. ))
  185. ifeq ($(LCD4LINUX_CUSTOM_DRIVERS),)
  186. LCD4LINUX_CUSTOM_DRIVERS:=Sample
  187. endif
  188. LCD4LINUX_CUSTOM_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
  189. $(if $(CONFIG_LCD4LINUX_CUSTOM_PLUGIN_$(c)),$(c)) \
  190. ))
  191. ifeq ($(LCD4LINUX_CUSTOM_PLUGINS),)
  192. LCD4LINUX_CUSTOM_PLUGINS:=sample
  193. endif
  194. CONFIGURE_ARGS+= \
  195. --with-drivers="$(LCD4LINUX_CUSTOM_DRIVERS)" \
  196. --with-plugins="$(LCD4LINUX_CUSTOM_PLUGINS)" \
  197. ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libiconv),)
  198. CONFIGURE_ARGS+= --with-libiconv-prefix="$(ICONV_PREFIX)"
  199. else
  200. CONFIGURE_ARGS+= --without-libiconv-prefix
  201. endif
  202. ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libmysqlclient),)
  203. EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
  204. endif
  205. # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_python),)
  206. # CONFIGURE_ARGS+= --with-python
  207. # else
  208. CONFIGURE_ARGS+= --without-python
  209. # endif
  210. # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libX11),)
  211. # CONFIGURE_ARGS+= --with-x
  212. # else
  213. CONFIGURE_ARGS+= --without-x
  214. # endif
  215. endif
  216. ifeq ($(BUILD_VARIANT),full)
  217. LCD4LINUX_FULL_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
  218. $(c) \
  219. ))
  220. LCD4LINUX_FULL_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
  221. $(c) \
  222. ))
  223. CONFIGURE_ARGS+= \
  224. --with-drivers="$(LCD4LINUX_FULL_DRIVERS)" \
  225. --with-plugins="$(LCD4LINUX_FULL_PLUGINS)" \
  226. --with-libiconv-prefix="$(ICONV_PREFIX)" \
  227. --without-python \
  228. --without-x
  229. EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
  230. endif
  231. define Package/lcd4linux/conffiles
  232. /etc/lcd4linux.conf
  233. endef
  234. define Package/lcd4linux/install
  235. $(INSTALL_DIR) $(1)/usr/bin
  236. $(CP) $(PKG_INSTALL_DIR)/usr/bin/lcd4linux $(1)/usr/bin/
  237. $(INSTALL_DIR) $(1)/etc
  238. $(INSTALL_CONF) $(PKG_BUILD_DIR)/lcd4linux.conf.sample $(1)/etc/lcd4linux.conf
  239. $(INSTALL_DIR) $(1)/etc/init.d
  240. $(INSTALL_BIN) ./files/lcd4linux.init $(1)/etc/init.d/lcd4linux
  241. $(SED) "s|^\(Display 'GLCD2USB'\)|#\1|g" \
  242. -e "s|^\(Layout 'TestLayer'\)|#\1|g" \
  243. -e "s|^#\(Display 'Image'\)|\1|g" \
  244. -e "s|^#\(Layout 'Default'\)|\1|g" \
  245. $(1)/etc/lcd4linux.conf
  246. endef
  247. Package/lcd4linux-custom/conffiles = $(Package/lcd4linux/conffiles)
  248. Package/lcd4linux-custom/install = $(Package/lcd4linux/install)
  249. Package/lcd4linux-full/conffiles = $(Package/lcd4linux/conffiles)
  250. Package/lcd4linux-full/install = $(Package/lcd4linux/install)
  251. $(eval $(call BuildPackage,lcd4linux-custom))
  252. $(eval $(call BuildPackage,lcd4linux-full))