mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:31:58 +01:00
improved rpm build
This commit is contained in:
parent
92b9d692f1
commit
52c58901e6
@ -1,6 +1,7 @@
|
||||
%define name piler
|
||||
%define version 0.1.25
|
||||
%define release 2
|
||||
%define myhostname piler.yourdomain.com
|
||||
|
||||
Summary: an email archiving application
|
||||
Name: %{name}
|
||||
@ -30,6 +31,8 @@ make clean all
|
||||
mkdir -p /root/rpmbuild/BUILDROOT/piler-0.1.25-2.x86_64/etc/init.d
|
||||
mkdir -p /root/rpmbuild/BUILDROOT/piler-0.1.25-2.x86_64/usr/local/lib
|
||||
make install DESTDIR=/root/rpmbuild/BUILDROOT/piler-0.1.25-2.x86_64
|
||||
mkdir -p /root/rpmbuild/BUILDROOT/piler-0.1.25-2.x86_64/var/www
|
||||
cp -R webui /root/rpmbuild/BUILDROOT/piler-0.1.25-2.x86_64/var/www/%{myhostname}
|
||||
|
||||
|
||||
%files
|
||||
@ -40,6 +43,7 @@ make install DESTDIR=/root/rpmbuild/BUILDROOT/piler-0.1.25-2.x86_64
|
||||
%dir /var/piler/store
|
||||
%dir /var/piler/stat
|
||||
%dir /var/run/piler
|
||||
%dir /var/www/%{myhostname}
|
||||
%attr(0655,piler,piler) /usr/local/bin/pileraget
|
||||
%attr(0655,piler,piler) /usr/local/bin/pilerexport
|
||||
%attr(0655,piler,piler) /usr/local/bin/pilerget
|
||||
|
@ -389,18 +389,25 @@ execute_post_install_tasks() {
|
||||
|
||||
chmod 755 $LOCALSTATEDIR/piler/stat
|
||||
|
||||
if [ -d webui ]; then webui_install; fi
|
||||
if [ -d webui ]; then
|
||||
echo -n "Copying www files to $DOCROOT... "
|
||||
mkdir -p $DOCROOT || exit 1
|
||||
cp -R webui/* $DOCROOT
|
||||
cp -R webui/.htaccess $DOCROOT
|
||||
fi
|
||||
|
||||
if [ -d /var/www/piler.yourdomain.com ]; then
|
||||
mv /var/www/piler.yourdomain.com $DOCROOT
|
||||
fi
|
||||
|
||||
|
||||
if [ -d $DOCROOT ]; then webui_install; fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
webui_install() {
|
||||
|
||||
echo -n "Copying www files to $DOCROOT... "
|
||||
mkdir -p $DOCROOT || exit 1
|
||||
|
||||
cp -R webui/* $DOCROOT
|
||||
cp -R webui/.htaccess $DOCROOT
|
||||
chmod 770 $DOCROOT/tmp $DOCROOT/images
|
||||
chgrp $WWWGROUP $DOCROOT/tmp
|
||||
chgrp $WWWGROUP $DOCROOT/system/helper/phpqrcode/cache
|
||||
|
Loading…
Reference in New Issue
Block a user