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
18 include $(INCLUDE_DIR
)/package.mk
24 define Package
/$(PKG_NAME
)/Default
25 TITLE
:=OWFS
(1-Wire File System
)
26 URL
:=http
://owfs.sourceforge.net
/
32 define Package
/$(PKG_NAME
)/Default
/description
33 OWFS is a suite of programs that designed to make the
1-wire bus and its
34 devices easily accessible. The underlying priciple is to create a virtual
35 filesystem
, with the unique ID being the directory
, and the individual
36 properties of the device are represented
as simple files that can be read
39 Details of the individual slave or master design are hidden behind a
40 consistent interface. The goal is to provide an easy set of tools for a
41 software designer to create monitoring or control applications. There are
42 some performance enhancements in the implementation
, including data caching
,
43 parallel access to bus masters
, and aggregation of device communication.
44 Still the fundemental goal has been ease of use
, flexibility and correctness
48 define Package
/owfs-server
49 $(call Package
/$(PKG_NAME
)/Default
)
50 DEPENDS
:=+libow
+libpthread
53 define Package
/owfs
/Library
54 $(call Package
/owfs
/Default
)
59 define Package
/owfs
/Utility
60 $(call Package
/owfs
/Default
)
66 define Package
/owfs-server
/Install
67 $(INSTALL_DIR
) $(1)/usr
/bin
68 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/$(2) $(1)/usr
/bin
/
77 $(call Package
/owfs
/Library
)
78 DEPENDS
:=+libusb
+libpthread
79 TITLE
:=OWFS
- common shared library
82 define Package
/libow
/description
83 $(call Package
/$(PKG_NAME
)/Default
/description
)
85 This package contains the OWFS library.
88 define Package
/libow-capi
89 $(call Package
/owfs
/Library
)
91 TITLE
:=OWFS
- C-API library
94 define Package
/libow-capi
/description
95 $(call Package
/$(PKG_NAME
)/Default
/description
)
97 This package contains the OWFS C-API library.
104 define Package
/owshell
105 $(call Package
/owfs
/Utility
)
106 TITLE
:=OWFS
- shell utilities
109 define Package
/owshell
/description
110 $(call Package
/$(PKG_NAME
)/Default
/description
)
112 This package contains the OWFS
shell utilities.
116 $(call Package
/owfs
/Utility
)
117 # libfuse depends on kmod-fuse, no need to declare dependency
118 DEPENDS
+= +libfuse
+fuse-utils
119 TITLE
:=OWFS
- fuse file system
122 define Package
/owfs
/description
123 $(call Package
/$(PKG_NAME
)/Default
/description
)
125 This package contains the OWFS fuse filesystem.
132 define Package
/owhttpd
133 $(call Package
/owfs-server
)
134 TITLE
:=OWFS
- http server
137 define Package
/owhttpd
/description
138 $(call Package
/$(PKG_NAME
)/Default
/description
)
140 This package contains the OWFS http server.
143 define Package
/owftpd
144 $(call Package
/owfs-server
)
145 TITLE
:=OWFS
- ftp server
148 define Package
/owftpd
/description
149 $(call Package
/$(PKG_NAME
)/Default
/description
)
151 This package contains the OWFS ftp server.
154 define Package
/owserver
155 $(call Package
/owfs-server
)
156 TITLE
:=OWFS
- network server
159 define Package
/owserver
/description
160 $(call Package
/$(PKG_NAME
)/Default
/description
)
162 This package contains the OWFS network server.
165 PKG_CONFIGURE_OPTS
:= \
171 --disable-libow-perl \
184 --with-fuseinclude
="$(STAGING_DIR)/usr/include" \
185 --with-fuselib
="$(STAGING_DIR)/usr/lib" \
186 $(PKG_CONFIGURE_OPTS
) \
190 define Build
/Configure
191 (cd
$(PKG_BUILD_DIR
); \
192 rm -rf config.
{status
,cache
} ; \
194 $(TARGET_CONFIGURE_OPTS
) \
195 CFLAGS
="$(TARGET_CFLAGS)" \
196 CPPFLAGS
="$(TARGET_CPPFLAGS)" \
197 LDFLAGS
="$(TARGET_LDFLAGS)" \
198 lt_sys_lib_dlsearch_path_spec
="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
199 lt_sys_lib_search_path_spec
="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
207 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
208 DESTDIR
="$(PKG_INSTALL_DIR)" \
212 define Build
/InstallDev
213 mkdir
-p
$(STAGING_DIR
)/usr
/include
214 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/{owcapi
,owfs_config
}.h
$(STAGING_DIR
)/usr
/include/
215 mkdir
-p
$(STAGING_DIR
)/usr
/lib
216 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libow-
*.so
* $(PKG_INSTALL_DIR
)/usr
/lib
/libowcapi-
*.so
* $(STAGING_DIR
)/usr
/lib
/
219 define Build
/UninstallDev
220 rm -rf
$(STAGING_DIR
)/usr
/include/{libow-capi
,owfs_config
}.h \
221 $(STAGING_DIR
)/usr
/lib
/libow-capi-
*.so
* \
222 $(STAGING_DIR
)/usr
/lib
/libow-
*.so
*
226 define Package
/owfs
/install
227 $(INSTALL_DIR
) $(1)/usr
/bin
228 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owfs
$(1)/usr
/bin
/
231 define Package
/owshell
/install
232 $(INSTALL_DIR
) $(1)/usr
/bin
233 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owread
$(1)/usr
/bin
/
234 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owwrite
$(1)/usr
/bin
/
235 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owdir
$(1)/usr
/bin
/
236 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owpresent
$(1)/usr
/bin
/
240 define Package
/owserver
/install
241 $(call Package
/owfs-server
/Install
,$(1),owserver
,70)
244 define Package
/owhttpd
/install
245 $(call Package
/owfs-server
/Install
,$(1),owhttpd
,80)
248 define Package
/owftpd
/install
249 $(call Package
/owfs-server
/Install
,$(1),owftpd
,80)
253 define Package
/libow
/install
254 $(INSTALL_DIR
) $(1)/usr
/lib
255 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libow-
*.so.
* $(1)/usr
/lib
/
258 define Package
/libow-capi
/install
259 $(INSTALL_DIR
) $(1)/usr
/lib
260 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libowcapi-
*.so.
* $(1)/usr
/lib
/
261 #$(INSTALL_DIR) $(1)/usr/include
262 #$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/{owcapi,owfs_config}.h $(1)/usr/include/
266 $(eval
$(call BuildPackage
,owfs
))
267 $(eval
$(call BuildPackage
,owshell
))
269 $(eval
$(call BuildPackage
,owserver
))
270 $(eval
$(call BuildPackage
,owhttpd
))
271 $(eval
$(call BuildPackage
,owftpd
))
273 $(eval
$(call BuildPackage
,libow
))
274 $(eval
$(call BuildPackage
,libow-capi
))