Files
Astral/recipes/sudo
T
2024-09-08 22:15:31 -03:00

21 lines
578 B
Plaintext

name=sudo
revision=1
from_source=sudo
imagedeps="base-devel"
hostdeps="xgcc xbinutils"
deps="base libxcrypt"
build() {
${source_dir}/configure --host=x86_64-astral --prefix=${prefix} --with-secure-path --with-env-editor --with-passprompt="[sudo] password for %p: " --disable-nls
make -j ${parallelism}
}
package() {
make install DESTDIR=${dest_dir}
export mode=$(stat -c "%a" ${dest_dir}/etc/sudoers)
chmod 700 ${dest_dir}/etc/sudoers
echo "astral ALL=(ALL:ALL) ALL" >> ${dest_dir}/etc/sudoers
chmod ${mode} ${dest_dir}/etc/sudoers
chmod u+s ${dest_dir}/etc/sudoers
}