Compare commits

..

No commits in common. "master" and "fe" have entirely different histories.
master ... fe

11 changed files with 67 additions and 73 deletions

22
.drone.yml Normal file
View File

@ -0,0 +1,22 @@
pipeline:
build:
image: debian
pull: true
commands:
- apt update && apt install -y make wget
- make
- ls -la
- make install
- ls -la
when:
event: [push, tag]
package:
image: debian
pull: true
commands:
- apt update && apt install -y build-essential fakeroot devscripts
- make package
- ls -la
when:
event: tag

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
*.exe *.exe
/build/ /data/
# ignore the debian stuff # ignore the debian stuff
debhelper-build-stamp debhelper-build-stamp

View File

@ -1,34 +0,0 @@
pipeline:
build_deb:
image: gitea.mdg-hamburg.de/ci-tools/deb-buildpackage:latest
pull: true
commands:
- make package
- ls ..
- dpkg -c ../*.deb
when:
event: [push, tag]
publish:
image: docker.io/plugins/sftp:linux-amd64
pull: true
settings:
host:
from_secret: deb_repo_ssh_host
port:
from_secret: deb_repo_ssh_port
username:
from_secret: deb_repo_ssh_username
password:
from_secret: deb_repo_ssh_password
files:
- ../*.deb
- ../*.dsc
- ../*.git
- ../*.changes
- ../*.buildinfo
destination_path: /var/www/repository/debian/incoming/input
when:
event: [tag]
branches: master

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2022 Kevin Dorner Copyright (c) 2021 Kevin Dorner
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,45 +1,48 @@
PKG_NAME := mdg-test PKGNAME := mdg-test
PKG_VERSION := 3.9.2 UPSTREAM_VERSION := 3.9.2
PKG_OPSI_RELEASE := 1.0 PKG_SUB_RELEASE := 1.0
PKG_DEB_RELEASE := 1
# sources and checksums can be found on https://www.python.org/downloads/windows/ 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/
default: fetch-sources patch-fields #Automatically set variables
PKG_FULL_VERSION := $(UPSTREAM_VERSION)-$(PKG_SUB_RELEASE)
DEB_CHANGELOG_VERSION := $(shell dpkg-parsechangelog -S Version | sed -rne 's|((-*[^-]+)+)(-[^-]+)|\1|p')
DEB_ORIG_FILE := $(PKGNAME)_$(PKG_FULL_VERSION).orig.tar.gz
BUILDDIR := build default: download
$(BUILDDIR):
mkdir -p $(BUILDDIR)/data
fetch-sources: $(BUILDDIR) all: | clean install
curl -o $(BUILDDIR)/data/$(SOURCE_FILENAME) $(SOURCE)
echo "$(CHECKSUM) $(BUILDDIR)/data/$(SOURCE_FILENAME)" | md5sum -c
patch-fields: $(BUILDDIR) download: setversion
sed -e "s|@PKG_VERSION@|$(PKG_VERSION)|" \ [ -d "data" ] || mkdir data
-e "s|@PKG_OPSI_RELEASE@|$(PKG_OPSI_RELEASE)|" \ wget -nc -P data $(SOURCE)
control.in > $(BUILDDIR)/control echo "$(CHECKSUM) data/python-$(UPSTREAM_VERSION)-amd64.exe" | md5sum -c && \
echo "SUCCESS: Checksums match" || \
{ ec=$$?; echo "ERROR: Checksum mismatch" >&2; rm -rf data >&2; exit $$ec; }
clean: data: download
rm -rf $(BUILDDIR)
install: $(BUILDDIR) install: data
install -Dm644 $(BUILDDIR)/control -t $(DESTDIR)/srv/deploy/install/$(PKG_NAME) install -Dm644 control -t $(DESTDIR)/srv/deploy/install/$(PKGNAME)
install -Dm644 $(BUILDDIR)/data/* -t $(DESTDIR)/srv/deploy/install/$(PKG_NAME)/data 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
uninstall: uninstall:
rm -rf $(DESTDIR)/srv/deploy/install/$(PKG_NAME) rm -rf $(DESTDIR)/srv/deploy/install/$(PKGNAME)
package: clean:
dpkg-buildpackage --unsigned-source --unsigned-changes --no-check-builddeps rm -rf data
# DEB_CHANGELOG_VERSION := $(shell dpkg-parsechangelog -S Version | sed -rne 's|((-*[^-]+)+)(-[^-]+)|\1|p') setversion:
package-check-changelog: @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: $(UPSTREAM_VERSION)/" \
-e "s/^packageVersion: [0-9]\{1,3\}\.[0-9]\{1,3\}$$/packageVersion: $(PKG_SUB_RELEASE)/" \
-i control
check-before-package:
@if [ "$(DEB_CHANGELOG_VERSION)" != "$(PKG_FULL_VERSION)" ]; then \ @if [ "$(DEB_CHANGELOG_VERSION)" != "$(PKG_FULL_VERSION)" ]; then \
echo "Mismatch between debian changelog file and Makefile version"; \ echo "Mismatch between debian changelog file and Makefile version"; \
echo "Debian changelog version: $(DEB_CHANGELOG_VERSION)"; \ echo "Debian changelog version: $(DEB_CHANGELOG_VERSION)"; \
@ -47,5 +50,9 @@ package-check-changelog:
exit 1; \ exit 1; \
fi fi
package: check-before-package
tar cavzf ../mdg-test_3.9.2-1.0.orig.tar.gz --exclude="debian" --exclude="**/.*" .
debuild -us -uc
.PHONY: default all download install uninstall clean setversion check-berfore-package package
.PHONY: default fetch-sources patch-fields clean install uninstall package package-check-changelog

