2003-09-11 11:41:16 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# fakeroot
|
|
|
|
#
|
|
|
|
#############################################################
|
2006-01-03 21:16:38 +01:00
|
|
|
FAKEROOT_VERSION:=1.2.13
|
2004-10-27 18:44:12 +02:00
|
|
|
FAKEROOT_SOURCE:=fakeroot_$(FAKEROOT_VERSION).tar.gz
|
2003-09-11 11:41:16 +02:00
|
|
|
FAKEROOT_SITE:=http://ftp.debian.org/debian/pool/main/f/fakeroot
|
|
|
|
FAKEROOT_CAT:=zcat
|
2005-03-07 22:19:15 +01:00
|
|
|
FAKEROOT_DIR1:=$(TOOL_BUILD_DIR)/fakeroot-$(FAKEROOT_VERSION)
|
|
|
|
FAKEROOT_DIR2:=$(BUILD_DIR)/fakeroot-$(FAKEROOT_VERSION)
|
2003-09-11 11:41:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
$(DL_DIR)/$(FAKEROOT_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(FAKEROOT_SITE)/$(FAKEROOT_SOURCE)
|
|
|
|
|
|
|
|
fakeroot-source: $(DL_DIR)/$(FAKEROOT_SOURCE)
|
|
|
|
|
2005-03-07 22:19:15 +01:00
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# build fakeroot for use on the host system
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
$(FAKEROOT_DIR1)/.unpacked: $(DL_DIR)/$(FAKEROOT_SOURCE)
|
|
|
|
$(FAKEROOT_CAT) $(DL_DIR)/$(FAKEROOT_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
$(SED) "s,getopt --version,getopt --version 2>/dev/null," \
|
|
|
|
$(FAKEROOT_DIR1)/scripts/fakeroot.in
|
|
|
|
touch $(FAKEROOT_DIR1)/.unpacked
|
|
|
|
|
|
|
|
$(FAKEROOT_DIR1)/.configured: $(FAKEROOT_DIR1)/.unpacked
|
|
|
|
(cd $(FAKEROOT_DIR1); rm -rf config.cache; \
|
2006-01-03 21:16:38 +01:00
|
|
|
CC="$(HOSTCC)" \
|
2005-03-07 22:19:15 +01:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
);
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(FAKEROOT_DIR1)/.configured
|
2005-03-07 22:19:15 +01:00
|
|
|
|
|
|
|
$(FAKEROOT_DIR1)/faked: $(FAKEROOT_DIR1)/.configured
|
|
|
|
$(MAKE) -C $(FAKEROOT_DIR1)
|
|
|
|
|
|
|
|
$(STAGING_DIR)/usr/bin/fakeroot: $(FAKEROOT_DIR1)/faked
|
|
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(FAKEROOT_DIR1) install
|
2005-06-24 09:26:33 +02:00
|
|
|
$(SED) 's,^PREFIX=.*,PREFIX=$(STAGING_DIR)/usr,g' $(STAGING_DIR)/usr/bin/fakeroot
|
|
|
|
$(SED) 's,^BINDIR=.*,BINDIR=$(STAGING_DIR)/usr/bin,g' $(STAGING_DIR)/usr/bin/fakeroot
|
|
|
|
$(SED) 's,^PATHS=.*,PATHS=$(FAKEROOT_DIR1)/.libs:/lib:/usr/lib,g' $(STAGING_DIR)/usr/bin/fakeroot
|
2005-03-07 22:19:15 +01:00
|
|
|
|
|
|
|
host-fakeroot: uclibc $(STAGING_DIR)/usr/bin/fakeroot
|
|
|
|
|
|
|
|
host-fakeroot-clean:
|
|
|
|
$(MAKE) -C $(FAKEROOT_DIR1) clean
|
|
|
|
|
|
|
|
host-fakeroot-dirclean:
|
|
|
|
rm -rf $(FAKEROOT_DIR1)
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# build fakeroot for use on the target system
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
$(FAKEROOT_DIR2)/.unpacked: $(DL_DIR)/$(FAKEROOT_SOURCE)
|
2004-10-09 23:19:47 +02:00
|
|
|
$(FAKEROOT_CAT) $(DL_DIR)/$(FAKEROOT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2003-09-11 11:41:16 +02:00
|
|
|
# If using busybox getopt, make it be quiet.
|
2003-11-19 18:17:56 +01:00
|
|
|
$(SED) "s,getopt --version,getopt --version 2>/dev/null," \
|
2005-03-07 22:19:15 +01:00
|
|
|
$(FAKEROOT_DIR2)/scripts/fakeroot.in
|
|
|
|
touch $(FAKEROOT_DIR2)/.unpacked
|
2003-09-11 11:41:16 +02:00
|
|
|
|
2005-03-07 22:19:15 +01:00
|
|
|
$(FAKEROOT_DIR2)/.configured: $(FAKEROOT_DIR2)/.unpacked
|
|
|
|
(cd $(FAKEROOT_DIR2); rm -rf config.cache; \
|
2003-09-11 11:41:16 +02:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
|
|
|
--libdir=/usr/lib/libfakeroot \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
|
|
|
$(DISABLE_NLS) \
|
|
|
|
);
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(FAKEROOT_DIR2)/.configured
|
2003-09-11 11:41:16 +02:00
|
|
|
|
2005-03-07 22:19:15 +01:00
|
|
|
$(FAKEROOT_DIR2)/faked: $(FAKEROOT_DIR2)/.configured
|
|
|
|
$(MAKE) CC=$(TARGET_CC) -C $(FAKEROOT_DIR2)
|
2003-09-11 11:41:16 +02:00
|
|
|
|
2005-03-07 22:19:15 +01:00
|
|
|
$(TARGET_DIR)/usr/bin/fakeroot: $(FAKEROOT_DIR2)/faked
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(FAKEROOT_DIR2) install
|
|
|
|
-mv $(TARGET_DIR)/usr/bin/$(ARCH)-linux-faked $(TARGET_DIR)/usr/bin/faked
|
|
|
|
-mv $(TARGET_DIR)/usr/bin/$(ARCH)-linux-fakeroot $(TARGET_DIR)/usr/bin/fakeroot
|
2003-09-11 11:41:16 +02:00
|
|
|
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
|
|
|
|
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
|
|
|
|
|
2005-03-07 22:19:15 +01:00
|
|
|
fakeroot: uclibc $(TARGET_DIR)/usr/bin/fakeroot
|
2003-09-11 11:41:16 +02:00
|
|
|
|
2005-03-07 22:19:15 +01:00
|
|
|
fakeroot-clean:
|
|
|
|
$(MAKE) -C $(FAKEROOT_DIR2) clean
|
2003-09-11 11:41:16 +02:00
|
|
|
|
2005-03-07 22:19:15 +01:00
|
|
|
fakeroot-dirclean:
|
|
|
|
rm -rf $(FAKEROOT_DIR2)
|
2003-09-11 11:41:16 +02:00
|
|
|
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_FAKEROOT)),y)
|
|
|
|
TARGETS+=fakeroot
|
|
|
|
endif
|