%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %define confdir %{python_sitelib}/%{name}/settings #% define confdir %{_sysconfdir}/%{name} Name: transifex Version: 1.1.0 Release: 4%{?dist} Summary: A system for distributed translation submissions Group: Applications/Internet License: GPLv2 URL: http://pypi.python.org/pypi/transifex Source0: http://pypi.python.org/packages/source/t/transifex/%{name}-%{version}beta.tar.gz Source1: django-settings.py.in BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Obsoletes: transifex-extras <= 0.9.1 BuildRequires: python-sphinx gettext python-markdown BuildRequires: Django django-contact-form django-pagination django-tagging BuildRequires: django-notification django-profile Django-south django-piston BuildRequires: django-authority mercurial >= 1.3 %if 0%{?rhel} <= 5 BuildRequires: python-sqlite2 %endif Requires: mercurial >= 1.3 python-urlgrabber intltool >= 0.37.1 Requires: python-markdown python-pygments python-polib >= 0.4.2 Requires: Django django-contact-form django-pagination django-tagging Requires: django-notification django-profile Django-south >= 0.7.3 django-piston Requires: django-authority django-filter django-sorting Requires: django-ajax-selects django-threadedcomments django-staticfiles django-addons Requires: python-sqlite2 %description Transifex is a web-system that facilitates the process of submitting translations in remote and disparate version control systems (VCS). %prep %setup -q -n %{name}-%{version}beta sed -e 's!share/locale!.*/locale!' /usr/lib/rpm/find-lang.sh > my-find-lang.sh %build %{__python} setup.py build #cd transifex #rm -rf .hg* build-tools #rm -r vcs/tests #python manage.py syncdb --noinput # Setup DB tables #python manage.py migrate # Setup more DB tables #python manage.py txcreatelanguages # Create a standard set of languages #python manage.py txcompilemessages # Create message catalogs for i18n %install rm -rf $RPM_BUILD_ROOT #transifex now installs as a normal django application %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} #The next part of the install process is removed #cd transifex #mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} #find -mindepth 1 -maxdepth 1 -type d \( \( -name .hg -o \ # -name build-tools -o -name docs -o -name settings \) -prune -o \ # -print \) | xargs cp -a -t $RPM_BUILD_ROOT/%{_datadir}/%{name} #cp -a *.py $RPM_BUILD_ROOT%{_datadir}/%{name} #find $RPM_BUILD_ROOT%{_datadir}/%{name}/locale -name \*.po -exec rm {} + #for vcs in cvs svn bzr hg git tar #do # mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/scratchdir/sources/"$vcs" #done mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name} #install -d -m 0755 $RPM_BUILD_ROOT/%{confdir} #cp -a settings/*.conf $RPM_BUILD_ROOT/%{confdir} sed -i -e 's!^\(LOG_PATH = \).*$!\1"%{_localstatedir}/log/%{name}"!' \ $RPM_BUILD_ROOT/%{confdir}/10-base.conf #sed -e 's!\[\[confpath\]\]!%{confdir}!' %{SOURCE1} > \ # $RPM_BUILD_ROOT%{_datadir}/%{name}/settings.py #cd .. #sh my-find-lang.sh $RPM_BUILD_ROOT django transifex.lst %clean rm -rf $RPM_BUILD_ROOT %post ln -s %{python_sitelib}/%{name}/settings %{_sysconfdir}/%{name} # Check to see if the secret key for Django needs setting, and then set it if grep -q '\[\[SECRETKEY\]\]' %{confdir}/10-base.conf then key=$(python << EOF import random print ''.join(chr(random.randint(35, 126)) for x in xrange(40)).replace('&', '\&') EOF ) sed -i -e "s!\[\[SECRETKEY\]\]!$key!" \ %{confdir}/10-base.conf fi %postun rm -f %{_sysconfdir}/%{name} #%files -f transifex.lst %files %defattr(-,root,root,-) #%doc LICENSE README docs/html %{python_sitelib}/ %exclude %{_prefix}/templates/ #%config(noreplace) %{confdir}/10-base.conf #%config(noreplace) %{confdir}/20-engines.conf #%config(noreplace) %{confdir}/30-site.conf #%config(noreplace) %{confdir}/40-apps.conf #%config(noreplace) %{confdir}/50-project.conf #%config(noreplace) %{confdir}/55-haystack.conf #%config(noreplace) %{confdir}/60-vcs.conf #%config(noreplace) %{confdir}/65-tarball.conf #%config(noreplace) %{confdir}/70-translation.conf #%config(noreplace) %{confdir}/80-storage.conf #%config(noreplace) %{confdir}/89-addons.conf #%config(noreplace) %{confdir}/90-local.conf.sample #%config(noreplace) %{confdir}/95-methods.conf #%dir %{_datadir}/%{name} #%{_datadir}/%{name}/__init__.py #%{_datadir}/%{name}/__init__.py[co] #%{_datadir}/%{name}/manage.py #%{_datadir}/%{name}/manage.py[co] #%{_datadir}/%{name}/settings.py #%{_datadir}/%{name}/settings.py[co] #%{_datadir}/%{name}/urls.py #%{_datadir}/%{name}/urls.py[co] #%{_datadir}/%{name}/actionlog #%{_datadir}/%{name}/codebases #%{_datadir}/%{name}/external #%{_datadir}/%{name}/languages #%dir %{_datadir}/%{name}/locale #%{_datadir}/%{name}/locale/LINGUAS #%{_datadir}/%{name}/projects #%{_datadir}/%{name}/releases #%{_datadir}/%{name}/simpleauth #%{_datadir}/%{name}/site_media #%{_datadir}/%{name}/submissions #%{_datadir}/%{name}/tarball #%{_datadir}/%{name}/templates #%{_datadir}/%{name}/txcommon #%{_datadir}/%{name}/translations #%{_datadir}/%{name}/txpermissions #%dir %{_datadir}/%{name}/reviews #%{_datadir}/%{name}/reviews/*.py #%{_datadir}/%{name}/reviews/*.py[co] #%{_datadir}/%{name}/reviews/migrations #%dir %{_datadir}/%{name}/teams #%{_datadir}/%{name}/teams/*.py #%{_datadir}/%{name}/teams/*.py[co] #%{_datadir}/%{name}/teams/migrations #%{_datadir}/%{name}/teams/templatetags #%dir %{_datadir}/%{name}/vcs #%{_datadir}/%{name}/vcs/*.py #%{_datadir}/%{name}/vcs/*.py[co] #%dir %{_datadir}/%{name}/vcs/lib #%{_datadir}/%{name}/vcs/lib/*.py #%{_datadir}/%{name}/vcs/lib/*.py[co] #%dir %{_datadir}/%{name}/vcs/migrations #%{_datadir}/%{name}/vcs/migrations/*.py #%{_datadir}/%{name}/vcs/migrations/*.py[co] #%dir %{_datadir}/%{name}/vcs/lib/support #%{_datadir}/%{name}/vcs/lib/support/__init__.py #%{_datadir}/%{name}/vcs/lib/support/hg.py #%{_datadir}/%{name}/vcs/lib/support/*.py[co] #%dir %{_datadir}/%{name}/vcs/lib/types #%{_datadir}/%{name}/vcs/lib/types/__init__.py #%{_datadir}/%{name}/vcs/lib/types/dummy.py #%{_datadir}/%{name}/vcs/lib/types/hg.py #%{_datadir}/%{name}/vcs/lib/types/*py[co] #%{_datadir}/%{name}/vcs/lib/exceptions/__init__.py #%{_datadir}/%{name}/vcs/lib/exceptions/__init__.py[co] #%{_datadir}/%{name}/webtrans #%dir %{_localstatedir}/lib/%{name} #%dir %{_localstatedir}/lib/%{name}/scratchdir #%dir %{_localstatedir}/lib/%{name}/scratchdir/sources #%dir %{_localstatedir}/lib/%{name}/scratchdir/sources/hg #%dir %{_localstatedir}/lib/%{name}/scratchdir/sources/tar #%{_datadir}/%{name}/addons #%{_datadir}/%{name}/media #%{_datadir}/%{name}/txcollections #%{_datadir}/%{name}/views.py #%{_datadir}/%{name}/views.py[co] %changelog * Tue Sep 06 2011 Domingo Becker - 1.1.0-4 - Added obsoletes to remove transifex-extras. * Mon Sep 05 2011 Domingo Becker - 1.1.0-3 - Install as a normal Django application. * Tue Aug 30 2011 Domingo Becker - 1.1.0-2 - Removed extra packages because it's not needed anymore. * Fri Jun 24 2011 Domingo Becker - 1.1.0-1 - Update to new upstream version. * Mon Dec 27 2010 usuario - 0.9.1-1 - Update to new upstream version. - The previous tarball has not the media/cs and media/images directories. * Mon Dec 20 2010 Domingo Becker - 0.9.0-5 - Transifex requires Django-south >= 0.7.3. * Wed Dec 01 2010 Domingo Becker - 0.9.0-4 - Added new dependency, python-sqlite2 * Mon Nov 29 2010 Domingo Becker - 0.9.0-3 - Removed the exclude manage.py in files section - New dependency: python-pygooglechart - Fixed project url and source0 url * Fri Sep 24 2010 Domingo Becker - 0.9.0-2 - include manage.py in installation - New dependencies: django-filter django-sorting django-ajax-selects \ django-threadedcomments django-staticfiles django-addons - Dependencies version: Django-south >= 0.7.2 * Tue Sep 14 2010 Mike McGrath - 0.9.0-1 - Upstream released new version * Wed Aug 11 2010 David Malcolm - 0.8.0-0.2.alpha - recompiling .py files against Python 2.7 (rhbz#623411) * Sat Jan 30 2010 Rakesh Pandit - 0.8.0-0.1.alpha - Updated to 0.8.0alpha - http://docs.transifex.org/releases/0.8.html#what-s-new-in-transifex-0-8 * Wed Dec 23 2009 Toshio Kuratomi - 0.7.3-4 - BR python-sqlite2 in EPEL. * Tue Dec 22 2009 Diego Búrigo Zacarão - 0.7.3-3 - Django-south seems to raise a specific NotImplementedError exception for some migration operations using SQLite. Dropped database creation. * Tue Dec 22 2009 Diego Búrigo Zacarão - 0.7.3-2 - Changed SPEC for copying the SQLite database. - Do not try to build the docs, once the 0.7.3 tarball does not have a Makefile for it. - It is not necessary anymore to create the .mo files manually. The management command txcompilemessages does it. * Tue Dec 22 2009 Rakesh Pandit - 0.7.3 - (patched by petersen) Updated to 0.7.3, for details: - http://code.transifex.org/index.cgi/tx-0.7.x/file/0fafc780e303/docs/releases/0.7.txt * Sun Jul 26 2009 Fedora Release Engineering - 0.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Fri Jun 26 2009 Ignacio Vazquez-Abrams 0.6-2 - Disabled docs for now * Wed Apr 29 2009 Ignacio Vazquez-Abrams 0.6-1 - Upstream update * Tarball support * User notifications * Multiple file support * Archive downloading * Many more (http://docs.transifex.org/releases/0.6.html) * Wed Apr 01 2009 Ignacio Vazquez-Abrams 0.5.2-1 - Upstream update * Fixed ordering of components untranslated by a Release X Lang * Fixed missing parameter for the set_stats_for_lang method call * Fixed msgfmt to work large files - Fixed small bug in %%post - Fixed PROJECT_PATH in the settings * Mon Mar 30 2009 Ignacio Vazquez-Abrams 0.5.1-2 - Build with proper tarball * Thu Mar 26 2009 Ignacio Vazquez-Abrams 0.5.1-1 - Upstream update * Added list of Components untranslated by Lang x Release * Fixed stats for projects with intltool support broken * Added mercurial compatibility for 1.2.x version * Added list of files to the submit form * Wed Mar 18 2009 Ignacio Vazquez-Abrams 0.5-1 - Updated to final release * Wed Mar 18 2009 Ignacio Vazquez-Abrams 0.5-0.7.rc1.hge0ede2b7056e - Updated from hg * Thu Mar 12 2009 Ignacio Vazquez-Abrams 0.5-0.6.rc1.hgc3439806202e - Updated from hg * Thu Mar 12 2009 Ignacio Vazquez-Abrams 0.5-0.5.rc1.hg450552bc8262 - Updated from hg - Fixed path error in %%post * Tue Mar 10 2009 Ignacio Vazquez-Abrams 0.5-0.4.rc1.hg969db3557e1f - Updated from hg * Tue Mar 10 2009 Ignacio Vazquez-Abrams 0.5-0.3.rc1.hg8a39f3e6146c - Update to rc1 and a little further * Mon Mar 09 2009 Ignacio Vazquez-Abrams 0.5-0.2.hg9f575f26d1db - Fix build for EL5 * Mon Mar 09 2009 Ignacio Vazquez-Abrams 0.5-0.1.hg9f575f26d1db - Remove vcs app tests - Add support for simple authentication * Fri Mar 06 2009 Ignacio Vazquez-Abrams - 0.5-0.0.hg43f8e9924fa2 - Update to 0.5 beta * Wed Jan 28 2009 Dimitris Glezos - 0.3.2 - Version 0.3.2 * Sat Aug 01 2008 Dimitris Glezos - 0.3.1 - Version 0.3.1 * Sun Jul 20 2008 Dimitris Glezos - 0.3-0 - Version 0.3 * Sun Feb 10 2008 Dimitris Glezos - 0.2-0 - Overhaul of file uploads, now supporting non-UTF uploads - Admins are now members of 'l10n-admin' group * Mon Jan 14 2008 Dimitris Glezos - 0.1.1-0 - Corrected a Unicode issue (non-ascii user names) * Sat Sep 29 2007 Mike McGrath - 0.1-5 - Added logrotate and a few other pieces - Added transifex user and a few permissions changes * Thu Sep 27 2007 Mike McGrath - 0.1-3 - Added BR TurboGears - Added transifex to cp -adv - Added a mkdir * Sat Jun 23 2007 Dimitris Glezos - 0.1-1 - Initial creation