Restructured Makefile's 'patterns' target, splitting out into a stand-alone Makefile in .mlvwm/patterns/ mirroring the structure of .mlvwm/pixmap/Makefile. Major overhaul of the Makefile to use a 'build' target which copies .mlvwm/ into a build/.mlvwm/ where everything is assembled & modified before installation; the Makefiles in .mlvwm/pixmap/ & .mlvwm/patterns/ now also build into build/.mlvwm/pixmap/ & build/.mlvwm/patterns/, respectively, instead of using the existing source directories; this makes for _far_ cleaner and safer build, less reliance on .gitignore files, and such; 'build' and 'clean' targets have been well tested, but the new 'install' target has not. Best to run a 'make clean' prior to updating past this commit, otherwise you will have to manually delete the .gitignore'd .mlvwm/pixmap/*.xpm files!

This commit is contained in:
Morgan Aldridge committed 2026-10-07 12:21:08 -04:00
1 parent 8477b44d2e
commit 003dbec508
4 files changed
+310 -148

No files matched your search

+1
View File
@@ -1 +1,2 @@
tmp
build
+87
View File
@@ -0,0 +1,87 @@
CONF_DIR ?= .mlvwm
BUILD_DIR ?= ../../build
TEMP_DIR ?= ../../tmp
TEMP_PATTERNS ?= $(TEMP_DIR)/patterns
PATTERNS_DIR ?= $(CONF_DIR)/patterns
all: build
clean: clean-patterns clean-temp clean-build
build-init:
-test ! -d $(TEMP_PATTERNS) && mkdir -p $(TEMP_PATTERNS)
-test ! -d $(BUILD_DIR) && mkdir -p $(BUILD_DIR)
clean-temp:
rm -r $(TEMP_PATTERNS)
clean-build:
rm -r $(BUILD_DIR)/$(PATTERNS_DIR)
#
# Each desktop pattern or picture file fetched, converted, and installed into
# this directory by this Makefile **MUST** be listed in this `build` target,
# the `clean-patterns` target, **AND** the `.gitignore` file in this same
# directory!
#
# The individual targets for each pattern or set can be found at the end of
# this file, sorted alphabetically by name. All files fetched remotely for the
# purpose of building the final pattern files **MUST** have a separate target
# to limit re-fetching for the purpose of limiting bandwidth and _especially_
# to prevent rate limiting during repeated builds.
#
build: build-init \
mac-os-solid-colors \
$(BUILD_DIR)/$(PATTERNS_DIR)/mac-os-background.jpg \
$(BUILD_DIR)/$(PATTERNS_DIR)/mac-os-background-hi-res.png \
$(BUILD_DIR)/$(PATTERNS_DIR)/mac-os-default.png
clean-patterns: clean-mac-os-solid-colors
rm $(BUILD_DIR)/$(PATTERNS_DIR)/mac-os-background.jpg
rm $(BUILD_DIR)/$(PATTERNS_DIR)/mac-os-background-hi-res.png
rm $(BUILD_DIR)/$(PATTERNS_DIR)/mac-os-default.png
########################################################################
# Pattern Sets
########################################################################
# Mac OS Solid Colors
#
# **NOTE**: This is a good example of how to fetch and copy an entire pattern
# set, as opposed to the individual patterns below.
"$(TEMP_DIR)/Mac OS Solid Color Backgrounds.zip":
curl -# -L https://imgur.com/a/9jYy0/zip \
-o "$(TEMP_DIR)/Mac OS Solid Color Backgrounds.zip"
mac-os-solid-colors: "$(TEMP_DIR)/Mac OS Solid Color Backgrounds.zip"
unzip -d $(BUILD_DIR)/$(PATTERNS_DIR) \
"$(TEMP_DIR)/Mac OS Solid Color Backgrounds.zip"
clean-mac-os-solid-colors:
# rm $(BUILD_DIR)/$(PATTERNS_DIR)/<INSERT FILE NAMES HERE!>
rm "$(TEMP_DIR)/Mac OS Solid Color Backgrounds.zip"
########################################################################
# Desktop Patterns
########################################################################
#
# Mac OS Desktop Picture (Original)
#
$(BUILD_DIR)/$(PATTERNS_DIR)/mac-os-background.jpg:
curl -# -L https://forums.macrumors.com/attachments/mac-os-background-jpg.61609 \
-o $(BUILD_DIR)/$(PATTERNS_DIR)/mac-os-background.jpg
#
# Mac OS Desktop Picture (High Res)
#
$(BUILD_DIR)/$(PATTERNS_DIR)/mac-os-background-hi-res.png:
curl -# -L https://wallpaperbat.com/img/250263-classic-mac-os-wallpaper.png \
-o $(BUILD_DIR)/$(PATTERNS_DIR)/mac-os-background-hi-res.png
#
# Mac OS Default Pattern (Original)
#
$(BUILD_DIR)/$(PATTERNS_DIR)/mac-os-default.png:
curl -# -L https://forums.macrumors.com/attachments/mac-os-default-png.61610 \
-o $(BUILD_DIR)/$(PATTERNS_DIR)/mac-os-default.png
+161 -116
View File
@@ -1,23 +1,28 @@
CONF ?= ../
TEMP ?= $(CONF)/../tmp
TEMP_PIXMAP ?= $(TEMP)/pixmap
PIXMAP ?= $(CONF)/pixmap
CONF_DIR ?= .mlvwm
BUILD_DIR ?= ../../build
TEMP_DIR ?= ../../tmp
TEMP_PIXMAP ?= $(TEMP_DIR)/pixmap
PIXMAP_DIR ?= $(CONF_DIR)/pixmap
all: build
clean: clean-pixmap clean-temp
clean: clean-pixmap clean-temp clean-build
temp:
mkdir -p $(TEMP_PIXMAP)
build-init:
-test ! -d $(TEMP_PIXMAP) && mkdir -p $(TEMP_PIXMAP)
-test ! -d $(BUILD_DIR) && mkdir -p $(BUILD_DIR)
clean-temp:
rm -r $(TEMP_PIXMAP)
clean-build:
rm -r $(BUILD_DIR)/$(PIXMAP_DIR)
#
# Each .xpm icon (i.e. pixmap) file fetched, converted, and installed into
# this directory by # this Makefile **MUST** be listed in this `build`
# target, the `clean-pixmap` target, **AND** the `.gitignore` file in this
# same directory!
# this directory by this Makefile **MUST** be listed in this `build` target,
# the `clean-pixmap` target, **AND** the `.gitignore` file in this same
# directory!
#
# The individual targets for each icon/pixmap can be found at the end of this
# file, sorted alphabetically by application name. All files fetched remotely
@@ -25,52 +30,52 @@ clean-temp:
# target to limit re-fetching for the purpose of limiting bandwidth and
# _especially_ to prevent rate limiting during repeated builds.
#
build: temp \
build: build-init \
mini-icons \
$(PIXMAP)/0ad.xpm \
$(PIXMAP)/audacity.xpm \
$(PIXMAP)/chromium.xpm \
$(PIXMAP)/claws-mail.xpm \
$(PIXMAP)/cool-retro-term.xpm \
$(PIXMAP)/firefox.xpm \
$(PIXMAP)/gkrellm.xpm \
$(PIXMAP)/godot.xpm \
$(PIXMAP)/iridium.xpm \
$(PIXMAP)/leafpad.xpm \
$(PIXMAP)/links.xpm \
$(PIXMAP)/mpv.xpm \
$(PIXMAP)/netsurf.xpm \
$(PIXMAP)/qemu.xpm \
$(PIXMAP)/scummvm.xpm \
$(PIXMAP)/smplayer.xpm \
$(PIXMAP)/solvespace.xpm \
$(PIXMAP)/vimb.xpm \
$(PIXMAP)/vlc.xpm \
$(PIXMAP)/xpdfreader.xpm \
$(PIXMAP)/zeal.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/0ad.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/audacity.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/chromium.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/claws-mail.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/cool-retro-term.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/firefox.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/gkrellm.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/godot.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/iridium.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/leafpad.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/links.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/mpv.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/netsurf.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/qemu.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/scummvm.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/smplayer.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/solvespace.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/vimb.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/vlc.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/xpdfreader.xpm \
$(BUILD_DIR)/$(PIXMAP_DIR)/zeal.xpm
clean-pixmap: clean-mini-icons
rm $(PIXMAP)/0ad.xpm
rm $(PIXMAP)/audacity.xpm
rm $(PIXMAP)/chromium.xpm
rm $(PIXMAP)/claws-mail.xpm
rm $(PIXMAP)/cool-retro-term.xpm
rm $(PIXMAP)/firefox.xpm
rm $(PIXMAP)/gkrellm.xpm
rm $(PIXMAP)/godot.xpm
rm $(PIXMAP)/iridium.xpm
rm $(PIXMAP)/leafpad.xpm
rm $(PIXMAP)/links.xpm
rm $(PIXMAP)/mpv.xpm
rm $(PIXMAP)/netsurf.xpm
rm $(PIXMAP)/qemu.xpm
rm $(PIXMAP)/scummvm.xpm
rm $(PIXMAP)/smplayer.xpm
rm $(PIXMAP)/solvespace.xpm
rm $(PIXMAP)/vimb.xpm
rm $(PIXMAP)/vlc.xpm
rm $(PIXMAP)/xpdfreader.xpm
rm $(PIXMAP)/zeal.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/0ad.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/audacity.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/chromium.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/claws-mail.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/cool-retro-term.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/firefox.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/gkrellm.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/godot.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/iridium.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/leafpad.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/links.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/mpv.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/netsurf.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/qemu.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/scummvm.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/smplayer.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/solvespace.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/vimb.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/vlc.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/xpdfreader.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/zeal.xpm
########################################################################
# Icon Sets
@@ -81,13 +86,14 @@ clean-pixmap: clean-mini-icons
# **NOTE**: This is a good example of how to fetch and copy an entire .xpm
# icon set, as opposed to the individual application icons below.
$(TEMP_PIXMAP)/mini-icons.tar.gz:
curl -# -L http://www2u.biglobe.ne.jp/~y-miyata/mlvwm/mini-icons.tar.gz -o $(TEMP_PIXMAP)/mini-icons.tar.gz
curl -# -L http://www2u.biglobe.ne.jp/~y-miyata/mlvwm/mini-icons.tar.gz \
-o $(TEMP_PIXMAP)/mini-icons.tar.gz
mini-icons: $(TEMP_PIXMAP)/mini-icons.tar.gz
tar -C $(PIXMAP) -xzf $(TEMP_PIXMAP)/mini-icons.tar.gz
tar -C $(BUILD_DIR)/$(PIXMAP_DIR) -xzf $(TEMP_PIXMAP)/mini-icons.tar.gz
clean-mini-icons:
rm $(PIXMAP)/mini*.xpm
rm $(BUILD_DIR)/$(PIXMAP_DIR)/mini*.xpm
rm $(TEMP_PIXMAP)/mini-icons.tar.gz
########################################################################
@@ -97,177 +103,216 @@ clean-mini-icons:
#
# 0 A.D. (Game)
#
$(PIXMAP)/0ad.xpm:
convert https://play0ad.com/favicon.ico $(PIXMAP)/0ad.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/0ad.xpm:
convert https://play0ad.com/favicon.ico \
$(BUILD_DIR)/$(PIXMAP_DIR)/0ad.xpm
#
# Audacity (Audio)
#
$(PIXMAP)/audacity.xpm:
curl -# -L https://raw.githubusercontent.com/audacity/audacity/master/images/icons/16x16/audacity16.xpm -o $(PIXMAP)/audacity.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/audacity.xpm:
curl -# -L https://raw.githubusercontent.com/audacity/audacity/master/images/icons/16x16/audacity16.xpm \
-o $(BUILD_DIR)/$(PIXMAP_DIR)/audacity.xpm
#
# Chrome/Chromium (Browser)
#
$(PIXMAP)/chromium.xpm:
convert https://www.chromium.org/favicon.ico $(PIXMAP)/chromium.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/chromium.xpm:
convert https://www.chromium.org/favicon.ico \
$(BUILD_DIR)/$(PIXMAP_DIR)/chromium.xpm
#
# Claws-Mail (Email)
#
$(TEMP_PIXMAP)/claws-mail-favicon.ico:
curl -# -L https://claws-mail.org/favicon.ico -o $(TEMP_PIXMAP)/claws-mail-favicon.ico
curl -# -L https://claws-mail.org/favicon.ico \
-o $(TEMP_PIXMAP)/claws-mail-favicon.ico
$(PIXMAP)/claws-mail.xpm: $(TEMP_PIXMAP)/claws-mail-favicon.ico
convert $(TEMP_PIXMAP)/claws-mail-favicon.ico $(PIXMAP)/claws-mail.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/claws-mail.xpm: $(TEMP_PIXMAP)/claws-mail-favicon.ico
convert $(TEMP_PIXMAP)/claws-mail-favicon.ico \
$(BUILD_DIR)/$(PIXMAP_DIR)/claws-mail.xpm
#
# Cool-Retro-Term (i.e. CRT; Terminal)
#
$(TEMP_PIXMAP)/cool-retro-term.png:
curl -# -L https://raw.githubusercontent.com/Swordfish90/cool-retro-term/master/app/icons/32x32/cool-retro-term.png -o $(TEMP_PIXMAP)/cool-retro-term.png
curl -# -L https://raw.githubusercontent.com/Swordfish90/cool-retro-term/master/app/icons/32x32/cool-retro-term.png \
-o $(TEMP_PIXMAP)/cool-retro-term.png
$(PIXMAP)/cool-retro-term.xpm: $(TEMP_PIXMAP)/cool-retro-term.png
convert $(TEMP_PIXMAP)/cool-retro-term.png -resize 16x16\> $(PIXMAP)/cool-retro-term.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/cool-retro-term.xpm: $(TEMP_PIXMAP)/cool-retro-term.png
convert $(TEMP_PIXMAP)/cool-retro-term.png -resize 16x16\> \
$(BUILD_DIR)/$(PIXMAP_DIR)/cool-retro-term.xpm
#
# Firefox (Browser)
#
$(TEMP_PIXMAP)/firefox.png:
curl -# -L https://hg-edge.mozilla.org/mozilla-central/raw-file/default/browser/branding/official/default16.png -o $(TEMP_PIXMAP)/firefox.png
curl -# -L https://hg-edge.mozilla.org/mozilla-central/raw-file/default/browser/branding/official/default16.png \
-o $(TEMP_PIXMAP)/firefox.png
$(PIXMAP)/firefox.xpm: $(TEMP_PIXMAP)/firefox.png
convert $(TEMP_PIXMAP)/firefox.png $(PIXMAP)/firefox.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/firefox.xpm: $(TEMP_PIXMAP)/firefox.png
convert $(TEMP_PIXMAP)/firefox.png \
$(BUILD_DIR)/$(PIXMAP_DIR)/firefox.xpm
#
# GKrellM (Utility)
#
$(TEMP_PIXMAP)/gkrellm.png:
curl -# -L https://git.srcbox.net/gkrellm/gkrellm/raw/branch/master/data/icons/16/gkrellm.png -o $(TEMP_PIXMAP)/gkrellm.png
curl -# -L https://git.srcbox.net/gkrellm/gkrellm/raw/branch/master/data/icons/16/gkrellm.png \
-o $(TEMP_PIXMAP)/gkrellm.png
$(PIXMAP)/gkrellm.xpm: $(TEMP_PIXMAP)/gkrellm.png
convert $(TEMP_PIXMAP)/gkrellm.png $(PIXMAP)/gkrellm.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/gkrellm.xpm: $(TEMP_PIXMAP)/gkrellm.png
convert $(TEMP_PIXMAP)/gkrellm.png \
$(BUILD_DIR)/$(PIXMAP_DIR)/gkrellm.xpm
#
# Godot (Engine/Editor)
#
$(TEMP_PIXMAP)/godot.png:
curl -# -L https://raw.githubusercontent.com/godotengine/godot/master/main/app_icon.png -o $(TEMP_PIXMAP)/godot.png
curl -# -L https://raw.githubusercontent.com/godotengine/godot/master/main/app_icon.png \
-o $(TEMP_PIXMAP)/godot.png
$(PIXMAP)/godot.xpm: $(TEMP_PIXMAP)/godot.png
convert $(TEMP_PIXMAP)/godot.png -resize 16x16\> $(PIXMAP)/godot.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/godot.xpm: $(TEMP_PIXMAP)/godot.png
convert $(TEMP_PIXMAP)/godot.png -resize 16x16\> \
$(BUILD_DIR)/$(PIXMAP_DIR)/godot.xpm
#
# Iridium (Browser)
#
$(TEMP_PIXMAP)/iridium-favicon.ico:
curl -# -L https://iridiumbrowser.de/favicon.ico -o $(TEMP_PIXMAP)/iridium-favicon.ico
curl -# -L https://iridiumbrowser.de/favicon.ico \
-o $(TEMP_PIXMAP)/iridium-favicon.ico
$(PIXMAP)/iridium.xpm: $(TEMP_PIXMAP)/iridium-favicon.ico
convert $(TEMP_PIXMAP)/iridium-favicon.ico[2] $(PIXMAP)/iridium.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/iridium.xpm: $(TEMP_PIXMAP)/iridium-favicon.ico
convert $(TEMP_PIXMAP)/iridium-favicon.ico[2] \
$(BUILD_DIR)/$(PIXMAP_DIR)/iridium.xpm
#
# Leafpad (Text Editor)
#
$(TEMP_PIXMAP)/leafpad.png:
curl -# -L https://raw.githubusercontent.com/tarot231/leafpad/main/data/icons/16x16/leafpad.png -o $(TEMP_PIXMAP)/leafpad.png
curl -# -L https://raw.githubusercontent.com/tarot231/leafpad/main/data/icons/16x16/leafpad.png \
-o $(TEMP_PIXMAP)/leafpad.png
$(PIXMAP)/leafpad.xpm: $(TEMP_PIXMAP)/leafpad.png
convert $(TEMP_PIXMAP)/leafpad.png $(PIXMAP)/leafpad.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/leafpad.xpm: $(TEMP_PIXMAP)/leafpad.png
convert $(TEMP_PIXMAP)/leafpad.png \
$(BUILD_DIR)/$(PIXMAP_DIR)/leafpad.xpm
#
# Links (Browser)
#
$(TEMP_PIXMAP)/links-2.29.tar.gz:
curl -# -L http://links.twibright.com/download/links-2.29.tar.gz -o $(TEMP_PIXMAP)/links-2.29.tar.gz
curl -# -L http://links.twibright.com/download/links-2.29.tar.gz \
-o $(TEMP_PIXMAP)/links-2.29.tar.gz
$(PIXMAP)/links.xpm: $(TEMP_PIXMAP)/links-2.29.tar.gz
tar -xzf $(TEMP_PIXMAP)/links-2.29.tar.gz -C $(TEMP_PIXMAP) links-2.29/linkswin.ico
convert $(TEMP_PIXMAP)/links-2.29/linkswin.ico[0] $(PIXMAP)/links.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/links.xpm: $(TEMP_PIXMAP)/links-2.29.tar.gz
tar -xzf $(TEMP_PIXMAP)/links-2.29.tar.gz -C $(TEMP_PIXMAP) \
links-2.29/linkswin.ico
convert $(TEMP_PIXMAP)/links-2.29/linkswin.ico[0] \
$(BUILD_DIR)/$(PIXMAP_DIR)/links.xpm
#
# MPV (Media Player)
#
$(TEMP_PIXMAP)/mpv.png:
curl -# -L https://raw.githubusercontent.com/mpv-player/mpv.io/master/source/images/favicon.png -o $(TEMP_PIXMAP)/mpv.png
curl -# -L https://raw.githubusercontent.com/mpv-player/mpv.io/master/source/images/favicon.png \
-o $(TEMP_PIXMAP)/mpv.png
$(PIXMAP)/mpv.xpm: $(TEMP_PIXMAP)/mpv.png
convert $(TEMP)/mpv.png -resize 16x16\> $(PIXMAP)/mpv.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/mpv.xpm: $(TEMP_PIXMAP)/mpv.png
convert $(TEMP_PIXMAP)/mpv.png -resize 16x16\> \
$(BUILD_DIR)/$(PIXMAP_DIR)/mpv.xpm
#
# NetSurf (Browser)
#
$(TEMP_PIXMAP)/netsurf-favicon.png:
curl -# -L https://www.netsurf-browser.org/webimages/favicon.png -o $(TEMP_PIXMAP)/netsurf-favicon.png
curl -# -L https://www.netsurf-browser.org/webimages/favicon.png \
-o $(TEMP_PIXMAP)/netsurf-favicon.png
$(PIXMAP)/netsurf.xpm: $(TEMP_PIXMAP)/netsurf-favicon.png
convert $(TEMP_PIXMAP)/netsurf-favicon.png $(PIXMAP)/netsurf.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/netsurf.xpm: $(TEMP_PIXMAP)/netsurf-favicon.png
convert $(TEMP_PIXMAP)/netsurf-favicon.png \
$(BUILD_DIR)/$(PIXMAP_DIR)/netsurf.xpm
#
# QEMU (Emulator)
#
$(TEMP_PIXMAP)/qemu.png:
curl -# -L "https://gitlab.com/qemu-project/qemu/-/raw/master/ui/icons/qemu_16x16.png?ref_type=heads&inline=false" -o $(TEMP_PIXMAP)/qemu.png
curl -# -L "https://gitlab.com/qemu-project/qemu/-/raw/master/ui/icons/qemu_16x16.png?ref_type=heads&inline=false" \
-o $(TEMP_PIXMAP)/qemu.png
$(PIXMAP)/qemu.xpm: $(TEMP_PIXMAP)/qemu.png
convert $(TEMP_PIXMAP)/qemu.png $(PIXMAP)/qemu.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/qemu.xpm: $(TEMP_PIXMAP)/qemu.png
convert $(TEMP_PIXMAP)/qemu.png \
$(BUILD_DIR)/$(PIXMAP_DIR)/qemu.xpm
#
# ScummVM (Emulator)
#
$(TEMP_PIXMAP)/scummvm.ico:
curl -# -L https://raw.githubusercontent.com/scummvm/scummvm/master/icons/scummvm.ico -o $(TEMP_PIXMAP)/scummvm.ico
curl -# -L https://raw.githubusercontent.com/scummvm/scummvm/master/icons/scummvm.ico \
-o $(TEMP_PIXMAP)/scummvm.ico
$(PIXMAP)/scummvm.xpm: $(TEMP_PIXMAP)/scummvm.ico
convert $(TEMP_PIXMAP)/scummvm.ico[8] -resize 16x16\> $(PIXMAP)/scummvm.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/scummvm.xpm: $(TEMP_PIXMAP)/scummvm.ico
convert $(TEMP_PIXMAP)/scummvm.ico[8] -resize 16x16\> \
$(BUILD_DIR)/$(PIXMAP_DIR)/scummvm.xpm
#
# SMPlayer (Media Player)
#
$(TEMP_PIXMAP)/smplayer.png:
curl -# -L https://raw.githubusercontent.com/smplayer-dev/smplayer/master/icons/smplayer_icon16.png -o $(TEMP_PIXMAP)/smplayer.png
curl -# -L https://raw.githubusercontent.com/smplayer-dev/smplayer/master/icons/smplayer_icon16.png \
-o $(TEMP_PIXMAP)/smplayer.png
$(PIXMAP)/smplayer.xpm: $(TEMP_PIXMAP)/smplayer.png
convert $(TEMP_PIXMAP)/smplayer.png $(PIXMAP)/smplayer.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/smplayer.xpm: $(TEMP_PIXMAP)/smplayer.png
convert $(TEMP_PIXMAP)/smplayer.png \
$(BUILD_DIR)/$(PIXMAP_DIR)/smplayer.xpm
#
# SolveSpace (CAD)
#
$(TEMP_PIXMAP)/solvespace.png:
curl -# -L https://raw.githubusercontent.com/solvespace/solvespace/master/res/freedesktop/solvespace-16x16.png -o $(TEMP_PIXMAP)/solvespace.png
curl -# -L https://raw.githubusercontent.com/solvespace/solvespace/master/res/freedesktop/solvespace-16x16.png \
-o $(TEMP_PIXMAP)/solvespace.png
$(PIXMAP)/solvespace.xpm: $(TEMP_PIXMAP)/solvespace.png
convert $(TEMP_PIXMAP)/solvespace.png $(PIXMAP)/solvespace.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/solvespace.xpm: $(TEMP_PIXMAP)/solvespace.png
convert $(TEMP_PIXMAP)/solvespace.png \
$(BUILD_DIR)/$(PIXMAP_DIR)/solvespace.xpm
#
# Vimb (Browser)
#
$(TEMP_PIXMAP)/vimb.png:
curl -# -L https://raw.githubusercontent.com/morgant/vimb-icon/master/.github/images/vimb-transparent-512x512.png -o $(TEMP_PIXMAP)/vimb.png
curl -# -L https://raw.githubusercontent.com/morgant/vimb-icon/master/.github/images/vimb-transparent-512x512.png \
-o $(TEMP_PIXMAP)/vimb.png
$(PIXMAP)/vimb.xpm: $(TEMP_PIXMAP)/vimb.png
convert $(TEMP_PIXMAP)/vimb.png -resize 16x16\> $(PIXMAP)/vimb.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/vimb.xpm: $(TEMP_PIXMAP)/vimb.png
convert $(TEMP_PIXMAP)/vimb.png -resize 16x16\> \
$(BUILD_DIR)/$(PIXMAP_DIR)/vimb.xpm
#
# VLC (Media Player)
#
$(PIXMAP)/vlc.xpm:
curl -# -L https://raw.githubusercontent.com/videolan/vlc/master/share/icons/16x16/vlc.xpm -o $(PIXMAP)/vlc.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/vlc.xpm:
curl -# -L https://raw.githubusercontent.com/videolan/vlc/master/share/icons/16x16/vlc.xpm \
-o $(BUILD_DIR)/$(PIXMAP_DIR)/vlc.xpm
#
# XPDFReader (Editor)
#
$(TEMP_PIXMAP)/xpdfreader-favicon.ico:
curl -# -L https://www.xpdfreader.com/img/favicon.ico -o $(TEMP_PIXMAP)/xpdfreader-favicon.ico
curl -# -L https://www.xpdfreader.com/img/favicon.ico \
-o $(TEMP_PIXMAP)/xpdfreader-favicon.ico
$(PIXMAP)/xpdfreader.xpm: $(TEMP_PIXMAP)/xpdfreader-favicon.ico
convert $(TEMP_PIXMAP)/xpdfreader-favicon.ico[0] $(PIXMAP)/xpdfreader.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/xpdfreader.xpm: $(TEMP_PIXMAP)/xpdfreader-favicon.ico
convert $(TEMP_PIXMAP)/xpdfreader-favicon.ico[0] \
$(BUILD_DIR)/$(PIXMAP_DIR)/xpdfreader.xpm
#
# Zeal (Documentation/Browser)
#
$(TEMP_PIXMAP)/zeal.png:
curl -# -L https://raw.githubusercontent.com/zealdocs/zeal/main/assets/freedesktop/16-apps-zeal.png -o $(TEMP_PIXMAP)/zeal.png
curl -# -L https://raw.githubusercontent.com/zealdocs/zeal/main/assets/freedesktop/16-apps-zeal.png \
-o $(TEMP_PIXMAP)/zeal.png
$(PIXMAP)/zeal.xpm: $(TEMP_PIXMAP)/zeal.png
convert $(TEMP_PIXMAP)/zeal.png $(PIXMAP)/zeal.xpm
$(BUILD_DIR)/$(PIXMAP_DIR)/zeal.xpm: $(TEMP_PIXMAP)/zeal.png
convert $(TEMP_PIXMAP)/zeal.png \
$(BUILD_DIR)/$(PIXMAP_DIR)/zeal.xpm
+61 -32
View File
@@ -1,46 +1,75 @@
TEMP=tmp
CONF=.mlvwm
BIN=bin
PIXMAP=$(CONF)/pixmap
PATTERNS=$(CONF)/patterns
TEMP_DIR = tmp
BUILD_DIR = build
CONF_DIR = .mlvwm
BIN_DIR = bin
PIXMAP_DIR = $(CONF_DIR)/pixmap
PATTERNS_DIR = $(CONF_DIR)/patterns
all: pixmap patterns
build: build-init build-pixmaps build-patterns
rsync -va \
--exclude=".git/" \
--exclude="Makefile" \
--exclude=".gitignore" \
$(CONF_DIR)/ \
$(BUILD_DIR)/$(CONF_DIR)/
rsync -va \
--exclude=".git/" \
--exclude=".gitignore" \
$(BIN_DIR)/ \
$(BUILD_DIR)/$(BIN_DIR)/
find $(BUILD_DIR)/$(BIN_DIR) -type f -iname "mlvwm-*" \
-exec chmod +x {} \;
sed -i \
's@/home2/tak/bin/pixmap@$(HOME)/$(PIXMAP_DIR)@g' \
$(BUILD_DIR)/$(CONF_DIR)/.mlvwmrc
patterns:
test ! -d $(PATTERNS) && mkdir $(PATTERNS)
curl -# -L https://forums.macrumors.com/attachments/mac-os-background-jpg.61609 -o $(PATTERNS)/mac-os-background.jpg
curl -# -L https://wallpaperbat.com/img/250263-classic-mac-os-wallpaper.png -o $(PATTERNS)/mac-os-background-hi-res.png
curl -# -L https://forums.macrumors.com/attachments/mac-os-default-png.61610 -o $(PATTERNS)/mac-os-default.png
curl -# -L https://imgur.com/a/9jYy0/zip -o "$(TEMP)/Mac OS Solid Color Backgrounds.zip"
unzip -d $(PATTERNS) "$(TEMP)/Mac OS Solid Color Backgrounds.zip"
build-init:
-test ! -d $(TEMP_DIR) && mkdir -p $(TEMP_DIR)
-test ! -d $(BUILD_DIR) && mkdir -p $(BUILD_DIR)
install: install-bin
find $(HOME) -name ".mlvwm" -type d -exec mv {}{,.$(date +%Y%m%d-%H%M%S)} \;
cp -R $(CONF) $(HOME)/
ln -fs $(HOME)/$(CONF)/.mlvwmrc $(HOME)/.mlvwmrc
sed -i 's@/home2/tak/bin/pixmap@$(HOME)/$(PIXMAP)@g' $(HOME)/$(CONF)/.mlvwmrc
install: install-archive install-bin
install -o $(USER) -g $(USER) {$(BUILD_DIR),$(HOME)}/$(CONF_DIR)
ln -fs $(HOME)/$(CONF_DIR)/.mlvwmrc $(HOME)/.mlvwmrc
install-bin:
mkdir -p $(HOME)/$(BIN)
find ${HOME}/$(BIN) -name "mlvwm-*" ! -name "*.*" -exec mv {}{,.$(date +%Y%m%d-%H%M%S)} \;
install -m 700 -o $(USER) $(BIN)/mlvwm-* $(HOME)/$(BIN)
-test ! -d $(HOME)/$(BIN_DIR) && mkdir -p $(HOME)/$(BIN_DIR)
install -m 700 -o $(USER) -g $(USER) \
$(BUILD_DIR)/$(BIN_DIR)/mlvwm-* \
$(HOME)/$(BIN_DIR)/
clean: clean-pixmap
rm -r $(TEMP)
rm -rf $(PATTERNS)
install-archive:
-test -d $(HOME)/$(CONF_DIR) \
&& mv $(HOME)/$(CONF_DIR){,.$(date +%Y%m%d-%H%M%S)}
-test -d $(HOME)/$(BIN_DIR) \
&& find $(HOME)/$(BIN_DIR) -type f -name "mlvwm-*" ! -name "*.*" \
-exec mv {}{,.$(date +%Y%m%d-%H%M%S)} \;
clean: clean-pixmaps clean-patterns
rm -r $(TEMP_DIR)
rm -r $(BUILD_DIR)
# For copyright and distribution reasons, it is preferred that application
# icons (i.e. pixmaps) are fetched and copied into `.mlvwm/pixmap/` instead of
# being committed to this repository. This is handled by the `Makefile` and
# `.gitignore` files in the `.mlvwm/pixmap/` directory.
#
# NOTE: This Makefile's `install` target still needs to be updated to **not**
# install the aforementioned `Makefile` & `.gitignore` when installing the
# contents of `.mlvwm/pixmap/`!
pixmap:
cd $(PIXMAP) && make
build-pixmaps:
-test ! -d $(BUILD_DIR)/$(PIXMAP_DIR) \
&& mkdir -p $(BUILD_DIR)/$(PIXMAP_DIR)
cd $(PIXMAP_DIR) && make
cd -
clean-pixmap:
cd $(PIXMAP) && make clean
clean-pixmaps:
cd $(PIXMAP_DIR) && make clean
cd -
# For copyright and distribution reasons, it is preferred that desktop
# patterns are fetched and copied into `.mlvwm/patterns/` instead of being
# committed to this repository. This is handled by the `Makefile` and
# `.gitignore` files in the `.mlvwm/patterns/` directory.
build-patterns:
cd $(PATTERNS_DIR) && make
cd -
clean-patterns:
cd $(PATTERNS_DIR) && make clean
cd -