2 # Copyright (C) 2008-2014 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
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=@SF
/$(PKG_NAME
)
16 PKG_HASH
:=f7e11bae6cd29d58726e6d29b297834e5656d6069a407d798067ae25cb0812ea
17 PKG_MAINTAINER
:=Jo-Philipp Wich
<jo@mein.io
>
23 PKG_CONFIG_DEPENDS
:= \
24 CONFIG_LIBOW_MASTER_USB \
25 CONFIG_LIBOW_MASTER_I2C \
26 CONFIG_LIBOW_MASTER_W1 \
27 CONFIG_LIBOW_ZEROCONF \
29 CONFIG_LIBOW_OWTRAFFIC
31 include $(INCLUDE_DIR
)/package.mk
37 define Package
/owfs
/Default
38 TITLE
:=OWFS
(1-Wire File System
)
39 URL
:=http
://owfs.sourceforge.net
/
45 define Package
/owfs
/Default
/description
46 OWFS is a suite of programs that designed to make the
1-wire bus and its
47 devices easily accessible. The underlying principle is to create a virtual
48 filesystem
, with the unique ID being the directory
, and the individual
49 properties of the device are represented
as simple files that can be read
52 Details of the individual slave or master design are hidden behind a
53 consistent interface. The goal is to provide an easy set of tools for a
54 software designer to create monitoring or control applications. There are
55 some performance enhancements in the implementation
, including data caching
,
56 parallel access to bus masters
, and aggregation of device communication.
57 Still the fundemental goal has been ease of use
, flexibility and correctness
61 define Package
/owfs
/Server
62 $(call Package
/owfs
/Default
)
63 DEPENDS
:=+libow
+libpthread
66 define Package
/owfs
/Library
67 $(call Package
/owfs
/Default
)
72 define Package
/owfs
/Utility
73 $(call Package
/owfs
/Default
)
84 $(call Package
/owfs
/Library
)
87 +LIBOW_MASTER_USB
:libusb-compat \
88 +LIBOW_MASTER_W1
:kmod-w1
89 TITLE
:=OWFS
- common shared library
92 define Package
/libow
/config
93 source
"$(SOURCE)/Config.in"
96 define Package
/libow
/description
97 $(call Package
/owfs
/Default
/description
)
99 This package contains the OWFS library.
102 define Package
/libow-capi
103 $(call Package
/owfs
/Library
)
105 TITLE
:=OWFS
- C-API library
108 define Package
/libow-capi
/description
109 $(call Package
/owfs
/Default
/description
)
111 This package contains the OWFS C-API library.
118 define Package
/owshell
119 $(call Package
/owfs
/Utility
)
120 TITLE
:=OWFS
- shell utilities
121 DEPENDS
+= +USE_UCLIBC
:librpc
124 define Package
/owshell
/description
125 $(call Package
/owfs
/Default
/description
)
127 This package contains the OWFS
shell utilities.
131 $(call Package
/owfs
/Utility
)
132 # libfuse depends on kmod-fuse, no need to declare dependency
133 DEPENDS
+= +libfuse
+fuse-utils
134 TITLE
:=OWFS
- fuse file system
137 define Package
/owfs
/description
138 $(call Package
/owfs
/Default
/description
)
140 This package contains the OWFS fuse filesystem.
147 define Package
/owhttpd
148 $(call Package
/owfs
/Server
)
149 TITLE
:=OWFS
- http server
152 define Package
/owhttpd
/description
153 $(call Package
/owfs
/Default
/description
)
155 This package contains the OWFS http server.
158 define Package
/owftpd
159 $(call Package
/owfs
/Server
)
160 TITLE
:=OWFS
- ftp server
163 define Package
/owftpd
/description
164 $(call Package
/owfs
/Default
/description
)
166 This package contains the OWFS ftp server.
169 define Package
/owserver
170 $(call Package
/owfs
/Server
)
171 TITLE
:=OWFS
- network server
174 define Package
/owserver
/description
175 $(call Package
/owfs
/Default
/description
)
177 This package contains the OWFS network server.
185 --with-fuseinclude
="$(STAGING_DIR)/usr/include" \
186 --with-fuselib
="$(STAGING_DIR)/usr/lib" \
194 $(if
$(CONFIG_LIBOW_MASTER_USB
),--enable-usb
,--disable-usb
) \
195 $(if
$(CONFIG_LIBOW_MASTER_W1
),--enable-w1
,--disable-w1
) \
196 $(if
$(CONFIG_LIBOW_MASTER_I2C
),--enable-i2c
,--disable-i2c
) \
197 $(if
$(CONFIG_LIBOW_ZEROCONF
),--enable-zero
,--disable-zero
) \
198 $(if
$(CONFIG_LIBOW_DEBUG
),--enable-debug
,--disable-debug
) \
199 $(if
$(CONFIG_LIBOW_OWTRAFFIC
),--enable-owtraffic
,--disable-owtraffic
)
202 LDFLAGS
="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -Wl,-rpath-link=$(TOOLCHAIN_DIR)/usr/lib" \
203 lt_cv_sys_lib_dlsearch_path_spec
="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
204 lt_cv_sys_lib_search_path_spec
="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
209 HOST_CPU
="$(PKGARCH)"
211 define Build
/InstallDev
212 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/include
213 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ow
{capi
,fs_config
}.h
$(STAGING_DIR
)/usr
/include/
214 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/lib
215 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libow
{,capi
}*.so
* $(STAGING_DIR
)/usr
/lib
/
218 define Package
/owfs
/install
219 $(INSTALL_DIR
) $(1)/usr
/bin
220 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owfs
$(1)/usr
/bin
/
221 $(INSTALL_DIR
) $(1)/etc
/config
222 $(INSTALL_DATA
) .
/files
/owfs.conf
$(1)/etc
/config
/owfs
223 $(INSTALL_DIR
) $(1)/etc
/init.d
224 $(INSTALL_BIN
) .
/files
/owfs.init
$(1)/etc
/init.d
/owfs
225 mkdir
-p
$(1)/mnt
/owfs
228 define Package
/owfs
/conffiles
232 define Package
/owshell
/install
233 $(INSTALL_DIR
) $(1)/usr
/bin
234 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owget
$(1)/usr
/bin
/
235 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owread
$(1)/usr
/bin
/
236 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owwrite
$(1)/usr
/bin
/
237 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owdir
$(1)/usr
/bin
/
238 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owpresent
$(1)/usr
/bin
/
242 define Package
/owserver
/install
243 $(INSTALL_DIR
) $(1)/usr
/bin
244 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owserver
$(1)/usr
/bin
/
245 $(INSTALL_DIR
) $(1)/etc
/config
246 $(INSTALL_DATA
) .
/files
/owserver.conf
$(1)/etc
/config
/owserver
247 $(INSTALL_DIR
) $(1)/etc
/init.d
248 $(INSTALL_BIN
) .
/files
/owserver.init
$(1)/etc
/init.d
/owserver
251 define Package
/owserver
/conffiles
255 define Package
/owhttpd
/install
256 $(INSTALL_DIR
) $(1)/usr
/bin
257 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owhttpd
$(1)/usr
/bin
/
258 $(INSTALL_DIR
) $(1)/etc
/config
259 $(INSTALL_DATA
) .
/files
/owhttpd.conf
$(1)/etc
/config
/owhttpd
260 $(INSTALL_DIR
) $(1)/etc
/init.d
261 $(INSTALL_BIN
) .
/files
/owhttpd.init
$(1)/etc
/init.d
/owhttpd
264 define Package
/owhttpd
/conffiles
268 define Package
/owftpd
/install
269 $(INSTALL_DIR
) $(1)/usr
/bin
270 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/owftpd
$(1)/usr
/bin
/
271 $(INSTALL_DIR
) $(1)/etc
/config
272 $(INSTALL_DATA
) .
/files
/owftpd.conf
$(1)/etc
/config
/owftpd
273 $(INSTALL_DIR
) $(1)/etc
/init.d
274 $(INSTALL_BIN
) .
/files
/owftpd.init
$(1)/etc
/init.d
/owftpd
277 define Package
/owftpd
/conffiles
281 define Package
/libow
/install
282 $(INSTALL_DIR
) $(1)/usr
/lib
283 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libow-
*.so.
* $(1)/usr
/lib
/
286 define Package
/libow-capi
/install
287 $(INSTALL_DIR
) $(1)/usr
/lib
288 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libowcapi-
*.so.
* $(1)/usr
/lib
/
292 $(eval
$(call BuildPackage
,owfs
))
293 $(eval
$(call BuildPackage
,owshell
))
295 $(eval
$(call BuildPackage
,owserver
))
296 $(eval
$(call BuildPackage
,owhttpd
))
297 $(eval
$(call BuildPackage
,owftpd
))
299 $(eval
$(call BuildPackage
,libow
))
300 $(eval
$(call BuildPackage
,libow-capi
))