From e95fa28f98cc193abb5b6b12c6f7b479ba78daa2 Mon Sep 17 00:00:00 2001 From: nodiscc Date: Fri, 13 Mar 2020 22:58:27 +0100 Subject: [PATCH] tools: Makefile: move 3rd party downloads to separate file - adds an easy way to disable third party downloads before build --- Makefile | 46 +++++----------------------------------------- Makefile.extra | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 41 deletions(-) create mode 100644 Makefile.extra diff --git a/Makefile b/Makefile index e2271a6..95d95b2 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ #!/usr/bin/make -f -# remove 'download_extras' to build without third party software -all: install_buildenv clean download_extras build +# remove 'download_extra' to build without third party software/dotfiles +all: install_buildenv clean download_extra build + +download_extra: + make -f Makefile.extra install_buildenv: # Install packages required to build the image @@ -13,45 +16,6 @@ install_buildenv: clean: sudo lb clean --purge -WGET=wget --continue --no-verbose --show-progress --directory-prefix=cache/downloads/ -download_extras: - # Download unpackaged software - # TODO file ITPs on bugs.debian.org, package for Debian - mkdir -p cache/downloads/ - # https://gitlab.com/nodiscc/plymouth-theme-debian-logo - -rm -rf config/includes.chroot/usr/share/plymouth/themes/debian-logo cache/downloads/plymouth-theme-debian-logo-1.0 - $(WGET) https://gitlab.com/nodiscc/plymouth-theme-debian-logo/-/archive/1.0/plymouth-theme-debian-logo-1.0.zip - unzip -q cache/downloads/plymouth-theme-debian-logo-1.0.zip -d cache/downloads/ - mkdir -p config/includes.chroot/usr/share/plymouth/themes/ - mv cache/downloads/plymouth-theme-debian-logo-1.0 config/includes.chroot/usr/share/plymouth/themes/debian-logo - # https://gitlab.com/nodiscc/cc0-wallpapers - -rm -rf config/includes.chroot/usr/share/backgrounds/cc0-wallpapers cache/downloads/cc0-wallpapers-1.0 - $(WGET) https://gitlab.com/nodiscc/cc0-wallpapers/-/archive/1.0/cc0-wallpapers-1.0.zip - unzip -q cache/downloads/cc0-wallpapers-1.0.zip -d cache/downloads/ - mkdir -p config/includes.chroot/usr/share/backgrounds/ - mv cache/downloads/cc0-wallpapers-1.0 config/includes.chroot/usr/share/backgrounds/cc0-wallpapers - # https://gitlab.com/nodiscc/xfce4-terminal-colorschemes - -rm -rf config/includes.chroot/usr/share/xfce4/terminal/colorschemes cache/downloads/xfce4-terminal-colorschemes-1.0 - $(WGET) https://gitlab.com/nodiscc/xfce4-terminal-colorschemes/-/archive/1.0/xfce4-terminal-colorschemes-1.0.zip - unzip -q cache/downloads/xfce4-terminal-colorschemes-1.0.zip -d cache/downloads/ - mkdir -p config/includes.chroot/usr/share/xfce4/terminal/ - mv cache/downloads/xfce4-terminal-colorschemes-1.0 config/includes.chroot/usr/share/xfce4/terminal/colorschemes - # https://github.com/scopatz/nanorc - -rm -rf config/includes.chroot/etc/skel/.nano cache/downloads/nano-highlight-master - $(WGET) https://github.com/scopatz/nanorc/archive/master.zip -O cache/downloads/nanorc-master.zip - unzip -q cache/downloads/nanorc-master.zip -d cache/downloads/ - mv cache/downloads/nanorc-master config/includes.chroot/etc/skel/.nano - git checkout -- config/includes.chroot/etc/skel/.nanorc - echo 'include ~/.nano/*.nanorc' >> config/includes.chroot/etc/skel/.nanorc - # https://github.com/az0/cleanerml - -rm -rf config/includes.chroot/usr/share/bleachbit/cleaners cache/downloads/cleanerml-master - $(WGET) https://github.com/az0/cleanerml/archive/master.zip -O cache/downloads/cleanerml-master.zip - unzip -q cache/downloads/cleanerml-master.zip -d cache/downloads/ - mkdir -p config/includes.chroot/usr/share/bleachbit/cleaners - mv cache/downloads/cleanerml-master/release/* config/includes.chroot/usr/share/bleachbit/cleaners/ - -############################## - bump_version: @last_tag=$$(git tag | tail -n1); \ echo "Please set version to $$last_tag in Makefile config/bootloaders/isolinux/live.cfg.in config/bootloaders/isolinux/menu.cfg auto/config" diff --git a/Makefile.extra b/Makefile.extra new file mode 100644 index 0000000..117a415 --- /dev/null +++ b/Makefile.extra @@ -0,0 +1,39 @@ +#!/usr/bin/make +WGET=wget --continue --no-verbose --show-progress --directory-prefix=cache/downloads/ +download_extra: + # Download unpackaged/third-party software + # TODO file ITPs on bugs.debian.org, package for Debian + mkdir -p cache/downloads/ + # https://gitlab.com/nodiscc/plymouth-theme-debian-logo + -rm -rf config/includes.chroot/usr/share/plymouth/themes/debian-logo cache/downloads/plymouth-theme-debian-logo-1.0 + $(WGET) https://gitlab.com/nodiscc/plymouth-theme-debian-logo/-/archive/1.0/plymouth-theme-debian-logo-1.0.zip + unzip -q cache/downloads/plymouth-theme-debian-logo-1.0.zip -d cache/downloads/ + mkdir -p config/includes.chroot/usr/share/plymouth/themes/ + mv cache/downloads/plymouth-theme-debian-logo-1.0 config/includes.chroot/usr/share/plymouth/themes/debian-logo + # https://gitlab.com/nodiscc/cc0-wallpapers + -rm -rf config/includes.chroot/usr/share/backgrounds/cc0-wallpapers cache/downloads/cc0-wallpapers-1.0 + $(WGET) https://gitlab.com/nodiscc/cc0-wallpapers/-/archive/1.0/cc0-wallpapers-1.0.zip + unzip -q cache/downloads/cc0-wallpapers-1.0.zip -d cache/downloads/ + mkdir -p config/includes.chroot/usr/share/backgrounds/ + mv cache/downloads/cc0-wallpapers-1.0 config/includes.chroot/usr/share/backgrounds/cc0-wallpapers + # https://gitlab.com/nodiscc/xfce4-terminal-colorschemes + -rm -rf config/includes.chroot/usr/share/xfce4/terminal/colorschemes cache/downloads/xfce4-terminal-colorschemes-1.0 + $(WGET) https://gitlab.com/nodiscc/xfce4-terminal-colorschemes/-/archive/1.0/xfce4-terminal-colorschemes-1.0.zip + unzip -q cache/downloads/xfce4-terminal-colorschemes-1.0.zip -d cache/downloads/ + mkdir -p config/includes.chroot/usr/share/xfce4/terminal/ + mv cache/downloads/xfce4-terminal-colorschemes-1.0 config/includes.chroot/usr/share/xfce4/terminal/colorschemes + # https://github.com/scopatz/nanorc + -rm -rf config/includes.chroot/etc/skel/.nano cache/downloads/nano-highlight-master + $(WGET) https://github.com/scopatz/nanorc/archive/master.zip -O cache/downloads/nanorc-master.zip + unzip -q cache/downloads/nanorc-master.zip -d cache/downloads/ + mv cache/downloads/nanorc-master config/includes.chroot/etc/skel/.nano + git checkout -- config/includes.chroot/etc/skel/.nanorc + echo 'include ~/.nano/*.nanorc' >> config/includes.chroot/etc/skel/.nanorc + # https://github.com/az0/cleanerml + -rm -rf config/includes.chroot/usr/share/bleachbit/cleaners cache/downloads/cleanerml-master + $(WGET) https://github.com/az0/cleanerml/archive/master.zip -O cache/downloads/cleanerml-master.zip + unzip -q cache/downloads/cleanerml-master.zip -d cache/downloads/ + mkdir -p config/includes.chroot/usr/share/bleachbit/cleaners + mv cache/downloads/cleanerml-master/release/* config/includes.chroot/usr/share/bleachbit/cleaners/ + +##############################