1 #############################################################
5 #############################################################
6 FAKEROOT_VERSION
:=1.2.13
7 FAKEROOT_SOURCE
:=fakeroot_
$(FAKEROOT_VERSION
).
tar.gz
8 FAKEROOT_SITE
:=http
://ftp.debian.org
/debian
/pool
/main
/f
/fakeroot
10 FAKEROOT_DIR1
:=$(TOOL_BUILD_DIR
)/fakeroot-
$(FAKEROOT_VERSION
)
11 FAKEROOT_DIR2
:=$(BUILD_DIR
)/fakeroot-
$(FAKEROOT_VERSION
)
14 $(DL_DIR
)/$(FAKEROOT_SOURCE
):
15 $(WGET
) -P
$(DL_DIR
) $(FAKEROOT_SITE
)/$(FAKEROOT_SOURCE
)
17 fakeroot-source
: $(DL_DIR
)/$(FAKEROOT_SOURCE
)
20 #############################################################
22 # build fakeroot for use on the host system
24 #############################################################
25 $(FAKEROOT_DIR1
)/.unpacked
: $(DL_DIR
)/$(FAKEROOT_SOURCE
)
26 $(FAKEROOT_CAT
) $(DL_DIR
)/$(FAKEROOT_SOURCE
) |
tar -C
$(TOOL_BUILD_DIR
) $(TAR_OPTIONS
) -
27 $(SED
) "s,getopt --version,getopt --version 2>/dev/null," \
28 $(FAKEROOT_DIR1
)/scripts
/fakeroot.in
29 touch
$(FAKEROOT_DIR1
)/.unpacked
31 $(FAKEROOT_DIR1
)/.configured
: $(FAKEROOT_DIR1
)/.unpacked
32 (cd
$(FAKEROOT_DIR1
); rm -rf config.cache
; \
37 touch
$(FAKEROOT_DIR1
)/.configured
39 $(FAKEROOT_DIR1
)/faked
: $(FAKEROOT_DIR1
)/.configured
40 $(MAKE
) -C
$(FAKEROOT_DIR1
)
42 $(STAGING_DIR
)/usr
/bin
/fakeroot
: $(FAKEROOT_DIR1
)/faked
43 $(MAKE
) DESTDIR
=$(STAGING_DIR
) -C
$(FAKEROOT_DIR1
) install
44 $(SED
) 's,^PREFIX=.*,PREFIX=$(STAGING_DIR)/usr,g' $(STAGING_DIR
)/usr
/bin
/fakeroot
45 $(SED
) 's,^BINDIR=.*,BINDIR=$(STAGING_DIR)/usr/bin,g' $(STAGING_DIR
)/usr
/bin
/fakeroot
46 $(SED
) 's,^PATHS=.*,PATHS=$(FAKEROOT_DIR1)/.libs:/lib:/usr/lib,g' $(STAGING_DIR
)/usr
/bin
/fakeroot
48 host-fakeroot
: uclibc
$(STAGING_DIR
)/usr
/bin
/fakeroot
51 $(MAKE
) -C
$(FAKEROOT_DIR1
) clean
53 host-fakeroot-dirclean
:
54 rm -rf
$(FAKEROOT_DIR1
)
57 #############################################################
59 # build fakeroot for use on the target system
61 #############################################################
62 $(FAKEROOT_DIR2
)/.unpacked
: $(DL_DIR
)/$(FAKEROOT_SOURCE
)
63 $(FAKEROOT_CAT
) $(DL_DIR
)/$(FAKEROOT_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
64 # If using busybox getopt, make it be quiet.
65 $(SED
) "s,getopt --version,getopt --version 2>/dev/null," \
66 $(FAKEROOT_DIR2
)/scripts
/fakeroot.in
67 touch
$(FAKEROOT_DIR2
)/.unpacked
69 $(FAKEROOT_DIR2
)/.configured
: $(FAKEROOT_DIR2
)/.unpacked
70 (cd
$(FAKEROOT_DIR2
); rm -rf config.cache
; \
71 $(TARGET_CONFIGURE_OPTS
) \
73 --target
=$(GNU_TARGET_NAME
) \
74 --host
=$(GNU_TARGET_NAME
) \
75 --build
=$(GNU_HOST_NAME
) \
80 --libdir=/usr
/lib
/libfakeroot \
82 --datadir=/usr
/share \
83 --localstatedir
=/var \
88 touch
$(FAKEROOT_DIR2
)/.configured
90 $(FAKEROOT_DIR2
)/faked
: $(FAKEROOT_DIR2
)/.configured
91 $(MAKE
) CC
=$(TARGET_CC
) -C
$(FAKEROOT_DIR2
)
93 $(TARGET_DIR
)/usr
/bin
/fakeroot
: $(FAKEROOT_DIR2
)/faked
94 $(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(FAKEROOT_DIR2
) install
95 -mv
$(TARGET_DIR
)/usr
/bin
/$(ARCH
)-linux-faked
$(TARGET_DIR
)/usr
/bin
/faked
96 -mv
$(TARGET_DIR
)/usr
/bin
/$(ARCH
)-linux-fakeroot
$(TARGET_DIR
)/usr
/bin
/fakeroot
97 rm -rf
$(TARGET_DIR
)/share
/locale
$(TARGET_DIR
)/usr
/info \
98 $(TARGET_DIR
)/usr
/man
$(TARGET_DIR
)/usr
/share
/doc
100 fakeroot
: uclibc
$(TARGET_DIR
)/usr
/bin
/fakeroot
103 $(MAKE
) -C
$(FAKEROOT_DIR2
) clean
106 rm -rf
$(FAKEROOT_DIR2
)
109 #############################################################
111 # Toplevel Makefile options
113 #############################################################
114 ifeq ($(strip $(BR2_PACKAGE_FAKEROOT
)),y
)