source: npl/webapps/sugarcrm/sugarcrm.SlackBuild @ c5c522c

gcc484ntopperl-5.22
Last change on this file since c5c522c was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 1.8 KB
Line 
1#!/bin/sh
2##NEED:apache2
3# Build sugerCRM for Syn-3.
4NAME=sugarcrm
5CWD=`pwd`
6TMP=/$CWD/tmp
7PKG=$TMP/package-sugarcrm
8rm -rf $PKG
9mkdir -p $PKG
10
11VERSION=5.2.0k
12ARCH=${ARCH:-i486}
13rm -rf $TMP
14mkdir -p $TMP || exit 1
15
16cd $TMP
17
18#because its impossible to autoinstall sugarcrm modules, we just use a filesystem + mysql database dump:
19mkdir -p $PKG/var/www/htdocs/syn3/sugarcrm || exit 1
20tar -xzf $CWD/*-dump.tar.gz --directory=$PKG/var/www/htdocs/syn3/sugarcrm || exit 1
21#chown -R nobody:nobody $PKG/var/www/htdocs/syn3/sugarcrm || exit 1
22
23#Syn-3 logo over de themes
24find $PKG/var/www/htdocs/syn3/sugarcrm/ -name company_logo.png -exec cp $CWD/company_logo.png "{}" \; || exit 1
25
26#postinstaller + sql + config
27mkdir -p $PKG/etc/postinst.d/ ||exit 1
28cp $CWD/post.sugarcrm $PKG/etc/postinst.d/ ||exit 1
29chmod +x $PKG/etc/postinst.d/* ||exit 1
30cp $CWD/sugarcrm.sql $PKG/var/www/htdocs/syn3/sugarcrm || exit 1
31cp $CWD/config.php $PKG/var/www/htdocs/syn3/sugarcrm || exit 1
32
33#change file permisssion so we can write
34chown -R nobody $PKG/var/www/htdocs/syn3/sugarcrm/cache || exit 1
35chown -R nobody $PKG/var/www/htdocs/syn3/sugarcrm/custom || exit 1
36chown -R nobody $PKG/var/www/htdocs/syn3/sugarcrm/data || exit 1
37chown -R nobody $PKG/var/www/htdocs/syn3/sugarcrm/modules || exit 1
38chown nobody $PKG/var/www/htdocs/syn3/sugarcrm/config.php || exit 1
39
40#webportal files er in
41cp $CWD/webportal.* $PKG/var/www/htdocs/syn3/sugarcrm || exit 1
42
43#ldap bind patch
44sed -i 's/ldap_bind($ldapconn, $user_name, $password);/ldap_bind($ldapconn, "$user_attr=$user_name,$base_dn", $password);/' $PKG/var/www/htdocs/syn3/sugarcrm/modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticateUser.php || exit 1
45
46#package maken
47cd $PKG
48NAME=`echo $0|cut -f2 -d'.'`
49makepkg -l y -c n $CWD/$NAME.pkg > /dev/null &&
50echo $VERSION > $CWD/$NAME.version &&
51arch > $CWD/$NAME.arch
Note: See TracBrowser for help on using the repository browser.