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.

248 lines
6.0 KiB

  1. #
  2. # Copyright (C) 2008-2014 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:=owfs
  9. PKG_VERSION:=2.9p5
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/$(PKG_NAME)
  13. PKG_MD5SUM:=b5c20998e8ffc6fa3974daef99c02402
  14. PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_FIXUP:=autoreconf
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. #
  20. # templates
  21. #
  22. define Package/$(PKG_NAME)/Default
  23. TITLE:=OWFS (1-Wire File System)
  24. URL:=http://owfs.sourceforge.net/
  25. SECTION:=net
  26. CATEGORY:=Network
  27. SUBMENU:=Filesystem
  28. endef
  29. define Package/$(PKG_NAME)/Default/description
  30. OWFS is a suite of programs that designed to make the 1-wire bus and its
  31. devices easily accessible. The underlying priciple is to create a virtual
  32. filesystem, with the unique ID being the directory, and the individual
  33. properties of the device are represented as simple files that can be read
  34. and written.
  35. Details of the individual slave or master design are hidden behind a
  36. consistent interface. The goal is to provide an easy set of tools for a
  37. software designer to create monitoring or control applications. There are
  38. some performance enhancements in the implementation, including data caching,
  39. parallel access to bus masters, and aggregation of device communication.
  40. Still the fundemental goal has been ease of use, flexibility and correctness
  41. rather than speed.
  42. endef
  43. define Package/owfs/Server
  44. $(call Package/owfs/Default)
  45. DEPENDS:=+libow +libpthread
  46. endef
  47. define Package/owfs/Library
  48. $(call Package/owfs/Default)
  49. SECTION:=libs
  50. CATEGORY:=Libraries
  51. endef
  52. define Package/owfs/Utility
  53. $(call Package/owfs/Default)
  54. SECTION:=utils
  55. CATEGORY:=Utilities
  56. DEPENDS:=+libow
  57. endef
  58. #
  59. # shared libraries
  60. #
  61. define Package/libow
  62. $(call Package/owfs/Library)
  63. DEPENDS:=+libusb-compat +libpthread
  64. TITLE:=OWFS - common shared library
  65. endef
  66. define Package/libow/description
  67. $(call Package/$(PKG_NAME)/Default/description)
  68. This package contains the OWFS library.
  69. endef
  70. define Package/libow-capi
  71. $(call Package/owfs/Library)
  72. DEPENDS:=+libow
  73. TITLE:=OWFS - C-API library
  74. endef
  75. define Package/libow-capi/description
  76. $(call Package/$(PKG_NAME)/Default/description)
  77. This package contains the OWFS C-API library.
  78. endef
  79. #
  80. # utilities
  81. #
  82. define Package/owshell
  83. $(call Package/owfs/Utility)
  84. TITLE:=OWFS - shell utilities
  85. DEPENDS+= +USE_UCLIBC:librpc
  86. endef
  87. define Package/owshell/description
  88. $(call Package/$(PKG_NAME)/Default/description)
  89. This package contains the OWFS shell utilities.
  90. endef
  91. define Package/owfs
  92. $(call Package/owfs/Utility)
  93. # libfuse depends on kmod-fuse, no need to declare dependency
  94. DEPENDS+= +libfuse +fuse-utils
  95. TITLE:=OWFS - fuse file system
  96. endef
  97. define Package/owfs/description
  98. $(call Package/$(PKG_NAME)/Default/description)
  99. This package contains the OWFS fuse filesystem.
  100. endef
  101. #
  102. # network daemons
  103. #
  104. define Package/owhttpd
  105. $(call Package/owfs/Server)
  106. TITLE:=OWFS - http server
  107. endef
  108. define Package/owhttpd/description
  109. $(call Package/$(PKG_NAME)/Default/description)
  110. This package contains the OWFS http server.
  111. endef
  112. define Package/owftpd
  113. $(call Package/owfs/Server)
  114. TITLE:=OWFS - ftp server
  115. endef
  116. define Package/owftpd/description
  117. $(call Package/$(PKG_NAME)/Default/description)
  118. This package contains the OWFS ftp server.
  119. endef
  120. define Package/owserver
  121. $(call Package/owfs/Server)
  122. TITLE:=OWFS - network server
  123. endef
  124. define Package/owserver/description
  125. $(call Package/$(PKG_NAME)/Default/description)
  126. This package contains the OWFS network server.
  127. endef
  128. CONFIGURE_ARGS += \
  129. --enable-owftpd \
  130. --enable-owserver \
  131. --enable-owhttpd \
  132. --enable-owfs \
  133. --with-fuseinclude="$(STAGING_DIR)/usr/include" \
  134. --with-fuselib="$(STAGING_DIR)/usr/lib" \
  135. --enable-shared \
  136. --enable-zero \
  137. --disable-parport \
  138. --disable-ownet \
  139. --disable-owpython \
  140. --disable-owphp \
  141. --disable-owtcl \
  142. --disable-swig \
  143. CONFIGURE_VARS += \
  144. LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -Wl,-rpath-link=$(TOOLCHAIN_DIR)/usr/lib" \
  145. lt_cv_sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
  146. lt_cv_sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
  147. shrext_cmds=".so" \
  148. MAKE_FLAGS += \
  149. CC="$(TARGET_CC)" \
  150. HOST_CPU="$(PKGARCH)"
  151. define Build/InstallDev
  152. $(INSTALL_DIR) $(STAGING_DIR)/usr/include
  153. $(CP) $(PKG_INSTALL_DIR)/usr/include/ow{capi,fs_config}.h $(STAGING_DIR)/usr/include/
  154. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
  155. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libow{,capi}*.so* $(STAGING_DIR)/usr/lib/
  156. endef
  157. define Package/owfs/install
  158. $(INSTALL_DIR) $(1)/usr/bin
  159. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owfs $(1)/usr/bin/
  160. endef
  161. define Package/owshell/install
  162. $(INSTALL_DIR) $(1)/usr/bin
  163. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owget $(1)/usr/bin/
  164. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owread $(1)/usr/bin/
  165. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owwrite $(1)/usr/bin/
  166. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owdir $(1)/usr/bin/
  167. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owpresent $(1)/usr/bin/
  168. endef
  169. define Package/owserver/install
  170. $(INSTALL_DIR) $(1)/usr/bin
  171. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owserver $(1)/usr/bin/
  172. endef
  173. define Package/owhttpd/install
  174. $(INSTALL_DIR) $(1)/usr/bin
  175. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owhttpd $(1)/usr/bin/
  176. endef
  177. define Package/owftpd/install
  178. $(INSTALL_DIR) $(1)/usr/bin
  179. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owftpd $(1)/usr/bin/
  180. endef
  181. define Package/libow/install
  182. $(INSTALL_DIR) $(1)/usr/lib
  183. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libow-*.so.* $(1)/usr/lib/
  184. endef
  185. define Package/libow-capi/install
  186. $(INSTALL_DIR) $(1)/usr/lib
  187. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libowcapi-*.so.* $(1)/usr/lib/
  188. endef
  189. $(eval $(call BuildPackage,owfs))
  190. $(eval $(call BuildPackage,owshell))
  191. $(eval $(call BuildPackage,owserver))
  192. $(eval $(call BuildPackage,owhttpd))
  193. $(eval $(call BuildPackage,owftpd))
  194. $(eval $(call BuildPackage,libow))
  195. $(eval $(call BuildPackage,libow-capi))