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.

304 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:=1204
  10. PKG_VERSION:=r$(PKG_REV)
  11. PKG_RELEASE:=1
  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. TARGET_CFLAGS += -std=gnu89
  188. EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
  189. ifeq ($(BUILD_VARIANT),custom)
  190. LCD4LINUX_CUSTOM_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
  191. $(if $(CONFIG_LCD4LINUX_CUSTOM_DRIVER_$(c)),$(c),) \
  192. ))
  193. ifeq ($(LCD4LINUX_CUSTOM_DRIVERS),)
  194. LCD4LINUX_CUSTOM_DRIVERS:=Sample
  195. endif
  196. LCD4LINUX_CUSTOM_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
  197. $(if $(CONFIG_LCD4LINUX_CUSTOM_PLUGIN_$(c)),$(c)) \
  198. ))
  199. ifeq ($(LCD4LINUX_CUSTOM_PLUGINS),)
  200. LCD4LINUX_CUSTOM_PLUGINS:=sample
  201. endif
  202. CONFIGURE_ARGS+= \
  203. --with-drivers="$(LCD4LINUX_CUSTOM_DRIVERS)" \
  204. --with-plugins="$(LCD4LINUX_CUSTOM_PLUGINS)" \
  205. ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libiconv),)
  206. CONFIGURE_ARGS+= --with-libiconv-prefix="$(ICONV_PREFIX)"
  207. else
  208. CONFIGURE_ARGS+= --without-libiconv-prefix
  209. endif
  210. ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libmysqlclient),)
  211. EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
  212. endif
  213. # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_python),)
  214. # CONFIGURE_ARGS+= --with-python
  215. # else
  216. CONFIGURE_ARGS+= --without-python
  217. # endif
  218. # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libX11),)
  219. # CONFIGURE_ARGS+= --with-x
  220. # else
  221. CONFIGURE_ARGS+= --without-x
  222. # endif
  223. endif
  224. ifeq ($(BUILD_VARIANT),full)
  225. LCD4LINUX_FULL_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
  226. $(c) \
  227. ))
  228. LCD4LINUX_FULL_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
  229. $(c) \
  230. ))
  231. CONFIGURE_ARGS+= \
  232. --with-drivers="$(LCD4LINUX_FULL_DRIVERS)" \
  233. --with-plugins="$(LCD4LINUX_FULL_PLUGINS)" \
  234. --with-libiconv-prefix="$(ICONV_PREFIX)" \
  235. --without-python \
  236. --without-x \
  237. EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
  238. endif
  239. define Package/lcd4linux/conffiles
  240. /etc/lcd4linux.conf
  241. endef
  242. define Package/lcd4linux/install
  243. $(INSTALL_DIR) $(1)/usr/bin
  244. $(CP) $(PKG_INSTALL_DIR)/usr/bin/lcd4linux $(1)/usr/bin/
  245. $(INSTALL_DIR) $(1)/etc
  246. $(INSTALL_CONF) $(PKG_BUILD_DIR)/lcd4linux.conf.sample $(1)/etc/lcd4linux.conf
  247. $(INSTALL_DIR) $(1)/etc/init.d
  248. $(INSTALL_BIN) ./files/lcd4linux.init $(1)/etc/init.d/lcd4linux
  249. $(SED) "s|^\(Display 'GLCD2USB'\)|#\1|g" \
  250. -e "s|^\(Layout 'TestLayer'\)|#\1|g" \
  251. -e "s|^#\(Display 'Image'\)|\1|g" \
  252. -e "s|^#\(Layout 'Default'\)|\1|g" \
  253. $(1)/etc/lcd4linux.conf
  254. endef
  255. Package/lcd4linux-custom/conffiles = $(Package/lcd4linux/conffiles)
  256. Package/lcd4linux-custom/install = $(Package/lcd4linux/install)
  257. Package/lcd4linux-full/conffiles = $(Package/lcd4linux/conffiles)
  258. Package/lcd4linux-full/install = $(Package/lcd4linux/install)
  259. $(eval $(call BuildPackage,lcd4linux-custom))
  260. $(eval $(call BuildPackage,lcd4linux-full))