LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   PDF-Shuffler (https://www.linuxquestions.org/questions/slackware-14/pdf-shuffler-803111/)

rizitis 04-20-2010 02:27 PM

PDF-Shuffler
 
On my ubuntu system when I was editing pdf files I used PDF-Shuffler
So now I wrote a slackbuild script for my slackware 13 (xfce)
To be more specific, I dont know how to write a slackbuild script so I try to edit the pyPdf.SlackBuild script, hopefully it works!
So I want to give it in public view maybe someone need it some time.

Code:

Homepage:
http://pdfshuffler.sourceforge.net/
Source Downloads:
http://sourceforge.net/projects/pdfshuffler/files/pdfshuffler/0.5/pdfshuffler-0.5.tar.gz/download

pdfshuffler.SlackBuild
Code:

#!/bin/sh

# Slackware build script for pdfshuffler
#
# 2010 rizitis
# Freedom
#
# 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.

PRGNAM=pdfshuffler
VERSION=0.5
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

DOCS="AUTHORS COPYING README TODO"

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION

chown -R root:root .
find . \
 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
 -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 -exec chmod 644 {} \;

python setup.py install --root=$PKG

( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
    xargs strip --strip-unneeded 2> /dev/null || true
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
    xargs strip --strip-unneeded 2> /dev/null
)

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

README
Code:

PDF-Shuffler 0.5
----------------

This is the latest release of PDF-Shuffler, a simple pyGTK utility to merge,
split and rearrange PDF documents. PDF-Shuffler lets also rotate and crop
individual pages of a pdf document.

PDF-Shuffler requires python-poppler and version 1.10 or newer of python-pypdf.

PDF-Shuffler is written in Python using PyGTK. It is released under the GNU GPL-2.

slack-desc
Code:

# 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 ':'.

          |-----handy-ruler---------------------------------------------------|
pdfshuffler: PDF-Shuffler 0.5 a simple pyGTK utility
pdfshuffler:     
pdfshuffler: PDF-Shuffler merge,split and rearrange PDF documents
pdfshuffler: also rotate and cropindividual pages of a pdf document.
pdfshuffler:
pdfshuffler: 
pdfshuffler:
pdfshuffler: 
pdfshuffler:
pdfshuffler: http://sourceforge.net/projects/pdfshuffler/
pdfshuffler:


manwichmakesameal 04-21-2010 09:34 AM

You may want to edit the slack-desc and put the actual app name instead of just "appname".


All times are GMT -5. The time now is 05:33 PM.