Compare commits

..

7 Commits

Author SHA1 Message Date
8b0ce9826f Very much edit
Some checks failed
ci/woodpecker/push/drone Pipeline failed
ci/woodpecker/tag/drone Pipeline failed
2022-03-03 20:40:16 +01:00
90043d5bc7 Added git source format and streamlined drone.yml
All checks were successful
ci/woodpecker/push/drone Pipeline was successful
2022-03-03 16:25:49 +01:00
0b3ef51543 Probably horribly broken, but lets test anyway
All checks were successful
ci/woodpecker/push/drone Pipeline was successful
2022-03-03 16:03:23 +01:00
a49d3283e9 Test da branch selector
All checks were successful
ci/woodpecker/tag/drone Pipeline was successful
2022-02-13 21:19:41 +01:00
cef3feefb9 Update 'README.md' 2022-01-31 13:55:51 +01:00
c6c276c67d trololol
All checks were successful
continuous-integration/drone the build was successful
2021-09-29 02:56:38 +02:00
762a37e435 lol§
All checks were successful
continuous-integration/drone the build was successful
2021-09-24 01:27:06 +02:00
6 changed files with 78 additions and 54 deletions

View File

@ -1,22 +1,12 @@
pipeline:
build:
build_deb:
image: debian
pull: true
commands:
- apt update && apt install -y make wget
- make
- ls -la
- make install
- ls -la
- apt update && apt install -y build-essential devscripts
- make package
- ls -laR ..
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
branches: master

View File

@ -1,48 +1,48 @@
PKGNAME := mdg-test
UPSTREAM_VERSION := 3.9.2
PKG_SUB_RELEASE := 1.0
PKG_NAME := mdg-test
PKG_VERSION := 3.9.2
PKG_OPSI_RELEASE := 1.0
PKG_DEB_RELEASE := 1
SOURCE := https://www.python.org/ftp/python/$(UPSTREAM_VERSION)/python-$(UPSTREAM_VERSION)-amd64.exe
# Sources and Checksums can be found on https://www.python.org/downloads/windows/
SOURCE_FILENAME := python-$(PKG_VERSION)-amd64.exe
SOURCE := https://www.python.org/ftp/python/$(PKG_VERSION)/$(SOURCE_FILENAME)
CHECKSUM := efb20aa1b648a2baddd949c142d6eb06
## Download Link and Checksums can be found on https://www.python.org/downloads/windows/
#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
default: download
#Variables below are set automatically
#DEB_CHANGELOG_VERSION := $(shell dpkg-parsechangelog -S Version | sed -rne 's|((-*[^-]+)+)(-[^-]+)|\1|p')
all: | clean install
download: setversion
[ -d "data" ] || mkdir data
wget -nc -P data $(SOURCE)
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; }
BUILDDIR := build
$(BUILDDIR): fetch-sources patch-version
data: download
fetch-sources:
[ -d "$(BUILDDIR)/data" ] || mkdir -p $(BUILDDIR)/data
curl -o $(BUILDDIR)/data/$(SOURCE_FILENAME) $(SOURCE)
echo "$(CHECKSUM) $(BUILDDIR)/data/$(SOURCE_FILENAME)" | md5sum -c
install: data
install -Dm644 control -t $(DESTDIR)/srv/deploy/install/$(PKGNAME)
install -Dm644 *.ins -t $(DESTDIR)/srv/deploy/install/$(PKGNAME)
install -Dm644 logo.png -t $(DESTDIR)/srv/deploy/install/$(PKGNAME)
install -Dm644 data/* -t $(DESTDIR)/srv/deploy/install/$(PKGNAME)/data
uninstall:
rm -rf $(DESTDIR)/srv/deploy/install/$(PKGNAME)
patch-version:
sed -e "s|@PKG_VERSION@|$(PKG_VERSION)|" \
-e "s|@PKG_OPSI_RELEASE@|$(PKG_OPSI_RELEASE)|" \
control.in > $(BUILDDIR)/control
clean:
rm -rf data
rm -rf $(BUILDDIR)
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: $(UPSTREAM_VERSION)/" \
-e "s/^packageVersion: [0-9]\{1,3\}\.[0-9]\{1,3\}$$/packageVersion: $(PKG_SUB_RELEASE)/" \
-i control
check-before-package:
install: $(BUILDDIR)
install -Dm644 $(BUILDDIR)/control -t $(DESTDIR)/srv/deploy/install/$(PKG_NAME)
install -Dm644 $(BUILDDIR)/data/* -t $(DESTDIR)/srv/deploy/install/$(PKG_NAME)/data
install -Dm644 *.ins -t $(DESTDIR)/srv/deploy/install/$(PKG_NAME)
install -Dm644 logo.png -t $(DESTDIR)/srv/deploy/install/$(PKG_NAME)
uninstall:
rm -rf $(DESTDIR)/srv/deploy/install/$(PKG_NAME)
package:
dpkg-buildpackage
package-check:
@if [ "$(DEB_CHANGELOG_VERSION)" != "$(PKG_FULL_VERSION)" ]; then \
echo "Mismatch between debian changelog file and Makefile version"; \
echo "Debian changelog version: $(DEB_CHANGELOG_VERSION)"; \
@ -50,10 +50,5 @@ check-before-package:
exit 1; \
fi
package: check-before-package
tar cavzf ../mdg-test_3.9.2-1.0.orig.tar.gz --exclude="debian" --exclude="**/.*" .
debuild -us -uc --diff-ignore="\.\S+" -I
.PHONY: default all download install uninstall clean setversion check-berfore-package package
.PHONY: build fetch-sources patch-version clean install uninstall package package-check

View File

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

37
control.in Normal file
View File

@ -0,0 +1,37 @@
[Product]
type: localboot
id: mdg-python
name: MDG Python
description: Python für Microsoft Windows mit pip-Unterstützung
advice: Vereinfachtes Paket mit neuer Python-Version und funktionsfähiger pip-Unterstützung
version: @PKG_VERSION@
packageVersion: @PKG_OPSI_RELEASE@
setupScript: install.ins
uninstallScript: remove.ins
[ProductProperty]
name: shortcut
type: bool
description: Startmenü Verknüpfungen erstellen
default: True
[ProductProperty]
name: associatefiles
type: bool
description: Assoziere Python-Dateiendungen
helptext: Zu den Python-Dateiendungen gehören u. a. ".py", ".pyw", ".pyc". Doppelklick auf Python-Dateien im Windows-Explorer nutzt dann den Python-Launcher.
default: True
[ProductProperty]
name: prependpath
type: bool
description: Python zum PATH hinzufügen
helptext: Fügt Python selbst und zugehörige Skripte zum systemweiten PATH hinzu. Dies erlaubt das direkte Verwenden von Python-Werkzeugen in der Kommandozeile.
default: True
[ProductProperty]
name: pippackages
type: unicode
description: Installiere pip Pakete
helptext: Die Pakete werden mit jeder Installation des Programms installiert oder aktualisiert. Zum Hinzufügen von neuen Pakten kann einfach eine Neuinstallation vorgenommen werden. Die Pakete werden mit einem Leerzeichen getrennt und können auf https://pypi.org/ gefunden werden. Diese Pakete werden systemweit installiert. Durch Nutzer installierte Pakete werden im jeweiligen Appdata Verzeichnis installiert.
pattern: numpy scikit-learn rsa

1
debian/source/format vendored Normal file
View File

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