Skip to content

Commit

Permalink
sk1: added
Browse files Browse the repository at this point in the history
  • Loading branch information
conraid committed May 19, 2015
1 parent 3dd6624 commit 7ba0847
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sk1/doinst.sh
@@ -0,0 +1,5 @@
# Update the desktop database:
if [ -x usr/bin/update-desktop-database ]; then
chroot . /usr/bin/update-desktop-database -q /usr/share/applications > /dev/null 2>&1
fi

94 changes: 94 additions & 0 deletions sk1/sk1.SlackBuild
@@ -0,0 +1,94 @@
#!/bin/sh
#
# Slackware build script for sk1
#
# 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 http://slackers.it/repository

# Exit on most errors
set -eu

# Set variables:
CWD=$(pwd)

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

# Insert document files in this variable
DOCFILES="MANIFEST* README* src/COPYRIGHTS src/GNU*"

# 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

# Set libdir
[ $ARCH == 'x86_64' ] && LIBDIRSUFFIX="64" || LIBDIRSUFFIX=""

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

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

# Build and install:
sed "/install_pat/s|/usr/lib/|/usr/lib${LIBDIRSUFFIX}/|" -i setup.py
python setup.py install --root=${PKG}

# 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

# Add a documentation directory:
mkdir -p ${PKGDOCDIR}
cp -a ${DOCFILES} ${PKGDOCDIR} || true

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

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

# Add a doinst.sh
install -Dm644 ${CWD}/doinst.sh ${PKG}/install/doinst.sh

# Create package:
cd ${PKG}
/sbin/makepkg -l y -c n ${CWD}/${PKGNAME}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz
8 changes: 8 additions & 0 deletions sk1/sk1.info
@@ -0,0 +1,8 @@
NAME="sk1"
VERSION="0.9.3"
HOMEPAGE=""
DOWNLOAD="http://downloads.sourceforge.net/sk1/sk1-0.9.3.tar.gz"
FILENAME="sk1-0.9.3.tar.gz"
REQUIRES=""
MD5SUM="04cfbc5ffd4e25ae47a95b2e37cd8465"
SHASUM="d3deefffe94f73527bd6a681aca92f5e871f6b64"
19 changes: 19 additions & 0 deletions sk1/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------------------------------------------------------|
sk1: sk1 (vector graphics editor)
sk1:
sk1: sK1 is an open source vector graphics editor similar to CorelDRAW,
sk1: Adobe Illustrator, or Freehand. First of all sK1 is oriented for
sk1: "prepress ready" PostScript & PDF output.
sk1:
sk1:
sk1:
sk1:
sk1:
sk1:

0 comments on commit 7ba0847

Please sign in to comment.