winst-mdg-visual-studio-code/Makefile

41 lines
2.0 KiB
Makefile

UPSTREAM_VERSION = 1.60.0
PKG_SUB_RELEASE = 1.0
PKG_FULL_VERSION = ${UPSTREAM_VERSION}-${PKG_SUB_RELEASE}
SOURCE = https://az764295.vo.msecnd.net/stable/e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff/VSCodeSetup-x64-1.60.0.exe
CHECKSUM = e103b76f8a062110b9619b75af6ee3c935c070b5f22ae4b1bf8fde2ed59ecd60
## Download Link and Checksums can be found on https://code.visualstudio.com/Download
## Look for Windows System Installer (64 bit)
install: clean setversion
@[ -d "./data/" ] || mkdir ./data/
@echo "Downloading the VSCode executable..."
@wget -O ./data/VSCodeSetup-x64-${UPSTREAM_VERSION}.exe ${SOURCE}
@echo "${CHECKSUM} ./data/VSCodeSetup-x64-${UPSTREAM_VERSION}.exe" | sha256sum -c && echo "SUCCESS: Checksums match" || { ec=$$?; echo "ERROR: Checksum mismatch" >&2; exit $$ec; }
@[ -d "./utils/" ] || mkdir ./utils/
@echo "Downloading Utilities..."
## Installing diff.exe and patch.exe from https://sourceforge.net/projects/unxutils/files/unxutils/current/
@wget -O ./utils/UnxUtils.zip https://jztkft.dl.sourceforge.net/project/unxutils/unxutils/current/UnxUtils.zip
@echo "f6a83c372110276f535a1963fa9701a547ef5342 ./utils/UnxUtils.zip" | sha1sum -c && echo "SUCCESS: Checksums match" || { ec=$$?; echo "ERROR: Checksum mismatch" >&2; exit $$ec; }
@echo "Extracting diff.exe from archive..."
@unzip -p ./utils/UnxUtils.zip usr/local/wbin/diff.exe > ./utils/diff.exe
@echo "Extracting patch.exe from archive..."
@unzip -p ./utils/UnxUtils.zip usr/local/wbin/patch.exe > ./utils/patch.exe
@echo "Removing temp archive..."
@rm -f ./utils/UnxUtils.zip
clean:
@echo "Cleaning ./data/"
@rm -rf ./data/
@echo "Cleaning ./utils/"
@rm -rf ./utils/
setversion:
@echo "Writing version ${PKG_FULL_VERSION} to control file"
@sed -i "s/^version: [0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$$/version: ${UPSTREAM_VERSION}/" ./control
@sed -i "s/^packageVersion: [0-9]\{1,3\}\.[0-9]\{1,3\}$$/packageVersion: ${PKG_SUB_RELEASE}/" ./control
package:
@echo "MEEP!"
.PHONY: install clean setversion package