source: branches/packages_10.03.1/admin/sudo/Makefile

Last change on this file was 29144, checked in by nico, 5 years ago

[backfire] packages/sudo: merge r29143 (closes: #10289)

File size: 1.8 KB
Line 
1#
2# Copyright (C) 2006-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=sudo
11PKG_VERSION:=1.7.8p1
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://www.sudo.ws/sudo/dist
16PKG_MD5SUM:=5552b9aabc43e34bbc8dc557c098a933
17
18PKG_INSTALL:=1
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/sudo
23  SECTION:=admin
24  CATEGORY:=Administration
25  TITLE:=Delegate authority to run commands
26  URL:=http://www.sudo.ws/
27endef
28
29define Package/sudo/description
30 Sudo (su "do") allows a system administrator to delegate authority to
31 give certain users (or groups of users) the ability to run some (or
32 all) commands as root or another user while providing an audit trail of
33 the commands and their arguments.
34endef
35
36define Package/sudo/conffiles
37/etc/sudoers
38endef
39
40CONFIGURE_ARGS+= \
41        --without-pam \
42        --disable-pam-session \
43        --with-editor=/bin/vi \
44        --without-lecture \
45        --disable-zlib
46
47CONFIGURE_VARS+= \
48        sudo_cv_uid_t_len=10 \
49        sudo_cv_func_unsetenv_void=no
50
51define Package/sudo/install
52        $(INSTALL_DIR) $(1)/usr/bin
53        $(CP) $(PKG_INSTALL_DIR)/usr/bin/sudo $(1)/usr/bin/
54        chmod 4755 $(1)/usr/bin/sudo
55        $(INSTALL_DIR) $(1)/usr/sbin
56        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/visudo $(1)/usr/sbin/
57        $(INSTALL_DIR) $(1)/etc
58        $(CP) $(PKG_INSTALL_DIR)/etc/sudoers $(1)/etc/
59        chmod 0440 $(1)/etc/sudoers
60        $(INSTALL_DIR) $(1)/etc/sudoers.d
61        $(INSTALL_DIR) $(1)/usr/lib
62        $(CP) $(PKG_INSTALL_DIR)/usr/lib/sudo_noexec.so $(1)/usr/lib/
63        $(INSTALL_DIR) $(1)/etc/init.d
64        $(INSTALL_BIN) ./files/sudo.init $(1)/etc/init.d/sudo
65endef
66
67define Package/sudo/postinst
68#!/bin/sh
69
70[ -n "$$IPKG_INSTROOT" ] || {
71        /etc/init.d/sudo enable
72        /etc/init.d/sudo start
73}
74endef
75
76$(eval $(call BuildPackage,sudo))
Note: See TracBrowser for help on using the repository browser.