diff --git a/.gitignore b/.gitignore index 2e97ca2..4aff5a1 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,7 @@ *~ .directory *.phar + +/slackbuilds/ +/vendor/ +/.bundle/ diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..440bede --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,30 @@ +AllCops: + Exclude: + - 'vendor/**/*' + - '.git/**/*' + - 'bin/rubocop' + - 'slackbuilds/**/*' + +Style/Documentation: + Enabled: false + +Style/TrailingCommaInHashLiteral: + EnforcedStyleForMultiline: consistent_comma + +Style/FrozenStringLiteralComment: + Exclude: + - '**/db/migrate/*' + +Layout/MultilineMethodCallIndentation: + EnforcedStyle: indented + +Layout/ArgumentAlignment: + EnforcedStyle: with_fixed_indentation + +Layout/EndAlignment: + EnforcedStyleAlignWith: variable + +Metrics/BlockLength: + ExcludedMethods: + - describe + - refine diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..a5bdde9 --- /dev/null +++ b/Gemfile @@ -0,0 +1,9 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +# frozen_string_literal: true + +source 'https://rubygems.caraus.de' + +gem 'infra', '~> 2.0.0' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..dffcdc9 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,36 @@ +GEM + remote: https://rubygems.caraus.de/ + specs: + ast (2.4.1) + infra (2.0.0) + rake (~> 13.0) + rubocop (~> 0.89) + parallel (1.20.1) + parser (2.7.2.0) + ast (~> 2.4.1) + rainbow (3.0.0) + rake (13.0.1) + regexp_parser (2.0.0) + rexml (3.2.4) + rubocop (0.93.1) + parallel (~> 1.10) + parser (>= 2.7.1.5) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8) + rexml + rubocop-ast (>= 0.6.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 1.4.0, < 2.0) + rubocop-ast (1.2.0) + parser (>= 2.7.1.5) + ruby-progressbar (1.10.1) + unicode-display_width (1.7.0) + +PLATFORMS + ruby + +DEPENDENCIES + infra (~> 2.0.0) + +BUNDLED WITH + 2.1.4 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a612ad9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/Markdown/Markdown.SlackBuild b/Markdown/Markdown.SlackBuild deleted file mode 100755 index 0c71562..0000000 --- a/Markdown/Markdown.SlackBuild +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh - -# Slackware build script for Markdown - -# Copyright 2013-2019 Markus Reichelt, Aachen, DE -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Markus Reichelt , 0xCCEEF115 - -PRGNAM=Markdown -VERSION=${VERSION:-2.6.11} -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -# python setup.py install --root=$PKG - -# Python 3 support. -if $(python3 -c 'import sys' 2>/dev/null); then - python3 setup.py install --root=$PKG -fi - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a docs/ PKG-INFO README.md INSTALL.md LICENSE.md $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/Markdown/Markdown.info b/Markdown/Markdown.info deleted file mode 100644 index fd1f613..0000000 --- a/Markdown/Markdown.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="Markdown" -VERSION="2.6.11" -HOMEPAGE="https://pypi.python.org/pypi/Markdown/" -DOWNLOAD="https://files.pythonhosted.org/packages/b3/73/fc5c850f44af5889192dff783b7b0d8f3fe8d30b65c8e3f78f8f0265fecf/Markdown-2.6.11.tar.gz" -MD5SUM="a67c1b2914f7d74eeede2ebe0fdae470" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="" -MAINTAINER="Markus Reichelt" -EMAIL="slackbuilds@mareichelt.de" diff --git a/Markdown/README b/Markdown/README deleted file mode 100644 index abac921..0000000 --- a/Markdown/README +++ /dev/null @@ -1,4 +0,0 @@ -This is a Python implementation of John Gruber's Markdown. - -It is almost completely compliant with the reference implementation, -though there are a few known issues. diff --git a/Markdown/slack-desc b/Markdown/slack-desc deleted file mode 100644 index 6aab715..0000000 --- a/Markdown/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -Markdown: Markdown (Python implementation of Markdown) -Markdown: -Markdown: This module handles the Python implementation of John Gruber's -Markdown: Markdown. -Markdown: -Markdown: Homepage: https://pypi.python.org/pypi/Markdown/ -Markdown: -Markdown: -Markdown: -Markdown: -Markdown: diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..e4f9333 --- /dev/null +++ b/Rakefile @@ -0,0 +1,110 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +# frozen_string_literal: true + +require 'infra/rake/ruby' +require 'digest/md5' +require 'net/http' +require_relative 'lib/package' +require_relative 'lib/download' + +task :dmd do + version = '2.094.2' + dub_version = '1.23.0' + dscanner_version = '0.11.0' + dcd_version = '0.13.1' + tarball_name = "dmd.#{version}.linux.tar.xz" + + uri = URI "http://downloads.dlang.org/releases/2.x/#{version}/#{tarball_name}" + checksum = { + dmd: download(uri, "slackbuilds/development/dmd/#{tarball_name}").hexdigest, + } + + package = Package.new 'development/dmd', + version: version, + homepage: 'https://dlang.org' + + write_info package, + download: [uri.to_s], + md5sum: [checksum[:dmd]] + + update_slackbuild_version 'development/dmd', version + commit 'development/dmd', version + + uri = URI "https://codeload.github.com/dlang/tools/tar.gz/v#{version}" + checksum[:tools] = download_and_deploy uri, + "development/d-tools/tools-#{version}.tar.gz" + + uri = URI "https://codeload.github.com/dlang/dub/tar.gz/v#{dub_version}" + checksum[:dub] = download_and_deploy uri, + "development/d-tools/dub-#{dub_version}.tar.gz" + + checksum[:dscanner] = clone 'https://github.com/dlang-community/D-Scanner.git', + "development/d-tools/D-Scanner-#{dscanner_version}.tar.xz" + checksum[:dcd] = clone 'https://github.com/dlang-community/DCD.git', + "development/d-tools/DCD-#{dcd_version}.tar.xz" + + package = Package.new 'development/d-tools', + version: version, + homepage: 'https://dlang.org', + requires: ['dmd'] + + write_info package, + download: [ + hosted_sources("/d-tools/dub-#{dub_version}.tar.gz"), + hosted_sources("/d-tools/tools-#{version}.tar.gz"), + hosted_sources("/d-tools/D-Scanner-#{dscanner_version}.tar.xz"), + hosted_sources("/d-tools/DCD-#{dcd_version}.tar.xz") + ], + md5sum: [ + checksum[:dub], + checksum[:tools], + checksum[:dscanner], + checksum[:dcd] + ] + + slackbuild_filename = 'slackbuilds/development/d-tools/d-tools.SlackBuild' + slackbuild_contents = File.read(slackbuild_filename) + .gsub(/^DUB_VERSION=\${DUB_VERSION:-.+/, + "DUB_VERSION=${DUB_VERSION:-#{dub_version}}") + .gsub(/^DSCANNER_VERSION=\${DSCANNER_VERSION:-.+/, + "DSCANNER_VERSION=${DSCANNER_VERSION:-#{dscanner_version}}") + .gsub(/^DCD_VERSION=\${DCD_VERSION:-.+/, + "DCD_VERSION=${DCD_VERSION:-#{dcd_version}}") + File.open(slackbuild_filename, 'w') { |file| file.puts slackbuild_contents } + + update_slackbuild_version 'development/d-tools', version + commit 'development/d-tools', version +end + +task :composer do + version = '2.0.7' + + package = Package.new 'development/composer', + version: version, + homepage: 'https://getcomposer.org/' + + uri = URI "https://getcomposer.org/download/#{version}/composer.phar" + checksum = download uri, 'slackbuilds/development/composer/composer.phar' + write_info package, + download: ["https://getcomposer.org/download/#{version}/composer.phar"], + md5sum: [checksum.hexdigest] + update_slackbuild_version 'development/composer', version + + commit 'development/composer', version +end + +task 'universal-ctags' do + ENV['COMMIT'] = `git ls-remote https://github.com/universal-ctags/ctags.git master` + .split + .first + ENV['HASH'] = ENV['COMMIT'][0...7] + + sh 'git', 'clone', '--recurse-submodules', 'https://github.com/universal-ctags/ctags.git', "ctags-#{ENV['COMMIT']}" + + rm_rf ["ctags-#{ENV['COMMIT']}/.git", "ctags-#{ENV['COMMIT']}/.gitignore"], secure: true + + sh 'bash', 'scripts/universal-ctags.sh' +end diff --git a/bin/rubocop b/bin/rubocop new file mode 100755 index 0000000..d0c4882 --- /dev/null +++ b/bin/rubocop @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'rubocop' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +bundle_binstub = File.expand_path("../bundle", __FILE__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rubocop", "rubocop") diff --git a/lib/download.rb b/lib/download.rb new file mode 100644 index 0000000..49bb0c0 --- /dev/null +++ b/lib/download.rb @@ -0,0 +1,145 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +# frozen_string_literal: true + +require_relative 'package' +require 'net/http' + +MY_BRANCH = 'user/belka/updates' + +def write_download(target, response) + checksum = Digest::MD5.new + + File.open target, 'w' do |io| + response.read_body do |chunk| + print '.' + io << chunk + checksum << chunk + end + end + + checksum +end + +def redirect_download(location, target) + puts 'redirecting...' + new_location = URI location + + download new_location, target +end + +def start_download(uri, target, http) + request = Net::HTTP::Get.new uri + + http.request request do |response| + case response + when Net::HTTPRedirection + return redirect_download response['location'], target + else + return write_download target, response + end + end +end + +def download(uri, target) + print "Downloading #{uri} " + checksum = nil + + Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http| + checksum = start_download uri, target, http + end + + puts + checksum +end + +def hosted_sources(absolute_url) + "https://download.dlackware.com/hosted-sources#{absolute_url}" +end + +def remote_file_exists?(url) + uri = URI hosted_sources(url) + + request = Net::HTTP.new uri.host, uri.port + request.use_ssl = true + response = request.request_head uri.path + + response.code.to_i == 200 +end + +def upload_command(local_path, remote_path) + "scp slackbuilds/#{local_path} "\ + "caraus.de:/srv/httpd/dlackware/download/hosted-sources#{remote_path}" +end + +def clone_and_archive(repo, name_version, tarball) + _, _, version = name_version.rpartition '-' + + rm_rf name_version + + sh "git clone #{repo} #{name_version}" + sh "git -C #{name_version} checkout v#{version}" + sh "git -C #{name_version} submodule update --init --recursive" + + sh "tar Jcvf slackbuilds/#{tarball} #{name_version}" + rm_rf name_version +end + +def clone(repo, tarball) + name_version = File.basename tarball, '.tar.xz' + remote_path = tarball[tarball.index('/')..-1] + + if remote_file_exists?(remote_path) + uri = URI hosted_sources(remote_path) + + return download(uri, "slackbuilds/#{tarball}").hexdigest + end + + clone_and_archive repo, name_version, tarball + + sh upload_command(tarball, remote_path) + + Digest::MD5.hexdigest File.read("slackbuilds/#{tarball}") +end + +def download_and_deploy(uri, tarball) + remote_path = tarball[tarball.index('/')..-1] + + if remote_file_exists?(remote_path) + uri = URI hosted_sources(remote_path) + return download(uri, "slackbuilds/#{tarball}").hexdigest + end + + checksum = download uri, "slackbuilds/#{tarball}" + sh upload_command(tarball, remote_path) + checksum.hexdigest +end + +def write_info(package, download:, md5sum:) + File.open "slackbuilds/#{package.path}/#{package.name}.info", 'w' do |file| + file.write info_template(package, download, md5sum) + end +end + +def update_slackbuild_version(package_path, version) + name = package_path.split('/').last + slackbuild_filename = "slackbuilds/#{package_path}/#{name}.SlackBuild" + slackbuild_contents = File.read(slackbuild_filename) + .gsub(/^VERSION=\${VERSION:-.+/, "VERSION=${VERSION:-#{version}}") + + File.open(slackbuild_filename, 'w') { |file| file.puts slackbuild_contents } +end + +def commit(package_path, version) + message = "#{package_path}: Updated for version #{version}" + + unless system('git', '-C', 'slackbuilds', 'checkout', MY_BRANCH, + err: '/dev/null') + sh "git -C slackbuilds checkout -b #{MY_BRANCH} master" + end + sh "git -C slackbuilds add #{package_path}" + sh %(git -C slackbuilds commit -m "#{message}") + # sh "git -C slackbuilds push origin #{branch}" +end diff --git a/lib/package.rb b/lib/package.rb new file mode 100644 index 0000000..7bc81ec --- /dev/null +++ b/lib/package.rb @@ -0,0 +1,38 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +# frozen_string_literal: true + +class Package + attr_reader :path + attr_reader :version + attr_reader :homepage + attr_reader :requires + + def initialize(path, version:, homepage:, requires: []) + @path = path + @version = version + @homepage = homepage + @requires = requires + end + + def name + File.basename @path + end +end + +def info_template(package, download, md5sum) + <<~INFO_FILE + PRGNAM="#{package.name}" + VERSION="#{package.version}" + HOMEPAGE="#{package.homepage}" + DOWNLOAD="#{download * " \\\n "}" + MD5SUM="#{md5sum * " \\\n "}" + DOWNLOAD_x86_64="" + MD5SUM_x86_64="" + REQUIRES="#{package.requires * ' '}" + MAINTAINER="Eugene Wissner" + EMAIL="belka@caraus.de" + INFO_FILE +end diff --git a/dovecot-pgsql/README b/private/dovecot-pgsql/README similarity index 100% rename from dovecot-pgsql/README rename to private/dovecot-pgsql/README diff --git a/dovecot-pgsql/dovecot-pgsql.SlackBuild b/private/dovecot-pgsql/dovecot-pgsql.SlackBuild similarity index 100% rename from dovecot-pgsql/dovecot-pgsql.SlackBuild rename to private/dovecot-pgsql/dovecot-pgsql.SlackBuild diff --git a/dovecot-pgsql/dovecot-pgsql.info b/private/dovecot-pgsql/dovecot-pgsql.info similarity index 100% rename from dovecot-pgsql/dovecot-pgsql.info rename to private/dovecot-pgsql/dovecot-pgsql.info diff --git a/dovecot-pgsql/slack-desc b/private/dovecot-pgsql/slack-desc similarity index 100% rename from dovecot-pgsql/slack-desc rename to private/dovecot-pgsql/slack-desc diff --git a/dovecot-pigeonhole/README b/private/dovecot-pigeonhole/README similarity index 100% rename from dovecot-pigeonhole/README rename to private/dovecot-pigeonhole/README diff --git a/dovecot-pigeonhole/dovecot-pigeonhole.SlackBuild b/private/dovecot-pigeonhole/dovecot-pigeonhole.SlackBuild similarity index 100% rename from dovecot-pigeonhole/dovecot-pigeonhole.SlackBuild rename to private/dovecot-pigeonhole/dovecot-pigeonhole.SlackBuild diff --git a/dovecot-pigeonhole/dovecot-pigeonhole.info b/private/dovecot-pigeonhole/dovecot-pigeonhole.info similarity index 100% rename from dovecot-pigeonhole/dovecot-pigeonhole.info rename to private/dovecot-pigeonhole/dovecot-pigeonhole.info diff --git a/dovecot-pigeonhole/slack-desc b/private/dovecot-pigeonhole/slack-desc similarity index 100% rename from dovecot-pigeonhole/slack-desc rename to private/dovecot-pigeonhole/slack-desc diff --git a/editline/editline.SlackBuild b/private/editline/editline.SlackBuild similarity index 100% rename from editline/editline.SlackBuild rename to private/editline/editline.SlackBuild diff --git a/editline/editline.info b/private/editline/editline.info similarity index 100% rename from editline/editline.info rename to private/editline/editline.info diff --git a/editline/slack-desc b/private/editline/slack-desc similarity index 100% rename from editline/slack-desc rename to private/editline/slack-desc diff --git a/hyperscan/README b/private/hyperscan/README similarity index 100% rename from hyperscan/README rename to private/hyperscan/README diff --git a/hyperscan/hyperscan.SlackBuild b/private/hyperscan/hyperscan.SlackBuild similarity index 100% rename from hyperscan/hyperscan.SlackBuild rename to private/hyperscan/hyperscan.SlackBuild diff --git a/hyperscan/hyperscan.info b/private/hyperscan/hyperscan.info similarity index 100% rename from hyperscan/hyperscan.info rename to private/hyperscan/hyperscan.info diff --git a/hyperscan/slack-desc b/private/hyperscan/slack-desc similarity index 100% rename from hyperscan/slack-desc rename to private/hyperscan/slack-desc diff --git a/nix/README b/private/nix/README similarity index 100% rename from nix/README rename to private/nix/README diff --git a/nix/config/rc.nix b/private/nix/config/rc.nix similarity index 100% rename from nix/config/rc.nix rename to private/nix/config/rc.nix diff --git a/nix/doinst.sh b/private/nix/doinst.sh similarity index 100% rename from nix/doinst.sh rename to private/nix/doinst.sh diff --git a/nix/nix.SlackBuild b/private/nix/nix.SlackBuild similarity index 100% rename from nix/nix.SlackBuild rename to private/nix/nix.SlackBuild diff --git a/nix/nix.info b/private/nix/nix.info similarity index 100% rename from nix/nix.info rename to private/nix/nix.info diff --git a/nix/slack-desc b/private/nix/slack-desc similarity index 100% rename from nix/slack-desc rename to private/nix/slack-desc diff --git a/php-pgsql/README b/private/php-pgsql/README similarity index 100% rename from php-pgsql/README rename to private/php-pgsql/README diff --git a/php-pgsql/doinst.sh b/private/php-pgsql/doinst.sh similarity index 100% rename from php-pgsql/doinst.sh rename to private/php-pgsql/doinst.sh diff --git a/php-pgsql/pdo_pgsql.ini b/private/php-pgsql/pdo_pgsql.ini similarity index 100% rename from php-pgsql/pdo_pgsql.ini rename to private/php-pgsql/pdo_pgsql.ini diff --git a/php-pgsql/pgsql.ini b/private/php-pgsql/pgsql.ini similarity index 100% rename from php-pgsql/pgsql.ini rename to private/php-pgsql/pgsql.ini diff --git a/php-pgsql/php-pgsql.SlackBuild b/private/php-pgsql/php-pgsql.SlackBuild similarity index 100% rename from php-pgsql/php-pgsql.SlackBuild rename to private/php-pgsql/php-pgsql.SlackBuild diff --git a/php-pgsql/php-pgsql.info b/private/php-pgsql/php-pgsql.info similarity index 100% rename from php-pgsql/php-pgsql.info rename to private/php-pgsql/php-pgsql.info diff --git a/php-pgsql/slack-desc b/private/php-pgsql/slack-desc similarity index 100% rename from php-pgsql/slack-desc rename to private/php-pgsql/slack-desc diff --git a/postfix-pgsql/README b/private/postfix-pgsql/README similarity index 100% rename from postfix-pgsql/README rename to private/postfix-pgsql/README diff --git a/postfix-pgsql/postfix-pgsql.SlackBuild b/private/postfix-pgsql/postfix-pgsql.SlackBuild similarity index 100% rename from postfix-pgsql/postfix-pgsql.SlackBuild rename to private/postfix-pgsql/postfix-pgsql.SlackBuild diff --git a/postfix-pgsql/postfix-pgsql.info b/private/postfix-pgsql/postfix-pgsql.info similarity index 100% rename from postfix-pgsql/postfix-pgsql.info rename to private/postfix-pgsql/postfix-pgsql.info diff --git a/postfix-pgsql/postfix.only.warn.regular.files.diff b/private/postfix-pgsql/postfix.only.warn.regular.files.diff similarity index 100% rename from postfix-pgsql/postfix.only.warn.regular.files.diff rename to private/postfix-pgsql/postfix.only.warn.regular.files.diff diff --git a/postfix-pgsql/postfix.script.starting.message.diff b/private/postfix-pgsql/postfix.script.starting.message.diff similarity index 100% rename from postfix-pgsql/postfix.script.starting.message.diff rename to private/postfix-pgsql/postfix.script.starting.message.diff diff --git a/postfix-pgsql/slack-desc b/private/postfix-pgsql/slack-desc similarity index 100% rename from postfix-pgsql/slack-desc rename to private/postfix-pgsql/slack-desc diff --git a/scripts/gcc-d.SlackBuild b/scripts/gcc-d.SlackBuild new file mode 100755 index 0000000..3e77d2c --- /dev/null +++ b/scripts/gcc-d.SlackBuild @@ -0,0 +1,251 @@ +#!/bin/sh + +# Slackware build script for gcc-d + +# Copyright 2017-2018 Eugene Wissner, Dachau, Germany +# +# Based on the GCC build script by Patrick J. Volkerding, Sebeka, MN, USA +# +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=gcc-d +SRCNAM=gdc +VERSION=${VERSION:-2.081.2} +GCC_VERSION=8.2.0 +HOST_GDC=2.076.0_b5 +HOST_GCC=5.5.0 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + *) ARCH=$(uname -m) ;; + esac + export ARCH +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" + LIB_ARCH=i386 +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" + LIB_ARCH=i386 +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" + LIB_ARCH=amd64 +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" + LIB_ARCH=armv7hl +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + LIB_ARCH=$ARCH +fi + +case "$ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; +esac + +if [ "$ARCH" != "x86_64" ]; then + GCC_ARCHOPTS="--with-arch=$ARCH" +else + GCC_ARCHOPTS="--disable-multilib" +fi + +set -e +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT + +# +# Build bootstrap compiler +# +cd $TMP +rm -rf $SRCNAM-$HOST_GDC gcc-$HOST_GCC +tar xvf $CWD/gcc-$HOST_GCC.tar.?z* +tar xvf $CWD/$SRCNAM-$HOST_GDC.tar.?z* + +# Apply patches. +cd $TMP/gcc-$HOST_GCC/gcc + +cd $TMP/$SRCNAM-$HOST_GDC +sh setup-gcc.sh ../gcc-$HOST_GCC + +cd $TMP/gcc-$HOST_GCC +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +rm -rf $TMP/bootstrap-gcc-d + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +../gcc-$HOST_GCC/configure \ + --prefix=$TMP/bootstrap-$PRGNAM \ + --enable-shared \ + --disable-bootstrap \ + --enable-languages=c,c++,d \ + --enable-threads=posix \ + --enable-checking=release \ + --with-system-zlib \ + --with-python-dir=/lib$LIBDIRSUFFIX/python2.7/site-packages \ + --enable-libstdcxx-dual-abi \ + --disable-libunwind-exceptions \ + --enable-__cxa_atexit \ + --enable-libssp \ + --enable-lto \ + --disable-install-libiberty \ + --with-gnu-ld \ + --verbose \ + --with-arch-directory=$LIB_ARCH \ + $GCC_ARCHOPTS \ + --target=${TARGET} \ + --build=${TARGET} \ + --host=${TARGET} + +make +make install + +# +# Build D compiler +# +cd $TMP +rm -rf $SRCNAM-$VERSION gcc-$GCC_VERSION +tar xvf $CWD/gcc-$GCC_VERSION.tar.?z* +tar xvf $CWD/$SRCNAM-$VERSION.tar.?z* + +# Apply patches. +cd $TMP/gcc-$GCC_VERSION/gcc + +cd $TMP/$SRCNAM-$VERSION +sh setup-gcc.sh ../gcc-$GCC_VERSION + +cd $TMP/gcc-$GCC_VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +CC="$TMP/bootstrap-$PRGNAM/bin/gcc" \ +CXX="$TMP/bootstrap-$PRGNAM/bin/g++" \ +CPP="$TMP/bootstrap-$PRGNAM/bin/cpp" \ +GDC="$TMP/bootstrap-$PRGNAM/bin/gdc" \ +LD="$TMP/bootstrap-$PRGNAM/bin/gcc" \ +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +../gcc-$GCC_VERSION/configure \ + --prefix=/usr \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --enable-shared \ + --disable-bootstrap \ + --enable-languages=c,c++,d \ + --enable-threads=posix \ + --enable-checking=release \ + --with-system-zlib \ + --with-python-dir=/lib$LIBDIRSUFFIX/python2.7/site-packages \ + --enable-libstdcxx-dual-abi \ + --disable-libunwind-exceptions \ + --enable-__cxa_atexit \ + --enable-libssp \ + --enable-lto \ + --disable-install-libiberty \ + --with-gnu-ld \ + --verbose \ + --with-arch-directory=$LIB_ARCH \ + --program-suffix="-`echo $GCC_VERSION | cut -d. -f1`" \ + --with-pkgversion="GDC $VERSION" \ + $GCC_ARCHOPTS \ + --target=${TARGET} \ + --build=${TARGET} \ + --host=${TARGET} + +make +make install DESTDIR=$PKG + +# Remove not D related stuff, already available in GCC +find $PKG/usr/info -type f -not -name "*gdc*" -delete +rm -r $PKG/usr/man/man7 +rm -r $PKG/usr/share +#rm -r $PKG/usr/include + +#find $PKG/usr/libexec/gcc \ +# \( -type f -or -type l \) -not -name "cc1d" \ +# -delete + +#find $PKG/usr/lib$LIBDIRSUFFIX/gcc -mindepth 3 \ +# \( -type f -or -type l \) -not -regex ".*/d/.*" \ +# -delete + +#find $PKG/usr/lib$LIBDIRSUFFIX -maxdepth 1 \ +# \( -type f -or -type l \) \ +# -not \( -name "*phobos*" -or -name "*gdruntime*" \) \ +# -delete + +( + cd $PKG/usr/lib$LIBDIRSUFFIX + rm -r python2.7 *.py *.o \ + libasan.{a,la,so} \ + libatomic.{a,la,so,so.1} \ + libcc1.* libgcc_s.* libgomp.* libitm.* liblsan.* \ + libquadmath.* libsanitizer.spec libssp* \ + libstdc++fs.* libstdc++.{a,la,so,so.6} \ + libsupc++.* libtsan.* \ + libubsan.{a,la,so} +) + +find $PKG/usr -type d -empty -delete + + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +gzip -9 $PKG/usr/info/*.info + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp $TMP/$SRCNAM-$VERSION/README.md $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/scripts/hhvm.sh b/scripts/hhvm.sh new file mode 100755 index 0000000..5aba70b --- /dev/null +++ b/scripts/hhvm.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +VERSION=${VERSION:-4.32.0} + +set -e + +git clone https://github.com/facebook/hhvm.git +mv hhvm hhvm-$VERSION + +cd hhvm-$VERSION +git checkout HHVM-$VERSION +git submodule update --init --recursive + +cd third-party +rm -rf libsqlite3 \ + lz4 \ + pcre +# libzip +cd .. +find -name "\.git*" -print0 | xargs -0 rm -rf + +cd .. +tar Jcvf hhvm-$VERSION.tar.xz hhvm-$VERSION +rm -rf hhvm-$VERSION +scp hhvm-$VERSION.tar.xz caraus.de:/srv/httpd/dlackware/download/hosted-sources/hhvm +CHECKSUM=`md5sum hhvm-$VERSION.tar.xz | cut -d ' ' -f 1` + +cat < hhvm.info +PRGNAM="hhvm" +VERSION="$VERSION" +HOMEPAGE="https://hhvm.com/" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://download.dlackware.com/hosted-sources/hhvm/hhvm-${VERSION}.tar.xz" +MD5SUM_x86_64="$CHECKSUM" +REQUIRES="tbb glog dwarf oniguruma libmemcached krb5 lz4 libsodium" +MAINTAINER="Eugene Wissner" +EMAIL="belka@caraus.de" +EOF + +rm -f slackbuilds/development/hhvm/*.tar.xz +mv \ + hhvm.info \ + hhvm-$VERSION.tar.xz \ + slackbuilds/development/hhvm/ +cd slackbuilds/development/hhvm + +# Update version in the SlackBuild. +sed -i "s#^\(VERSION=\)\${VERSION:-.\+#\1\${VERSION:-$VERSION}#" hhvm.SlackBuild + +BRANCH="hhvm${VERSION//.}" +git checkout master +git checkout -b $BRANCH +git add . +git commit -m "development/hhvm: Updated for version $VERSION" +#git push origin $BRANCH diff --git a/scripts/ioncube.sh b/scripts/ioncube.sh new file mode 100755 index 0000000..c618ea6 --- /dev/null +++ b/scripts/ioncube.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +VERSION=${VERSION:-10.3.9} + +set -e + + +wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86_${VERSION}.tar.gz \ + http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64_${VERSION}.tar.gz + +CHECKSUM32="`md5sum ioncube_loaders_lin_x86_${VERSION}.tar.gz | cut -d ' ' -f 1`" +CHECKSUM64="`md5sum ioncube_loaders_lin_x86-64_${VERSION}.tar.gz | cut -d ' ' -f 1`" + +mv ioncube_loaders_lin_x86_${VERSION}.tar.gz \ + ioncube_loaders_lin_x86-64_${VERSION}.tar.gz \ + slackbuilds/development/ioncube-loader/ + +cat < slackbuilds/development/ioncube-loader/ioncube-loader.info +PRGNAM="ioncube-loader" +VERSION="$VERSION" +HOMEPAGE="https://www.ioncube.com" +DOWNLOAD="http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86_${VERSION}.tar.gz" +MD5SUM="$CHECKSUM32" +DOWNLOAD_x86_64="http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64_${VERSION}.tar.gz" +MD5SUM_x86_64="$CHECKSUM64" +REQUIRES="" +MAINTAINER="Eugene Wissner" +EMAIL="belka@caraus.de" +EOF + +sed -i "s#^\(VERSION=\)\${VERSION:-.\+#\1\${VERSION:-$VERSION}#" slackbuilds/development/ioncube-loader/ioncube-loader.SlackBuild + +BRANCH="ioncube${VERSION//.}" +cd slackbuilds +git checkout master +git checkout -b $BRANCH +git add development/ioncube-loader +git commit -m "development/ioncube-loader: Updated for version ${VERSION}" +git push origin $BRANCH diff --git a/scripts/universal-ctags.sh b/scripts/universal-ctags.sh new file mode 100755 index 0000000..06ebe85 --- /dev/null +++ b/scripts/universal-ctags.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +set -e + +tar Jcvf ctags-$COMMIT.tar.xz ctags-$COMMIT + +rm -rf ctags-$COMMIT +CHECKSUM=`md5sum ctags-$COMMIT.tar.xz | cut -d ' ' -f 1` + +scp ctags-$COMMIT.tar.xz caraus.de:/srv/httpd/dlackware/download/hosted-sources/universal-ctags + +cat < universal-ctags.info +PRGNAM="universal-ctags" +VERSION="$HASH" +HOMEPAGE="https://ctags.io/" +DOWNLOAD="https://download.dlackware.com/hosted-sources/universal-ctags/ctags-$COMMIT.tar.xz" +MD5SUM="$CHECKSUM" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="%README%" +MAINTAINER="Eugene Wissner" +EMAIL="belka@caraus.de" +EOF + +rm -f slackbuilds/development/universal-ctags/*.tar.xz +mv \ + universal-ctags.info \ + ctags-$COMMIT.tar.xz \ + slackbuilds/development/universal-ctags/ +cd slackbuilds/development/universal-ctags + +# Update version in the SlackBuild. +sed -i "s#^\(VERSION=\)\${VERSION:-.\+#\1\${VERSION:-$HASH}#" universal-ctags.SlackBuild +sed -i "s#^\(GITVERSION=\)\${GITVERSION:-.\+#\1\${GITVERSION:-$COMMIT}#" universal-ctags.SlackBuild + +# Commit. +git checkout master +#git checkout -b ctags$HASH +git add . +git commit -m "development/universal-ctags: Updated for version $HASH"