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