blob: 68cedb4e921032862bc20f60cffc422f0a4d6418 (
plain)
1 # Description: Library for handling paper characteristics
2 # URL: http://ftp.debian.org/debian/pool/main/libp/libpaper/
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on:
5
6 name=libpaper
7 version=1.1.28
8 release=2
9 source=(http://ftp.debian.org/debian/pool/main/libp/libpaper/libpaper_1.1.28.tar.gz)
10
11 build() {
12 cd $name-$version
13 autoreconf -fi
14 ./configure --prefix=/usr \
15 --sysconfdir=/etc \
16 --disable-static
17 make
18 make DESTDIR=$PKG install
19 mkdir -vp $PKG/etc/libpaper.d
20 cat > $PKG/usr/bin/run-parts << "EOF"
21 #!/bin/sh
22 # run-parts: Runs all the scripts found in a directory.
23 # from Slackware, by Patrick J. Volkerding with ideas borrowed
24 # from the Red Hat and Debian versions of this utility.
25
26 # keep going when something fails
27 set +e
28
29 if [ $# -lt 1 ]; then
30 echo "Usage: run-parts <directory>"
31 exit 1
32 fi
33
34 if [ ! -d $1 ]; then
35 echo "Not a directory: $1"
36 echo "Usage: run-parts <directory>"
37 exit 1
38 fi
39
40 # There are several types of files that we would like to
41 # ignore automatically, as they are likely to be backups
42 # of other scripts:
43 IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
44
45 # Main loop:
46 for SCRIPT in $1/* ; do
47 # If this is not a regular file, skip it:
48 if [ ! -f $SCRIPT ]; then
49 continue
50 fi
51 # Determine if this file should be skipped by suffix:
52 SKIP=false
53 for SUFFIX in $IGNORE_SUFFIXES ; do
54 if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
55 SKIP=true
56 break
57 fi
58 done
59 if [ "$SKIP" = "true" ]; then
60 continue
61 fi
62 # If we've made it this far, then run the script if it's executable:
63 if [ -x $SCRIPT ]; then
64 $SCRIPT || echo "$SCRIPT failed."
65 fi
66 done
67
68 exit 0
69 EOF
70 }
|