2006-04-11 02:27:51 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# sudo
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2007-07-11 16:06:06 +02:00
|
|
|
SUDO_VERSION:=1.6.8p12
|
2009-01-12 01:06:49 +01:00
|
|
|
SUDO_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/s/sudo
|
|
|
|
SUDO_SOURCE:=sudo_$(SUDO_VERSION).orig.tar.gz
|
2009-01-11 20:58:51 +01:00
|
|
|
|
|
|
|
#SUDO_VERSION:=1.7.0
|
|
|
|
#SUDO_SITE:=http://www.courtesan.com/sudo/dist
|
|
|
|
# 1.7.0 Needs update Cross-Compiler patches
|
2009-01-12 01:06:49 +01:00
|
|
|
# SUDO_SOURCE:=sudo-$(SUDO_VERSION).tar.gz
|
2009-01-11 20:58:51 +01:00
|
|
|
|
2007-07-11 16:06:06 +02:00
|
|
|
SUDO_DIR:=$(BUILD_DIR)/sudo-$(SUDO_VERSION)
|
2006-10-03 15:42:42 +02:00
|
|
|
SUDO_UNZIP:=$(ZCAT)
|
2006-04-11 02:27:51 +02:00
|
|
|
|
|
|
|
$(DL_DIR)/$(SUDO_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(SUDO_SITE),$(SUDO_SOURCE))
|
2006-04-11 02:27:51 +02:00
|
|
|
|
|
|
|
sudo-source: $(DL_DIR)/$(SUDO_SOURCE) $(SUDO_CONFIG_FILE)
|
|
|
|
|
|
|
|
$(SUDO_DIR)/.unpacked: $(DL_DIR)/$(SUDO_SOURCE)
|
|
|
|
$(SUDO_UNZIP) $(DL_DIR)/$(SUDO_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2009-01-11 20:58:51 +01:00
|
|
|
toolchain/patch-kernel.sh $(SUDO_DIR) package/sudo sudo-$(SUDO_VERSION)\*.patch
|
2008-02-12 01:35:03 +01:00
|
|
|
$(CONFIG_UPDATE) $(SUDO_DIR)
|
2008-03-06 19:26:10 +01:00
|
|
|
touch $@
|
2006-04-11 02:27:51 +02:00
|
|
|
|
|
|
|
$(SUDO_DIR)/.configured: $(SUDO_DIR)/.unpacked $(SUDO_CONFIG_FILE)
|
|
|
|
(cd $(SUDO_DIR); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2009-10-01 21:24:42 +02:00
|
|
|
./configure $(QUIET) \
|
2006-04-11 02:27:51 +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 \
|
2007-01-14 04:52:21 +01:00
|
|
|
--libdir=/lib \
|
2006-04-11 02:27:51 +02:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
|
|
|
$(DISABLE_LARGEFILE) \
|
|
|
|
--without-lecture \
|
|
|
|
--without-sendmail \
|
|
|
|
--without-umask \
|
|
|
|
--with-logging=syslog \
|
|
|
|
--without-interfaces \
|
|
|
|
--disable-authentication \
|
|
|
|
$(SUDO_EXTRA_CONFIG) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2006-04-11 02:27:51 +02:00
|
|
|
|
2008-03-06 19:26:10 +01:00
|
|
|
touch $@
|
2006-04-11 02:27:51 +02:00
|
|
|
|
|
|
|
$(SUDO_DIR)/sudo: $(SUDO_DIR)/.configured
|
|
|
|
$(MAKE) -C $(SUDO_DIR)
|
2008-03-06 19:26:10 +01:00
|
|
|
touch -c $@
|
2006-04-11 02:27:51 +02:00
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/bin/sudo: $(SUDO_DIR)/sudo
|
2009-01-11 20:58:51 +01:00
|
|
|
rm -f $(TARGET_DIR)/usr/bin/sudo
|
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/visudo
|
|
|
|
rm -f $(TARGET_DIR)/etc/sudoers
|
|
|
|
$(INSTALL) -m 0777 -D $(SUDO_DIR)/sudo $(TARGET_DIR)/usr/bin/sudo
|
|
|
|
$(INSTALL) -m 0777 -D $(SUDO_DIR)/visudo $(TARGET_DIR)/usr/sbin/visudo
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $(TARGET_DIR)/usr/bin/sudo $(TARGET_DIR)/usr/sbin/visudo
|
2009-01-11 20:58:51 +01:00
|
|
|
chmod 4555 $(TARGET_DIR)/usr/bin/sudo
|
|
|
|
chmod 0555 $(TARGET_DIR)/usr/sbin/visudo
|
|
|
|
$(INSTALL) -m 0440 -D $(SUDO_DIR)/sudoers $(TARGET_DIR)/etc/sudoers
|
2006-07-04 20:06:38 +02:00
|
|
|
touch -c $(TARGET_DIR)/usr/bin/sudo
|
2006-04-11 02:27:51 +02:00
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
sudo: $(TARGET_DIR)/usr/bin/sudo
|
2006-04-11 02:27:51 +02:00
|
|
|
|
2009-01-11 20:58:51 +01:00
|
|
|
sudo-unpacked: $(SUDO_DIR)/.unpacked
|
|
|
|
|
2006-04-11 02:27:51 +02:00
|
|
|
sudo-clean:
|
2006-12-21 14:52:43 +01:00
|
|
|
rm -f $(TARGET_DIR)/usr/bin/sudo $(TARGET_DIR)/etc/sudoers \
|
|
|
|
$(TARGET_DIR)/usr/sbin/visudo
|
2006-04-11 02:27:51 +02:00
|
|
|
-$(MAKE) -C $(SUDO_DIR) clean
|
|
|
|
|
|
|
|
sudo-dirclean:
|
|
|
|
rm -rf $(SUDO_DIR)
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SUDO),y)
|
2006-04-11 02:27:51 +02:00
|
|
|
TARGETS+=sudo
|
|
|
|
endif
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBPAM),y)
|
2006-04-11 02:27:51 +02:00
|
|
|
SUDO_EXTRA_CONFIG=--enable-pam
|
|
|
|
sudo: libpam
|
|
|
|
endif
|