2 # Copyright (C) 2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR)/rules.mk
13 PKG_SOURCE:=sudo-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=http://www.sudo.ws/sudo/dist/
15 PKG_MD5SUM:=5fd96bba35fe29b464f7aa6ad255f0a6
17 include $(INCLUDE_DIR)/package.mk
21 CATEGORY:=Admistration
22 TITLE:=delegate authority to run commands
23 URL:=http://www.sudo.ws/
26 define Package/sudo/description
27 Sudo (su "do") allows a system administrator to delegate authority to give
28 certain users (or groups of users) the ability to run some (or all) commands
29 as root or another user while providing an audit trail of the commands and
35 --disable-pam-session \
38 sudo_cv_uid_t_len=10 \
41 $(MAKE) -C $(PKG_BUILD_DIR) \
42 DESTDIR="$(PKG_INSTALL_DIR)" \
46 define Package/sudo/conffiles
50 define Package/sudo/install
51 $(INSTALL_DIR) $(1)/usr/bin
52 $(CP) $(PKG_INSTALL_DIR)/usr/bin/sudo $(1)/usr/bin/
53 chmod 4755 $(1)/usr/bin/sudo
54 $(INSTALL_DIR) $(1)/usr/sbin
55 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/visudo $(1)/usr/sbin/
56 $(INSTALL_DIR) $(1)/etc
57 $(CP) $(PKG_INSTALL_DIR)/etc/sudoers $(1)/etc/
58 chmod 0440 $(1)/etc/sudoers
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sudo_noexec.so $(1)/usr/lib/
63 $(eval $(call BuildPackage,sudo))