winst-mdg-visual-studio-code/Makefile

41 lines
1.9 KiB
Makefile

#Config
UPSTREAM_VERSION = 1.50.1
PKG_SUB_RELEASE = 1.0
PKG_FULL_VERSION = ${UPSTREAM_VERSION}-${PKG_SUB_RELEASE}
SOURCE = https://az764295.vo.msecnd.net/stable/d2e414d9e4239a252d1ab117bd7067f125afd80a/VSCodeSetup-x64-${UPSTREAM_VERSION}.exe
CHECKSUM = 0180288d4a51497224997ce0491b1f7335747df3ce858ae9f73458f81f782156
## Download Link and Checksums can be found on https://code.visualstudio.com/Download
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