From: buildmaster Date: Tue, 19 Oct 2021 12:17:50 +0000 (+0200) Subject: Provide an initial init.sls file too X-Git-Url: https://repo.cephalix.eu/gitweb/?a=commitdiff_plain;h=b93fcc2b616dfdb30f05010e41b5017bd3ab1b7d;p=template.git Provide an initial init.sls file too --- diff --git a/Makefile b/Makefile index 9bfab13..24f92c2 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ 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/DISPLAYNAME/$(DISPLAYNAME)/g" oss-pkg-$(PACKAGE).spec sed -i s/YEAR/$(YEAR)/g oss-pkg-$(PACKAGE).spec + grep -q TOREPLACE repo-ng/init.sls && { echo "Adapt repo-ng/init.sls"; exit 1 } ../oss-pkg-tools/create_hash.sh $(PACKAGE) mkdir -p oss-pkg-$(PACKAGE) sed s/PACKAGE/$(PACKAGE)/g $(PACKAGE).sls > oss-pkg-$(PACKAGE)/$(PACKAGE).sls @@ -24,14 +24,19 @@ package: mv /usr/src/packages/RPMS/noarch/oss-pkg-$(PACKAGE)-$(VERSION)-$(NRELEASE).noarch.rpm $(REPO)/noarch echo $(NRELEASE) > RELEASE git commit -a -m "New release" - git push createrepo $(REPO) + git push init: test -d .git && rm -r .git - mv oss-pkg-packages.spec.in oss-pkg-$(PACKAGE).spec - sed -i 's/PACKAGE/$(PACKAGE)/g' oss-pkg-$(PACKAGE).spec - echo "Do not forget to adapt VERSION and the FULLNAMES file" + 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 + mv init.sls repo-ng/ + sed -i 's/PACKAGE/$(PACKAGE)/g' repo-ng/init.sls + 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/init.sls b/init.sls new file mode 100644 index 0000000..e9e6f1a --- /dev/null +++ b/init.sls @@ -0,0 +1,33 @@ +############################################################################### +# SLS: PACKAGE +# 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' %} + +Package: + 'VERSION': + full_name: 'TOREPLACE' + installer: salt://win/repo-ng/PACKAGE/TOREPLACE.exe + {% if ARCH == 'x64' %} + uninstaller: '%PROGRAMFILES(x86)%\PACKAGE\unins000.exe' + {% else %} + uninstaller: '%PROGRAMFILES%\PACKAGE\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 +