source: packages/utils/owfs/Makefile @ 27640

Last change on this file since 27640 was 27640, checked in by florian, 5 years ago

[package] owfs: do not override dependency after r27639

File size: 6.1 KB
Line 
1#
2# Copyright (C) 2008-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=owfs
11PKG_VERSION:=2.8p4
12PKG_RELEASE:=2
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=@SF/$(PKG_NAME)
16PKG_MD5SUM:=beccd8765184b2abea0a3f28dc466ea3
17
18PKG_FIXUP:=libtool
19PKG_INSTALL:=1
20
21include $(INCLUDE_DIR)/package.mk
22
23#
24# templates
25#
26
27define 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
33endef
34
35define 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.
49endef
50
51define Package/owfs/Server
52  $(call Package/owfs/Default)
53  DEPENDS:=+libow +libpthread
54endef
55
56define Package/owfs/Library
57  $(call Package/owfs/Default)
58  SECTION:=libs
59  CATEGORY:=Libraries
60endef
61
62define Package/owfs/Utility
63  $(call Package/owfs/Default)
64  SECTION:=utils
65  CATEGORY:=Utilities
66  DEPENDS:=+libow
67endef
68
69#
70# shared libraries
71#
72
73define Package/libow
74  $(call Package/owfs/Library)
75  DEPENDS:=+libusb +libpthread
76  TITLE:=OWFS - common shared library
77endef
78
79define Package/libow/description
80  $(call Package/$(PKG_NAME)/Default/description)
81
82  This package contains the OWFS library.
83endef
84
85define Package/libow-capi
86  $(call Package/owfs/Library)
87  DEPENDS:=+libow
88  TITLE:=OWFS - C-API library
89endef
90
91define Package/libow-capi/description
92  $(call Package/$(PKG_NAME)/Default/description)
93
94  This package contains the OWFS C-API library.
95endef
96
97#
98# utilities
99#
100
101define Package/owshell
102  $(call Package/owfs/Utility)
103  TITLE:=OWFS - shell utilities
104  DEPENDS+= +USE_UCLIBC:librpc
105endef
106
107define Package/owshell/description
108  $(call Package/$(PKG_NAME)/Default/description)
109
110  This package contains the OWFS shell utilities.
111endef
112
113define Package/owfs
114  $(call Package/owfs/Utility)
115  # libfuse depends on kmod-fuse, no need to declare dependency
116  DEPENDS+= +libfuse +fuse-utils
117  TITLE:=OWFS - fuse file system
118endef
119
120define Package/owfs/description
121  $(call Package/$(PKG_NAME)/Default/description)
122
123  This package contains the OWFS fuse filesystem.
124endef
125
126#
127# network daemons
128#
129
130define Package/owhttpd
131  $(call Package/owfs/Server)
132  TITLE:=OWFS - http server
133endef
134
135define Package/owhttpd/description
136  $(call Package/$(PKG_NAME)/Default/description)
137
138  This package contains the OWFS http server.
139endef
140
141define Package/owftpd
142  $(call Package/owfs/Server)
143  TITLE:=OWFS - ftp server
144endef
145
146define Package/owftpd/description
147  $(call Package/$(PKG_NAME)/Default/description)
148
149  This package contains the OWFS ftp server.
150endef
151
152define Package/owserver
153  $(call Package/owfs/Server)
154  TITLE:=OWFS - network server
155endef
156
157define Package/owserver/description
158  $(call Package/$(PKG_NAME)/Default/description)
159
160  This package contains the OWFS network server.
161endef
162
163CONFIGURE_ARGS += \
164        --enable-owftpd \
165        --enable-owserver \
166        --enable-owhttpd \
167        --enable-owfs \
168        --with-fuseinclude="$(STAGING_DIR)/usr/include" \
169        --with-fuselib="$(STAGING_DIR)/usr/lib" \
170        --enable-shared \
171        --disable-rpath \
172        --enable-zero \
173        --disable-parport \
174        --disable-ownfsd \
175        --disable-ownet \
176        --disable-owpython \
177        --disable-libow-perl \
178        --disable-owphp \
179        --disable-owtcl \
180        --disable-owside \
181        --disable-swig \
182
183CONFIGURE_VARS += \
184        LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -Wl,-rpath-link=$(TOOLCHAIN_DIR)/usr/lib" \
185        lt_cv_sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
186        lt_cv_sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
187        shrext_cmds=".so" \
188
189define Build/Compile
190        $(MAKE) -C $(PKG_BUILD_DIR) \
191                CC="$(TARGET_CC)" \
192                DESTDIR="$(PKG_INSTALL_DIR)" \
193                HOST_CPU="$(PKGARCH)" \
194                all install
195endef
196
197define Build/InstallDev
198        $(INSTALL_DIR) $(STAGING_DIR)/usr/include
199        $(CP)   $(PKG_INSTALL_DIR)/usr/include/ow{capi,fs_config}.h $(STAGING_DIR)/usr/include/
200        $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
201        $(CP)   $(PKG_INSTALL_DIR)/usr/lib/libow{,capi}*.so* $(STAGING_DIR)/usr/lib/
202endef
203
204define Package/owfs/install
205        $(INSTALL_DIR) $(1)/usr/bin
206        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owfs $(1)/usr/bin/
207endef
208
209define Package/owshell/install
210        $(INSTALL_DIR) $(1)/usr/bin
211        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owget $(1)/usr/bin/
212        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owread $(1)/usr/bin/
213        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owwrite $(1)/usr/bin/
214        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owdir $(1)/usr/bin/
215        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owpresent $(1)/usr/bin/
216endef
217
218
219define Package/owserver/install
220        $(INSTALL_DIR) $(1)/usr/bin
221        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owserver $(1)/usr/bin/
222endef
223
224define Package/owhttpd/install
225        $(INSTALL_DIR) $(1)/usr/bin
226        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owhttpd $(1)/usr/bin/
227endef
228
229define Package/owftpd/install
230        $(INSTALL_DIR) $(1)/usr/bin
231        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owftpd $(1)/usr/bin/
232endef
233
234
235define Package/libow/install
236        $(INSTALL_DIR) $(1)/usr/lib
237        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libow-*.so.* $(1)/usr/lib/
238endef
239
240define Package/libow-capi/install
241        $(INSTALL_DIR) $(1)/usr/lib
242        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libowcapi-*.so.* $(1)/usr/lib/
243endef
244
245
246$(eval $(call BuildPackage,owfs))
247$(eval $(call BuildPackage,owshell))
248
249$(eval $(call BuildPackage,owserver))
250$(eval $(call BuildPackage,owhttpd))
251$(eval $(call BuildPackage,owftpd))
252
253$(eval $(call BuildPackage,libow))
254$(eval $(call BuildPackage,libow-capi))
Note: See TracBrowser for help on using the repository browser.