]> git.pld-linux.org Git - packages/pootle.git/blame - pootle.spec
- update mod_wsgi requires
[packages/pootle.git] / pootle.spec
CommitLineData
83e18d77 1# TODO
d254aee3 2# - move %{_datadir}/pootle/mo/* to system localedir as pootle.mo
3cdbb14a 3%define subver b3
83e18d77
ER
4%define fullname Pootle
5Summary: Localization and translation management web application
6Name: pootle
6a1a7ce1 7Version: 2.8.0
3cdbb14a 8Release: 0.10
6a03db66 9License: GPL v2
83e18d77 10Group: Development/Tools
6a1a7ce1 11Source0: https://github.com/translate/pootle/releases/download/%{version}%{subver}/Pootle-%{version}%{subver}.tar.bz2
3cdbb14a 12# Source0-md5: c7e86066f78f8a04823309c1b3cf0134
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
3a0bac63 27Requires: apache(mod_wsgi)
83e18d77
ER
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
ER
42
43%description
44Pootle is web application for managing distributed or crowdsourced
45translation.
46
47It's features include::
48- Translation of Gettext PO and XLIFF files.
49- Submitting to remote version control systems (VCS).
50- Managing groups of translators
51- Online webbased or offline translation
52- Quality checks
53
54%prep
6a1a7ce1 55%setup -q -n %{fullname}-%{version}%{?subver}
24b2a3ca 56%patch0 -p1
0357622e
ER
57#%patch1 -p1
58#%patch2 -p1
83e18d77 59
0357622e 60#%{__sed} -i -e '1s,#!.*env python,#!%{__python},' wsgi.py
d254aee3 61
8df5b20b
ER
62# not packaging for Travis CI
63rm pootle/settings/91-travis.conf
64
ae29918e 65rm pootle/log/README
c4be098b 66rm pootle/dbs/README
ae29918e 67
83e18d77 68%build
756dc700 69%py_build
83e18d77
ER
70
71%install
72rm -rf $RPM_BUILD_ROOT
c4be098b 73install -d $RPM_BUILD_ROOT{%{_sbindir},%{_datadir}/%{name},%{_sharedstatedir}/%{name}/{dbs,po/.tmp},/var/log/%{name},%{_sysconfdir}}
710cf04b 74
756dc700 75%py_install
756dc700 76%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/tests
110e0cd3 77%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/pytest_pootle
83e18d77 78
95cb2ddc 79# move these to /var/lib/pootle/po
95cb2ddc 80mv $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/translations/{terminology,tutorial} \
ae29918e 81 $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}/po
44eb7949 82rmdir $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/translations
95cb2ddc 83
f586b625 84# move to data dir
4988dce2 85mv $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/{locale,static,assets} \
81cad4aa
ER
86 $RPM_BUILD_ROOT%{_datadir}/%{name}
87
5a25dfdc
ER
88# install_dirs.py was modified _after_ install completed, so compile again
89# before py_postclean
90# TODO. compile only install_dirs.py
91%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
92%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
d254aee3
ER
93%py_postclean
94
e3077663 95%find_lang %{name}.lang
f69840c8 96
710cf04b 97# don't clobber user $PATH
0357622e
ER
98#mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/PootleServer
99#install -p manage.py $RPM_BUILD_ROOT%{_sbindir}/pootle-manage
100#install -p wsgi.py $RPM_BUILD_ROOT%{_datadir}/pootle
83e18d77 101
d254aee3
ER
102install -d $RPM_BUILD_ROOT%{_sysconfdir}
103cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
83e18d77 104
710cf04b 105# we do doc in rpm
b042bedc 106rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
710cf04b
ER
107
108# external pkg
0357622e 109#rm -r $RPM_BUILD_ROOT%{py_sitescriptdir}/djblets
710cf04b 110
83e18d77
ER
111%clean
112rm -rf $RPM_BUILD_ROOT
113
4f752939 114%triggerin -- apache < 2.2.0, apache-base
83e18d77
ER
115%webapp_register httpd %{_webapp}
116
4f752939 117%triggerun -- apache < 2.2.0, apache-base
83e18d77
ER
118%webapp_unregister httpd %{_webapp}
119
f69840c8 120%files -f %{name}.lang
83e18d77 121%defattr(644,root,root,755)
f586b625 122%doc README.rst INSTALL CONTRIBUTING.rst
d254aee3
ER
123%dir %attr(750,root,http) %{_sysconfdir}
124%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
756dc700
ER
125#%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/localsettings.py
126%attr(755,root,root) %{_bindir}/pootle
d254aee3 127
81cad4aa
ER
128%dir %{_datadir}/%{name}
129%{_datadir}/%{name}/assets
130%{_datadir}/%{name}/static
e3077663
ER
131%dir %{_datadir}/%{name}/locale
132%{_datadir}/%{name}/locale/LINGUAS
133%{_datadir}/%{name}/locale/templates
756dc700 134%if 0
d254aee3 135%attr(755,root,root) %{_datadir}/pootle/wsgi.py
756dc700 136%endif
d254aee3 137
81cad4aa 138%{py_sitescriptdir}/%{name}
6a1a7ce1 139%{py_sitescriptdir}/Pootle-%{version}%{?subver}-py*.egg-info
d254aee3 140
81cad4aa
ER
141%dir %{_sharedstatedir}/%{name}
142%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/dbs
143%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/po
710cf04b
ER
144# setup a tempdir inside the PODIRECTORY heirarchy, this way we have
145# reasonable guarantee that temp files will be created on the same
146# filesystem as translation files (required for save operations).
81cad4aa 147%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/po/.tmp
710cf04b 148
f69840c8 149# base translations from pootle itself
95cb2ddc 150#%dir %attr(770,root,http) %{_sharedstatedir}/pootle/po/pootle
81cad4aa
ER
151# terminology and tutorial po files
152%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/po/terminology
153%dir %attr(770,root,http) %{_sharedstatedir}/%{name}/po/tutorial
ae29918e
ER
154
155%dir %attr(770,root,http) /var/log/%{name}
This page took 0.142638 seconds and 4 git commands to generate.