[fpaste-server] Incomplete commit (needs code release) for 0.3
Jonathan Steffan
jsteffan at fedoraproject.org
Mon Sep 19 03:12:30 UTC 2011
commit bcaccae71ed790f02dd6df46b303975d10cfae57
Author: Jonathan Steffan <jsteffan at fedoraproject.org>
Date: Sun Sep 18 21:12:06 2011 -0600
Incomplete commit (needs code release) for 0.3
fpaste-server.spec | 120 ++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 94 insertions(+), 26 deletions(-)
---
diff --git a/fpaste-server.spec b/fpaste-server.spec
index cfda34a..7e68283 100644
--- a/fpaste-server.spec
+++ b/fpaste-server.spec
@@ -4,30 +4,35 @@
%endif
%define name fpaste-server
-%define version 0.2
-%define unmangled_version 0.2
-%define release 1
-
-Name: %{name}
-Version: %{version}
-Release: %{release}%{?dist}
-Summary: Fedora Pastebin
-Group: Applications/Internet
-License: GPLv2+
-URL: https://fedorahosted.org/fpaste-server/
-Source0: https://fedorahosted.org/releases/f/p/fpaste-server/%{name}-%{unmangled_version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
-BuildArch: noarch
-Prefix: %{_prefix}
+%define version 0.3
+%define unmangled_version 0.3
+%define release 2
+
+Name: %{name}
+Version: %{version}
+Release: %{release}%{?dist}
+Summary: Fedora Pastebin
+Group: Applications/Internet
+License: GPLv2+
+URL: https://fedorahosted.org/fpaste-server/
+Source0: https://fedorahosted.org/releases/f/p/fpaste-server/%{name}-%{unmangled_version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
-Requires: django-tracking >= 0.2.7
-Requires: django-simple-captcha >= 0.2.0
-Requires: django-mptt >= 0.4.2
-Requires: django-dpaste >= 0.2.4
-Requires: httpd
+Requires: django-tracking >= 0.2.7
+Requires: django-simple-captcha >= 0.2.0
+Requires: django-mptt >= 0.4.2
+Requires: django-dpaste >= 0.2.4
+Requires: python-sqlite
+
+%if 0%{?rhel} > 5 || 0%{?fedora} > 6
+Requires: dejavu-sans-mono-fonts
+%else
+Requires: bitstream-vera-fonts
+%endif
%description
fpaste-server is simply put, a pastebin.
@@ -35,6 +40,42 @@ Like many a pastebin application before it,
fpaste-server strives to make it easy to
share code and other information collaboratively.
+%package httpd
+Summary: Fedora Pastebin - httpd support
+Group: Applications/Internet
+
+Requires: httpd, mod_wsgi
+
+%description httpd
+fpaste-server httpd support. This package includes
+example configuration files for httpd to run fpaste-server
+via mod_wsgi
+
+# MySQL-python shipped with EL5 is too old
+%if 0%{?rhel} > 5
+%package mysql
+Summary: Fedora Pastebin - MySQL support
+Group: Applications/Internet
+
+Requires: MySQL-python > 1.2.1
+Conflicts: %{name}-pgsql
+
+%description mysql
+fpaste-server MySQL support. This package includes
+example configuration files for mysql to run fpaste-server
+%endif
+
+%package pgsql
+Summary: Fedora Pastebin - PostgreSQL support
+Group: Applications/Internet
+
+Requires: python-psycopg2
+Conflicts: %{name}-mysql
+
+%description pgsql
+fpaste-server PostgreSQL support. This package includes
+example configuration files for PostgreSQL to run fpaste-server
+
%prep
%setup -qn %{name}-%{unmangled_version} -n %{name}-%{unmangled_version}
@@ -46,30 +87,57 @@ python setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
chmod a+x %{buildroot}%{python_sitelib}/fpaste_server/manage.py
sed -i 's|#python_path#|%{python_sitelib}|g' %{buildroot}%{python_sitelib}/fpaste_server/conf/fpaste_server.conf.sample
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d/
+mkdir -p %{buildroot}%{_sysconfdir}/%{name}
+# httpd sample configuration
mv %{buildroot}%{python_sitelib}/fpaste_server/conf/fpaste_server.conf.sample %{buildroot}%{_sysconfdir}/httpd/conf.d/fpaste_server.conf.sample
+# mysql sample configuration
+mv %{buildroot}%{python_sitelib}/fpaste_server/conf/settings_mysql.py.sample %{buildroot}%{_sysconfdir}/%{name}/settings_mysql.py.sample
+# pgsql sample configuration
+mv %{buildroot}%{python_sitelib}/fpaste_server/conf/settings_pgsql.py.sample %{buildroot}%{_sysconfdir}/%{name}/settings_pgsql.py.sample
# uses the dpaste path structure and needs a symbolic link to work
-ln -sf %{python_sitelib}/fpaste_server/templates/fpaste_server %{buildroot}/%{python_sitelib}/fpaste_server/templates/dpaste
+pushd %{buildroot}/%{python_sitelib}/fpaste_server/templates
+ln -sf fpaste_server dpaste
+popd
%clean
rm -rf $RPM_BUILD_ROOT
%files
-%defattr(-,root,root)
+%defattr(-,root,root,-)
%doc README
+%dir %{_sysconfdir}/%{name}
%{python_sitelib}/*
+
+%files httpd
+%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/httpd/conf.d/fpaste_server.conf.sample
+# MySQL-python shipped with EL5 is too old
+%if 0%{?rhel} > 5
+%files mysql
+%defattr(-,root,root,-)
+%config(noreplace) %{_sysconfdir}/%{name}/settings_mysql.py.sample
+%endif
+
+%files pgsql
+%defattr(-,root,root,-)
+%config(noreplace) %{_sysconfdir}/%{name}/settings_pgsql.py.sample
+
%changelog
+* Sun Sep 18 2011 Jonathan Steffan <jsteffan at fedoraproject.org> - 0.3-1
+- Update Requires based on shipped settings.py
+- Update to 0.3 with minor bugfixes and configuration changes
+- Add subpackages for MySQL and PostgreSQL
-* Mon Aug 10 2011 Clint Savage <herlo at fedoraproject.org> 0.2-1
+* Mon Aug 10 2011 Clint Savage <herlo at fedoraproject.org> - 0.2-1
- Cleaned up pathing and config files
-* Mon Apr 11 2011 Clint Savage <herlo at fedoraproject.org> 0.1-3
+* Mon Apr 11 2011 Clint Savage <herlo at fedoraproject.org> - 0.1-3
- Added dist macro to release line.
-* Mon Mar 07 2011 Clint Savage <herlo at fedoraproject.org> 0.1-2
+* Mon Mar 07 2011 Clint Savage <herlo at fedoraproject.org> - 0.1-2
- Fixed rpmlint errors and warnings.
-* Tue Feb 08 2011 Clint Savage <herlo at fedoraproject.org> 0.1-1
+* Tue Feb 08 2011 Clint Savage <herlo at fedoraproject.org> - 0.1-1
- Initial package build
More information about the scm-commits
mailing list