From 9a7549c8aa95d4a04a2fef52f9494ddeaaedd7e7 Mon Sep 17 00:00:00 2001 From: CEPHALIX GIT ADMIN Date: Wed, 19 Jun 2019 10:00:31 +0200 Subject: [PATCH] Initial Version --- FULLNAMES | 2 + LICENSE | 1 + LegoMindstormsTeacherEDU3.sls | 14 ++++++ Makefile | 28 +++++++++++ RELEASE | 1 + VERSION | 1 + oss-pkg-LegoMindstormsTeacherEDU3.spec.in | 58 +++++++++++++++++++++++ repo-ng/TeacherSpec.txt | 31 ++++++++++++ repo-ng/init.sls | 30 ++++++++++++ 9 files changed, 166 insertions(+) create mode 100644 FULLNAMES create mode 100644 LICENSE create mode 100644 LegoMindstormsTeacherEDU3.sls create mode 100644 Makefile create mode 100644 RELEASE create mode 100644 VERSION create mode 100644 oss-pkg-LegoMindstormsTeacherEDU3.spec.in create mode 100755 repo-ng/TeacherSpec.txt create mode 100644 repo-ng/init.sls diff --git a/FULLNAMES b/FULLNAMES new file mode 100644 index 0000000..eb24635 --- /dev/null +++ b/FULLNAMES @@ -0,0 +1,2 @@ +LEGO MINDSTORMS EV3 +LEGO MINDSTORMS NXT x64 Driver 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/LegoMindstormsTeacherEDU3.sls b/LegoMindstormsTeacherEDU3.sls new file mode 100644 index 0000000..f452394 --- /dev/null +++ b/LegoMindstormsTeacherEDU3.sls @@ -0,0 +1,14 @@ +############################################################################### +# SLS: PACKAGE +# Copyright (c) 2017 Helmuth Varkoly, Nuermberg, Germany. +# All rights reserved. +# +# Author: Helmuth Varkoly +# +# Description: SLS to use with OSS's softwaremanagement +############################################################################### +PACKAGE: + pkg: + - installed + + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8ae6875 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +PACKAGE = $(shell basename `pwd` ) +DESTDIR = / +REPO = /srv/www/repo/TESTING/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 + ../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 + for i in $(REPO)/noarch/oss-pkg-$(PACKAGE)-$(VERSION)-*.rpm; do test -e $$i && rm $$i; done + 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 + + 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/VERSION b/VERSION new file mode 100644 index 0000000..3eefcb9 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.0.0 diff --git a/oss-pkg-LegoMindstormsTeacherEDU3.spec.in b/oss-pkg-LegoMindstormsTeacherEDU3.spec.in new file mode 100644 index 0000000..cd3e3f7 --- /dev/null +++ b/oss-pkg-LegoMindstormsTeacherEDU3.spec.in @@ -0,0 +1,58 @@ +# +# Spec file for PACKAGE +# Copyright (c) YEAR Helmuth Varkoly and Peter Varkoly Nuremberg, Germany. All rights reserved. +# + +Name: oss-pkg-PACKAGE +Summary: Package to install PACKAGE on OSS-Clients +Version: VERSION +Release: RELEASE +License: GPL-2.0 +Vendor: Peter Varkoly and Helmuth Varkoly +Packager: peter@varkoly.de +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 PACKAGE on OSS-Clients + +Authors: +-------- + helmuth@varkoly.de + peter@varkoly.de + + +%prep +%setup -n %{name} + +%build + +%install + +mkdir -p %{buildroot}/srv/salt/win/repo-ng/PACKAGE +mkdir -p %{buildroot}/srv/salt/packages/ +cp PACKAGE.sls %{buildroot}/srv/salt/packages/ +cp -a repo-ng/* %{buildroot}/srv/salt/win/repo-ng/PACKAGE + +%clean +rm -rf %{buildroot} + +%pre + +%post + +/usr/sbin/oss_api_post_file.sh 'softwares/add' /srv/salt/win/repo-ng/PACKAGE/HASH.json + +%files +%defattr(644,root,root) +/srv/salt/win/repo-ng/PACKAGE +/srv/salt/packages/PACKAGE.sls + + diff --git a/repo-ng/TeacherSpec.txt b/repo-ng/TeacherSpec.txt new file mode 100755 index 0000000..5e9f70b --- /dev/null +++ b/repo-ng/TeacherSpec.txt @@ -0,0 +1,31 @@ +; -------------------------- How to use this file --------------------------------- +; +; To run this installer in quiet mode: +; 1. Edit the information below to match your company information and install location. +; 2. Run : setup.exe /q /AcceptLicenses yes. Passing the value "yes" +; to the /AcceptLicenses parameter indicates that you agree with the license agreements. +; Alternatively, instead of /q, /qb can be used to run the installer in basic UI mode. +; 3. The installer will automatically restart your system after the installation is done. +; To prevent the restart use the command line : setup.exe /r:n /q /AcceptLicenses yes +; +; For more information on installation automation visit www.ni.com/info and enter the infocode exdir3. + + +; -------------------------- Set feature states --------------------------------- +; The valid feature states are: Local, Absent, NoChange, Default +; Local - Install it (on the local hard drive). If already installed leave it installed. +; Absent - Do not install it. If already installed uninstall it. +; NoChange - Do not install it. If already installed, leave it installed. +; Default is equivalent to not listing the feature in this file. The feature follows its default behavior. +; To install EV3 in Student mode, remove the "EV3_EDU_Mode" setting on line 24 by deleting the entire line. + +[Features] +LEGO_EV3_EDU_Feature.EV3.EDU.142=Local +EV3_EDU_Mode.EV3.EDU.MODE.142=Local + + +; -------------------------- Set general installation settings --------------------------------- +[InstallationType] +;uncomment one of the following lines for student vs teacher install +DefaultRadioButton=TeacherInstall +;DefaultRadioButton=StudentInstall diff --git a/repo-ng/init.sls b/repo-ng/init.sls new file mode 100644 index 0000000..9f44f25 --- /dev/null +++ b/repo-ng/init.sls @@ -0,0 +1,30 @@ +############################################################################### +# SLS: LegoMindstormsTeacherEDU3 +# Copyright (c) 2017 Helmuth Varkoly, Nuermberg, Germany. +# All rights reserved. +# +# Authors: Helmuth Varkoly +# +# Description: Package SLS +# Note: no logging +############################################################################### + +{% if grains['cpuarch'] == 'AMD64' %} +{% set UNINSTALL = "%PROGRAMFILES(X86)%\\National Instruments\\Shared\\NIUninstaller" %} +{% else %} +{% set UNINSTALL = '%ProgramFiles%\\National Instruments\\Shared\\NIUninstaller' %} +{% endif %} + +{% set LOG_PATH = 'C:\\salt\\var\\log' %} + +LegoMindstormsTeacherEDU3: + '1.0.0': + installer: salt://win/repo-ng/LegoMindstormsTeacherEDU3/LME-EV3_Full-setup_1.4.2_de-DE_WIN32.exe + full_name: 'LEGO MINDSTORMS EV3' + uninstaller: '{{ UNINSTALL }}\uninst.exe' + install_flags: 'C:\\salt\\var\\cache\\salt\\minion\\files\\base\\win\\repo-ng\\LegoMindstormsTeacherEDU3\\TeacherSpec.txt /q /acceptlicenses yes /r:n' + uninstall_flags: '/CompanyEnum LEGO_SW /qb /x all /LOG "{{ LOG_PATH}}\\Lego_uninst.log"' + msiexec: False + locale: de_DE + reboot: False + cache_dir: True -- 2.43.0