2 # Copyright (C) 2006-2017 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://www.sudo.ws
/dist
16 PKG_HASH
:=558d10b9a1991fb3b9fa7fa7b07ec4405b7aefb5b3cb0b0871dbc81e3a88e558
18 PKG_MAINTAINER
:=Alexandru Ardelean
<ardeleanalex@gmail.com
>
21 PKG_LICENSE_FILES
:=doc
/LICENSE
22 PKG_CPE_ID
:=cpe
:/a
:todd_miller
:sudo
26 PKG_BUILD_FLAGS
:=no-mips16
28 include $(INCLUDE_DIR
)/package.mk
32 CATEGORY
:=Administration
33 TITLE
:=Delegate authority to run commands
34 URL
:=https
://www.sudo.ws
/
37 define Package
/sudo
/description
38 Sudo
(su
"do") allows a system administrator to delegate authority to
39 give certain users
(or groups of users
) the ability to run some
(or
40 all) commands
as root or another user while providing an audit trail of
41 the commands and their arguments.
44 define Package
/sudo
/conffiles
51 --disable-pam-session \
52 --with-editor
=/bin
/vi \
56 --with-rundir
=/var
/lib
/sudo \
57 --with-vardir
=/var
/lib
/sudo
60 sudo_cv_uid_t_len
=10 \
61 sudo_cv_func_unsetenv_void
=no
63 define Package
/sudo
/install
65 $(1)/etc
/{init.d
,sudoers.d
} \
69 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/sudo
$(1)/usr
/bin
/
70 chmod
4755 $(1)/usr
/bin
/sudo
71 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/visudo
$(1)/usr
/sbin
/
72 $(CP
) $(PKG_INSTALL_DIR
)/etc
/sudoers
$(1)/etc
/
73 chmod
0440 $(1)/etc
/sudoers
74 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/sudo
/*.so
* $(1)/usr
/lib
/sudo
/
75 $(INSTALL_BIN
) .
/files
/sudo.init
$(1)/etc
/init.d
/sudo
78 define Package
/sudo
/postinst
81 [ -n
"$$IPKG_INSTROOT" ] ||
{
82 /etc
/init.d
/sudo enable
83 /etc
/init.d
/sudo start
87 $(eval
$(call BuildPackage
,sudo
))