Rebased from upstream / out of band repository.
[librecmc/librecmc.git] / package / utils / fuse / Makefile
1 #
2 # Copyright (C) 2006-2015 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 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=fuse
12 PKG_VERSION:=2.9.7
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=https://github.com/libfuse/libfuse/releases/download/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_HASH:=832432d1ad4f833c20e13b57cf40ce5277a9d33e483205fc63c78111b3358874
18
19 PKG_LICENSE:=LGPLv2.1 GPLv2
20 PKG_LICENSE_FILES:=COPYING.LIB COPYING
21 PKG_CPE_ID:=cpe:/a:fuse_project:fuse
22
23 PKG_INSTALL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/fuse/Default
28   TITLE:=FUSE
29   URL:=http://fuse.sourceforge.net/
30 endef
31
32 define Package/fuse/Default/description
33  FUSE (Filesystem in UserSpacE)
34 endef
35
36 define Package/fuse-utils
37 $(call Package/fuse/Default)
38   SECTION:=utils
39   CATEGORY:=Utilities
40   DEPENDS:=+libfuse
41   TITLE+= (utilities)
42   SUBMENU:=Filesystem
43 endef
44
45 define Package/fuse-utils/description
46 $(call Package/fuse/Default/description)
47  This package contains the FUSE utilities.
48  - fusermount
49  - ulockmgr_server
50 endef
51
52 define Package/libfuse
53 $(call Package/fuse/Default)
54   SECTION:=libs
55   CATEGORY:=Libraries
56   TITLE+= (library)
57   DEPENDS:=+kmod-fuse +libpthread
58   SUBMENU:=Filesystem
59 endef
60
61 define Package/libfuse/description
62 $(call Package/fuse/Default/description)
63  This package contains the FUSE shared libraries, needed by other programs.
64  - libfuse
65  - libulockmgr
66 endef
67
68 # generic args
69 CONFIGURE_ARGS += \
70         --enable-shared \
71         --enable-static \
72         --enable-lib \
73         --enable-util \
74         --disable-rpath \
75         --disable-example \
76         --disable-mtab
77
78 define Build/InstallDev
79         $(INSTALL_DIR) $(1)/usr/include
80         $(CP)   $(PKG_INSTALL_DIR)/usr/include/{fuse,fuse.h,ulockmgr.h} $(1)/usr/include/
81         $(INSTALL_DIR)  $(1)/usr/lib
82         $(CP)   $(PKG_INSTALL_DIR)/usr/lib/lib{fuse,ulockmgr}.{a,so*} $(1)/usr/lib/
83         $(INSTALL_DIR)  $(1)/usr/lib/pkgconfig
84         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(1)/usr/lib/pkgconfig/
85         $(SED) 's,-I$$$${includedir}/fuse,,g' $(1)/usr/lib/pkgconfig/fuse.pc
86         $(SED) 's,-L$$$${libdir},,g' $(1)/usr/lib/pkgconfig/fuse.pc
87 endef
88
89 define Package/fuse-utils/install
90         $(INSTALL_DIR) $(1)/sbin
91         $(CP) $(PKG_INSTALL_DIR)/sbin/mount.fuse $(1)/sbin/
92         $(INSTALL_DIR) $(1)/usr/bin
93         $(CP) $(PKG_INSTALL_DIR)/usr/bin/{fusermount,ulockmgr_server} $(1)/usr/bin/
94 endef
95
96 define Package/libfuse/install
97         $(INSTALL_DIR) $(1)/usr/lib
98         $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{fuse,ulockmgr}.so.* $(1)/usr/lib/
99 endef
100
101 $(eval $(call BuildPackage,fuse-utils))
102 $(eval $(call BuildPackage,libfuse))