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