blob: d6e86b79ff5924663505796c3c5cab2055a8e861 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
#!/bin/bash
# Slackware build script for pli
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20230103 bkw: update for v0.9.10e, fix PKGTYPE mess.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pli
VERSION=${VERSION:-0.9.10e}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
# static binary and library are for this arch.
ARCH=i586
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
# wrapper/frontend script version.
PLICLVER=${PLICLVER:-0.0.1}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tgz
cd $PRGNAM-$VERSION
chown -R root:root .
# permissions are bad, please don't revert this to template.
find . -type f -a -exec chmod 644 {} \+ -o -exec chmod 755 {} \+
# binary-only software, no compilation, just install it where it goes.
# AUR has a pli build:
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pli-bin
# but they don't include the includes, or the ISAM stuff (libpbl),
# or the alt/ dir.
PKGLIB=$PKG/usr/lib
PRIVLIB=$PKGLIB/$PRGNAM-$VERSION
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
PKGMAN=$PKG/usr/man/man1
mkdir -p $PKG/usr/bin $PRIVLIB $PKGDOC $PKGMAN
install -s -oroot -groot -m0755 plic $PRIVLIB/plic
install -oroot -groot -m0644 lib/libprf.a $PRIVLIB/libprf.a
install -oroot -groot -m0644 lib/libpbl.a $PRIVLIB/libpbl.a
cp -a lib/{alt,include,source} $PRIVLIB
ln -s $PRGNAM-$VERSION $PKG/usr/lib/$PRGNAM
ln -s ../lib/$PRGNAM/plic $PKG/usr/bin/plic
ln -s $PRGNAM/libprf.a $PKGLIB/libprf.a
ln -s $PRGNAM/libpbl.a $PKGLIB/libpbl.a
gzip -9c < $CWD/plic.1 > $PKGMAN/plic.1.gz
# wrapper script. written by the SlackBuild author, but not
# Slackware-specific, so it's not kept in SBo's git repo.
install -oroot -groot -m0755 $CWD/plicl-$PLICLVER $PKG/usr/bin/plicl
sh $CWD/plicl-$PLICLVER --man | gzip -9c > $PKGMAN/plicl.1.gz
# don't need 2 copies of the lgpl
rm -f lib/lgpl.html
cp -a *.gif *.pdf *.html lib/*.html samples $PKGDOC
cat $CWD/README_SBo.txt > $PKGDOC/README_SBo.txt
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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
|