Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
162 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# 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 | ||
|
||
# Update icon cache if one exists | ||
if [ -r usr/share/icons/hicolor/icon-theme.cache ]; then | ||
if [ -x /usr/bin/gtk-update-icon-cache ]; then | ||
chroot . /usr/bin/gtk-update-icon-cache -t -f -q usr/share/icons/hicolor >/dev/null 2>&1 | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
#!/bin/sh | ||
# | ||
# Slackware build script for kprinter4 | ||
# | ||
# Copyright 2014 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 -e | ||
|
||
# Set variables: | ||
CWD=$(pwd) | ||
|
||
PRGNAME=${PRGNAME:-kprinter4} | ||
PKGNAME=$(echo $PRGNAME | tr A-Z a-z) | ||
VERSION=${VERSION:-10} | ||
PKGVERSION=$(echo $VERSION | tr - _) | ||
BUILD=${BUILD:-1} | ||
TAG=${TAG:-cf} | ||
TMP=${TMP:-/tmp/pkg} | ||
PKG=$TMP/package-$PKGNAME | ||
DOCS="$PKG/usr/doc/$PKGNAME-$PKGVERSION" | ||
|
||
# Insert document files in this variable | ||
DOCFILES="AUTHORS LICEN?E README*" | ||
|
||
ARCH=${ARCH:=""} # Set ARCH or leave blank to determine it automatically | ||
# 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 compiling FLAGS | ||
case "$ARCH" in | ||
i[3-5]86) | ||
SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"; CHOST="i486" | ||
SLKLDFLAGS=""; LIBDIRSUFFIX="" | ||
;; | ||
i686) | ||
SLKCFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"; CHOST="i486" | ||
SLKLDFLAGS=""; LIBDIRSUFFIX="" | ||
;; | ||
x86_64) | ||
SLKCFLAGS="-O2 -fPIC -pipe -fomit-frame-pointer"; CHOST="x86_64" | ||
SLKLDFLAGS="-L/lib64 -L/usr/lib64"; LIBDIRSUFFIX="64" | ||
;; | ||
*) | ||
SLKCFLAGS="-O2"; CHOST=$ARCH | ||
SLKLDFLAGS=""; LIBDIRSUFFIX="" | ||
;; | ||
esac | ||
|
||
# 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 . | ||
|
||
# Configure | ||
mkdir -p build | ||
cd build | ||
cmake \ | ||
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ | ||
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ | ||
-DCMAKE_BUILD_TYPE=none \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
-DMAN_INSTALL_DIR=/usr/man \ | ||
-DSYSCONF_INSTALL_DIR=/etc \ | ||
-DLIB_SUFFIX=${LIBDIRSUFFIX} \ | ||
.. | ||
|
||
# Build and install: | ||
make | ||
make DESTDIR=$PKG install | ||
cd - | ||
|
||
# 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 | ||
|
||
# Add a documentation directory: | ||
mkdir -p ${DOCS} | ||
cp -a $DOCFILES $DOCS | ||
|
||
# Add a slackbuild script: | ||
install -Dm644 $CWD/$PKGNAME.SlackBuild $DOCS/$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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
NAME="kprinter4" | ||
VERSION="10" | ||
HOMEPAGE="https://github.com/credativ/kprinter4" | ||
DOWNLOAD="https://github.com/credativ/kprinter4/archive/v10.tar.gz" | ||
SOURCE="kprinter4-10.tar.gz" | ||
REQUIRES="" | ||
MD5SUM="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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------------------------------------------------------| | ||
kprinter4: kprinter4 (KDE4 print dialog) | ||
kprinter4: | ||
kprinter4: KPrinter4 is a simple stand-alone PostScript document printer | ||
kprinter4: modelled after the KDE 4 print dialog. It can be used in place of | ||
kprinter4: /bin/lpr in order to better control the print setup of non-KDE | ||
kprinter4: applications. | ||
kprinter4: | ||
kprinter4: | ||
kprinter4: | ||
kprinter4: | ||
kprinter4: |