mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-01 01:00:03 +01:00
6ee2255a86
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
39 lines
862 B
Bash
39 lines
862 B
Bash
#!/bin/sh
|
|
|
|
# Create the xpra-prebuilt-docs tarball. Part of SlackBuilds.org xpra
|
|
# build. Run from within the SlackBuild dir. Does not require root
|
|
# acces, but does need to write to its current directory.
|
|
|
|
set -e
|
|
|
|
# get VERSION:
|
|
source ./xpra.info
|
|
|
|
OUTDIR=xpra-$VERSION-prebuilt-docs
|
|
TARBALL=$OUTDIR.tar.xz
|
|
|
|
RPMFILE=xpra-common-4.3-10.el8.noarch.rpm
|
|
URL=https://www.xpra.org/dists/CentOS/8/x86_64/$RPMFILE
|
|
|
|
# only download the file if we don't already have it.
|
|
[ -e $RPMFILE ] || wget $URL
|
|
[ -e $RPMFILE ] || exit 1
|
|
|
|
rm -rf $OUTDIR
|
|
mkdir -p $OUTDIR
|
|
cd $OUTDIR
|
|
|
|
# extract without creating an intermediate tarball (as rpm2targz would):
|
|
rpm2cpio ../$RPMFILE | cpio -imd
|
|
|
|
# remove everything but the docs:
|
|
mkdir .keep
|
|
mv usr/share/doc/xpra/* .keep
|
|
rm -rf *
|
|
mv .keep/* .
|
|
rmdir .keep
|
|
|
|
# now ready to create the tarball.
|
|
cd -
|
|
tar cvfJ $TARBALL $OUTDIR
|
|
md5sum $TARBALL
|