* adjust for build rpm and deb.

This commit is contained in:
wangyidong
2015-03-17 10:21:45 +08:00
parent 464b388d0b
commit 615cbda384
4 changed files with 13 additions and 9 deletions

View File

@@ -66,7 +66,7 @@ rpm:
mkdir ~/rpmbuild/SOURCES
cp ZenTaoPMS.${VERSION}.zip ~/rpmbuild/SOURCES
mkdir ~/rpmbuild/SOURCES/etc/httpd/conf.d/ -p
cp build/rpm/zentaopms.conf ~/rpmbuild/SOURCES/etc/httpd/conf.d/
cp build/debian/zentaopms.conf ~/rpmbuild/SOURCES/etc/httpd/conf.d/
mkdir ~/rpmbuild/SOURCES/var/www/ -p
cd ~/rpmbuild/SOURCES; unzip ZenTaoPMS.${VERSION}.zip; mv zentaopms var/www/zentao;
sed -i 's/index.php/\/zentao\/index.php/' ~/rpmbuild/SOURCES/var/www/zentao/www/.htaccess

View File

@@ -1 +1,7 @@
echo "zentaopms has been successfully installed. Please run sudo apache2ctl restart and visit http://localhost/zentao."
lowVersion=`apache2 -v|awk '$3~/Apache/{print $3}'|awk -F '/' '{print ($2<2.4) ? 1 : 0}'`;
if [ $lowVersion == 1 ]; then
sed -i '/Require all granted/d' /etc/apache2/sites-enabled/zentaopms.conf
fi
echo "zentaopms has been successfully installed."
echo "Please run sudo apache2ctl restart and visit http://localhost/zentao."

View File

@@ -1,7 +0,0 @@
Alias /zentao /var/www/zentao/www
<Directory /var/www/zentao/www/>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
</Directory>

View File

@@ -33,5 +33,10 @@ rm -rf $RPM_BUILD_ROOT
/
%post
lowVersion=`httpd -v|awk '$3~/Apache/{print $3}'|awk -F '/' '{print ($2<2.4) ? 1 : 0}'`
if [ $lowVersion == 1 ]; then
sed -i '/Require all granted/d' /etc/httpd/conf.d/zentaopms.conf
fi
echo "zentaopms has been successfully installed."
echo "Please restart httpd and visit http://localhost/zentao."