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