Skip to content

Instantly share code, notes, and snippets.

@c0psrul3
Forked from thomascube/Makefile
Created April 20, 2016 21:37
Show Gist options
  • Save c0psrul3/2be438a987afc80681a78a9535f4cec8 to your computer and use it in GitHub Desktop.
Save c0psrul3/2be438a987afc80681a78a9535f4cec8 to your computer and use it in GitHub Desktop.
Roundcube release scripts
diff --git a/INSTALL b/INSTALL
index c099fc6..64a708f 100644
--- a/INSTALL
+++ b/INSTALL
@@ -15,8 +15,11 @@
- PCRE, DOM, JSON, XML, Session, Sockets (required)
- PHP Data Objects (PDO) with driver for either MySQL, PostgreSQL or SQLite (required)
Note: MySQL database driver requires PHP 5.3.7 or newer.
- - Libiconv, Zip (recommended)
- - Fileinfo, Mcrypt, mbstring (optional)
+ - Libiconv (required)
+ - Multibyte String (mbstring)
+ - Mcrypt (supporting Triple DES)
+ - Fileinfo (optional)
+ - Zip (recommended)
* PEAR packages distributed with Roundcube or external:
- Mail_Mime 1.8.1 or newer
- Mail_mimeDecode 1.5.5 or newer
diff --git a/README.md b/README.md
index 04b4d8f..ad81b4a 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,7 @@ INSTALLATION
------------
For detailed instructions on how to install Roundcube webmail on your server,
please refer to the INSTALL document in the same directory as this document.
+Please carefully read the REQUIREMENTS section of the INSTALL instructions.
If you're updating an older version of Roundcube please follow the steps
described in the UPGRADING file.
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index a127eeb..b678a70 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -736,7 +736,7 @@ class rcube
mcrypt_module_close($td);
}
else {
- @include_once 'des.inc';
+ // @include_once 'des.inc'; (not shipped with this distribution)
if (function_exists('des')) {
$des_iv_size = 8;
@@ -791,7 +791,7 @@ class rcube
mcrypt_module_close($td);
}
else {
- @include_once 'des.inc';
+ // @include_once 'des.inc'; (not shipped with this distribution)
if (function_exists('des')) {
$des_iv_size = 8;
--- composer.json.orig 2015-11-16 21:34:50.000000000 +0100
+++ composer.json 2015-11-16 21:35:22.000000000 +0100
@@ -28,14 +28,12 @@
"pear-pear.php.net/mail_mime": "~1.10.0",
"pear-pear.php.net/net_smtp": "~1.7.1",
"pear-pear.php.net/crypt_gpg": "~1.4.0",
+ "pear-pear.php.net/net_ldap2": "~2.1.0",
+ "kolab/Net_LDAP3": "dev-master",
"roundcube/net_sieve": "~1.5.0"
},
"require-dev": {
"phpunit/phpunit": "*"
},
- "suggest": {
- "pear-pear.php.net/net_ldap2": "~2.1.0 required for connecting to LDAP address books",
- "kolab/Net_LDAP3": "dev-master required for connecting to LDAP address books"
- },
"minimum-stability": "dev"
}
--- INSTALL.orig 2015-01-04 17:24:34.000000000 +0100
+++ INSTALL 2015-01-04 17:25:06.000000000 +0100
@@ -39,29 +39,22 @@
or SQLite support in PHP
* One of the above databases with permission to create tables
* An SMTP server (recommended) or PHP configured for mail delivery
-* Composer installed either locally or globally (https://getcomposer.org)
+* Composer installed either locally or globally (optional, for plugin installation)
INSTALLATION
============
1. Decompress and put this folder somewhere inside your document root
-2. Install dependencies using composer:
- - get composer from https://getcomposer.org/download/
- - rename the composer.json-dist file into composer.json
- - if you want to use LDAP address books, enable the LDAP libraries in your
- composer.json file by moving the items from "suggest" to the "require"
- section (remove the explanation texts after the version!).
- - run `php composer.phar install --no-dev`
-3. Make sure that the following directories (and the files within)
+2. Make sure that the following directories (and the files within)
are writable by the webserver
- /temp
- /logs
-4. Create a new database and a database user for Roundcube (see DATABASE SETUP)
-5. Point your browser to http://url-to-roundcube/installer/
-6. Follow the instructions of the install script (or see MANUAL CONFIGURATION)
-7. After creating and testing the configuration, remove the installer directory
-8. Check Known Issues section of this file
+3. Create a new database and a database user for Roundcube (see DATABASE SETUP)
+4. Point your browser to http://url-to-roundcube/installer/
+5. Follow the instructions of the install script (or see MANUAL CONFIGURATION)
+6. After creating and testing the configuration, remove the installer directory
+7. Check Known Issues section of this file
CONFIGURATION HINTS
#!/bin/sh
# remove all external components from a Roundcube checkout
scriptdir=`pwd`/`dirname $0`
cd $1
rm program/lib/utf8.class.php
rm program/lib/des.inc
rm -rf program/lib/encoding/
rm -rf program/lib/Auth/
rm -rf program/lib/Crypt/
rm -rf program/lib/Mail/
rm -rf program/lib/Net/
rm program/lib/PEAR.php
rm program/lib/PEAR5.php
rm -rf tests/
patch -p1 < $scriptdir/dependent.diff
GITREMOTE=git://github.com/roundcube/roundcubemail.git
GITBRANCH=master
VERSION=1.1.0
all: clean dist dependent framework
dist: roundcubemail-git toolchain
cp -r roundcubemail-git roundcubemail-$(VERSION)
(cd roundcubemail-$(VERSION); cp composer.json-dist composer.json)
(cd roundcubemail-$(VERSION); patch -p0 < ../dist.diff)
(cd roundcubemail-$(VERSION); php /tmp/composer.phar install --prefer-dist --no-dev)
(cd roundcubemail-$(VERSION); rm composer.json composer.lock; rm -rf vendor/pear/*/tests vendor/*/*/.git*)
tar czf roundcubemail-$(VERSION)-complete.tar.gz roundcubemail-$(VERSION)
rm -rf roundcubemail-$(VERSION)
dependent: roundcubemail-git
cp -r roundcubemail-git roundcubemail-$(VERSION)
tar czf roundcubemail-$(VERSION).tar.gz roundcubemail-$(VERSION)
rm -rf roundcubemail-$(VERSION)
framework: roundcubemail-git
cp -r roundcubemail-git/program/lib/Roundcube roundcube-framework-$(VERSION)
phpdoc -d roundcube-framework-$(VERSION) -t roundcube-framework-$(VERSION)/doc --title="Roundcube Framework" --defaultpackagename="Framework" --template=responsive-twig
rm -rf roundcube-framework-$(VERSION)/doc/phpdoc-cache*
tar czf roundcube-framework-$(VERSION).tar.gz roundcube-framework-$(VERSION)
rm -rf roundcube-framework-$(VERSION)
toolchain: /tmp/composer.phar
rm -f dist.diff
wget --no-check-certificate 'https://gist.github.com/thomascube/2725894/raw/dist.diff'
roundcubemail-git: /tmp/yuicompressor.jar
git clone $(GITREMOTE) roundcubemail-git
(cd roundcubemail-git; git checkout $(GITBRANCH))
(cd roundcubemail-git; bin/jsshrink.sh; bin/updatecss.sh; bin/cssshrink.sh)
(cd roundcubemail-git/bin; rm transifexpull.sh package2composer.sh importgettext.sh exportgettext.sh)
(cd roundcubemail-git; rm -rf tests public_html .git* .tx* index-test.php)
(cd roundcubemail-git; sed -i '' 's/1.1-git/$(VERSION)/' index.php program/include/iniset.php program/lib/Roundcube/bootstrap.php)
/tmp/yuicompressor.jar:
wget --no-check-certificate https://github.com/yui/yuicompressor/releases/download/v2.4.8/yuicompressor-2.4.8.zip -O "/tmp/yui.zip"
(cd /tmp && unzip "/tmp/yui.zip" && mv "yuicompressor-2.4.8.jar" "yuicompressor.jar")
/tmp/composer.phar:
curl -sS https://getcomposer.org/installer | php -- --install-dir=/tmp/
clean:
rm -rf roundcubemail-git
GITREMOTE=git://github.com/roundcube/roundcubemail.git
GITBRANCH=release-1.0
VERSION=1.0.0
all: clean dist dependent framework
dist: roundcubemail-git
cp -r roundcubemail-git roundcubemail-$(VERSION)
tar czf roundcubemail-$(VERSION).tar.gz roundcubemail-$(VERSION)
rm -rf roundcubemail-$(VERSION)
dependent: roundcubemail-git toolchain
cp -r roundcubemail-git roundcubemail-$(VERSION)-dep
./makedependent.sh roundcubemail-$(VERSION)-dep
find roundcubemail-$(VERSION)-dep -name '*.orig' | xargs rm
tar czf roundcubemail-$(VERSION)-dep.tar.gz roundcubemail-$(VERSION)-dep
rm -rf roundcubemail-$(VERSION)-dep
framework: roundcubemail-git
cp -r roundcubemail-git/program/lib/Roundcube roundcube-framework-$(VERSION)
phpdoc -d roundcube-framework-$(VERSION) -t roundcube-framework-$(VERSION)/doc --title="Roundcube Framework" --defaultpackagename="Framework" --template=responsive-twig
rm -rf roundcube-framework-$(VERSION)/doc/phpdoc-cache*
tar czf roundcube-framework-$(VERSION).tar.gz roundcube-framework-$(VERSION)
rm -rf roundcube-framework-$(VERSION)
toolchain:
rm -f dependent.diff makedependent.sh
wget --no-check-certificate 'https://gist.github.com/thomascube/2725894/raw/dependent.diff'
wget --no-check-certificate 'https://gist.github.com/thomascube/2725894/raw/makedependent.sh'
chmod +x makedependent.sh
roundcubemail-git:
git clone $(GITREMOTE) roundcubemail-git
(cd roundcubemail-git; git checkout $(GITBRANCH))
(cd roundcubemail-git; bin/jsshrink.sh; bin/updatecss.sh; bin/cssshrink.sh)
rm -rf roundcubemail-git/tests roundcubemail-git/public_html roundcubemail-git/.git* roundcubemail-git/.tx*
clean:
rm -rf roundcubemail-git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment