sudo: bump to version 1.9.9
[feed/packages.git] / admin / sudo / Makefile
1 #
2 # Copyright (C) 2006-2017 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=sudo
11 PKG_VERSION:=1.9.9
12 PKG_RELEASE:=$(AUTORELEASE)
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://www.sudo.ws/dist
16 PKG_HASH:=6d6ee863a3bc26c87661093a74ec63e10fd031ceba714642d21636dfe25e3e00
17
18 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
19
20 PKG_LICENSE:=ISC
21 PKG_LICENSE_FILES:=doc/LICENSE
22 PKG_CPE_ID:=cpe:/a:todd_miller:sudo
23
24 PKG_INSTALL:=1
25 PKG_BUILD_PARALLEL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/sudo
30 SECTION:=admin
31 CATEGORY:=Administration
32 TITLE:=Delegate authority to run commands
33 URL:=https://www.sudo.ws/
34 endef
35
36 define Package/sudo/description
37 Sudo (su "do") allows a system administrator to delegate authority to
38 give certain users (or groups of users) the ability to run some (or
39 all) commands as root or another user while providing an audit trail of
40 the commands and their arguments.
41 endef
42
43 define Package/sudo/conffiles
44 /etc/sudoers
45 /etc/sudoers.d/
46 endef
47
48 CONFIGURE_ARGS += \
49 --without-pam \
50 --disable-pam-session \
51 --with-editor=/bin/vi \
52 --without-lecture \
53 --disable-zlib \
54 --disable-openssl \
55 --with-rundir=/var/lib/sudo \
56 --with-vardir=/var/lib/sudo
57
58 CONFIGURE_VARS += \
59 sudo_cv_uid_t_len=10 \
60 sudo_cv_func_unsetenv_void=no
61
62 define Package/sudo/install
63 $(INSTALL_DIR) \
64 $(1)/etc/{init.d,sudoers.d} \
65 $(1)/usr/{bin,sbin} \
66 $(1)/usr/lib/sudo
67
68 $(CP) $(PKG_INSTALL_DIR)/usr/bin/sudo $(1)/usr/bin/
69 chmod 4755 $(1)/usr/bin/sudo
70 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/visudo $(1)/usr/sbin/
71 $(CP) $(PKG_INSTALL_DIR)/etc/sudoers $(1)/etc/
72 chmod 0440 $(1)/etc/sudoers
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sudo/*.so* $(1)/usr/lib/sudo/
74 $(INSTALL_BIN) ./files/sudo.init $(1)/etc/init.d/sudo
75 endef
76
77 define Package/sudo/postinst
78 #!/bin/sh
79
80 [ -n "$$IPKG_INSTROOT" ] || {
81 /etc/init.d/sudo enable
82 /etc/init.d/sudo start
83 }
84 endef
85
86 $(eval $(call BuildPackage,sudo))