View File

@ -1,4 +1,3 @@
![status-badge](https://drone.mdg-hamburg.de/api/badges/kevin.dorner/CI-Test/status.svg)
# mdg-python # mdg-python
A better Python for Windows OPSI package aimed to work with IServ A better Python for Windows OPSI package aimed to work with IServ

View File

@ -4,8 +4,8 @@ id: mdg-python
name: MDG Python name: MDG Python
description: Python für Microsoft Windows mit pip-Unterstützung description: Python für Microsoft Windows mit pip-Unterstützung
advice: Vereinfachtes Paket mit neuer Python-Version und funktionsfähiger pip-Unterstützung advice: Vereinfachtes Paket mit neuer Python-Version und funktionsfähiger pip-Unterstützung
version: @PKG_VERSION@ version: 3.9.2
packageVersion: @PKG_OPSI_RELEASE@ packageVersion: 1.0
setupScript: install.ins setupScript: install.ins
uninstallScript: remove.ins uninstallScript: remove.ins

2
debian/control vendored
View File

@ -8,7 +8,7 @@ Vcs-Git: https://gitea.mdg-hamburg.de/MDG-Packages/winst-mdg-python.git
Vcs-Browser: https://gitea.mdg-hamburg.de/MDG-Packages/winst-mdg-python Vcs-Browser: https://gitea.mdg-hamburg.de/MDG-Packages/winst-mdg-python
Package: mdg-test Package: winst-mdg-python
Architecture: all Architecture: all
Depends: winst-microsoft-windows-10-64 Depends: winst-microsoft-windows-10-64
Provides: winst-python Provides: winst-python

2
debian/files vendored Normal file
View File

@ -0,0 +1,2 @@
mdg-test_1.1.1-2.2-1_amd64.buildinfo misc optional
winst-mdg-python_1.1.1-2.2-1_all.deb misc optional

View File

@ -1 +0,0 @@
3.0 (git)

View File

@ -53,7 +53,6 @@ endif
[Files_Cleanup] [Files_Cleanup]
; This ensures all data has been removed ; This ensures all data has been removed
; Leave previous versions for future removal
delete -sf "%ProgramFiles64Dir%\python39\" delete -sf "%ProgramFiles64Dir%\python39\"
[WinBatch_Setup] [WinBatch_Setup]