Browse Source
ADD: woodpecker-cli (#76)
ADD: woodpecker-cli (#76)
Added woodpecker-cli (and git) Fixed woodpecker-agent* SlackBuild Co-authored-by: Mykyta Solomko <sev@nix.org.ua> Reviewed-on: #76 Co-Authored-By: Mykyta Solomko <sev@no-reply.code.nix.org.ua> Co-Committed-By: Mykyta Solomko <sev@no-reply.code.nix.org.ua>pull/77/head
6 changed files with 242 additions and 2 deletions
-
2woodpecker-agent-git/woodpecker-agent-git.SlackBuild
-
2woodpecker-agent/woodpecker-agent.SlackBuild
-
111woodpecker-cli-git/woodpecker-cli-git.SlackBuild
-
10woodpecker-cli-git/woodpecker-cli-git.info
-
109woodpecker-cli/woodpecker-cli.SlackBuild
-
10woodpecker-cli/woodpecker-cli.info
@ -0,0 +1,111 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
# Slackware build script for Woodpecker agent |
|||
|
|||
# Copyright 2019-2021, Mykyta Solomko <sev@nix.org.ua>, Kyiv, Ukraine |
|||
# 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. |
|||
|
|||
# Changelog |
|||
#========== |
|||
# * 2021.05.15 - git version |
|||
|
|||
PRGNAM=woodpecker-cli-git |
|||
SRCNAM=woodpecker |
|||
VERSION=$(date +%Y%m%d) |
|||
BUILD=${BUILD:-1} |
|||
TAG=${TAG:-sev} |
|||
|
|||
# Automatically determine the architecture we're building on: |
|||
if [ -z "$ARCH" ]; then |
|||
case "$( uname -m )" in |
|||
i?86) ARCH=i486 ;; |
|||
arm*) ARCH=arm ;; |
|||
# Unless $ARCH is already set, use uname -m for all other archs: |
|||
*) ARCH=$( uname -m ) ;; |
|||
esac |
|||
fi |
|||
|
|||
CWD=$(pwd) |
|||
TMP=${TMP:-/tmp/build/${ARCH}} |
|||
PKG=$TMP/package-$PRGNAM |
|||
OUTPUT=${OUTPUT:-/tmp} |
|||
|
|||
rm -rf ${PKG} |
|||
mkdir -p ${TMP} ${PKG} ${OUTPUT} |
|||
cd ${TMP} |
|||
rm -rf ${SRCNAM} |
|||
git clone --recursive https://github.com/laszlocph/woodpecker |
|||
cd ${SRCNAM} |
|||
|
|||
# Override version |
|||
VERSION_GIT="$(git rev-parse HEAD)" |
|||
VERSION="${VERSION}.${VERSION_GIT:0:8}.git" |
|||
|
|||
export GOPATH="$(pwd)/.gopath" |
|||
export PATH="${GOPATH}/bin:${PATH}" |
|||
mkdir -p "${GOPATH}" |
|||
|
|||
mkdir -p ${GOPATH}/src/github.com/laszlocph |
|||
cd ${GOPATH}/src/github.com/laszlocph |
|||
ln -sf ../../../../ woodpecker |
|||
|
|||
cd "${GOPATH}/src/github.com/laszlocph/woodpecker" |
|||
go get -v ./... |
|||
go build -ldflags '-extldflags "-static" -X main.Version='"${VERSION}" -v -o release/woodpecker-cli github.com/laszlocph/woodpecker/cli/drone |
|||
|
|||
# Create woodpecker-cli package |
|||
mkdir -p ${PKG}/usr/bin |
|||
|
|||
install -m755 release/woodpecker-cli -t ${PKG}/usr/bin/ |
|||
|
|||
# Strip binaries and libraries |
|||
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 |
|||
|
|||
# Copy program documentation into the package |
|||
mkdir -p ${PKG}/usr/doc/${PRGNAM}-${VERSION} |
|||
cp -a \ |
|||
LICENSE README.md \ |
|||
${PKG}/usr/doc/$PRGNAM-$VERSION |
|||
cat ${CWD}/${PRGNAM}.SlackBuild > ${PKG}/usr/doc/${PRGNAM}-${VERSION}/${PRGNAM}.SlackBuild |
|||
|
|||
mkdir -p ${PKG}/install |
|||
|
|||
# slack-desc |
|||
cat > ${PKG}/install/slack-desc << EOF |
|||
|-----handy-ruler------------------------------------------------------| |
|||
woodpecker-cli-git: Woodpecker CLI (continuous delivery platform CLI tools) |
|||
woodpecker-cli-git: |
|||
woodpecker-cli-git: Woodpecker CLI command line tools are used to interact with the |
|||
woodpecker-cli-git: Drone from the command line, and provide important utilities for |
|||
woodpecker-cli-git: managing users and repository settings. |
|||
woodpecker-cli-git: |
|||
woodpecker-cli-git: Homepage: https://woodpecker.laszlo.cloud/ |
|||
woodpecker-cli-git: |
|||
woodpecker-cli-git: |
|||
woodpecker-cli-git: |
|||
woodpecker-cli-git: |
|||
EOF |
|||
|
|||
# slack-conflicts |
|||
echo 'woodpecker-cli' > ${PKG}/install/slack-conflicts |
|||
|
|||
cd ${PKG} |
|||
/sbin/makepkg -l y -c n ${OUTPUT}/${PRGNAM}-${VERSION/-/_}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} |
|||
@ -0,0 +1,10 @@ |
|||
PRGNAM="woodpecker-agent-git" |
|||
VERSION="git" |
|||
HOMEPAGE="https://woodpecker.io/" |
|||
DOWNLOAD="https://github.com/laszlocph/woodpecker/" |
|||
MD5SUM="" |
|||
DOWNLOAD_x86_64="" |
|||
MD5SUM_x86_64="" |
|||
REQUIRES="" |
|||
MAINTAINER="Mykyta Solomko" |
|||
EMAIL="sev@nix.org.ua" |
|||
@ -0,0 +1,109 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
# Slackware build script for Woodpecker CLI |
|||
|
|||
# Copyright 2019-2021, Mykyta Solomko <sev@nix.org.ua>, Kyiv, Ukraine |
|||
# 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. |
|||
|
|||
# Changelog |
|||
#========== |
|||
# * 2021.05.15 - version 0.13.0-rc.3 |
|||
|
|||
PRGNAM=woodpecker-cli |
|||
SRCNAM=woodpecker |
|||
VERSION=${VERSION:-0.13.0-rc.3} |
|||
BUILD=${BUILD:-1} |
|||
TAG=${TAG:-sev} |
|||
|
|||
# Automatically determine the architecture we're building on: |
|||
if [ -z "$ARCH" ]; then |
|||
case "$( uname -m )" in |
|||
i?86) ARCH=i486 ;; |
|||
arm*) ARCH=arm ;; |
|||
# Unless $ARCH is already set, use uname -m for all other archs: |
|||
*) ARCH=$( uname -m ) ;; |
|||
esac |
|||
fi |
|||
|
|||
CWD=$(pwd) |
|||
TMP=${TMP:-/tmp/build/${ARCH}} |
|||
PKG=$TMP/package-$PRGNAM |
|||
OUTPUT=${OUTPUT:-/tmp} |
|||
|
|||
set -e # Exit on most errors |
|||
|
|||
rm -rf ${PKG} |
|||
mkdir -p ${TMP} ${PKG} ${OUTPUT} |
|||
cd ${TMP} |
|||
rm -rf ${SRCNAM}-${VERSION} |
|||
tar xvf ${CWD}/v${VERSION}.tar.?z* |
|||
cd ${SRCNAM}-${VERSION} |
|||
|
|||
export GOPATH="$(pwd)/.gopath" |
|||
export PATH="${GOPATH}/bin:${PATH}" |
|||
mkdir -p "${GOPATH}" |
|||
|
|||
mkdir -p ${GOPATH}/src/github.com/laszlocph |
|||
cd ${GOPATH}/src/github.com/laszlocph |
|||
ln -sf ../../../../ woodpecker |
|||
|
|||
cd "${GOPATH}/src/github.com/laszlocph/woodpecker" |
|||
go get -v ./... |
|||
go build -ldflags '-extldflags "-static" -X main.Version='"${VERSION}" -v -o release/woodpecker-cli github.com/laszlocph/woodpecker/cli/drone |
|||
|
|||
# Create woodpecker-cli package |
|||
mkdir -p ${PKG}/usr/bin |
|||
|
|||
install -m755 release/woodpecker-cli -t ${PKG}/usr/bin/ |
|||
|
|||
# Strip binaries and libraries |
|||
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 |
|||
|
|||
# Copy program documentation into the package |
|||
mkdir -p ${PKG}/usr/doc/${PRGNAM}-${VERSION} |
|||
cp -a \ |
|||
LICENSE README.md \ |
|||
${PKG}/usr/doc/$PRGNAM-$VERSION |
|||
cat ${CWD}/${PRGNAM}.SlackBuild > ${PKG}/usr/doc/${PRGNAM}-${VERSION}/${PRGNAM}.SlackBuild |
|||
|
|||
mkdir -p ${PKG}/install |
|||
|
|||
# slack-desc |
|||
cat > ${PKG}/install/slack-desc << EOF |
|||
|-----handy-ruler------------------------------------------------------| |
|||
woodpecker-cli: Woodpecker CLI (continuous delivery platform CLI tools) |
|||
woodpecker-cli: |
|||
woodpecker-cli: Woodpecker CLI command line tools are used to interact with the |
|||
woodpecker-cli: Drone from the command line, and provide important utilities for |
|||
woodpecker-cli: managing users and repository settings. |
|||
woodpecker-cli: |
|||
woodpecker-cli: Homepage: https://woodpecker.laszlo.cloud/ |
|||
woodpecker-cli: |
|||
woodpecker-cli: |
|||
woodpecker-cli: |
|||
woodpecker-cli: |
|||
EOF |
|||
|
|||
# slack-conflicts |
|||
echo 'woodpecker-cli-git' > ${PKG}/install/slack-conflicts |
|||
|
|||
cd ${PKG} |
|||
/sbin/makepkg -l y -c n ${OUTPUT}/${PRGNAM}-${VERSION/-/_}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} |
|||
@ -0,0 +1,10 @@ |
|||
PRGNAM="woodpecker-agent" |
|||
VERSION="0.13.0-rc.3" |
|||
HOMEPAGE="https://woodpecker.io/" |
|||
DOWNLOAD="https://github.com/laszlocph/woodpecker/archive/v0.13.0-rc.3.tar.gz" |
|||
MD5SUM="dc61fa06c781f10d07ac901a826e2bb3" |
|||
DOWNLOAD_x86_64="" |
|||
MD5SUM_x86_64="" |
|||
REQUIRES="" |
|||
MAINTAINER="Mykyta Solomko" |
|||
EMAIL="sev@nix.org.ua" |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue