From 4a1855f0a4df62d63a68733837c8fa813470290d Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 18 Feb 2022 12:46:52 -0500 Subject: office/SOGo: Make the optional docs truly optional. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- office/SOGo/README | 5 +++-- office/SOGo/SOGo.SlackBuild | 28 ++++++++++++++++------------ office/SOGo/SOGo.info | 10 ++-------- office/SOGo/docs.md5sums | 3 +++ office/SOGo/getdocs.sh | 13 +++++++++++++ 5 files changed, 37 insertions(+), 22 deletions(-) create mode 100644 office/SOGo/docs.md5sums create mode 100644 office/SOGo/getdocs.sh (limited to 'office/SOGo') diff --git a/office/SOGo/README b/office/SOGo/README index 448d9358740d5..53fcf692221e2 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 d2522ff8df24b..4866cfa1715da 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 6c1f1f67f3f91..61390d7c782ea 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 0000000000000..8d5c113023479 --- /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 0000000000000..cdbbc6513c990 --- /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 $? -- cgit v1.2.3