Probably horribly broken, but lets test anyway
ci/woodpecker/push/drone Pipeline was successful Details

This commit is contained in:
UnlimitedCookies 2022-03-03 16:03:23 +01:00
parent a49d3283e9
commit 0b3ef51543
2 changed files with 29 additions and 32 deletions

View File

@ -3,11 +3,11 @@ pipeline:
image: debian image: debian
pull: true pull: true
commands: commands:
- apt update && apt install -y make wget - apt update && apt install -y make curl
- make - make
- ls -la - ls -laR
- make install - make install
- ls -la - ls -laR
when: when:
event: [push, tag] event: [push, tag]
@ -15,9 +15,9 @@ pipeline:
image: debian image: debian
pull: true pull: true
commands: commands:
- apt update && apt install -y build-essential fakeroot devscripts wget - apt update && apt install -y build-essential devscripts
- make package - make package
- ls -la - ls -laR
when: when:
event: tag event: tag

View File

@ -1,44 +1,41 @@
PKGNAME := mdg-test PKG_NAME := mdg-test
UPSTREAM_VERSION := 3.9.2 PKG_VERSION := 3.9.2
PKG_SUB_RELEASE := 1.0 PKG_OPSI_RELEASE := 1.0
PKG_DEB_RELEASE := 1
SOURCE := https://www.python.org/ftp/python/$(UPSTREAM_VERSION)/python-$(UPSTREAM_VERSION)-amd64.exe SOURCE_FILENAME := python-$(PKG_VERSION)-amd64.exe
SOURCE := https://www.python.org/ftp/python/$(PKG_VERSION)/$(SOURCE_FILENAME)
CHECKSUM := efb20aa1b648a2baddd949c142d6eb06 CHECKSUM := efb20aa1b648a2baddd949c142d6eb06
## Download Link and Checksums can be found on https://www.python.org/downloads/windows/ # Sources and Checksums can be found on https://www.python.org/downloads/windows/
#Variables below are set automatically #Variables below are set automatically
PKG_FULL_VERSION := $(UPSTREAM_VERSION)-$(PKG_SUB_RELEASE)
DEB_CHANGELOG_VERSION := $(shell dpkg-parsechangelog -S Version | sed -rne 's|((-*[^-]+)+)(-[^-]+)|\1|p') DEB_CHANGELOG_VERSION := $(shell dpkg-parsechangelog -S Version | sed -rne 's|((-*[^-]+)+)(-[^-]+)|\1|p')
DEB_ORIG_FILE := $(PKGNAME)_$(PKG_FULL_VERSION).orig.tar.gz #DEB_ORIG_FILE := $(PKG_NAME)_$(PKG_FULL_VERSION).orig.tar.gz
default: download default: fetch-sources
all: | clean install data: fetch-sources
download: setversion fetch-sources:
[ -d "data" ] || mkdir data [ -d "data" ] || mkdir data
wget -nc -P data $(SOURCE) curl -o data/$(SOURCE_FILENAME) $(SOURCE)
echo "$(CHECKSUM) data/python-$(UPSTREAM_VERSION)-amd64.exe" | md5sum -c && \ echo "$(CHECKSUM) data/$(SOURCE_FILENAME)" | md5sum -c
echo "SUCCESS: Checksums match" || \
{ ec=$$?; echo "ERROR: Checksum mismatch" >&2; rm -rf data >&2; exit $$ec; }
data: download
install: data install: data setversion
install -Dm644 control -t $(DESTDIR)/srv/deploy/install/$(PKGNAME) install -Dm644 control -t $(DESTDIR)/srv/deploy/install/$(PKG_NAME)
install -Dm644 *.ins -t $(DESTDIR)/srv/deploy/install/$(PKGNAME) install -Dm644 *.ins -t $(DESTDIR)/srv/deploy/install/$(PKG_NAME)
install -Dm644 logo.png -t $(DESTDIR)/srv/deploy/install/$(PKGNAME) install -Dm644 logo.png -t $(DESTDIR)/srv/deploy/install/$(PKG_NAME)
install -Dm644 data/* -t $(DESTDIR)/srv/deploy/install/$(PKGNAME)/data install -Dm644 data/* -t $(DESTDIR)/srv/deploy/install/$(PKG_NAME)/data
uninstall: uninstall:
rm -rf $(DESTDIR)/srv/deploy/install/$(PKGNAME) rm -rf $(DESTDIR)/srv/deploy/install/$(PKG_NAME)
clean: clean:
rm -rf data rm -rf data
setversion: setversion:
@echo "INFO: Writing version $(PKG_FULL_VERSION) to control file" sed -e "s/^version: [0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$$/version: $(PKG_VERSION)/" \
sed -e "s/^version: [0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$$/version: $(UPSTREAM_VERSION)/" \
-e "s/^packageVersion: [0-9]\{1,3\}\.[0-9]\{1,3\}$$/packageVersion: $(PKG_SUB_RELEASE)/" \ -e "s/^packageVersion: [0-9]\{1,3\}\.[0-9]\{1,3\}$$/packageVersion: $(PKG_SUB_RELEASE)/" \
-i control -i control
@ -50,10 +47,10 @@ package-check:
exit 1; \ exit 1; \
fi fi
package: package-check package:
tar cavzf ../$(DEB_ORIG_FILE) --exclude="debian" --exclude="**/.*" . # tar cavzf ../$(DEB_ORIG_FILE) --exclude="debian" --exclude="**/.*" .
debuild -us -uc --diff-ignore="\.\S+" -I dpkg-buildpackage -b
.PHONY: default all download install uninstall clean setversion package-check package .PHONY: default fetch-sources install uninstall clean setversion package-check package