2 # Copyright (C) 2008-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
15 PKG_MD5SUM:=8aea6f3bb0dc9fdb52ed3f0e9d84fa79
20 include $(INCLUDE_DIR)/package.mk
26 define Package/$(PKG_NAME)/Default
27 TITLE:=OWFS (1-Wire File System)
28 URL:=http://owfs.sourceforge.net/
34 define Package/$(PKG_NAME)/Default/description
35 OWFS is a suite of programs that designed to make the 1-wire bus and its
36 devices easily accessible. The underlying priciple is to create a virtual
37 filesystem, with the unique ID being the directory, and the individual
38 properties of the device are represented as simple files that can be read
41 Details of the individual slave or master design are hidden behind a
42 consistent interface. The goal is to provide an easy set of tools for a
43 software designer to create monitoring or control applications. There are
44 some performance enhancements in the implementation, including data caching,
45 parallel access to bus masters, and aggregation of device communication.
46 Still the fundemental goal has been ease of use, flexibility and correctness
50 define Package/owfs-server
51 $(call Package/$(PKG_NAME)/Default)
52 DEPENDS:=+libow +libpthread
55 define Package/owfs/Library
56 $(call Package/owfs/Default)
61 define Package/owfs/Utility
62 $(call Package/owfs/Default)
68 define Package/owfs-server/Install
69 $(INSTALL_DIR) $(1)/usr/bin
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin/
79 $(call Package/owfs/Library)
80 DEPENDS:=+libusb +libpthread
81 TITLE:=OWFS - common shared library
84 define Package/libow/description
85 $(call Package/$(PKG_NAME)/Default/description)
87 This package contains the OWFS library.
90 define Package/libow-capi
91 $(call Package/owfs/Library)
93 TITLE:=OWFS - C-API library
96 define Package/libow-capi/description
97 $(call Package/$(PKG_NAME)/Default/description)
99 This package contains the OWFS C-API library.
106 define Package/owshell
107 $(call Package/owfs/Utility)
108 TITLE:=OWFS - shell utilities
111 define Package/owshell/description
112 $(call Package/$(PKG_NAME)/Default/description)
114 This package contains the OWFS shell utilities.
118 $(call Package/owfs/Utility)
119 # libfuse depends on kmod-fuse, no need to declare dependency
120 DEPENDS+= +libfuse +fuse-utils
121 TITLE:=OWFS - fuse file system
124 define Package/owfs/description
125 $(call Package/$(PKG_NAME)/Default/description)
127 This package contains the OWFS fuse filesystem.
134 define Package/owhttpd
135 $(call Package/owfs-server)
136 TITLE:=OWFS - http server
139 define Package/owhttpd/description
140 $(call Package/$(PKG_NAME)/Default/description)
142 This package contains the OWFS http server.
145 define Package/owftpd
146 $(call Package/owfs-server)
147 TITLE:=OWFS - ftp server
150 define Package/owftpd/description
151 $(call Package/$(PKG_NAME)/Default/description)
153 This package contains the OWFS ftp server.
156 define Package/owserver
157 $(call Package/owfs-server)
158 TITLE:=OWFS - network server
161 define Package/owserver/description
162 $(call Package/$(PKG_NAME)/Default/description)
164 This package contains the OWFS network server.
167 PKG_CONFIGURE_OPTS:= \
173 --disable-libow-perl \
186 --with-fuseinclude="$(STAGING_DIR)/usr/include" \
187 --with-fuselib="$(STAGING_DIR)/usr/lib" \
188 $(PKG_CONFIGURE_OPTS) \
192 define Build/Configure
193 (cd $(PKG_BUILD_DIR); \
194 rm -rf config.{status,cache} ; \
196 $(TARGET_CONFIGURE_OPTS) \
197 CFLAGS="$(TARGET_CFLAGS)" \
198 CPPFLAGS="$(TARGET_CPPFLAGS)" \
199 LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -Wl,-rpath-link=$(TOOLCHAIN_DIR)/usr/lib" \
200 lt_cv_sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
201 lt_cv_sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
208 define Build/InstallDev
209 $(INSTALL_DIR) $(STAGING_DIR)/usr/include
210 $(CP) $(PKG_INSTALL_DIR)/usr/include/{owcapi,owfs_config}.h $(STAGING_DIR)/usr/include/
211 $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
212 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libow-*.so* $(PKG_INSTALL_DIR)/usr/lib/libowcapi-*.so* $(STAGING_DIR)/usr/lib/
215 define Build/UninstallDev
216 rm -rf $(STAGING_DIR)/usr/include/{libow-capi,owfs_config}.h \
217 $(STAGING_DIR)/usr/lib/libow-capi-*.so* \
218 $(STAGING_DIR)/usr/lib/libow-*.so*
222 define Package/owfs/install
223 $(INSTALL_DIR) $(1)/usr/bin
224 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owfs $(1)/usr/bin/
227 define Package/owshell/install
228 $(INSTALL_DIR) $(1)/usr/bin
229 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owread $(1)/usr/bin/
230 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owwrite $(1)/usr/bin/
231 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owdir $(1)/usr/bin/
232 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owpresent $(1)/usr/bin/
236 define Package/owserver/install
237 $(call Package/owfs-server/Install,$(1),owserver,70)
240 define Package/owhttpd/install
241 $(call Package/owfs-server/Install,$(1),owhttpd,80)
244 define Package/owftpd/install
245 $(call Package/owfs-server/Install,$(1),owftpd,80)
249 define Package/libow/install
250 $(INSTALL_DIR) $(1)/usr/lib
251 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libow-*.so.* $(1)/usr/lib/
254 define Package/libow-capi/install
255 $(INSTALL_DIR) $(1)/usr/lib
256 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libowcapi-*.so.* $(1)/usr/lib/
257 #$(INSTALL_DIR) $(1)/usr/include
258 #$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/{owcapi,owfs_config}.h $(1)/usr/include/
262 $(eval $(call BuildPackage,owfs))
263 $(eval $(call BuildPackage,owshell))
265 $(eval $(call BuildPackage,owserver))
266 $(eval $(call BuildPackage,owhttpd))
267 $(eval $(call BuildPackage,owftpd))
269 $(eval $(call BuildPackage,libow))
270 $(eval $(call BuildPackage,libow-capi))