summaryrefslogtreecommitdiffstats
path: root/office
diff options
context:
space:
mode:
author B. Watson2022-02-18 18:46:52 +0100
committer Willy Sudiarto Raharjo2022-02-19 06:09:28 +0100
commit4a1855f0a4df62d63a68733837c8fa813470290d (patch)
tree336fc01714b8e56061486fae4fdbd8ed1fbae156 /office
parentb089b0e37a8b840793594687d359f3fddbbdeb61 (diff)
downloadslackbuilds-4a1855f0a4df62d63a68733837c8fa813470290d.tar.gz
office/SOGo: Make the optional docs truly optional.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office')
-rw-r--r--office/SOGo/README5
-rw-r--r--office/SOGo/SOGo.SlackBuild28
-rw-r--r--office/SOGo/SOGo.info10
-rw-r--r--office/SOGo/docs.md5sums3
-rw-r--r--office/SOGo/getdocs.sh13
5 files changed, 37 insertions, 22 deletions
diff --git a/office/SOGo/README b/office/SOGo/README
index 448d935874..53fcf69222 100644
--- a/office/SOGo/README
+++ b/office/SOGo/README
@@ -11,8 +11,9 @@ middle of your servers to offer your users a uniform and complete
interface to access their information. It has been deployed in
production environments where thousands of users are involved.
-Additional documentation can be installed by setting
-INSTALL_DOCS=yes when executing this script.
+The optional extra documentation (PDF files) will be installed if
+they are present in the script's directory. You can download these by
+running "sh getdocs.sh".
Groupname and Username
diff --git a/office/SOGo/SOGo.SlackBuild b/office/SOGo/SOGo.SlackBuild
index d2522ff8df..4866cfa171 100644
--- a/office/SOGo/SOGo.SlackBuild
+++ b/office/SOGo/SOGo.SlackBuild
@@ -22,6 +22,12 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220218 bkw: Modified by SlackBuilds.org:
+# - get the docs out of DOWNLOAD in the info file. they were getting
+# downloaded (or failing to, due to user-agent checking on the
+# server), but only installed if the user set an environment
+# variable.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=SOGo
@@ -38,9 +44,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -91,9 +94,9 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -145,13 +148,14 @@ cp -a \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-if [ "${INSTALL_DOCS:-no}" != "no" ]; then
- cp -a \
- $CWD/SOGoInstallationGuide.pdf \
- $CWD/SOGoMozillaThunderbirdConfigurationGuide.pdf \
- $CWD/SOGoOutlookConnectorConfigurationGuide.pdf \
- $PKG/usr/doc/$PRGNAM-$VERSION
-fi
+# 20220218 bkw: install PDF docs, if available.
+for i in \
+ SOGoInstallationGuide \
+ SOGoMozillaThunderbirdConfigurationGuide \
+ SOGoOutlookConnectorConfigurationGuide
+do
+ [ -e $CWD/$i.pdf ] && cat $CWD/$i.pdf > $PKG/usr/doc/$PRGNAM-$VERSION/$i.pdf
+done
# Install backup script
cat Scripts/sogo-backup.sh > $PKG/usr/doc/$PRGNAM-$VERSION/sogo-backup.sh
diff --git a/office/SOGo/SOGo.info b/office/SOGo/SOGo.info
index 6c1f1f67f3..61390d7c78 100644
--- a/office/SOGo/SOGo.info
+++ b/office/SOGo/SOGo.info
@@ -1,14 +1,8 @@
PRGNAM="SOGo"
VERSION="5.0.1"
HOMEPAGE="https://sogo.nu/"
-DOWNLOAD="https://sogo.nu/files/downloads/SOGo/Sources/SOGo-5.0.1.tar.gz \
- https://sogo.nu/files/docs/SOGoInstallationGuide.pdf \
- https://sogo.nu/files/docs/SOGoMozillaThunderbirdConfigurationGuide.pdf \
- https://sogo.nu/files/docs/SOGoOutlookConnectorConfigurationGuide.pdf"
-MD5SUM="f7112b11568d68d58b32fb4ba64a8bbc \
- 69977733e37855bd521fdec223d9a7b9 \
- b4af8941febedb25c124a4ff3244b1f7 \
- 29e7144dd129d344d16509b188487ffb"
+DOWNLOAD="https://packages.inverse.ca/SOGo/sources/SOGo-5.0.1.tar.gz"
+MD5SUM="f7112b11568d68d58b32fb4ba64a8bbc"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="SOPE libmemcached"
diff --git a/office/SOGo/docs.md5sums b/office/SOGo/docs.md5sums
new file mode 100644
index 0000000000..8d5c113023
--- /dev/null
+++ b/office/SOGo/docs.md5sums
@@ -0,0 +1,3 @@
+cf8bd301773b32d63b6efb9363d543f9 SOGoInstallationGuide.pdf
+b15b25c66158d68adc5acdb08355566d SOGoMozillaThunderbirdConfigurationGuide.pdf
+812601272142416df7e939ccccbf330c SOGoOutlookConnectorConfigurationGuide.pdf
diff --git a/office/SOGo/getdocs.sh b/office/SOGo/getdocs.sh
new file mode 100644
index 0000000000..cdbbc6513c
--- /dev/null
+++ b/office/SOGo/getdocs.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# 20220218 bkw: download the PDF docs for SOGo. upstream site does
+# user-agent checking, so we pretend to be an ancient version of
+# firefox.
+
+wget --user-agent 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)' \
+ https://sogo.nu/files/docs/SOGoInstallationGuide.pdf \
+ https://sogo.nu/files/docs/SOGoMozillaThunderbirdConfigurationGuide.pdf \
+ https://sogo.nu/files/docs/SOGoOutlookConnectorConfigurationGuide.pdf
+
+md5sum -c docs.md5sums
+exit $?