updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / zsce-core / PKGBUILD
blob22d80f961aa94515901302b750eed9225fe69ce0
1 # Maintainer: F0ruD <fzerorubigd at gmail dot com>
2 # Contributor: Bob Fanger < bfanger(at)gmail >
3 pkgname=zsce-core
4 pkgver=5.5.0
5 pkgrel=2
6 _phpver=5.3.8
7 pkgdesc="Zend Server Community Edition (CE) is a high-performance, reliable PHP Application Server that is absolutely free to use in development or in production."
8 arch=('i686' 'x86_64')
9 url="http://www.zend.com/en/community/zend-server-ce"
10 license=('unknown')
11 provides=('zend-server-ce')
12 depends=() 
13 makedepends=('diffutils') 
14 optdepends=('mysql: for complete the apache-php and mysql set'
15             'zsce-phpmyadmin: install phpmyadmin on zend server- the original one need php' )
16 #first one is dummy, see bellow
17 md5sums=('a6f2813eb65b7a747293cc5130383d49'
18          '0542c14340ae591e6d81c15c6630a210'
19          '831dfaf11f8de96b4f229f223c114622')
20          
21 case "$CARCH" in
22     i686|i[3-5]86) _arch='i386';md5sums[0]='9441f2022f983a0c0df7cd02a298ace5';;
23     x86_64|amd64) _arch='x86_64';md5sums[0]='a6f2813eb65b7a747293cc5130383d49';;
24     *) error "Unknown or invalid CARCH=$CARCH"; exit 1
25 esac
28 source=(http://downloads.zend.com/zendserver/${pkgver}/ZendServer-CE-php-${_phpver}-${pkgver}-linux-glibc23-${_arch}.tar.gz
29         install.patch
30         zsce-core.html)
31 install=$pkgname.install
33 conflicts=()
35 _address="ZendServer-${pkgver}_Tarball_M42-php5.3.7RC4-linux-glibc23-${_arch}"
36 build() {
37         cp install.patch ${srcdir}/${_address}
38         cd ${srcdir}
39         cd ${_address}
40         patch -Np1 -i ./install.patch
42         # extract files
43         ./7z x -o${pkgdir}/opt -y zend.7z 
44         if [ $? -ne 0 ];then 
45                 echo "Failed to extract files.. "
46                 return 1
47         fi
48         cp ${srcdir}/zsce-core.html ${pkgdir}/opt/zend/
49         mkdir ${pkgdir}/etc
50         touch ${pkgdir}/etc/zce.rc 
51         mkdir ${pkgdir}/etc/rc.d
52         cp ${pkgdir}/opt/zend/bin/zendctl.sh ${pkgdir}/etc/rc.d/zendserverce
53         chmod 755 ${pkgdir}/opt # set default rights on /opt
54         chmod 755 ${pkgdir}/etc # set default rights on /etc
55         # Add installer to the package
56         installer_file=${pkgdir}/opt/zend/install.sh
57         cp install.sh ${installer_file}
58         sed -i 's/\/usr\/local/\/opt/g' ${pkgdir}/opt/zend/apache2/conf/httpd.conf
59         sed -i 's/\/usr\/local/\/opt/g' ${pkgdir}/opt/zend/apache2/bin/apxs