42fe78c9680740240e80caf4e4eb6ebcaf521c77
[openwrt.git] / package / fuse / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=fuse
13 PKG_VERSION:=2.6.3
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
18 PKG_MD5SUM:=3f4f5d07d12dedc0a3fd23472171fe94
19 PKG_CAT:=zcat
20
21 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/fuse/Default
27 TITLE:=FUSE
28 DEPENDS:=@LINUX_2_6
29 DESCRIPTION:=\
30 FUSE (Filesystem in UserSpacE)
31 URL:=http://fuse.sourceforge.net/
32 endef
33
34 define Package/fuse-utils
35 $(call Package/fuse/Default)
36 SECTION:=utils
37 CATEGORY:=Utilities
38 DEPENDS:=+libfuse +kmod-fuse @LINUX_2_6
39 TITLE+= (utilities)
40 DESCRIPTION+=\\\
41 \\\
42 This package contains the FUSE utilities.
43 endef
44
45 define KernelPackage/fuse
46 SUBMENU:=Filesystems
47 $(call Package/fuse/Default)
48 DEPENDS:=@LINUX_2_6
49 TITLE+= (kernel module)
50 DESCRIPTION+=\\\
51 \\\
52 This package contains the FUSE kernel module.
53 FILES:=$(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
54 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
55 AUTOLOAD:=$(call AutoLoad,80,fuse)
56 endef
57
58 define Package/libfuse
59 $(call Package/fuse/Default)
60 SECTION:=libs
61 CATEGORY:=Libraries
62 DEPENDS:=@LINUX_2_6
63 TITLE+= (library)
64 DESCRIPTION+=\\\
65 \\\
66 This package contains the FUSE shared library, needed by other programs.
67 endef
68
69 CONFIGURE_ARGS += \
70 --enable-shared \
71 --enable-static \
72 --disable-rpath \
73 --enable-kernel-module \
74 --enable-lib \
75 --enable-util \
76 --disable-example \
77 --disable-auto-modprobe \
78 --with-kernel="$(LINUX_DIR)" \
79 --disable-mtab
80
81 define Build/Configure
82 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
83 touch configure.in ; \
84 touch aclocal.m4 ; \
85 touch Makefile.in ; \
86 touch include/config.h.in ; \
87 touch configure ; \
88 )
89 $(call Build/Configure/Default)
90 endef
91
92 define Build/Compile
93 $(MAKE) -C $(PKG_BUILD_DIR) \
94 ARCH="$(LINUX_KARCH)" \
95 CROSS_COMPILE="$(TARGET_CROSS)" \
96 DESTDIR="$(PKG_INSTALL_DIR)" \
97 AM_CFLAGS="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
98 EXTRA_DIST="" \
99 all install
100 endef
101
102 define Build/InstallDev
103 mkdir -p $(STAGING_DIR)/usr/include
104 $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} $(STAGING_DIR)/usr/include/
105 mkdir -p $(STAGING_DIR)/usr/lib
106 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} $(STAGING_DIR)/usr/lib/
107 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
108 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/
109 $(SED) 's,-I$$$${includedir}/fuse,,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
110 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
111 endef
112
113 define Build/UninstallDev
114 rm -rf $(STAGING_DIR)/usr/include/fuse{,.h} \
115 $(STAGING_DIR)/usr/lib/libfuse.{a,so*} \
116 $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
117 endef
118
119 define Package/fuse-utils/install
120 $(INSTALL_DIR) $(1)/usr/bin
121 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/
122 endef
123
124 define Package/libfuse/install
125 $(INSTALL_DIR) $(1)/usr/lib
126 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/
127 endef
128
129 $(eval $(call BuildPackage,fuse-utils))
130 $(eval $(call BuildPackage,libfuse))
131 $(eval $(call KernelPackage,fuse))
This page took 0.056874 seconds and 3 git commands to generate.