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