[packages/pootle/dev-2.7] move static and assets to /usr/share
glen
glen at pld-linux.org
Sun May 8 10:46:54 CEST 2016
commit 81cad4aa1b5cd22ccb58d2029c6161e900dd2028
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun May 8 11:30:15 2016 +0300
move static and assets to /usr/share
pootle.spec | 28 +++++++++++++++++-----------
settings.patch | 20 ++++++++++++++++++++
2 files changed, 37 insertions(+), 11 deletions(-)
---
diff --git a/pootle.spec b/pootle.spec
index 6454d3f..7cb5773 100644
--- a/pootle.spec
+++ b/pootle.spec
@@ -4,7 +4,7 @@
Summary: Localization and translation management web application
Name: pootle
Version: 2.7.3
-Release: 0.6
+Release: 0.7
License: GPL v2
Group: Development/Tools
Source0: https://github.com/translate/pootle/releases/download/%{version}/Pootle-%{version}.tar.bz2
@@ -79,6 +79,10 @@ mv $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/translations/{terminology,tutorial
$RPM_BUILD_ROOT%{_sharedstatedir}/%{name}/po
rmdir $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/translations
+# move to /usr/share
+mv $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/{static,assets} \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}
+
# install_dirs.py was modified _after_ install completed, so compile again
# before py_postclean
# TODO. compile only install_dirs.py
@@ -138,7 +142,7 @@ scan_mo() {
fi
done
}
-scan_mo $RPM_BUILD_ROOT%{_sharedstatedir}/pootle/po/{pootle,terminology,tutorial}/* >> %{name}.lang
+scan_mo $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}/po/{pootle,terminology,tutorial}/* >> %{name}.lang
# don't clobber user $PATH
#mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/PootleServer
@@ -171,29 +175,31 @@ rm -rf $RPM_BUILD_ROOT
#%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/localsettings.py
%attr(755,root,root) %{_bindir}/pootle
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/assets
+%{_datadir}/%{name}/static
%if 0
-%dir %{_datadir}/pootle
%{_datadir}/pootle/mo/README
%attr(755,root,root) %{_datadir}/pootle/wsgi.py
-%{_datadir}/pootle/html
%{_datadir}/pootle/templates
%dir %{_datadir}/pootle/mo
%endif
-%{py_sitescriptdir}/pootle
+%{py_sitescriptdir}/%{name}
%{py_sitescriptdir}/Pootle-%{version}-py*.egg-info
-%dir %{_sharedstatedir}/pootle
-%dir %attr(770,root,http) %{_sharedstatedir}/pootle/dbs
-%dir %attr(770,root,http) %{_sharedstatedir}/pootle/po
+%dir %{_sharedstatedir}/%{name}
+%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/dbs
+%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/po
# setup a tempdir inside the PODIRECTORY heirarchy, this way we have
# reasonable guarantee that temp files will be created on the same
# filesystem as translation files (required for save operations).
-%dir %attr(770,root,http) %{_sharedstatedir}/pootle/po/.tmp
+%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/po/.tmp
# base translations from pootle itself
#%dir %attr(770,root,http) %{_sharedstatedir}/pootle/po/pootle
-%dir %attr(770,root,http) %{_sharedstatedir}/pootle/po/terminology
-%dir %attr(770,root,http) %{_sharedstatedir}/pootle/po/tutorial
+# terminology and tutorial po files
+%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/po/terminology
+%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/po/tutorial
%dir %attr(770,root,http) /var/log/%{name}
diff --git a/settings.patch b/settings.patch
index d5c9962..0543e6f 100644
--- a/settings.patch
+++ b/settings.patch
@@ -102,3 +102,23 @@
'USER': '',
'PASSWORD': '',
'HOST': '',
+--- Pootle-2.7.3/pootle/settings/10-base.conf~ 2016-04-25 17:04:49.000000000 +0300
++++ Pootle-2.7.3/pootle/settings/10-base.conf 2016-05-08 11:27:04.284020305 +0300
+@@ -49,7 +49,7 @@
+ # The absolute path to the directory where collectstatic
+ # will collect static files for deployment.
+ # Example: "/var/www/example.com/static/"
+-STATIC_ROOT = working_path('assets') + '/'
++STATIC_ROOT = '/usr/share/pootle/assets/'
+
+ # URL to use when referring to static files located in
+ # STATIC_ROOT.
+@@ -57,7 +57,7 @@
+ STATIC_URL = '/assets/'
+
+ STATICFILES_DIRS = [
+- working_path('static'),
++ '/usr/share/pootle/static',
+ ]
+
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/pootle.git/commitdiff/99ac8f5ae00caa91ce0ae9d8d97ac95a9c3492c3
More information about the pld-cvs-commit
mailing list