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