From 0182e0adf31550425d5bb84bda1b31743f042b7c Mon Sep 17 00:00:00 2001 From: santic-zombie Date: Wed, 6 Jul 2022 22:32:39 +0300 Subject: [PATCH] New patches, README addings --- APKBUILD | 66 ++++++++++++++----------- Gruntfile.patch | 22 +++++++++ README.md | 12 +++++ package.patch | 13 +++++ patch/Gruntfile.js | 117 +++++++++++++++++++++++++++++++++++++++++++++ patch/package.json | 12 +++++ 6 files changed, 214 insertions(+), 28 deletions(-) create mode 100644 Gruntfile.patch create mode 100644 package.patch create mode 100644 patch/Gruntfile.js create mode 100644 patch/package.json diff --git a/APKBUILD b/APKBUILD index 55c206b..7f3cd91 100644 --- a/APKBUILD +++ b/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Santic # Maintainer: Santic pkgname=opennebula -pkgver=6.2.2 +pkgver=6.4.0 pkgrel=1 pkgdesc="OpenNebula Server and Scheduler (Community Edition)" url="https://opennebula.io/" @@ -10,56 +10,58 @@ license="Apache" depends="augeas curl czmq - g++ gnutls - libpq + g++ libvncserver libnsl libpg_query + libpq + libxml2 logrotate - ronn mariadb mariadb-client mariadb-server-utils npm - xmlrpc-c - libxml2 - xmlrpc-c openssl ruby + ruby-augeas + ruby-bundler ruby-nokogiri + ruby-pg ruby-rexml ruby-xmlrpc - ruby-bundler - ruby-pg - ruby-augeas shadow - sqlite" + sqlite + sqlite-static + xmlrpc-c" makedepends="alpine-sdk augeas-dev bash + curl-dev czmq-dev gnutls-dev - python2 + libnsl-dev + libpq-dev libvncserver-dev + libxml2-dev linux-headers - libnsl-dev - openssl-dev - sqlite-dev mariadb-dev + make + openssl-dev + python3 + ronn ruby-dev - libxml2-dev - xmlrpc-c-dev scons - make - curl-dev - libpq-dev" + sqlite-dev + xmlrpc-c-dev" install="${pkgname}.pre-install ${pkgname}.post-install ${pkgname}.post-upgrade ${pkgname}.pre-deinstall ${pkgname}.post-deinstall" -source="https://github.com/OpenNebula/one/archive/release-${pkgver}.tar.gz +source="https://downloads.opennebula.io/packages/opennebula-${pkgver}/opennebula-${pkgver}.tar.gz + Gruntfile.patch + package.patch svn.patch opennebula opennebula-scheduler @@ -74,21 +76,29 @@ source="https://github.com/OpenNebula/one/archive/release-${pkgver}.tar.gz builddir="$srcdir/" prepare() { - cd "one-release-${pkgver}" + cd "opennebula-${pkgver}" + + patch -p0 < "${srcdir}/Gruntfile.patch" + patch -p0 < "${srcdir}/package.patch" patch -p0 < "${srcdir}/svn.patch" - npm config set prefix '~/.local/' - prefix=~/.local/ - npm config set python python2.7 - npm install bower grunt -g + + rm -rf "${HOME}/.npm-packages" + mkdir "${HOME}/.npm-packages" + + npm config set prefix "${HOME}/.npm-packages" + NPM_PACKAGES="${HOME}/.npm-packages" + export PATH="$PATH:$NPM_PACKAGES/bin" + +# npm install bower grunt -g } build() { - cd "one-release-${pkgver}" + cd "opennebula-${pkgver}" CXXFLAGS="--std=c++14" scons -j2 new_xmlrpc=yes mysql=yes sqlite=yes sunstone=yes systemd=no } package() { - cd "one-release-${pkgver}" + cd "opennebula-${pkgver}" install -D -m755 "${srcdir}/opennebula" "${pkgdir}/etc/init.d/opennebula" install -D -m755 "${srcdir}/opennebula-scheduler" "${pkgdir}/etc/init.d/opennebula-scheduler" diff --git a/Gruntfile.patch b/Gruntfile.patch new file mode 100644 index 0000000..c80d43f --- /dev/null +++ b/Gruntfile.patch @@ -0,0 +1,22 @@ +Index: src/sunstone/public/Gruntfile.js +--- src/sunstone/public/Gruntfile.js ++++ src/sunstone/public/Gruntfile.js +@@ -14,6 +14,8 @@ + /* limitations under the License. */ + /* -------------------------------------------------------------------------- */ + ++const sass = require('node-sass'); ++ + module.exports = function(grunt) { + grunt.initConfig({ + pkg: grunt.file.readJSON("package.json"), +@@ -24,7 +26,8 @@ + }, + dist: { + options: { +- outputStyle: "compressed" ++ outputStyle: "compressed", ++ implementation: sass + }, + files: { + "css/app.css": "scss/app.scss" diff --git a/README.md b/README.md index 9386383..7e102e3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # APKBUILD +## Prepare + ``` # apk add alpine-sdk sudo # visudo @@ -18,3 +20,13 @@ ``` abuild-keygen -a -i ``` + +## Build + +``` +abuild checksum +``` + +``` +abuild -r +``` diff --git a/package.patch b/package.patch new file mode 100644 index 0000000..db49313 --- /dev/null +++ b/package.patch @@ -0,0 +1,13 @@ +Index: src/sunstone/public/package.json +--- src/sunstone/public/package.json ++++ src/sunstone/public/package.json +@@ -6,7 +6,7 @@ + "grunt-cli": "1.3.2", + "grunt-contrib-requirejs": "1.0.0", + "grunt-contrib-watch": "1.1.0", +- "grunt-sass": "2.1.0", +- "node-sass": "4.14.1" ++ "grunt-sass": "3.1.0", ++ "node-sass": "7.0.1" + } + } diff --git a/patch/Gruntfile.js b/patch/Gruntfile.js new file mode 100644 index 0000000..a5e9678 --- /dev/null +++ b/patch/Gruntfile.js @@ -0,0 +1,117 @@ +/* -------------------------------------------------------------------------- */ +/* Copyright 2002-2022, OpenNebula Project, OpenNebula Systems */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ +/* not use this file except in compliance with the License. You may obtain */ +/* a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/* -------------------------------------------------------------------------- */ + +const sass = require('node-sass'); + +module.exports = function(grunt) { + grunt.initConfig({ + pkg: grunt.file.readJSON("package.json"), + + sass: { + options: { + includePaths: ["bower_components/foundation-sites/scss"] + }, + dist: { + options: { + outputStyle: "compressed", + implementation: sass + }, + files: { + "css/app.css": "scss/app.scss" + } + } + }, + + watch: { + grunt: { + files: ["Gruntfile.js"] + }, + + sass: { + files: "scss/*.scss", + tasks: ["sass"] + }, + + requirejs: { + files: "app/**/*.js", + tasks: ["requirejs"] + } + }, + + requirejs: { + compileCSS: { + options: { + out: "./css/app.min.css", + cssIn: "./css/app.css", + optimizeCss: "default" + } + }, + compileJS: { + options: { + appDir: "./app", + baseUrl: "./", // 1 + dir: "./dist", // 2 + //name: 'vendor/almond', // 3 + mainConfigFile: "./app/main.js", // 5 + preserveLicenseComments: false, + optimize: "none", + generateSourceMaps: true, + removeCombined: true, + //skipDirOptimize: false, + //findNestedDependencies: true, + modules: [ + { + name: "main", + include: ["almond"] + }, + { + name: "login", + include: ["almond"], + insertRequire: ["login"] + }, + { + name: "console/vnc", + include: ["almond"], + insertRequire: ["console/vnc"] + }, + { + name: "console/vmrc", + include: ["almond"], + insertRequire: ["console/vmrc"] + }, + { + name: "console/spice", + include: ["almond"], + insertRequire: ["console/spice"] + }, + { + name: "console/guacamole", + include: ["almond"], + insertRequire: ["console/guacamole"] + } + ] + } + } + } + }); + + grunt.loadNpmTasks("grunt-sass"); + grunt.loadNpmTasks("grunt-contrib-watch"); + grunt.loadNpmTasks("grunt-contrib-requirejs"); + + grunt.registerTask("build", ["sass"]); + grunt.registerTask("default", ["build","watch"]); +}; diff --git a/patch/package.json b/patch/package.json new file mode 100644 index 0000000..82de2e0 --- /dev/null +++ b/patch/package.json @@ -0,0 +1,12 @@ +{ + "name": "opennebula-sunstone", + "version": "0.0.1", + "devDependencies": { + "grunt": "<1.1.0", + "grunt-cli": "1.3.2", + "grunt-contrib-requirejs": "1.0.0", + "grunt-contrib-watch": "1.1.0", + "grunt-sass": "3.1.0", + "node-sass": "7.0.1" + } +}