From 4e9fd567ff94e9c254c6e2298d0d314eeffe20dc Mon Sep 17 00:00:00 2001 From: buildmaster Date: Thu, 13 Jan 2022 21:06:26 +0100 Subject: [PATCH 1/1] Initial version of UltimakerCura --- .gitignore | 1 + FULLNAMES | 2 ++ LICENSE | 1 + Makefile | 41 +++++++++++++++++++++++++ RELEASE | 1 + UltimakerCura.sls | 14 +++++++++ VERSION | 1 + init.sls.in | 33 ++++++++++++++++++++ oss-pkg-UltimakerCura.spec.in | 58 +++++++++++++++++++++++++++++++++++ 9 files changed, 152 insertions(+) create mode 100644 .gitignore create mode 100644 FULLNAMES create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 RELEASE create mode 100644 UltimakerCura.sls create mode 100644 VERSION create mode 100644 init.sls.in create mode 100644 oss-pkg-UltimakerCura.spec.in diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..12b8d4b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +packages.spec diff --git a/FULLNAMES b/FULLNAMES new file mode 100644 index 0000000..a638839 --- /dev/null +++ b/FULLNAMES @@ -0,0 +1,2 @@ +Ultimaker Cura 4.13.0 +Ultimaker Cura diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c70fc0d --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +Copyright (c) 2017 Peter Varkoly and Helmuth Varkoly Nürnberg. All rights reserverd. \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ec71c38 --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +PACKAGE = $(shell basename `pwd` ) +DESTDIR = / +REPO = /srv/www/repo/salt-packages/ +VERSION = $(shell cat VERSION ) +RELEASE = $(shell cat RELEASE ) +NRELEASE = $(shell echo $(RELEASE) + 1 | bc ) +YEAR = $(shell date +%Y ) + +package: + sed s/VERSION/$(VERSION)/g oss-pkg-$(PACKAGE).spec.in > oss-pkg-$(PACKAGE).spec + sed -i s/RELEASE/$(NRELEASE)/g oss-pkg-$(PACKAGE).spec + sed -i s/PACKAGE/$(PACKAGE)/g oss-pkg-$(PACKAGE).spec + sed -i s/YEAR/$(YEAR)/g oss-pkg-$(PACKAGE).spec + sed s/VERSION/$(VERSION)/g init.sls.in > repo-ng/init.sls + ../oss-pkg-tools/create_hash.sh $(PACKAGE) + mkdir -p oss-pkg-$(PACKAGE) + sed s/PACKAGE/$(PACKAGE)/g $(PACKAGE).sls > oss-pkg-$(PACKAGE)/$(PACKAGE).sls + if [ -d repo-ng ]; then ln -s ../repo-ng/ oss-pkg-$(PACKAGE)/repo-ng; fi + tar hjcvpf oss-pkg-$(PACKAGE).tar.bz2 oss-pkg-$(PACKAGE) + rm -rf oss-pkg-$(PACKAGE) + mv oss-pkg-$(PACKAGE).tar.bz2 /usr/src/packages/SOURCES/ + rpmbuild -bb oss-pkg-$(PACKAGE).spec + find $(REPO)/noarch -name "oss-pkg-$(PACKAGE)-$(VERSION)-*.rpm" -exec rm {} \; + mv /usr/src/packages/RPMS/noarch/oss-pkg-$(PACKAGE)-$(VERSION)-$(NRELEASE).noarch.rpm $(REPO)/noarch + echo $(NRELEASE) > RELEASE + git commit -a -m "New release" + createrepo $(REPO) + git push + +init: + rm -rf .git + mv oss-pkg-packages.spec.in oss-pkg-$(PACKAGE).spec.in + sed -i 's/PACKAGE/$(PACKAGE)/g' oss-pkg-$(PACKAGE).spec.in + mkdir repo-ng + sed -i 's/PACKAGE/$(PACKAGE)/g' init.sls.in + mv temlate.sls $(PACKAGE).sls + sed -i 's/PACKAGE/$(PACKAGE)/g' $(PACKAGE).sls + git init + git add . + git commit -am "Initial version of $(PACKAGE)" + echo "Do not forget to adapt VERSION and the FULLNAMES file" diff --git a/RELEASE b/RELEASE new file mode 100644 index 0000000..c227083 --- /dev/null +++ b/RELEASE @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/UltimakerCura.sls b/UltimakerCura.sls new file mode 100644 index 0000000..5d71c94 --- /dev/null +++ b/UltimakerCura.sls @@ -0,0 +1,14 @@ +############################################################################### +# SLS: UltimakerCura +# Copyright (c) 2017 Helmuth Varkoly, Nuermberg, Germany. +# All rights reserved. +# +# Author: Helmuth Varkoly +# +# Description: SLS to use with OSS's softwaremanagement +############################################################################### +UltimakerCura: + pkg: + - installed + + diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..813b83b --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +4.13.0 diff --git a/init.sls.in b/init.sls.in new file mode 100644 index 0000000..0483777 --- /dev/null +++ b/init.sls.in @@ -0,0 +1,33 @@ +############################################################################### +# SLS: UltimakerCura +# Copyright (c) 2017 Helmuth Varkoly, Nuermberg, Germany. +# All rights reserved. +# +# Authors: Helmuth Varkoly +# +# Description: Package SLS +############################################################################### +{% if grains['cpuarch'] == 'AMD64' %} +{% set ARCH = "x64" %} +{% else %} +{% set ARCH = "x86" %} +{% endif %} + +{% set LOG_PATH = 'C:\\salt\\var\\log' %} + +UltimakerCura: + 'VERSION': + full_name: 'TOREPLACE' + installer: salt://win/repo-ng/UltimakerCura/TOREPLACE.exe + {% if ARCH == 'x64' %} + uninstaller: '%PROGRAMFILES(x86)%\UltimakerCura\unins000.exe' + {% else %} + uninstaller: '%PROGRAMFILES%\UltimakerCura\unins000.exe' + {% endif %} + install_flags: '/verysilent /norestart /LOG="{{ LOG_PATH }}_inst.log"' + uninstall_flags: '/verysilent /SUPPRESSMSGBOXES /NORESTART /LOG="{{ LOG_PATH }}_uninst.log"' + locale: de_DE + msiexec: False + reboot: False + cache_dir: False + diff --git a/oss-pkg-UltimakerCura.spec.in b/oss-pkg-UltimakerCura.spec.in new file mode 100644 index 0000000..8c954b5 --- /dev/null +++ b/oss-pkg-UltimakerCura.spec.in @@ -0,0 +1,58 @@ +# +# Spec file for UltimakerCura +# Copyright (c) YEAR Helmuth Varkoly and Peter Varkoly Nuremberg, Germany. All rights reserved. +# + +Name: oss-pkg-UltimakerCura +Summary: Package to install UltimakerCura on OSS-Clients +Version: VERSION +Release: RELEASE +License: GPL-2.0 +Vendor: Peter Varkoly and Helmuth Varkoly +Packager: packager@cephalix.eu +Group: Productivity/ +Source: %{name}.tar.bz2 +BuildArch: noarch +BuildRequires:unzip +#Requires: +Requires: filesystem +PreReq: salt-master +PreReq: %fillup_prereq +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +Package to install UltimakerCura on CRANIX-Clients + +Authors: +-------- + helmuth@varkoly.de + peter@varkoly.de + + +%prep +%setup -n %{name} + +%build + +%install + +mkdir -p %{buildroot}/srv/salt/win/repo-ng/UltimakerCura +mkdir -p %{buildroot}/srv/salt/packages/ +cp UltimakerCura.sls %{buildroot}/srv/salt/packages/ +cp -a repo-ng/* %{buildroot}/srv/salt/win/repo-ng/UltimakerCura + +%clean +rm -rf %{buildroot} + +%pre + +%post + +/usr/sbin/crx_api_post_file.sh 'softwares/add' /srv/salt/win/repo-ng/UltimakerCura/HASH.json + +%files +%defattr(644,root,root) +/srv/salt/win/repo-ng/UltimakerCura +/srv/salt/packages/UltimakerCura.sls + + -- 2.43.0