LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-20-2010, 02:27 PM   #1
rizitis
LQ Newbie
 
Registered: Mar 2009
Location: Greece-Chania Crete
Distribution: Slackware 14
Posts: 14

Rep: Reputation: 0
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:

Last edited by rizitis; 04-21-2010 at 12:27 PM.
 
Old 04-21-2010, 09:34 AM   #2
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 800

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


Reply

Tags
slackbuilds, slackware13


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
save website as pdf and send pdf as an email? Cyberman Linux - Software 4 12-19-2009 09:41 PM
How to wget a webpage, and save as PDF (like cups-pdf) ? frenchn00b Programming 3 11-18-2008 03:48 PM
LXer: Linux PDF editor for manipulating PDF documents LXer Syndicated Linux News 0 12-19-2007 09:50 AM
Convert pdf to html or txt or remaster the pdf? jago25_98 Linux - Software 1 12-13-2005 01:11 AM


All times are GMT -5. The time now is 10:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration