Force dependency on LINUX_2_6 to stop building fuse on 2.4 kernels.
[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
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 TITLE+= (kernel module)
49 DESCRIPTION+=\\\
50 \\\
51 This package contains the FUSE kernel module.
52 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
53 FILES:=$(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
54 endef
55
56 define Package/libfuse
57 $(call Package/fuse/Default)
58 SECTION:=libs
59 CATEGORY:=Libraries
60 TITLE+= (library)
61 DESCRIPTION+=\\\
62 \\\
63 This package contains the FUSE shared library, needed by other programs.
64 endef
65
66 define Build/Configure
67 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
68 touch configure.in ; \
69 touch aclocal.m4 ; \
70 touch Makefile.in ; \
71 touch include/config.h.in ; \
72 touch configure ; \
73 $(TARGET_CONFIGURE_OPTS) \
74 CFLAGS="$(TARGET_CFLAGS)" \
75 ./configure \
76 --target=$(GNU_TARGET_NAME) \
77 --host=$(GNU_TARGET_NAME) \
78 --build=$(GNU_HOST_NAME) \
79 --program-prefix="" \
80 --program-suffix="" \
81 --prefix=/usr \
82 --exec-prefix=/usr \
83 --bindir=/usr/bin \
84 --datadir=/usr/share \
85 --includedir=/usr/include \
86 --infodir=/usr/share/info \
87 --libdir=/usr/lib \
88 --libexecdir=/usr/lib \
89 --localstatedir=/var \
90 --mandir=/usr/share/man \
91 --sbindir=/usr/sbin \
92 --sysconfdir=/etc \
93 $(DISABLE_LARGEFILE) \
94 $(DISABLE_NLS) \
95 --enable-shared \
96 --enable-static \
97 --disable-rpath \
98 --enable-kernel-module \
99 --enable-lib \
100 --enable-util \
101 --disable-example \
102 --disable-auto-modprobe \
103 --with-kernel="$(LINUX_DIR)" \
104 --disable-mtab \
105 );
106 endef
107
108 define Build/Compile
109 $(MAKE) -C $(PKG_BUILD_DIR) \
110 ARCH="$(LINUX_KARCH)" \
111 CROSS_COMPILE="$(TARGET_CROSS)" \
112 DESTDIR="$(PKG_INSTALL_DIR)" \
113 all install
114 endef
115
116 define Build/InstallDev
117 mkdir -p $(STAGING_DIR)/usr/include
118 $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} $(STAGING_DIR)/usr/include/
119 mkdir -p $(STAGING_DIR)/usr/lib
120 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} $(STAGING_DIR)/usr/lib/
121 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
122 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/
123 $(SED) 's,-I$$$${includedir}/fuse,,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
124 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
125 endef
126
127 define Build/UninstallDev
128 rm -rf $(STAGING_DIR)/usr/include/fuse{,.h} \
129 $(STAGING_DIR)/usr/lib/libfuse.{a,so*} \
130 $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
131 endef
132
133 define Package/fuse-utils/install
134 $(INSTALL_DIR) $(1)/usr/bin
135 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/
136 endef
137
138 define Package/libfuse/install
139 $(INSTALL_DIR) $(1)/usr/lib
140 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/
141 endef
142
143 $(eval $(call BuildPackage,fuse-utils))
144 $(eval $(call BuildPackage,libfuse))
145 $(eval $(call KernelPackage,fuse))
This page took 0.051145 seconds and 5 git commands to generate.