Commit 70b9d30d authored by Ryan Jackson's avatar Ryan Jackson

Added sudo to the build

parent 60f393ea
include ../../variables.mk
SUDO_VERSION = 1.6.9p17
SUDO_PATH = $(TARGET_BUILD_PATH)/sudo-$(SUDO_VERSION)
.PHONY: extract patch config \
sudo install clean all
all: sudo
extract: $(SUDO_PATH)/.extract-stamp
patch: $(SUDO_PATH)/.patch-stamp
config: $(SUDO_PATH)/.config-stamp
sudo: $(SUDO_PATH)/sudo
install: $(TARGET_PATH)/usr/bin/sudo
clean:
PATH=$(STAGING_DIR)/usr/bin:$(PATH) $(MAKE) -C $(SUDO_PATH) clean
rm -f $(SUDO_PATH)/.build-stamp $(SUDO_PATH)/.config-stamp
$(SUDO_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xzf $(SOURCE_PATH)/sudo/sudo-$(SUDO_VERSION).tar.gz
touch $@
$(SUDO_PATH)/.patch-stamp: $(SUDO_PATH)/.extract-stamp
$(SCRIPTS_PATH)/patch-kernel.sh $(SUDO_PATH) $(SOURCE_PATH)/sudo/ '*.patch'
touch $@
$(SUDO_PATH)/.config-stamp: $(SUDO_PATH)/.patch-stamp
rm -f $(SUDO_PATH)/config.cache
(cd $(SUDO_PATH); \
PATH=$(STAGING_DIR)/usr/bin:$(PATH) \
$(HOST_CONFIGURE_OPTS) \
./configure \
--target=i386-linux-uclibc \
--host=i386-linux-uclibc \
--build=x86_64-linux-gnu \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libdir=/lib \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--without-lecture \
--without-sendmail \
--without-umask \
--with-logging=syslog \
--without-interfaces \
--without-pam \
$(SUDO_EXTRA_CONFIG) \
)
touch $@
#--enable-elf-shlibs --enable-dynamic-e2fsck --disable-swapfs \
#--enable-elf-shlibs \
$(SUDO_PATH)/sudo: $(SUDO_PATH)/.config-stamp
PATH=$(STAGING_DIR)/usr/bin:$(PATH) \
CC=$(TARGET_CC) \
$(MAKE) -C $(SUDO_PATH) \
$(TARGET_CONFIGURE_OPTS) LD=i386-linux-uclibc-gcc
touch $@
$(TARGET_PATH)/usr/bin/sudo: $(SUDO_PATH)/sudo
install -d -m 755 $(TARGET_PATH)/usr
install -d -m 755 $(TARGET_PATH)/usr/bin
install -m 755 $(SUDO_PATH)/sudo \
$(TARGET_PATH)/usr/bin/sudo
$(STRIPCMD) --strip-unneeded $(TARGET_PATH)/usr/bin/sudo
mkdir -p $(TARGET_PATH)/usr/local/bin
ln -sf /usr/bin/sudo $(TARGET_PATH)/usr/local/bin
touch -c $@
--- sudo-1.6.9p17/configure.orig 2008-12-17 17:29:45.000000000 -0700
+++ sudo-1.6.9p17/configure 2008-12-17 17:30:23.000000000 -0700
@@ -14791,14 +14791,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
rm -f conftestdata
-if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-else
- cat >conftest.$ac_ext <<_ACEOF
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -14853,7 +14846,6 @@
sudo_cv_uid_t_len=10
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment