2003-09-11 11:41:16 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# fakeroot
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-01 10:08:04 +01:00
|
|
|
FAKEROOT_VERSION:=1.9.5
|
2008-03-13 08:38:10 +01:00
|
|
|
FAKEROOT_SOURCE:=fakeroot_$(FAKEROOT_VERSION).tar.gz
|
2008-12-01 10:08:04 +01:00
|
|
|
FAKEROOT_SITE:=http://snapshot.debian.net/archive/2008/04/27/debian/pool/main/f/fakeroot/
|
2006-10-01 17:17:52 +02:00
|
|
|
FAKEROOT_CAT:=$(ZCAT)
|
2006-12-15 15:18:30 +01:00
|
|
|
FAKEROOT_SOURCE_DIR:=$(BUILD_DIR)/fakeroot-$(FAKEROOT_VERSION)
|
2009-04-01 16:15:04 +02:00
|
|
|
FAKEROOT_DIR1:=$(BUILD_DIR)/fakeroot-$(FAKEROOT_VERSION)-host
|
2006-12-15 15:18:30 +01:00
|
|
|
FAKEROOT_DIR2:=$(BUILD_DIR)/fakeroot-$(FAKEROOT_VERSION)-target
|
2003-09-11 11:41:16 +02:00
|
|
|
|
|
|
|
$(DL_DIR)/$(FAKEROOT_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(FAKEROOT_SITE),$(FAKEROOT_SOURCE))
|
2003-09-11 11:41:16 +02:00
|
|
|
|
|
|
|
fakeroot-source: $(DL_DIR)/$(FAKEROOT_SOURCE)
|
|
|
|
|
2006-12-15 15:18:30 +01:00
|
|
|
$(FAKEROOT_SOURCE_DIR)/.unpacked: $(DL_DIR)/$(FAKEROOT_SOURCE)
|
|
|
|
$(FAKEROOT_CAT) $(DL_DIR)/$(FAKEROOT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
# If using busybox getopt, make it be quiet.
|
|
|
|
$(SED) "s,getopt --version,getopt --version 2>/dev/null," \
|
|
|
|
$(FAKEROOT_SOURCE_DIR)/scripts/fakeroot.in
|
|
|
|
toolchain/patch-kernel.sh $(FAKEROOT_SOURCE_DIR) package/fakeroot/ \*.patch
|
2007-01-22 21:26:38 +01:00
|
|
|
touch $@
|
2006-12-15 15:18:30 +01:00
|
|
|
|
2005-03-07 22:19:15 +01:00
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# build fakeroot for use on the host system
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2006-12-15 15:18:30 +01:00
|
|
|
$(FAKEROOT_DIR1)/.configured: $(FAKEROOT_SOURCE_DIR)/.unpacked
|
|
|
|
mkdir -p $(FAKEROOT_DIR1)
|
2005-03-07 22:19:15 +01:00
|
|
|
(cd $(FAKEROOT_DIR1); rm -rf config.cache; \
|
2006-01-03 21:16:38 +01:00
|
|
|
CC="$(HOSTCC)" \
|
2009-10-01 21:24:42 +02:00
|
|
|
$(FAKEROOT_SOURCE_DIR)/configure $(QUIET) \
|
2009-04-01 16:15:19 +02:00
|
|
|
--prefix=$(HOST_DIR)/usr \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-01-22 21:26:38 +01:00
|
|
|
touch $@
|
2005-03-07 22:19:15 +01:00
|
|
|
|
|
|
|
$(FAKEROOT_DIR1)/faked: $(FAKEROOT_DIR1)/.configured
|
|
|
|
$(MAKE) -C $(FAKEROOT_DIR1)
|
2007-01-22 21:26:38 +01:00
|
|
|
touch -c $@
|
2005-03-07 22:19:15 +01:00
|
|
|
|
2009-04-01 16:15:19 +02:00
|
|
|
$(HOST_DIR)/usr/bin/fakeroot: $(FAKEROOT_DIR1)/faked
|
|
|
|
$(MAKE) -C $(FAKEROOT_DIR1) install
|
2007-01-22 21:26:38 +01:00
|
|
|
touch -c $@
|
2005-03-07 22:19:15 +01:00
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
host-fakeroot: $(HOST_DIR)/usr/bin/fakeroot
|
2005-03-07 22:19:15 +01:00
|
|
|
|
|
|
|
host-fakeroot-clean:
|
2008-03-27 16:42:42 +01:00
|
|
|
-$(MAKE) -C $(FAKEROOT_DIR1) clean
|
2005-03-07 22:19:15 +01:00
|
|
|
|
|
|
|
host-fakeroot-dirclean:
|
|
|
|
rm -rf $(FAKEROOT_DIR1)
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# build fakeroot for use on the target system
|
|
|
|
#
|
|
|
|
#############################################################
|
2003-09-11 11:41:16 +02:00
|
|
|
|
2006-12-15 15:18:30 +01:00
|
|
|
$(FAKEROOT_DIR2)/.configured: $(FAKEROOT_SOURCE_DIR)/.unpacked
|
|
|
|
mkdir -p $(FAKEROOT_DIR2)
|
2005-03-07 22:19:15 +01:00
|
|
|
(cd $(FAKEROOT_DIR2); rm -rf config.cache; \
|
2003-09-11 11:41:16 +02:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2009-10-01 21:24:42 +02:00
|
|
|
$(FAKEROOT_SOURCE_DIR)/configure $(QUIET) \
|
2003-09-11 11:41:16 +02:00
|
|
|
--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 \
|
2007-09-17 14:30:31 +02:00
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info \
|
2003-09-11 11:41:16 +02:00
|
|
|
$(DISABLE_NLS) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-01-22 21:26:38 +01:00
|
|
|
touch $@
|
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)
|
2007-01-22 21:26:38 +01:00
|
|
|
touch -c $@
|
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
|
2007-09-17 14:30:31 +02:00
|
|
|
-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
|
|
|
|
ifneq ($(BR2_HAVE_INFOPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/info
|
|
|
|
endif
|
|
|
|
ifneq ($(BR2_HAVE_MANPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/man
|
|
|
|
endif
|
|
|
|
rm -rf $(TARGET_DIR)/share/locale
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/doc
|
2007-01-22 21:26:38 +01:00
|
|
|
touch -c $@
|
2003-09-11 11:41:16 +02:00
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
fakeroot: $(TARGET_DIR)/usr/bin/fakeroot
|
2003-09-11 11:41:16 +02:00
|
|
|
|
2005-03-07 22:19:15 +01:00
|
|
|
fakeroot-clean:
|
2008-03-27 16:42:42 +01:00
|
|
|
-$(MAKE) -C $(FAKEROOT_DIR2) clean
|
2006-12-15 15:18:30 +01:00
|
|
|
rm -f $(TARGET_DIR)/usr/bin/fake{d,root}
|
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
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_FAKEROOT),y)
|
2005-02-10 04:06:39 +01:00
|
|
|
TARGETS+=fakeroot
|
|
|
|
endif
|
2007-04-06 18:36:48 +02:00
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_HOST_FAKEROOT),y)
|
2007-04-06 18:36:48 +02:00
|
|
|
HOST_SOURCE+=fakeroot-source
|
|
|
|
endif
|