more cleanup
[openwrt/svn-archive/archive.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 CONFIGURE_ARGS += \
69 --enable-shared \
70 --enable-static \
71 --disable-rpath \
72 --enable-kernel-module \
73 --enable-lib \
74 --enable-util \
75 --disable-example \
76 --disable-auto-modprobe \
77 --with-kernel="$(LINUX_DIR)" \
78 --disable-mtab
79
80 define Build/Configure
81 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
82 touch configure.in ; \
83 touch aclocal.m4 ; \
84 touch Makefile.in ; \
85 touch include/config.h.in ; \
86 touch configure ; \
87 )
88 $(call Build/Configure/Default)
89 endef
90
91 define Build/Compile
92 $(MAKE) -C $(PKG_BUILD_DIR) \
93 ARCH="$(LINUX_KARCH)" \
94 CROSS_COMPILE="$(TARGET_CROSS)" \
95 DESTDIR="$(PKG_INSTALL_DIR)" \
96 all install
97 endef
98
99 define Build/InstallDev
100 mkdir -p $(STAGING_DIR)/usr/include
101 $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} $(STAGING_DIR)/usr/include/
102 mkdir -p $(STAGING_DIR)/usr/lib
103 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} $(STAGING_DIR)/usr/lib/
104 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/
106 $(SED) 's,-I$$$${includedir}/fuse,,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
107 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
108 endef
109
110 define Build/UninstallDev
111 rm -rf $(STAGING_DIR)/usr/include/fuse{,.h} \
112 $(STAGING_DIR)/usr/lib/libfuse.{a,so*} \
113 $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
114 endef
115
116 define Package/fuse-utils/install
117 $(INSTALL_DIR) $(1)/usr/bin
118 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/
119 endef
120
121 define Package/libfuse/install
122 $(INSTALL_DIR) $(1)/usr/lib
123 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/
124 endef
125
126 $(eval $(call BuildPackage,fuse-utils))
127 $(eval $(call BuildPackage,libfuse))
128 $(eval $(call KernelPackage,fuse))