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