Commit f7f755c9 authored by Marco Mariani's avatar Marco Mariani

more /opt/zimbra for Perl, clamav, curl, libmemcached, memcached, nginx, php, postfix, rsync

parent 0dca566a
......@@ -405,7 +405,7 @@ build:
cp $(PERL_ROOT)/$$lib.tar.gz $(TMPDIR); \
(cd $(TMPDIR); tar xfz $$lib.tar.gz; cd $$lib; \
$(PERL) -I$(DEST_LIB_DIR) Makefile.PL PREFIX=$(DEST_DIR) LIB=$(DEST_LIB_DIR) --ssl --nocatchstderr \
--libs="-L$(ZIMBRA_HOME)/mysql/lib -L/opt/zimbra/openssl/lib -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl" \
--libs="-L$(ZIMBRA_HOME)/mysql/lib -L$(ZIMBRA_HOME)/openssl/lib -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl" \
--mysql_config="$(ZIMBRA_HOME)/mysql/bin/mysql_config"; \
$(SED) -i .bak -e 's#-arch x86_64 -arch i386 -arch ppc -bundle -undefined dynamic_lookup -L/usr/local/lib#-arch x86_64 -bundle -undefined dynamic_lookup#' Makefile; \
$(SED) -i .bak -e 's#-arch x86_64 -arch i386 -arch ppc -L/usr/local/lib#-arch x86_64#' Makefile; \
......@@ -413,7 +413,7 @@ build:
$(SED) -i .bak -e 's#-arch x86_64 -arch i386 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector#-arch x86_64 -bundle -undefined dynamic_lookup -fstack-protector#' Makefile; \
$(SED) -i .bak -e 's#-arch x86_64 -arch i386 -fstack-protector -L/usr/local/lib#-arch x86_64 -fstack-protector#' Makefile; \
$(SED) -i .bak -e 's#-arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include#-arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector#' Makefile; \
LD_RUN_PATH=/opt/zimbra/lib:/opt/zimbra/mysql/lib:/opt/zimbra/openssl/lib $(MAKE); $(MAKE) install;) >> $(LOGFILE) 2>&1; \
LD_RUN_PATH=$(ZIMBRA_HOME)/lib:$(ZIMBRA_HOME)/mysql/lib:$(ZIMBRA_HOME)/openssl/lib $(MAKE); $(MAKE) install;) >> $(LOGFILE) 2>&1; \
if [ $$? -ne 0 ]; then echo "FAILED."; else echo "done."; fi \
done
......@@ -431,9 +431,9 @@ build:
echo -n "Compiling perl lib $$lib" ...; \
cp $(PERL_ROOT)/$$lib.tar.gz $(TMPDIR); \
(cd $(TMPDIR); tar xzf $$lib.tar.gz; cd $$lib; \
$(PERL) -I$(DEST_LIB_DIR) Makefile.PL PREFIX=$(ZIMBRA_HOME)/zimbramon LIB=$(ZIMBRA_HOME)/zimbramon/lib DATADIR=$(ZIMBRA_HOME)/conf/spamassassin CONFDIR=/opt/zimbra/conf/spamassassin LOCALSTATEDIR=$(ZIMBRA_HOME)/data/spamassassin; \
$(PERL) -I$(DEST_LIB_DIR) Makefile.PL PREFIX=$(ZIMBRA_HOME)/zimbramon LIB=$(ZIMBRA_HOME)/zimbramon/lib DATADIR=$(ZIMBRA_HOME)/conf/spamassassin CONFDIR=$(ZIMBRA_HOME)/conf/spamassassin LOCALSTATEDIR=$(ZIMBRA_HOME)/data/spamassassin; \
$(MAKE); $(MAKE) install DESTDIR=$(DEST_DIR); \
cp -R $(DEST_DIR)/opt/zimbra/zimbramon/* $(DEST_DIR); \
cp -R $(DEST_DIR)$(ZIMBRA_HOME)/zimbramon/* $(DEST_DIR); \
rm -rf $(DEST_DIR)/opt;) >> $(LOGFILE) 2>&1; \
if [ $$? -ne 0 ]; then echo "FAILED."; else echo "done."; fi \
done
......@@ -442,7 +442,7 @@ build:
echo -n "Compiling perl lib $$lib ..."; \
cp $(PERL_ROOT)/$$lib.tar.gz $(TMPDIR); \
(cd $(TMPDIR); tar xzf $$lib.tar.gz; cd $$lib; \
$(SED) -i .bak -e 's#/usr/lib/sendmail /usr/sbin/sendmail#/usr/lib/sendmail /usr/sbin/sendmail /opt/zimbra/postfix/sbin/sendmail#' lib/Swatch/Actions.pm; \
$(SED) -i .bak -e 's#/usr/lib/sendmail /usr/sbin/sendmail#/usr/lib/sendmail /usr/sbin/sendmail $(ZIMBRA_HOME)/postfix/sbin/sendmail#' lib/Swatch/Actions.pm; \
rm -f lib/Swatch/Actions.pm.bak; \
$(PERL) -I$(DEST_LIB_DIR) Makefile.PL PREFIX=$(DEST_DIR) LIB=$(DEST_LIB_DIR); \
$(MAKE); $(MAKE) install;) >> $(LOGFILE) 2>&1; \
......
......@@ -20,8 +20,8 @@ else
include $(CLAMAV_ROOT)/../versions.def
endif
CPPFLAGS := CPPFLAGS="-I/opt/zimbra/sendmail-$(SENDMAIL_VERSION)/include"
LDFLAGS := LDFLAGS="-L/opt/zimbra/sendmail-$(SENDMAIL_VERSION)/lib"
CPPFLAGS := CPPFLAGS="-I$(ZIMBRA_HOME)/sendmail-$(SENDMAIL_VERSION)/include"
LDFLAGS := LDFLAGS="-L$(ZIMBRA_HOME)/sendmail-$(SENDMAIL_VERSION)/lib"
CONFIG_OPT := --enable-milter
CLAMAV_TGZ_TARGET := \
$(P4_ROOT)/ThirdPartyBuilds/$(BUILD_PLATFORM)/clamav/clamav-$(CLAMAV_VERSION).tgz
......@@ -45,7 +45,7 @@ build:
CFLAGS="-g -O2" \
$(CPPFLAGS) \
$(LDFLAGS) \
./configure --prefix=/opt/zimbra/clamav-$(CLAMAV_VERSION) --mandir=/opt/zimbra/clamav-$(CLAMAV_VERSION)/man \
./configure --prefix=$(ZIMBRA_HOME)/clamav-$(CLAMAV_VERSION) --mandir=$(ZIMBRA_HOME)/clamav-$(CLAMAV_VERSION)/man \
--with-user=zimbra --with-group=zimbra --disable-zlib-vcheck --disable-gcc-vcheck --disable-clamav $(CONFIG_OPT); \
$(MAKE) $(MAKEARGS); $(MAKE) install)
-(cd $(ZIMBRA_HOME); ln -s clamav-$(CLAMAV_VERSION) clamav)
......
......@@ -58,10 +58,10 @@ build:
$(LDFLAGS) \
CFLAGS="-g -O2" \
./configure --prefix=$(ZIMBRA_HOME)/curl-$(CURL_VERSION) --disable-ldap --disable-ldaps \
--with-gssapi=/opt/zimbra/heimdal-$(HEIMDAL_VERSION) \
--with-ssl=/opt/zimbra/openssl-$(OPENSSL_VERSION) \
--with-gssapi=$(ZIMBRA_HOME)/heimdal-$(HEIMDAL_VERSION) \
--with-ssl=$(ZIMBRA_HOME)/openssl-$(OPENSSL_VERSION) \
--without-gnutls \
--with-ca-bundle=/opt/zimbra/curl-$(CURL_VERSION)/share/curl/ca-bundle.crt \
--with-ca-bundle=$(ZIMBRA_HOME)/curl-$(CURL_VERSION)/share/curl/ca-bundle.crt \
--with-zlib=$(LIB_DIR) \
--with-libidn=$(LIB_DIR))
(cd curl-$(CURL_VERSION); LD_RUN_PATH=$(OPENSSL_LIB_DIR):$(HEIMDAL_LIB_DIR):$(CURL_LIB_DIR) $(MAKE) $(MAKEARGS))
......
......@@ -36,7 +36,7 @@ build:
LIBEVENT_CPPFLAGS="-I$(ZIMBRA_HOME)/memcached/include" \
LIBEVENT_LDFLAGS="-L$(ZIMBRA_HOME)/memcached/lib" \
./configure --prefix=$(ZIMBRA_HOME)/libmemcached-$(LIBMCD_VERSION) \
--with-memcached=/opt/zimbra/memcached; \
--with-memcached=$(ZIMBRA_HOME)/memcached; \
$(MAKE) $(MAKEARGS); \
$(MAKE) install STRIP="")
(cd $(ZIMBRA_HOME); ln -s libmemcached-$(LIBMCD_VERSION) libmemcached)
......
......@@ -41,7 +41,7 @@ build:
$(PATCH) \
CFLAGS="-g -O2" ./configure --prefix=$(ZIMBRA_HOME)/memcached-$(MEMCACHED_VERSION) \
--with-libevent=$(ZIMBRA_HOME)/memcached-$(MEMCACHED_VERSION); \
LD_RUN_PATH=/opt/zimbra/memcached/lib make; make install)
LD_RUN_PATH=$(ZIMBRA_HOME)/memcached/lib make; make install)
ln -s $(MEMCACHED_INSTALL) $(ZIMBRA_HOME)/memcached
tar:
......
......@@ -17,8 +17,8 @@ PCREINC :=
PCRELIB :=
ifeq (MACOSX,$(findstring MACOSX,$(BUILD_PLATFORM)))
PCREINC := -I/opt/zimbra/include
PCRELIB := -L/opt/zimbra/lib
PCREINC := -I$(ZIMBRA_HOME)/include
PCRELIB := -L$(ZIMBRA_HOME)/lib
endif
NGINX_TGZ_TARGET := $(P4_ROOT)/ThirdPartyBuilds/$(BUILD_PLATFORM)/nginx/nginx-$(NGINX_VERSION)-zimbra.tgz
......@@ -31,8 +31,8 @@ KEEPALIVE_TGZ_SRC := $(NGINX_ROOT)/src/nviennot-nginx-tcp-keepalive-4d7186d.tar.
KEEPALIVE_SOURCE := $(NGINX_ROOT)/nviennot-nginx-tcp-keepalive
WITH_CC_OPT := -g \
-I/opt/zimbra/cyrus-sasl-$(CYRUS_VERSION)/include \
-I/opt/zimbra/openssl-$(OPENSSL_VERSION)/include \
-I$(ZIMBRA_HOME)/cyrus-sasl-$(CYRUS_VERSION)/include \
-I$(ZIMBRA_HOME)/openssl-$(OPENSSL_VERSION)/include \
$(PCREINC)
WITH_LD_OPT := -L$(CYRUS_LIB_DIR) \
......@@ -57,8 +57,8 @@ build:
--with-mail \
--with-mail-sasl \
--with-mail_ssl_module \
--error-log-path=/opt/zimbra/log/nginx.log \
--http-log-path=/opt/zimbra/log/nginx.access.log \
--error-log-path=$(ZIMBRA_HOME)/log/nginx.log \
--http-log-path=$(ZIMBRA_HOME)/log/nginx.access.log \
--http-client-body-temp-path=$(ZIMBRA_HOME)/data/tmp/nginx/client \
--http-proxy-temp-path=$(ZIMBRA_HOME)/data/tmp/nginx/proxy \
--http-fastcgi-temp-path=$(ZIMBRA_HOME)/data/tmp/nginx/fastcgi \
......
......@@ -18,7 +18,7 @@ else
PATCH :=
endif
SED := sed -i .bak -e 's/-lxml2/\/opt\/zimbra\/libxml2-$(XML_VERSION)\/lib\/libxml2.a/g' Makefile
SED := sed -i .bak -e 's|-lxml2|$(ZIMBRA_HOME)/libxml2-$(XML_VERSION)/lib/libxml2.a|g' Makefile
PHP_TGZ_TARGET := \
$(P4_ROOT)/ThirdPartyBuilds/$(BUILD_PLATFORM)/php/php-$(PHP_VERSION).tgz
......@@ -34,7 +34,7 @@ build:
tar xfj src/php-$(PHP_VERSION).tar.bz2
(cd php-$(PHP_VERSION); \
$(PATCH) $(ACEXE) CFLAGS="-g -O2" \
./configure --prefix=/opt/zimbra/php-$(PHP_VERSION) --with-apxs2=/opt/zimbra/httpd-$(HTTPD_VERSION)/bin/apxs --with-config-file-path=/opt/zimbra/conf --with-pspell=/opt/zimbra/aspell-$(ASPELL_VERSION) --with-libxml-dir=/opt/zimbra/libxml2-$(XML_VERSION); \
./configure --prefix=$(ZIMBRA_HOME)/php-$(PHP_VERSION) --with-apxs2=$(ZIMBRA_HOME)/httpd-$(HTTPD_VERSION)/bin/apxs --with-config-file-path=$(ZIMBRA_HOME)/conf --with-pspell=$(ZIMBRA_HOME)/aspell-$(ASPELL_VERSION) --with-libxml-dir=$(ZIMBRA_HOME)/libxml2-$(XML_VERSION); \
$(SED); \
$(MAKE) $(MAKEARGS); \
$(MAKE) install)
......@@ -43,7 +43,7 @@ clean:
rm -rf php-$(PHP_VERSION)
allclean: clean
rm -rf /opt/zimbra/php-$(PHP_VERSION)
rm -rf $(ZIMBRA_HOME)/php-$(PHP_VERSION)
rm -f $(PHP_TGZ_TARGET)
tar: $(P4_ROOT)/ThirdPartyBuilds/$(BUILD_PLATFORM)/php
......
......@@ -14,8 +14,8 @@ else
include $(POSTFIX_ROOT)/../versions.def
endif
DBINC := -I/opt/zimbra/bdb-$(BDB_VERSION)/include
DBLIB := -L/opt/zimbra/bdb-$(BDB_VERSION)/lib -ldb
DBINC := -I$(ZIMBRA_HOME)/bdb-$(BDB_VERSION)/include
DBLIB := -L$(ZIMBRA_HOME)/bdb-$(BDB_VERSION)/lib -ldb
POSTFIX_TGZ_TARGET := \
$(P4_ROOT)/ThirdPartyBuilds/$(BUILD_PLATFORM)/postfix/postfix-$(POSTFIX_VERSION).tgz
BDB_PATCH := patch -g0 -p1 < ../patches/postfix-zimbra-bdb.patch;
......@@ -29,9 +29,9 @@ MYSQL_CLIENT_VERSION ?= standard-$(MYSQL_VERSION_STRING)-clientlibs
SYSTEM_LIB := /usr/lib
LD_RUN_PATH := /opt/zimbra/lib:/opt/zimbra/mysql-$(MYSQL_VERSION)/lib:/opt/zimbra/openldap-$(LDAP_VERSION)/lib:/opt/zimbra/openssl-$(OPENSSL_VERSION)/lib:/opt/zimbra/cyrus-sasl-$(CYRUS_VERSION)/lib:/opt/zimbra/bdb-$(BDB_VERSION)/lib
MYSQL_INC := /opt/zimbra/mysql-$(MYSQL_VERSION)/include
MYSQL_LIB := /opt/zimbra/mysql-$(MYSQL_VERSION)/lib
LD_RUN_PATH := $(ZIMBRA_HOME)/lib:$(ZIMBRA_HOME)/mysql-$(MYSQL_VERSION)/lib:$(ZIMBRA_HOME)/openldap-$(LDAP_VERSION)/lib:$(ZIMBRA_HOME)/openssl-$(OPENSSL_VERSION)/lib:$(ZIMBRA_HOME)/cyrus-sasl-$(CYRUS_VERSION)/lib:$(ZIMBRA_HOME)/bdb-$(BDB_VERSION)/lib
MYSQL_INC := $(ZIMBRA_HOME)/mysql-$(MYSQL_VERSION)/include
MYSQL_LIB := $(ZIMBRA_HOME)/mysql-$(MYSQL_VERSION)/lib
INSTALL_PARMS := install_root=/../
......@@ -53,39 +53,39 @@ build:
$(MAKE) $(MAKEARGS) makefiles \
OPT="-O2" \
DEBUG="-g" \
CCARGS='-DDEF_COMMAND_DIR=\"/opt/zimbra/postfix-$(POSTFIX_VERSION)/sbin\" \
-DDEF_DAEMON_DIR=\"/opt/zimbra/postfix-$(POSTFIX_VERSION)/libexec\" \
-DDEF_CONFIG_DIR=\"/opt/zimbra/postfix-$(POSTFIX_VERSION)/conf\" \
-DDEF_QUEUE_DIR=\"/opt/zimbra/data/postfix/spool\" \
-DDEF_SENDMAIL_PATH=\"/opt/zimbra/postfix-$(POSTFIX_VERSION)/sbin/sendmail\" \
-DDEF_NEWALIAS_PATH=\"/opt/zimbra/postfix-$(POSTFIX_VERSION)/sbin/newaliases\" \
-DDEF_MAILQ_PATH=\"/opt/zimbra/postfix-$(POSTFIX_VERSION)/sbin/mailq\" \
-DDEF_MANPAGE_DIR=\"/opt/zimbra/postfix-$(POSTFIX_VERSION)/man\" \
CCARGS='-DDEF_COMMAND_DIR=\"$(ZIMBRA_HOME)/postfix-$(POSTFIX_VERSION)/sbin\" \
-DDEF_DAEMON_DIR=\"$(ZIMBRA_HOME)/postfix-$(POSTFIX_VERSION)/libexec\" \
-DDEF_CONFIG_DIR=\"$(ZIMBRA_HOME)/postfix-$(POSTFIX_VERSION)/conf\" \
-DDEF_QUEUE_DIR=\"$(ZIMBRA_HOME)/data/postfix/spool\" \
-DDEF_SENDMAIL_PATH=\"$(ZIMBRA_HOME)/postfix-$(POSTFIX_VERSION)/sbin/sendmail\" \
-DDEF_NEWALIAS_PATH=\"$(ZIMBRA_HOME)/postfix-$(POSTFIX_VERSION)/sbin/newaliases\" \
-DDEF_MAILQ_PATH=\"$(ZIMBRA_HOME)/postfix-$(POSTFIX_VERSION)/sbin/mailq\" \
-DDEF_MANPAGE_DIR=\"$(ZIMBRA_HOME)/postfix-$(POSTFIX_VERSION)/man\" \
-DDEF_HTML_DIR=\"no\" \
-DDEF_README_DIR=\"no\" \
-DDEF_SENDMAIL_PATH=\"/opt/zimbra/postfix-$(POSTFIX_VERSION)/sbin/sendmail\" \
-DDEF_DATA_DIR=\"/opt/zimbra/data/postfix/data\" \
-DDEF_SENDMAIL_PATH=\"$(ZIMBRA_HOME)/postfix-$(POSTFIX_VERSION)/sbin/sendmail\" \
-DDEF_DATA_DIR=\"$(ZIMBRA_HOME)/data/postfix/data\" \
-DUSE_SASL_AUTH \
-DUSE_CYRUS_SASL \
-DHAS_LDAP -DHAS_MYSQL -DUSE_TLS $(DBINC) $(PCRE_DEF) $(PCRE_INCLUDE) $(FD_SIZE) \
$(URANDOM) \
-DUSE_LDAP_SASL \
-I/opt/zimbra/openldap-$(LDAP_VERSION)/include \
-I$(ZIMBRA_HOME)/openldap-$(LDAP_VERSION)/include \
-I$(MYSQL_INC) \
-I/opt/zimbra/openssl-$(OPENSSL_VERSION)/include \
-I/opt/zimbra/cyrus-sasl-$(CYRUS_VERSION)/include/sasl -I/usr/include' \
AUXLIBS='$(EXTRALIBS) -L/opt/zimbra/cyrus-sasl-$(CYRUS_VERSION)/lib \
$(DBLIB) -L/opt/zimbra/openldap-$(LDAP_VERSION)/lib $(PCRE_LIB) \
-I$(ZIMBRA_HOME)/openssl-$(OPENSSL_VERSION)/include \
-I$(ZIMBRA_HOME)/cyrus-sasl-$(CYRUS_VERSION)/include/sasl -I/usr/include' \
AUXLIBS='$(EXTRALIBS) -L$(ZIMBRA_HOME)/cyrus-sasl-$(CYRUS_VERSION)/lib \
$(DBLIB) -L$(ZIMBRA_HOME)/openldap-$(LDAP_VERSION)/lib $(PCRE_LIB) \
-lldap -llber \
-L$(MYSQL_LIB) \
-L/opt/zimbra/openssl-$(OPENSSL_VERSION)/lib \
-L$(ZIMBRA_HOME)/openssl-$(OPENSSL_VERSION)/lib \
-lmysqlclient -lz -lm -L$(SYSTEM_LIB) -lsasl2 -lpthread -lssl -lcrypto'; \
LD_RUN_PATH=$(LD_RUN_PATH) $(MAKE) $(MAKEARGS);)
install:
(cd postfix-$(POSTFIX_VERSION); \
$(MAKE) non-interactive-package $(INSTALL_PARMS); \
sed -e 's|postconf|/opt/zimbra/bin/postconf|' auxiliary/qshape/qshape.pl > $(ZIMBRA_HOME)/postfix-$(POSTFIX_VERSION)/sbin/qshape.pl;\
sed -e 's|postconf|$(ZIMBRA_HOME)/bin/postconf|' auxiliary/qshape/qshape.pl > $(ZIMBRA_HOME)/postfix-$(POSTFIX_VERSION)/sbin/qshape.pl;\
chmod a+rx $(ZIMBRA_HOME)/postfix-$(POSTFIX_VERSION)/sbin/qshape.pl;)
(cd $(ZIMBRA_HOME); ln -s postfix-$(POSTFIX_VERSION) postfix)
......
......@@ -5,9 +5,9 @@
case "$CCARGS" in
*-DNO_DB*) ;;
- *) if [ -f /usr/include/db.h ]
+ *) if [ -f /opt/zimbra/bdb/include/db.h ]
+ *) if [ -f ${ZIMBRA_HOME}/bdb/include/db.h ]
+ then
+ CCARGS="$CCARGS -I/opt/zimbra/bdb/include"
+ CCARGS="$CCARGS -I${ZIMBRA_HOME}/bdb/include"
+ elif [ -f /usr/include/db.h ]
then
: we are all set
......@@ -17,9 +17,9 @@
case "$CCARGS" in
*-DNO_DB*) ;;
- *) if [ -f /usr/include/db.h ]
+ *) if [ -f /opt/zimbra/bdb/include/db.h ]
+ *) if [ -f ${ZIMBRA_HOME}/bdb/include/db.h ]
+ then
+ CCARGS="$CCARGS -I/opt/zimbra/bdb/include"
+ CCARGS="$CCARGS -I${ZIMBRA_HOME}/bdb/include"
+ elif [ -f /usr/include/db.h ]
then
: we are all set
......
......@@ -26,8 +26,8 @@ POPT_INCLUDE :=
POPT_LDFLAGS :=
ifeq (MACOSXx86,$(findstring MACOSXx86,$(BUILD_PLATFORM)))
POPT_INCLUDE := CPPFLAGS="-I/opt/zimbra/include"
POPT_LDFLAGS := LDFLAGS="-L/opt/zimbra/lib"
POPT_INCLUDE := CPPFLAGS="-I$(ZIMBRA_HOME)/include"
POPT_LDFLAGS := LDFLAGS="-L$(ZIMBRA_HOME)/lib"
endif
build: $(RSYNC_NAME)-$(RSYNC_VERSION)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment