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