Newer
Older
tools-builder / makefile
  1. # Produce standard tools tarballs using linuxbrew
  2.  
  3. EXPORTDIR = /shared
  4. INSTALLDIR = /opt/TundraWare
  5. TOOLS = tools
  6. TOOLSDIR = ${INSTALLDIR}/${TOOLS}
  7.  
  8. BREW = ${TOOLSDIR}/bin/brew
  9. DATESTAMP = $(shell date +%Y%m%d)
  10.  
  11. # Get latest linuxbrew
  12.  
  13. getbrew:
  14. echo "Make sure you have write permission on the target directory!"
  15. git clone https://github.com/Linuxbrew/brew.git ${TOOLSDIR}
  16.  
  17. bootstrap-build:
  18. echo "Make sure you have the OS development tools installed!"
  19. ${BREW} install git make file-formula perl
  20.  
  21. bootstrap-release: tidyup
  22. cd ${INSTALLDIR} && mv -v ${TOOLS} ${TOOLS}-bootstrap-${DATESTAMP}
  23. cd ${INSTALLDIR} && tar -czvf ${EXPORTDIR}/${TOOLS}-bootstrap-${DATESTAMP}.tar.gz ${TOOLS}-bootstrap-${DATESTAMP}
  24.  
  25. full-build:
  26. echo "Make sure you OS autoconf, automake, and perl installed!"
  27. echo 'Make sure the bootstrap is installed at $TOOLSDIR'
  28. ${BREW} install emacs joe htop nload nmap screen the_silver_searcher tree vim
  29.  
  30. full-release: tidyup
  31. cd ${INSTALLDIR} && mv -v ${TOOLS} ${TOOLS}-full-${DATESTAMP}
  32. cd ${INSTALLDIR} && tar -czvf ${EXPORTDIR}/${TOOLS}-${DATESTAMP}.tar.gz ${TOOLS}-${DATESTAMP}
  33.  
  34. tidyup:
  35. ${BREW} config
  36. ${BREW} prune
  37. ${BREW} cleanup
  38. -${BREW} doctor
  39.  
  40. clean:
  41. rm -vrf ${TOOLSDIR}