add libusb and lsusb (usbutils)
[openwrt.git] / openwrt / package / fuse / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=fuse
6 PKG_VERSION:=2.2.1
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=250d89b9c7b6ecf531df60c67f75737d
9
10 PKG_SOURCE_URL:= \
11 @SF/$(PKG_NAME) \
12 http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_CAT:=zcat
15
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
18
19 include $(TOPDIR)/package/templates.mk
20
21 $(eval $(call PKG_template,KMOD_FUSE,kmod-fuse,$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22 $(eval $(call PKG_template,LIBFUSE,libfuse,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
23 $(eval $(call PKG_template,FUSE_UTILS,fuse-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
24
25 COMPILE_TARGETS += install-dev
26 CLEAN_TARGETS += uninstall-dev
27
28 include $(TOPDIR)/package/rules.mk
29
30 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
31 (cd $(PKG_BUILD_DIR); \
32 rm -rf config.{cache,status} ; \
33 touch configure.in ; \
34 touch aclocal.m4 ; \
35 touch Makefile.in ; \
36 touch include/config.h.in ; \
37 touch configure ; \
38 $(TARGET_CONFIGURE_OPTS) \
39 CFLAGS="$(TARGET_CFLAGS)" \
40 ./configure \
41 --target=$(GNU_TARGET_NAME) \
42 --host=$(GNU_TARGET_NAME) \
43 --build=$(GNU_HOST_NAME) \
44 --program-prefix="" \
45 --program-suffix="" \
46 --prefix=/usr \
47 --exec-prefix=/usr \
48 --bindir=/usr/bin \
49 --datadir=/usr/share \
50 --includedir=/usr/include \
51 --infodir=/usr/share/info \
52 --libdir=/usr/lib \
53 --libexecdir=/usr/lib/locate \
54 --localstatedir=/var/lib \
55 --mandir=/usr/share/man \
56 --sbindir=/usr/sbin \
57 --sysconfdir=/etc \
58 $(DISABLE_LARGEFILE) \
59 $(DISABLE_NLS) \
60 --enable-shared \
61 --enable-static \
62 --enable-kernel-module \
63 --enable-lib \
64 --enable-util \
65 --disable-example \
66 --disable-auto-modprobe \
67 --with-kernel=$(LINUX_DIR) \
68 );
69 touch $(PKG_BUILD_DIR)/.configured
70
71 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
72 $(MAKE) -C $(PKG_BUILD_DIR)
73 touch $(PKG_BUILD_DIR)/.built
74
75 $(PKG_BUILD_DIR)/.installed: $(PKG_BUILD_DIR)/.built
76 mkdir -p $(PKG_INSTALL_DIR)
77 $(MAKE) -C $(PKG_BUILD_DIR) \
78 DESTDIR="$(PKG_INSTALL_DIR)" \
79 install
80 touch $(PKG_BUILD_DIR)/.installed
81
82 $(IPKG_KMOD_FUSE): $(IDIR_KMOD_FUSE)/CONTROL/control $(PKG_BUILD_DIR)/.installed
83 mkdir -p $(IDIR_KMOD_FUSE)/lib/modules/$(LINUX_VERSION)
84 cp -fpR $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.o \
85 $(IDIR_KMOD_FUSE)/lib/modules/$(LINUX_VERSION)/
86 $(RSTRIP_KMOD) $(IDIR_KMOD_FUSE)
87 mkdir -p $(PACKAGE_DIR)
88 $(IPKG_BUILD) $(IDIR_KMOD_FUSE) $(PACKAGE_DIR)
89
90 $(IPKG_LIBFUSE): $(IDIR_LIBFUSE)/CONTROL/control $(PKG_BUILD_DIR)/.installed
91 mkdir -p $(IDIR_LIBFUSE)/usr/lib
92 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(IDIR_LIBFUSE)/usr/lib/
93 chmod 0644 $(IDIR_LIBFUSE)/usr/lib/lib*.so*
94 $(RSTRIP) $(IDIR_LIBFUSE)
95 mkdir -p $(PACKAGE_DIR)
96 $(IPKG_BUILD) $(IDIR_LIBFUSE) $(PACKAGE_DIR)
97
98 $(IPKG_FUSE_UTILS): $(IDIR_FUSE_UTILS)/CONTROL/control $(PKG_BUILD_DIR)/.installed
99 mkdir -p $(IDIR_FUSE_UTILS)/usr/bin
100 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/fusermount $(IDIR_FUSE_UTILS)/usr/bin/
101 $(RSTRIP) $(IDIR_FUSE_UTILS)
102 mkdir -p $(PACKAGE_DIR)
103 $(IPKG_BUILD) $(IDIR_FUSE_UTILS) $(PACKAGE_DIR)
104
105 $(STAGING_DIR)/usr/lib/libfuse.so: $(PKG_BUILD_DIR)/.installed
106 mkdir -p $(PKG_INSTALL_DIR)/usr/include
107 cp -fpR $(PKG_INSTALL_DIR)/usr/include/fuse* $(STAGING_DIR)/usr/include/
108 mkdir -p $(PKG_INSTALL_DIR)/usr/lib
109 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} $(STAGING_DIR)/usr/lib/
110 mkdir -p $(PKG_INSTALL_DIR)/usr/lib/pkgconfig
111 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/
112
113 install-dev: $(STAGING_DIR)/usr/lib/libfuse.so
114
115 uninstall-dev:
116 rm -rf $(STAGING_DIR)/usr/include/fuse*
117 rm -rf $(STAGING_DIR)/usr/lib/libfuse.{a,so*}
118 rm -rf $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
This page took 0.046148 seconds and 5 git commands to generate.