Skip to content

Commit

Permalink
gulp: added 3.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
conraid committed Jul 10, 2015
1 parent 0645d25 commit e726754
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 0 deletions.
101 changes: 101 additions & 0 deletions gulp/gulp.SlackBuild
@@ -0,0 +1,101 @@
#!/bin/sh
#
# Slackware build script for gulp
#
# Copyright 2015 Corrado Franco (http://conraid.net)
# 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.
#
# Latest version of this SlackBuild at https://github.com/conraid/SlackBuilds

# Exit on most errors
set -eu

# Set variables:
CWD=$(pwd)

PRGNAM=${PRGNAM:-gulp}
PKGNAM=$(echo ${PRGNAM} | tr A-Z a-z)
VERSION=${VERSION:-3.9.0}
PKGVERSION=${VERSION//-/_}
BUILD=${BUILD:-1}
TAG=${TAG:-cf}
TMP=${TMP:-/tmp/pkg}
PKG=${TMP}/package-${PKGNAM}
PKGDOCDIR="${PKG}/usr/doc/${PKGNAM}-${PKGVERSION}"


# Insert document files in this variable
DOCFILES="*.md LICENSE docs/*"

# Automatically determine the architecture we're building on:
if [ -z ${ARCH:=""} ]; then
case "$( uname -m )" in
i?86) ARCH=i686 ;;
arm*) ARCH=arm ;;
# Unless ${ARCH} is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi

# Extract source and prepare:
rm -rf ${PKG}
mkdir -p ${TMP} ${PKG}
cd ${TMP}
rm -rf ${PRGNAM}-${VERSION}
tar xvf ${CWD}/${PRGNAM}-${VERSION}.tar.gz || tar xvf ${CWD}/v${VERSION}.tar.gz
cd ${PRGNAM}-${VERSION}

# Make sure ownerships and permissions are sane:
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

# Build and install:
DESTDIR=${PKG} npm install --user root -g

# Strip binaries:
find ${PKG} | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
find ${PKG} | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs -r strip -g 2> /dev/null || true

# Compress and link manpages, if any:
if [ -d ${PKG}/usr/man ]; then
find ${PKG}/usr/man -type f -exec chmod 644 {} \; -exec gzip -9 {} \;
for i in $( find ${PKG}/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
fi

# Remove empty dir
rmdir ${PKG}/usr/etc

# Add bash completion file
install -Dm744 completion/bash ${PKG}/etc/bash_completion.d/bash

# Add a documentation directory:
mkdir -p ${PKGDOCDIR}
cp -a ${DOCFILES} ${PKGDOCDIR} || true
cp completion/README.md ${PKGDOCDIR}

# Add a slackbuild script:
install -Dm644 ${CWD}/${PKGNAM}.SlackBuild ${PKGDOCDIR}/${PKGNAM}.SlackBuild

# Add slack-desc
install -Dm644 ${CWD}/slack-desc ${PKG}/install/slack-desc

# Create package:
cd ${PKG}
/sbin/makepkg -l y -c n ${CWD}/${PKGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz
8 changes: 8 additions & 0 deletions gulp/gulp.info
@@ -0,0 +1,8 @@
NAME="gulp"
VERSION="3.9.0"
HOMEPAGE=""
DOWNLOAD="https://github.com/gulpjs/gulp/archive/v3.9.0.tar.gz"
FILENAME="gulp-3.9.0.tar.gz"
REQUIRES="node npm"
MD5SUM="4416063cfa4125ecf45cbf7833674d29"
SHASUM="4291c862a9bc2f2d1a7add512b1c266c9c96bde5"
19 changes: 19 additions & 0 deletions gulp/slack-desc
@@ -0,0 +1,19 @@
# 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------------------------------------------------------|
gulp: gulp (The streaming build system)
gulp:
gulp: Gulp is a node-module build system automating tasks: minification
gulp: and copying of all JavaScript files, static images. More capable of
gulp: watching files to automatically rerun the task when a file changes.
gulp:
gulp:
gulp:
gulp:
gulp:
gulp:

0 comments on commit e726754

Please sign in to comment.