sudo: bump to verison 1.9.15p5
[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.15p5
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://www.sudo.ws/dist
16 PKG_HASH:=558d10b9a1991fb3b9fa7fa7b07ec4405b7aefb5b3cb0b0871dbc81e3a88e558
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 PKG_BUILD_FLAGS:=no-mips16
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/sudo
31 SECTION:=admin
32 CATEGORY:=Administration
33 TITLE:=Delegate authority to run commands
34 URL:=https://www.sudo.ws/
35 endef
36
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.
42 endef
43
44 define Package/sudo/conffiles
45 /etc/sudoers
46 /etc/sudoers.d/
47 endef
48
49 CONFIGURE_ARGS += \
50 --without-pam \
51 --disable-pam-session \
52 --with-editor=/bin/vi \
53 --without-lecture \
54 --disable-zlib \
55 --disable-openssl \
56 --with-rundir=/var/lib/sudo \
57 --with-vardir=/var/lib/sudo
58
59 CONFIGURE_VARS += \
60 sudo_cv_uid_t_len=10 \
61 sudo_cv_func_unsetenv_void=no
62
63 define Package/sudo/install
64 $(INSTALL_DIR) \
65 $(1)/etc/{init.d,sudoers.d} \
66 $(1)/usr/{bin,sbin} \
67 $(1)/usr/lib/sudo
68
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
76 endef
77
78 define Package/sudo/postinst
79 #!/bin/sh
80
81 [ -n "$$IPKG_INSTROOT" ] || {
82 /etc/init.d/sudo enable
83 /etc/init.d/sudo start
84 }
85 endef
86
87 $(eval $(call BuildPackage,sudo))