2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

Install AIX packages under /opt/freeware with links in /usr/bin and

/usr/sbin.  This matches the layout of the sudo package from AIX
freeware.
This commit is contained in:
Todd C. Miller 2012-06-11 15:07:16 -04:00
parent a8e0687ca9
commit c498235578
2 changed files with 32 additions and 0 deletions

16
mkpkg
View File

@ -252,6 +252,22 @@ case "$osversion" in
--with-env-editor
$configure_opts"
;;
aix*)
# Note, must indent with tabs, not spaces due to IFS trickery
# Note: we include our own zlib instead of relying on the
# AIX freeware version being installed.
configure_opts="
--prefix=/opt/freeware
--mandir=/opt/freeware/man
--with-insults=disabled
--with-logging=syslog
--with-logfac=auth
--with-editor=/usr/bin/vi
--with-env-editor
--enable-zlib=builtin
$configure_opts"
PPVARS="${PPVARS}${PPVARS+$space}aix_freeware=$true"
;;
*)
# For Solaris, add project support and use let configure choose zlib.
# For all others, use the builtin zlib and disable NLS support.

16
sudo.pp
View File

@ -214,6 +214,15 @@ still allow people to get their work done."
perl -pe 'last if (/^What/i && $seen++)' NEWS > ${pp_wrkdir}/ReadMe.txt
%endif
%if X"$aix_freeware" = X"true"
# Create links from /opt/freeware/{bin,sbin} -> /usr/{bin.sbin}
mkdir -p ${pp_destdir}/usr/bin ${pp_destdir}/usr/sbin
ln -s -f ${bindir}/sudo ${pp_destdir}/usr/bin
ln -s -f ${bindir}/sudoedit ${pp_destdir}/usr/bin
ln -s -f ${bindir}/sudoreplay ${pp_destdir}/usr/bin
ln -s -f ${sbindir}/visudo ${pp_destdir}/usr/sbin
%endif
# OS-level directories that should generally exist but might not.
extradirs=`echo ${pp_destdir}/${mandir}/[mc]* | sed "s#${pp_destdir}/##g"`
extradirs="$extradirs `dirname $docdir` `dirname $timedir`"
@ -267,6 +276,13 @@ still allow people to get their work done."
%else
$sudoersdir/sudoers.dist $sudoers_mode $sudoers_uid:$sudoers_gid volatile
%endif
%if X"$aix_freeware" = X"true"
# Links for binaries from /opt/freeware to /usr
/usr/bin/sudo 0755 root: symlink $bindir/sudo
/usr/bin/sudoedit 0755 root: symlink $bindir/sudoedit
/usr/bin/sudoreplay 0755 root: symlink $bindir/sudoreplay
/usr/sbin/visudo 0755 root: symlink $sbindir/visudo
%endif
%files [!aix]
$sudoedit_man 0644 symlink,ignore-others $sudoedit_man_target