Difference between revisions of "User:Aexoxea/Tiki Wiki CMS Groupware/Files LTS"

From ArchWiki
Jump to navigation Jump to search
(Re-inserted initial files for Tiki 18.0.)
(Fix up tikiwiki-lts.install.)
Line 94: Line 94:
 
</nowiki>}}
 
</nowiki>}}
  
{{hc|tikiwiki.install|2=<nowiki>
+
{{hc|tikiwiki-lts.install|2=<nowiki>
 
post_install() {
 
post_install() {
  
echo ":: Be aware that if using Tiki Wiki CMS Groupware on PHP 7.1, there are a few"
+
echo ":: If you encounter trouble using Tiki Wiki CMS Groupware on PHP 7.2 or 7.1,"
echo "  minor known issues (see 'https://doc.tiki.org/Requirements'). If these impact"
+
echo "  consider downgrading to PHP 7.0 or 5.6. More information can be found at"
echo "  you, consider downgrading to PHP 7.0."
+
echo "  'https://doc.tiki.org/Requirements'."
 
echo "  "
 
echo "  "
 
echo ":: To complete the setup of Tiki Wiki CMS Groupware, you need to follow the"
 
echo ":: To complete the setup of Tiki Wiki CMS Groupware, you need to follow the"
Line 128: Line 128:
 
echo ":: To complete the upgrade of Tiki Wiki CMS Groupware, you need to follow the"
 
echo ":: To complete the upgrade of Tiki Wiki CMS Groupware, you need to follow the"
 
echo "  instructions starting at:"
 
echo "  instructions starting at:"
echo "  'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Choose_your_update_path'"
+
echo "  'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Apply_the_update'"
  
 
}
 
}
Line 134: Line 134:
 
pre_remove() {
 
pre_remove() {
  
# Clear out Tiki caches -- cached files may interfere with the upgrade process (if doing remove-then-install).
+
# Clear out Tiki caches -- cached files may interfere with the upgrade process (if doing a remove-then-install).
 
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*
 
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*
 
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*
 
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*
Line 144: Line 144:
 
post_remove() {
 
post_remove() {
  
# Remove lock file -- allows Tiki installer to be used (if doing remove-then-install).
+
# Remove lock file -- allows Tiki installer to be used (if doing a remove-then-install).
 
rm --force /usr/share/webapps/tikiwiki/db/lock
 
rm --force /usr/share/webapps/tikiwiki/db/lock
  

Revision as of 14:25, 16 February 2018

These files can be used to build and install the latest long term support release of Tiki Wiki CMS Groupware.

Note: This page exists in lieu of a package in AUR for now. I still consider these files to be experimental and I can't yet commit to keeping them updated.
PKGBUILD
pkgname=tikiwiki-lts
pkgver=18.0
pkgrel=1
_relcodename="18.x_Alcyone"
_minphpver="5.6"   # Inclusive of this version.
_maxphpver="7.3"   # Exclusive of this version.
pkgdesc="Tiki Wiki CMS Groupware, long-term support version."
arch=('any')
url="https://tiki.org/"
license=('LGPL2.1')
depends=("php-intl>=${_minphpver}" "php-intl<${_maxphpver}")
optdepends=("php-gd>=${_minphpver}: image processing and CAPTCHAs"
            "php-gd<${_maxphpver}: image processing and CAPTCHAs"
            "mariadb>=5.0: supported database server"
            "mysql>=5.0: supported database server")
makedepends=("unzip")
conflicts=('tikiwiki')
source=("tiki-${pkgver}.tar.gz::https://sourceforge.net/projects/tikiwiki/files/Tiki_${_relcodename}/${pkgver}/tiki-${pkgver}.tar.gz/download"
        "apache.example.conf"
        "setup-6460.diff")
options=('emptydirs' '!strip')
install="${pkgname}.install"
md5sums=('ca85659e2030734352d22fa8b989a175'
         'f761900ca84055a145a68ad10551aced'
         '9b58ddd811948cc059863101790454d9')
sha1sums=('f0ef690688f70abf656489e15020e2338f3adfc0'
          'db56b4e1960f16a595a6b309a77d0fee46b48bf0'
          '98052a54f98c6bfe4a651c71c5860190a47d0483')

package() {
# Copy the main package files into place.
mkdir --parents "${pkgdir}/usr/share/webapps/"
cp --archive --force "${srcdir}/tiki-${pkgver}" "${pkgdir}/usr/share/webapps/tikiwiki"

# Install the Apache example configuration.
install -D --mode="644" --target-directory="${pkgdir}/etc/webapps/tikiwiki/" "${srcdir}/apache.example.conf"

# Ready the setup script for use.
chmod a+rx,u+w "${pkgdir}/usr/share/webapps/tikiwiki/setup.sh"
patch "${pkgdir}/usr/share/webapps/tikiwiki/setup.sh" "${srcdir}/setup-6460.diff"   # Workaround for 'https://dev.tiki.org/item6460'.

# Run the setup script.
cd "${pkgdir}/usr/share/webapps/tikiwiki/"
if [ -e "/usr/bin/php" ]; then
    ./setup.sh -u root -g root -n fix
elif [ -e "/usr/bin/php72" ]; then
    ./setup.sh -u root -g root -p php72 -n fix
elif [ -e "/usr/bin/php71" ]; then
    ./setup.sh -u root -g root -p php71 -n fix
elif [ -e "/usr/bin/php70" ]; then
    ./setup.sh -u root -g root -p php70 -n fix
elif [ -e "/usr/bin/php56" ]; then
    ./setup.sh -u root -g root -p php56 -n fix
else
    echo ":: WARNING: Setup script not run as no supported PHP binary could be found."
fi
}
apache.example.conf
<IfModule mod_alias.c>
    Alias /tiki /usr/share/webapps/tikiwiki/
</IfModule>

<Directory /usr/share/webapps/tikiwiki/>
    Options FollowSymlinks
    AllowOverride all
    Require all granted
    php_admin_value open_basedir "/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/tikiwiki/:/etc/webapps/tikiwiki/"
</Directory>
setup-6460.diff
--- setup.sh
+++ setup.sh
@@ -539,10 +539,10 @@
 	then
 		if exists curl;
 		then
-			curl -s https://getcomposer.org/installer | php -- --install-dir=temp
+			curl -s https://getcomposer.org/installer | "${PHPCLI}" -- --install-dir=temp
 		else
 			# todo : if exists php;
-			php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));" -- --install-dir=temp
+			"${PHPCLI}" -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));" -- --install-dir=temp
 		fi
 		# if PATCHCOMPOSERFLAG then modify temp/composer.phar to avoid the warnings
 		# this hack is not yet possible because of a self signature check in temp/composer.phar
tikiwiki-lts.install
post_install() {

echo ":: If you encounter trouble using Tiki Wiki CMS Groupware on PHP 7.2 or 7.1,"
echo "   consider downgrading to PHP 7.0 or 5.6. More information can be found at"
echo "   'https://doc.tiki.org/Requirements'."
echo "   "
echo ":: To complete the setup of Tiki Wiki CMS Groupware, you need to follow the"
echo "   instructions starting at:"
echo "   'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Install_and_set_up_prerequisites'"

}

pre_upgrade() {

echo ":: Prior to upgrading Tiki Wiki CMS Groupware, you should consider the actions"
echo "   listed at:"
echo "   'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Before_updating'"

# Clear out Tiki caches -- cached files may interfere with the upgrade process.
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*
rm --force --recursive /usr/share/webapps/tikiwiki/temp/public/*
rm --force --recursive /usr/share/webapps/tikiwiki/temp/templates_c/*

}

post_upgrade() {

# Remove lock file -- allows Tiki installer to be used.
rm --force /usr/share/webapps/tikiwiki/db/lock

echo ":: To complete the upgrade of Tiki Wiki CMS Groupware, you need to follow the"
echo "   instructions starting at:"
echo "   'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Apply_the_update'"

}

pre_remove() {

# Clear out Tiki caches -- cached files may interfere with the upgrade process (if doing a remove-then-install).
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*
rm --force --recursive /usr/share/webapps/tikiwiki/temp/public/*
rm --force --recursive /usr/share/webapps/tikiwiki/temp/templates_c/*

}

post_remove() {

# Remove lock file -- allows Tiki installer to be used (if doing a remove-then-install).
rm --force /usr/share/webapps/tikiwiki/db/lock

echo ":: If you're removing Tiki Wiki CMS Groupware for good, remember to:"
echo "   (1) Remove Tiki's database (and database user account, if applicable)."
echo "   (2) Remove any residual files under /usr/share/webapps/tikiwiki/."

}