Makefile 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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. libdbus \
  116. libgd \
  117. libmpdclient \
  118. libmysqlclient \
  119. libncurses \
  120. libnmeap \
  121. libsqlite3 \
  122. ppp \
  123. # libftdi \
  124. # libX11 \
  125. # python \
  126. PKG_CONFIG_DEPENDS:= \
  127. $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_DRIVER_%,$(LCD4LINUX_DRIVERS)) \
  128. $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_PLUGIN_%,$(LCD4LINUX_PLUGINS)) \
  129. include $(INCLUDE_DIR)/package.mk
  130. include $(INCLUDE_DIR)/nls.mk
  131. define Package/lcd4linux/Default
  132. SECTION:=utils
  133. CATEGORY:=Utilities
  134. PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
  135. TITLE:=LCD display utility
  136. URL:=http://lcd4linux.bulix.org/
  137. endef
  138. define Package/lcd4linux/Default/description
  139. LCD4Linux is a small program that grabs information from the kernel and
  140. some subsystems and displays it on an external liquid crystal display.
  141. endef
  142. define Package/lcd4linux-custom
  143. $(call Package/lcd4linux/Default)
  144. DEPENDS:= \
  145. +LCD4LINUX_CUSTOM_NEEDS_libdbus:libdbus \
  146. +LCD4LINUX_CUSTOM_NEEDS_libgd:libgd \
  147. $(if $(ICONV_FULL),+LCD4LINUX_CUSTOM_NEEDS_libiconv:libiconv-full) \
  148. +LCD4LINUX_CUSTOM_NEEDS_libjpeg:libjpeg \
  149. +LCD4LINUX_CUSTOM_NEEDS_libmpdclient:libmpdclient \
  150. +LCD4LINUX_CUSTOM_NEEDS_libmysqlclient:libmysqlclient \
  151. +LCD4LINUX_CUSTOM_NEEDS_libncurses:libncurses \
  152. +LCD4LINUX_CUSTOM_NEEDS_libsqlite3:libsqlite3 \
  153. +LCD4LINUX_CUSTOM_NEEDS_libusb:libusb-compat \
  154. # +LCD4LINUX_CUSTOM_NEEDS_libftdi:libftdi \
  155. # +LCD4LINUX_CUSTOM_NEEDS_libX11:libX11 \
  156. # +LCD4LINUX_CUSTOM_NEEDS_python:python
  157. MENU:=1
  158. PROVIDES:=lcd4linux
  159. VARIANT=custom
  160. endef
  161. define Package/lcd4linux-custom/config
  162. source "$(SOURCE)/Config.in"
  163. endef
  164. define Package/lcd4linux-custom/description
  165. $(call Package/lcd4linux/Default/description)
  166. .
  167. This package contains a customized version of LCD4Linux.
  168. endef
  169. define Package/lcd4linux-full
  170. $(call Package/lcd4linux/Default)
  171. DEPENDS:= @DEVEL \
  172. +libdbus \
  173. +libgd \
  174. $(if $(ICONV_FULL),+libiconv-full) \
  175. +libmpdclient \
  176. +libmysqlclient \
  177. +libncurses \
  178. +libsqlite3 \
  179. +libusb-compat \
  180. # +libftdi \
  181. # +libX11 \
  182. # +python
  183. PROVIDES:=lcd4linux
  184. VARIANT=full
  185. endef
  186. define Package/lcd4linux-full/description
  187. $(call Package/lcd4linux/Default/description)
  188. .
  189. This package contains a version of LCD4Linux built with all supported
  190. drivers and plugins.
  191. endef
  192. CONFIGURE_ARGS+= \
  193. --disable-rpath \
  194. EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
  195. ifeq ($(BUILD_VARIANT),custom)
  196. LCD4LINUX_CUSTOM_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
  197. $(if $(CONFIG_LCD4LINUX_CUSTOM_DRIVER_$(c)),$(c),) \
  198. ))
  199. ifeq ($(LCD4LINUX_CUSTOM_DRIVERS),)
  200. LCD4LINUX_CUSTOM_DRIVERS:=Sample
  201. endif
  202. LCD4LINUX_CUSTOM_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
  203. $(if $(CONFIG_LCD4LINUX_CUSTOM_PLUGIN_$(c)),$(c)) \
  204. ))
  205. ifeq ($(LCD4LINUX_CUSTOM_PLUGINS),)
  206. LCD4LINUX_CUSTOM_PLUGINS:=sample
  207. endif
  208. CONFIGURE_ARGS+= \
  209. --with-drivers="$(LCD4LINUX_CUSTOM_DRIVERS)" \
  210. --with-plugins="$(LCD4LINUX_CUSTOM_PLUGINS)" \
  211. ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libiconv),)
  212. CONFIGURE_ARGS+= --with-libiconv-prefix="$(ICONV_PREFIX)"
  213. else
  214. CONFIGURE_ARGS+= --without-libiconv-prefix
  215. endif
  216. ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libmysqlclient),)
  217. EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
  218. endif
  219. # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_python),)
  220. # CONFIGURE_ARGS+= --with-python
  221. # else
  222. CONFIGURE_ARGS+= --without-python
  223. # endif
  224. # ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libX11),)
  225. # CONFIGURE_ARGS+= --with-x
  226. # else
  227. CONFIGURE_ARGS+= --without-x
  228. # endif
  229. endif
  230. ifeq ($(BUILD_VARIANT),full)
  231. LCD4LINUX_FULL_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
  232. $(c) \
  233. ))
  234. LCD4LINUX_FULL_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
  235. $(c) \
  236. ))
  237. CONFIGURE_ARGS+= \
  238. --with-drivers="$(LCD4LINUX_FULL_DRIVERS)" \
  239. --with-plugins="$(LCD4LINUX_FULL_PLUGINS)" \
  240. --with-libiconv-prefix="$(ICONV_PREFIX)" \
  241. --without-python \
  242. --without-x \
  243. EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
  244. endif
  245. define Package/lcd4linux/conffiles
  246. /etc/lcd4linux.conf
  247. endef
  248. define Package/lcd4linux/install
  249. $(INSTALL_DIR) $(1)/usr/bin
  250. $(CP) $(PKG_INSTALL_DIR)/usr/bin/lcd4linux $(1)/usr/bin/
  251. $(INSTALL_DIR) $(1)/etc
  252. $(INSTALL_CONF) $(PKG_BUILD_DIR)/lcd4linux.conf.sample $(1)/etc/lcd4linux.conf
  253. $(INSTALL_DIR) $(1)/etc/init.d
  254. $(INSTALL_BIN) ./files/lcd4linux.init $(1)/etc/init.d/lcd4linux
  255. $(SED) "s|^\(Display 'GLCD2USB'\)|#\1|g" \
  256. -e "s|^\(Layout 'TestLayer'\)|#\1|g" \
  257. -e "s|^#\(Display 'Image'\)|\1|g" \
  258. -e "s|^#\(Layout 'Default'\)|\1|g" \
  259. $(1)/etc/lcd4linux.conf
  260. endef
  261. Package/lcd4linux-custom/conffiles = $(Package/lcd4linux/conffiles)
  262. Package/lcd4linux-custom/install = $(Package/lcd4linux/install)
  263. Package/lcd4linux-full/conffiles = $(Package/lcd4linux/conffiles)
  264. Package/lcd4linux-full/install = $(Package/lcd4linux/install)
  265. $(eval $(call BuildPackage,lcd4linux-custom))
  266. $(eval $(call BuildPackage,lcd4linux-full))