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.

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