From c72eb2359da8ccca222647832166300069c531e8 Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Wed, 26 Jul 2017 15:11:48 +0200 Subject: [PATCH] Initial version. --- MSOfficeStandard2013.sls | 24 ++++++++++++++++++++++++ Makefile | 31 +++++++++++++++++++++++++++++++ RELEASE | 1 + VERSION | 1 + repo-ng/init.sls | 18 ++++++++++++++++++ 5 files changed, 75 insertions(+) create mode 100644 MSOfficeStandard2013.sls create mode 100644 Makefile create mode 100644 RELEASE create mode 100644 VERSION create mode 100755 repo-ng/init.sls diff --git a/MSOfficeStandard2013.sls b/MSOfficeStandard2013.sls new file mode 100644 index 0000000..6ea74d5 --- /dev/null +++ b/MSOfficeStandard2013.sls @@ -0,0 +1,24 @@ +#Tes#Testt +{% set KEY = salt['grains.get']('MSOfficeStandard2013_KEY') %} +{% if grains['cpuarch'] == 'AMD64' %} + {% set PROGRAM_FILES = "Program Files (x86)" %} + {% else %} + {% set PROGRAM_FILES = "Program Files" %} + {% endif %} + +MSOfficeStandard2013: + pkg: + - installed + +set_Lic: + cmd.run: + - name: 'cscript OSPP.vbs /inpkey:{{ KEY }}' + - cwd: 'C:\{{ PROGRAM_FILES }}\Microsoft Office\Office15' + require: + - MSOfficeStandard2013: + pkg.installed +activate: + cmd.run: + - name: 'cscript OSPP.vbs /act' + - cwd: 'C:\{{ PROGRAM_FILES }}\Microsoft Office\Office15' + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4f7bda1 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +PACKAGE = $(shell basename `pwd` ) +DESTDIR = / +REPO = /srv/www/repo/TESTING/oss-packages/ +VERSION = $(shell cat VERSION ) +RELEASE = $(shell cat RELEASE ) +NRELEASE = $(shell echo $(RELEASE) + 1 | bc ) + + +package: + cp packages.spec.in oss-pkg-$(PACKAGE).spec + sed -i s/VERSION/$(VERSION)/ oss-pkg-$(PACKAGE).spec + sed -i s/RELEASE/$(NRELEASE)/ oss-pkg-$(PACKAGE).spec + sed -i s/PACKAGE/$(PACKAGE)/ oss-pkg-$(PACKAGE).spec + mkdir -p oss-pkg-$(PACKAGE) + ln -s ../$(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 + #I have to learn it + #rpm --addsign /usr/src/packages/RPMS/noarch/oss-pkg-$(PACKAGE)-$(VERSION)-$(NRELEASE).noarch.rpm + mv /usr/src/packages/RPMS/noarch/oss-pkg-$(PACKAGE)-$(VERSION)-$(NRELEASE).noarch.rpm $(REPO)/noarch + createrepo $(REPO) + #I have to learn it + #gpg -a --detach-sign $(REPO)/repodata/repomd.xml + echo $(NRELEASE) > RELEASE + git commit -a -m "New release" + git push + + diff --git a/RELEASE b/RELEASE new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/RELEASE @@ -0,0 +1 @@ +1 diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1 diff --git a/repo-ng/init.sls b/repo-ng/init.sls new file mode 100755 index 0000000..77035b5 --- /dev/null +++ b/repo-ng/init.sls @@ -0,0 +1,18 @@ +#test + +#MSOfficeStandard2013: +# pkg: +# - installed + +MSOfficeStandard2013: + '15.0.4420.1017': + full_name: 'Microsoft Office Standard 2013' + installer: salt://win/repo-ng/MSOfficeStandard2013/x86/setup.exe + install_flags: '/config install.xml' + uninstaller: salt://win/repo-ng/MSOfficeStandard2013/x86/setup.exe + uninstall_flags: '/uninstall Standard /config uninstall.xml' + msiexec: False + locale: de_DE + cache_dir: True + + -- 2.43.0