kumquat-buildroot/package/fakeroot/fakeroot.mk

137 lines
4.0 KiB
Makefile
Raw Normal View History

2003-09-11 11:41:16 +02:00
#############################################################
#
# fakeroot
#
#############################################################
2008-03-11 14:11:14 +01:00
FAKEROOT_VERSION:=1.9.3
FAKEROOT_SOURCE:=fakeroot_$(FAKEROOT_VERSION).tar.gz
2008-03-12 14:57:59 +01:00
FAKEROOT_SITE:=http://snapshot.debian.net/archive/2008/02/06/debian/pool/main/f/fakeroot
FAKEROOT_CAT:=$(ZCAT)
FAKEROOT_SOURCE_DIR:=$(BUILD_DIR)/fakeroot-$(FAKEROOT_VERSION)
FAKEROOT_DIR1:=$(TOOL_BUILD_DIR)/fakeroot-$(FAKEROOT_VERSION)-host
FAKEROOT_DIR2:=$(BUILD_DIR)/fakeroot-$(FAKEROOT_VERSION)-target
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)
$(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 $@
#############################################################
#
# build fakeroot for use on the host system
#
#############################################################
$(FAKEROOT_DIR1)/.configured: $(FAKEROOT_SOURCE_DIR)/.unpacked
mkdir -p $(FAKEROOT_DIR1)
(cd $(FAKEROOT_DIR1); rm -rf config.cache; \
CC="$(HOSTCC)" \
$(FAKEROOT_SOURCE_DIR)/configure \
--prefix=/usr \
2006-04-19 19:53:45 +02:00
$(DISABLE_NLS) \
)
2007-01-22 21:26:38 +01:00
touch $@
$(FAKEROOT_DIR1)/faked: $(FAKEROOT_DIR1)/.configured
$(MAKE) -C $(FAKEROOT_DIR1)
2007-01-22 21:26:38 +01:00
touch -c $@
$(STAGING_DIR)/usr/bin/fakeroot: $(FAKEROOT_DIR1)/faked
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(FAKEROOT_DIR1) install
$(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
2007-08-13 10:12:20 +02:00
$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
$(STAGING_DIR)/usr/lib/libfakeroot.la
2007-01-22 21:26:38 +01:00
touch -c $@
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
#
#############################################################
2003-09-11 11:41:16 +02:00
$(FAKEROOT_DIR2)/.configured: $(FAKEROOT_SOURCE_DIR)/.unpacked
mkdir -p $(FAKEROOT_DIR2)
(cd $(FAKEROOT_DIR2); rm -rf config.cache; \
2003-09-11 11:41:16 +02:00
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
$(FAKEROOT_SOURCE_DIR)/configure \
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 \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
2003-09-11 11:41:16 +02:00
$(DISABLE_NLS) \
)
2007-01-22 21:26:38 +01:00
touch $@
2003-09-11 11:41:16 +02: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
$(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
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
fakeroot: uclibc $(TARGET_DIR)/usr/bin/fakeroot
2003-09-11 11:41:16 +02:00
fakeroot-clean:
-$(MAKE) -C $(FAKEROOT_DIR2) clean
rm -f $(TARGET_DIR)/usr/bin/fake{d,root}
2003-09-11 11:41:16 +02:00
fakeroot-dirclean:
rm -rf $(FAKEROOT_DIR2)
2003-09-11 11:41:16 +02:00
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_FAKEROOT)),y)
TARGETS+=fakeroot
endif
2007-05-03 10:25:17 +02:00
ifeq ($(strip $(BR2_HOST_FAKEROOT)),y)
HOST_SOURCE+=fakeroot-source
endif