# fss-0002
#  chgrp e_mount /sbin/mountpoint

main:
  ./configure $CONF $DOCDIR --enable-install-program=hostname --enable-no-install-program=kill $TARGET
  sed -i -e "s|DEFAULT_LOGIN_PATH \":/usr/ucb:/bin:/usr/bin\"|DEFAULT_LOGIN_PATH \":/bin:/sbin:${TC}bin\"|" src/su.c
  sed -i -e 's|DEFAULT_SHELL "/bin/sh"|DEFAULT_SHELL "/bin/bash"|' src/su.c
  sed -i -e 's|DEFAULT_USER "root"|DEFAULT_USER "There Is No Root"|' src/su.c
  sed 's/IDLESTR_LEN 6/IDLESTR_LEN 10/' -i src/who.c
  sed -i -e 's|isfinite|finite|g' src/seq.c
  echo "#undef HAVE_ICONV" >> lib/config.h
  echo "#undef HAVE_ICONV_H" >> lib/config.h
  echo "#undef HAVE_ICONV_CONST" >> lib/config.h
  echo "#undef HAVE_OPENAT" >> lib/config.h
  make
  make install
  mv -v /bin/mknod /sbin/
  chgrp e_public /bin/mktemp
  chgrp e_basic /bin/{[,cp,cut,dircolors,echo,env,expr,factor,false,ls,mkdir,mv,nohup,pathchk,printenv,printf,rm,rmdir,seq,sleep,sync,tac,tee,test,tee,test,true,yes,whoami,cat,timeout,truncate} /bin/stdbuf
  chgrp e_file /bin/{split,csplit,dd,df,id,install,join,link,ln,nl,od,paste,ptx,readlink,shred,shuf,stat,touch}
  chgrp e_time /bin/{date,uptime}
  chgrp e_path /bin/{basename,dirname,du,pwd,vdir}
  chgrp e_text /bin/{base64,comm,expand,fmt,fold,head,pr,tail,tr,sort,tsort,unexpand,uniq,wc}
  chgrp e_permission /bin/{chgrp,chmod,chown,logname,mkfifo,pinky,uname,users,who,chcon,runcon}
  chgrp e_process_admin /bin/nice
  chgrp e_encrypt /bin/{cksum,md5sum,sha1sum,sha224sum,sha256sum,sha384sum,sha512sum,sum}
  chgrp e_network /bin/{hostid,hostname}
  chgrp e_terminal /bin/{,s}tty
  chgrp e_device /sbin/mknod
  chgrp e_switch_root /bin/chroot
  chgrp -R e_public /lib/coreutils
  chmod o-rx /bin/mktemp
  chmod o-rx /bin/{[,cp,cut,dircolors,echo,env,expr,factor,false,ls,mkdir,mv,nohup,pathchk,printenv,printf,rm,rmdir,seq,sleep,sync,tac,tee,test,tee,test,true,yes,whoami,cat,timeout,truncate} /bin/stdbuf
  chmod o-rx /bin/{split,csplit,dd,df,id,install,join,link,ln,nl,od,paste,ptx,readlink,shred,shuf,stat,touch}
  chmod o-rx /bin/{date,uptime}
  chmod o-rx /bin/{basename,dirname,du,pwd,vdir}
  chmod o-rx /bin/{base64,comm,expand,fmt,fold,head,pr,tail,tr,sort,tsort,unexpand,uniq,wc}
  chmod o-rx /bin/{chgrp,chmod,chown,logname,mkfifo,pinky,uname,users,who,chcon,runcon}
  chmod o-rx /bin/nice
  chmod o-rx /bin/{cksum,md5sum,sha1sum,sha224sum,sha256sum,sha384sum,sha512sum,sum}
  chmod o-rx /bin/{hostid,hostname}
  chmod o-rx /bin/{,s}tty
  chmod o-rx /sbin/mknod
  chmod o-rx /bin/chroot
  chmod o-rx /lib/coreutils
  #setcap cap_sys_chroot=ep /bin/chroot
  chmod +s /bin/chroot
  rm -Rf /bin/{unlink,groups,dir} /share/locale
  rm -Rf /bin/ddate
  rm -f /bin/nproc
  tkis_handle_documentation info standard /share/info
