]> git.pld-linux.org Git - packages/pootle.git/blame - pootle.spec
skip tests packaging
[packages/pootle.git] / pootle.spec
CommitLineData
83e18d77 1# TODO
d254aee3 2# - move %{_datadir}/pootle/mo/* to system localedir as pootle.mo
6a1a7ce1 3%define subver b1
83e18d77
ER
4%define fullname Pootle
5Summary: Localization and translation management web application
6Name: pootle
6a1a7ce1 7Version: 2.8.0
e3077663 8Release: 0.9
6a03db66 9License: GPL v2
83e18d77 10Group: Development/Tools
6a1a7ce1
ER
11Source0: https://github.com/translate/pootle/releases/download/%{version}%{subver}/Pootle-%{version}%{subver}.tar.bz2
12# Source0-md5: 5cc1913bbe92d92c19ed4e3dcf1325bf
4f752939 13Source1: apache.conf
e3077663 14Source2: find-lang.sh
710cf04b
ER
15Patch0: settings.patch
16Patch1: paths.patch
098c6911 17Patch2: homedir.patch
0357622e 18URL: http://pootle.translatehouse.org/
3537313a 19BuildRequires: python-modules >= 1:2.7
631c177e 20BuildRequires: rpm-pythonprov
756dc700 21BuildRequires: rpmbuild(macros) >= 1.714
d254aee3 22BuildRequires: sed >= 4.0
83e18d77 23BuildRequires: translate-toolkit >= 1.4.1
60d8d4b5
ER
24Requires: apache-mod_alias
25Requires: apache-mod_authz_host
3712e06b 26Requires: apache-mod_mime
83e18d77
ER
27Requires: apache-mod_wsgi
28Requires: group(http)
29Requires: iso-codes
83e18d77 30Requires: zip
d254aee3 31Suggests: memcached
098c6911 32Suggests: python(sqlite)
d254aee3 33Suggests: python-memcached
83e18d77
ER
34BuildArch: noarch
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
e3077663
ER
37%define find_lang sh %{_sourcedir}/find-lang.sh %{buildroot}
38
83e18d77
ER
39%define _webapps /etc/webapps
40%define _webapp %{name}
d254aee3 41%define _sysconfdir %{_webapps}/%{_webapp}
83e18d77 42
cd395ff0 43# no appropriate packages in pld
99ac8f5a 44%define _noautoreq_pyegg django.*
cd395ff0 45
83e18d77
ER
46%description
47Pootle is web application for managing distributed or crowdsourced
48translation.
49
50It's features include::
51- Translation of Gettext PO and XLIFF files.
52- Submitting to remote version control systems (VCS).
53- Managing groups of translators
54- Online webbased or offline translation
55- Quality checks
56
57%prep
6a1a7ce1 58%setup -q -n %{fullname}-%{version}%{?subver}
24b2a3ca 59%patch0 -p1
0357622e
ER
60#%patch1 -p1
61#%patch2 -p1
83e18d77 62
0357622e 63#%{__sed} -i -e '1s,#!.*env python,#!%{__python},' wsgi.py
d254aee3 64
8df5b20b
ER
65# not packaging for Travis CI
66rm pootle/settings/91-travis.conf
67
ae29918e 68rm pootle/log/README
c4be098b 69rm pootle/dbs/README
ae29918e 70
83e18d77 71%build
756dc700 72%py_build
83e18d77
ER
73
74%install
75rm -rf $RPM_BUILD_ROOT
c4be098b 76install -d $RPM_BUILD_ROOT{%{_sbindir},%{_datadir}/%{name},%{_sharedstatedir}/%{name}/{dbs,po/.tmp},/var/log/%{name},%{_sysconfdir}}
710cf04b 77
756dc700 78%py_install
756dc700 79%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/tests
110e0cd3 80%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/pytest_pootle
83e18d77 81
95cb2ddc 82# move these to /var/lib/pootle/po
95cb2ddc 83mv $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/translations/{terminology,tutorial} \
ae29918e 84 $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}/po
44eb7949 85rmdir $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/translations
95cb2ddc 86
f586b625 87# move to data dir
4988dce2 88mv $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/{locale,static,assets} \
81cad4aa
ER
89 $RPM_BUILD_ROOT%{_datadir}/%{name}
90
5a25dfdc
ER
91# install_dirs.py was modified _after_ install completed, so compile again
92# before py_postclean
93# TODO. compile only install_dirs.py
94%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
95%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
d254aee3
ER
96%py_postclean
97
e3077663 98%find_lang %{name}.lang
f69840c8 99
710cf04b 100# don't clobber user $PATH
0357622e
ER
101#mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/PootleServer
102#install -p manage.py $RPM_BUILD_ROOT%{_sbindir}/pootle-manage
103#install -p wsgi.py $RPM_BUILD_ROOT%{_datadir}/pootle
83e18d77 104
d254aee3
ER
105install -d $RPM_BUILD_ROOT%{_sysconfdir}
106cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
83e18d77 107
710cf04b 108# we do doc in rpm
b042bedc 109rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
710cf04b
ER
110
111# external pkg
0357622e 112#rm -r $RPM_BUILD_ROOT%{py_sitescriptdir}/djblets
710cf04b 113
83e18d77
ER
114%clean
115rm -rf $RPM_BUILD_ROOT
116
4f752939 117%triggerin -- apache < 2.2.0, apache-base
83e18d77
ER
118%webapp_register httpd %{_webapp}
119
4f752939 120%triggerun -- apache < 2.2.0, apache-base
83e18d77
ER
121%webapp_unregister httpd %{_webapp}
122
f69840c8 123%files -f %{name}.lang
83e18d77 124%defattr(644,root,root,755)
f586b625 125%doc README.rst INSTALL CONTRIBUTING.rst
d254aee3
ER
126%dir %attr(750,root,http) %{_sysconfdir}
127%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
756dc700
ER
128#%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/localsettings.py
129%attr(755,root,root) %{_bindir}/pootle
d254aee3 130
81cad4aa
ER
131%dir %{_datadir}/%{name}
132%{_datadir}/%{name}/assets
133%{_datadir}/%{name}/static
e3077663
ER
134%dir %{_datadir}/%{name}/locale
135%{_datadir}/%{name}/locale/LINGUAS
136%{_datadir}/%{name}/locale/templates
756dc700 137%if 0
d254aee3 138%attr(755,root,root) %{_datadir}/pootle/wsgi.py
756dc700 139%endif
d254aee3 140
81cad4aa 141%{py_sitescriptdir}/%{name}
6a1a7ce1 142%{py_sitescriptdir}/Pootle-%{version}%{?subver}-py*.egg-info
d254aee3 143
81cad4aa
ER
144%dir %{_sharedstatedir}/%{name}
145%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/dbs
146%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/po
710cf04b
ER
147# setup a tempdir inside the PODIRECTORY heirarchy, this way we have
148# reasonable guarantee that temp files will be created on the same
149# filesystem as translation files (required for save operations).
81cad4aa 150%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/po/.tmp
710cf04b 151
f69840c8 152# base translations from pootle itself
95cb2ddc 153#%dir %attr(770,root,http) %{_sharedstatedir}/pootle/po/pootle
81cad4aa
ER
154# terminology and tutorial po files
155%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/po/terminology
156%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/po/tutorial
ae29918e
ER
157
158%dir %attr(770,root,http) /var/log/%{name}
This page took 0.0999719999999999 seconds and 4 git commands to generate.