Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 63b53c1

Browse files
committed
Update pydio.spec.tpl
1 parent 962b2a1 commit 63b53c1

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

dist/rpm/pydio.spec.tpl

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ Pydio is a web-based browser for managing files on a web server without FTP. Ful
2222
it is the perfect tool to replace (drop)box and alikes in the enterprise.
2323

2424
%prep
25-
26-
if [ $1 -gt 1 ]; then
27-
# For upgrades
28-
[ -f ./.htaccess ] && cp -pf ./.htaccess /tmp/pydio.update.htaccess
29-
fi
25+
[ -f %{buildroot}%{pydiodir}/.htaccess ] && cp -pf %{buildroot}%{pydiodir}/.htaccess /tmp/pydio.update.htaccess
3026

3127
%setup -q -n %{name}-core-%{version}
3228

@@ -93,23 +89,18 @@ rm -rf %{buildroot}
9389
if [ -f "%{_localstatedir}/cache/%{name}/plugins_cache.ser" ]
9490
then
9591
# Upgrading an existing install
92+
[ -f /tmp/pydio.update.htaccess ] && cp -pf /tmp/pydio.update.htaccess %{buildroot}%{pydiodir}/.htaccess
9693
rm -f %{_localstatedir}/cache/%{name}/i18n/*.ser
9794
rm -f %{_localstatedir}/cache/%{name}/plugins_*.ser
9895
if [ ! -f "%{_localstatedir}/cache/%{name}/first_run_passed" ]
9996
then
10097
touch %{_localstatedir}/cache/%{name}/first_run_passed
10198
fi
99+
else
100+
# Brand new install
101+
[ -f %{buildroot}%{pydiodir}/.htaccess ] && cp -p ./plugins/boot.conf/htaccess.tpl.linux %{buildroot}%{pydiodir}/.htaccess
102102
fi
103103

104-
if [ $1 -gt 1 ]; then
105-
# For upgrades
106-
[ -f /tmp/pydio.update.htaccess ] && cp -pf /tmp/pydio.update.htaccess %{buildroot}%{pydiodir}/.htaccess
107-
fi
108-
109-
if [ $1 -eq 1 ]; then
110-
# For install
111-
[ -f %{buildroot}%{pydiodir}/.htaccess ] && cp -p ./plugins/boot.conf/htaccess.tpl.linux %{buildroot}%{pydiodir}/.htaccess
112-
fi
113104

114105
%changelog
115106
* Wed Jun 01 2013 Charles du Jeu <charles@ajaxplorer.info> - 5.0.0-1

0 commit comments

Comments
 (0)