mariadb: update to 10.9.8
[feed/packages.git] / utils / owfs / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=owfs
11 PKG_VERSION:=3.2p4
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://github.com/owfs/owfs/releases/download/v$(PKG_VERSION)
16 PKG_HASH:=af0a5035f3f3df876ca15aea13486bfed6b3ef5409dee016db0be67755c35fcc
17
18 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
19 PKG_LICENSE:=GPL-2.0
20 PKG_CPE_ID:=cpe:/a:owfs:owfs
21
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24
25 PKG_CONFIG_DEPENDS:= \
26 CONFIG_LIBOW_MASTER_USB \
27 CONFIG_LIBOW_MASTER_I2C \
28 CONFIG_LIBOW_MASTER_W1 \
29 CONFIG_LIBOW_ZEROCONF \
30 CONFIG_LIBOW_DEBUG \
31 CONFIG_LIBOW_OWTRAFFIC
32
33 include $(INCLUDE_DIR)/package.mk
34
35 #
36 # templates
37 #
38
39 define Package/owfs/Default
40 TITLE:=OWFS (1-Wire File System)
41 URL:=https://github.com/owfs/owfs
42 SECTION:=net
43 CATEGORY:=Network
44 SUBMENU:=Filesystem
45 endef
46
47 define Package/owfs/Default/description
48 OWFS is a suite of programs that designed to make the 1-wire bus and its
49 devices easily accessible. The underlying principle is to create a virtual
50 filesystem, with the unique ID being the directory, and the individual
51 properties of the device are represented as simple files that can be read
52 and written.
53
54 Details of the individual slave or master design are hidden behind a
55 consistent interface. The goal is to provide an easy set of tools for a
56 software designer to create monitoring or control applications. There are
57 some performance enhancements in the implementation, including data caching,
58 parallel access to bus masters, and aggregation of device communication.
59 Still the fundemental goal has been ease of use, flexibility and correctness
60 rather than speed.
61 endef
62
63 define Package/owfs/Server
64 $(call Package/owfs/Default)
65 DEPENDS:=+libow +libpthread
66 endef
67
68 define Package/owfs/Library
69 $(call Package/owfs/Default)
70 SECTION:=libs
71 CATEGORY:=Libraries
72 endef
73
74 define Package/owfs/Utility
75 $(call Package/owfs/Default)
76 SECTION:=utils
77 CATEGORY:=Utilities
78 DEPENDS:=+libow
79 endef
80
81 #
82 # shared libraries
83 #
84
85 define Package/libow
86 $(call Package/owfs/Library)
87 DEPENDS:= \
88 +libpthread \
89 +LIBOW_MASTER_USB:libusb-compat \
90 +LIBOW_MASTER_W1:kmod-w1
91 TITLE:=OWFS - common shared library
92 endef
93
94 define Package/libow/config
95 source "$(SOURCE)/Config.in"
96 endef
97
98 define Package/libow/description
99 $(call Package/owfs/Default/description)
100
101 This package contains the OWFS library.
102 endef
103
104 define Package/libow-capi
105 $(call Package/owfs/Library)
106 DEPENDS:=+libow
107 TITLE:=OWFS - C-API library
108 endef
109
110 define Package/libow-capi/description
111 $(call Package/owfs/Default/description)
112
113 This package contains the OWFS C-API library.
114 endef
115
116 #
117 # utilities
118 #
119
120 define Package/owshell
121 $(call Package/owfs/Utility)
122 TITLE:=OWFS - shell utilities
123 endef
124
125 define Package/owshell/description
126 $(call Package/owfs/Default/description)
127
128 This package contains the OWFS shell utilities.
129 endef
130
131 define Package/owfs
132 $(call Package/owfs/Utility)
133 # libfuse depends on kmod-fuse, no need to declare dependency
134 DEPENDS+= +libfuse +fuse-utils
135 TITLE:=OWFS - fuse file system
136 endef
137
138 define Package/owfs/description
139 $(call Package/owfs/Default/description)
140
141 This package contains the OWFS fuse filesystem.
142 endef
143
144 #
145 # network daemons
146 #
147
148 define Package/owhttpd
149 $(call Package/owfs/Server)
150 TITLE:=OWFS - http server
151 endef
152
153 define Package/owhttpd/description
154 $(call Package/owfs/Default/description)
155
156 This package contains the OWFS http server.
157 endef
158
159 define Package/owftpd
160 $(call Package/owfs/Server)
161 TITLE:=OWFS - ftp server
162 endef
163
164 define Package/owftpd/description
165 $(call Package/owfs/Default/description)
166
167 This package contains the OWFS ftp server.
168 endef
169
170 define Package/owserver
171 $(call Package/owfs/Server)
172 TITLE:=OWFS - network server
173 endef
174
175 define Package/owserver/description
176 $(call Package/owfs/Default/description)
177
178 This package contains the OWFS network server.
179 endef
180
181 CONFIGURE_ARGS += \
182 --enable-owftpd \
183 --enable-owserver \
184 --enable-owhttpd \
185 --enable-owfs \
186 --with-fuseinclude="$(STAGING_DIR)/usr/include" \
187 --with-fuselib="$(STAGING_DIR)/usr/lib" \
188 --enable-shared \
189 --disable-parport \
190 --disable-ownet \
191 --disable-owpython \
192 --disable-owphp \
193 --disable-owtcl \
194 --disable-swig \
195 --disable-avahi \
196 $(if $(CONFIG_LIBOW_MASTER_USB),--enable-usb,--disable-usb) \
197 $(if $(CONFIG_LIBOW_MASTER_W1),--enable-w1,--disable-w1) \
198 $(if $(CONFIG_LIBOW_MASTER_I2C),--enable-i2c,--disable-i2c) \
199 $(if $(CONFIG_LIBOW_ZEROCONF),--enable-zero,--disable-zero) \
200 $(if $(CONFIG_LIBOW_DEBUG),--enable-debug,--disable-debug) \
201 $(if $(CONFIG_LIBOW_OWTRAFFIC),--enable-owtraffic,--disable-owtraffic)
202
203 CONFIGURE_VARS += \
204 lt_cv_sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
205 lt_cv_sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
206 shrext_cmds=".so" \
207
208 MAKE_FLAGS += \
209 CC="$(TARGET_CC)" \
210 HOST_CPU="$(PKGARCH)"
211
212 define Build/InstallDev
213 $(INSTALL_DIR) $(STAGING_DIR)/usr/include
214 $(CP) $(PKG_INSTALL_DIR)/usr/include/ow{capi,fs_config}.h $(STAGING_DIR)/usr/include/
215 $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
216 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libow{,capi}*.so* $(STAGING_DIR)/usr/lib/
217 endef
218
219 define Package/owfs/install
220 $(INSTALL_DIR) $(1)/usr/bin
221 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owfs $(1)/usr/bin/
222 $(INSTALL_DIR) $(1)/etc/config
223 $(INSTALL_DATA) ./files/owfs.conf $(1)/etc/config/owfs
224 $(INSTALL_DIR) $(1)/etc/init.d
225 $(INSTALL_BIN) ./files/owfs.init $(1)/etc/init.d/owfs
226 mkdir -p $(1)/mnt/owfs
227 endef
228
229 define Package/owfs/conffiles
230 /etc/config/owfs
231 endef
232
233 define Package/owshell/install
234 $(INSTALL_DIR) $(1)/usr/bin
235 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owget $(1)/usr/bin/
236 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owread $(1)/usr/bin/
237 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owwrite $(1)/usr/bin/
238 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owdir $(1)/usr/bin/
239 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owpresent $(1)/usr/bin/
240 endef
241
242
243 define Package/owserver/install
244 $(INSTALL_DIR) $(1)/usr/bin
245 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owserver $(1)/usr/bin/
246 $(INSTALL_DIR) $(1)/etc/config
247 $(INSTALL_DATA) ./files/owserver.conf $(1)/etc/config/owserver
248 $(INSTALL_DIR) $(1)/etc/init.d
249 $(INSTALL_BIN) ./files/owserver.init $(1)/etc/init.d/owserver
250 endef
251
252 define Package/owserver/conffiles
253 /etc/config/owserver
254 endef
255
256 define Package/owhttpd/install
257 $(INSTALL_DIR) $(1)/usr/bin
258 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owhttpd $(1)/usr/bin/
259 $(INSTALL_DIR) $(1)/etc/config
260 $(INSTALL_DATA) ./files/owhttpd.conf $(1)/etc/config/owhttpd
261 $(INSTALL_DIR) $(1)/etc/init.d
262 $(INSTALL_BIN) ./files/owhttpd.init $(1)/etc/init.d/owhttpd
263 endef
264
265 define Package/owhttpd/conffiles
266 /etc/config/owhttpd
267 endef
268
269 define Package/owftpd/install
270 $(INSTALL_DIR) $(1)/usr/bin
271 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owftpd $(1)/usr/bin/
272 $(INSTALL_DIR) $(1)/etc/config
273 $(INSTALL_DATA) ./files/owftpd.conf $(1)/etc/config/owftpd
274 $(INSTALL_DIR) $(1)/etc/init.d
275 $(INSTALL_BIN) ./files/owftpd.init $(1)/etc/init.d/owftpd
276 endef
277
278 define Package/owftpd/conffiles
279 /etc/config/owftpd
280 endef
281
282 define Package/libow/install
283 $(INSTALL_DIR) $(1)/usr/lib
284 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libow-*.so.* $(1)/usr/lib/
285 endef
286
287 define Package/libow-capi/install
288 $(INSTALL_DIR) $(1)/usr/lib
289 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libowcapi-*.so.* $(1)/usr/lib/
290 endef
291
292
293 $(eval $(call BuildPackage,owfs))
294 $(eval $(call BuildPackage,owshell))
295
296 $(eval $(call BuildPackage,owserver))
297 $(eval $(call BuildPackage,owhttpd))
298 $(eval $(call BuildPackage,owftpd))
299
300 $(eval $(call BuildPackage,libow))
301 $(eval $(call BuildPackage,libow-capi))