From 6229cff268fb965b47d0e52cac0332ec6d36eb92 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Thu, 26 Feb 2015 12:23:48 +0100 Subject: [PATCH 1/2] package Rust nightly binaries --- d/rust/rust.SlackBuild | 63 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 d/rust/rust.SlackBuild diff --git a/d/rust/rust.SlackBuild b/d/rust/rust.SlackBuild new file mode 100755 index 00000000..9deed86e --- /dev/null +++ b/d/rust/rust.SlackBuild @@ -0,0 +1,63 @@ +#!/bin/sh + +CWD=$(pwd) + +PRGNAM=$(basename $CWD) +VERSION=nightly +BUILD=1 + +ARCH=$(uname -m) + +REPOSITORIES=/home/installs/SlackBuilds/repositories + +TAG=cyco +TMP=/tmp/$TAG +PKG=$TMP/pkg-$PRGNAM +OUTPUT=/tmp + +PREFIX=/usr + +# cleaning +rm -fr $PKG +mkdir -p $TMP $PKG + +# get +[ "$VERSION" == "nightly" ] && rm $CWD/rust-${VERSION}-x86_64-unknown-linux-gnu.tar.gz +[ ! -e $CWD/rust-${VERSION}-x86_64-unknown-linux-gnu.tar.gz ] && wget -c https://static.rust-lang.org/dist/rust-${VERSION}-x86_64-unknown-linux-gnu.tar.gz -O $CWD/rust-${VERSION}-x86_64-unknown-linux-gnu.tar.gz + +cd $TMP +tar xvf $CWD/rust-${VERSION}-x86_64-unknown-linux-gnu.tar.gz + +cd rust-nightly-x86_64-unknown-linux-gnu +./install.sh --prefix=$PKG/usr + +echo "${ARCH}" | grep -q -o 64 && mv $PKG/usr/lib $PKG/usr/lib64 +mv $PKG/usr/share/man $PKG/usr/ +find $PKG/usr/man/ -type f -name \*.\? -exec gzip -9 {} \; + +cd $PKG +mkdir -p install +cat < install/slack-desc +$PRGNAM: $PRGNAM (a safe, concurrent, practical language) +$PRGNAM: +$PRGNAM: Rust is a curly-brace, block-structured expression language. +$PRGNAM: It visually resembles the C language family, but differs significantly in +$PRGNAM: syntactic and semantic details. Its design is oriented toward concerns of +$PRGNAM: “programming in the large”, that is, of creating and maintaining boundaries +$PRGNAM: – both abstract and operational – that preserve large-system integrity, +$PRGNAM: availability and concurrency. +$PRGNAM: +$PRGNAM: http://www.rust-lang.org/ +$PRGNAM: +EOF + +chown -R root:root * + +[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; + +find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +[ "$VERSION" == "nightly" ] && VERSION=${VERSION}_$(date +%F | tr - .) + +makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz From b6501b511769476d3fae4a41bb199c522edd7672 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 3 Mar 2015 16:54:14 +0100 Subject: [PATCH 2/2] Added draft sonerezh Signed-off-by: Gwenhael Le Moine --- n/sonerezh/sonerezh.SlackBuild | 69 ++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 n/sonerezh/sonerezh.SlackBuild diff --git a/n/sonerezh/sonerezh.SlackBuild b/n/sonerezh/sonerezh.SlackBuild new file mode 100755 index 00000000..0562f367 --- /dev/null +++ b/n/sonerezh/sonerezh.SlackBuild @@ -0,0 +1,69 @@ +#!/bin/sh + +CWD=$(pwd) + +PRGNAM=$(basename $CWD) +VERSION=${VERSION:-$(date +%F | tr - .)} +ARCH="noarch" # hardcode ARCH +BUILD=${BUILD:-1} +TAG=${TAG:-cyco} + +DOCROOT=${DOCROOT:-/var/www/htdocs} + +PHPUSER=${PHPUSER:-apache} +PHPGROUP=${PHPGROUP:-apache} + +TMP=${TMP:-/tmp/$TAG} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -eu + +rm -rf $PKG +mkdir -p $TMP $OUTPUT $PKG/$DOCROOT +cd $PKG/$DOCROOT/ +rm -rf $PRGNAM-$VERSION + +REPOSITORY=/home/installs/SlackBuilds/repository/$PRGNAM + +if [ -e $REPOSITORY ]; then + (cd $REPOSITORY; git pull) +else + git clone https://github.com/Sonerezh/sonerezh.git $REPOSITORY +fi + +cp -R $REPOSITORY $PRGNAM + +cd $PRGNAM +rm -fr .git .gitignore +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 -o -perm 755 \) \ + -exec chmod 750 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 -o -perm 644 \) \ + -exec chmod 640 {} \; + +mkdir -p $PKG/usr/doc/$PRGNAM +cp -a CHANGELOG COPYING $PKG/usr/doc/$PRGNAM + +# Change ownership and perms and create a link. +chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/$PRGNAM +chmod 0750 $PKG/$DOCROOT/$PRGNAM + +mkdir -p $PKG/install +cat < $PKG/install/slack-desc +$PRGNAM: $PRGNAM (A self-hosted, web-based application for stream your music, everywhere.) +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: https://www.sonerezh.bzh/ +$PRGNAM: +EOF + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}