From 54d2f3591c1c0d9b482b25ccd82c735816f2fb13 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 10 Mar 2008 12:24:21 -0700 Subject: [PATCH] * Initial spec file. Update TODO with setup.py problems we have to work around in the spec file. --- fas/TODO | 6 +++++ fas/fas.spec | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 fas/fas.spec diff --git a/fas/TODO b/fas/TODO index d0f9c65..a8e9669 100644 --- a/fas/TODO +++ b/fas/TODO @@ -6,3 +6,9 @@ Nice-to-have things: * fas/group.py: Easy searching within groups (and sponsor/admin interface) * fas/aliases.py: An easy interface to manage mail aliases + + * setup.py: + - Fix installing in all scenarios: bdist_egg, install, and + install --install-data='/usr/share/fas' + - Install fas.cfg + - Install start-fas to the correct directory diff --git a/fas/fas.spec b/fas/fas.spec new file mode 100644 index 0000000..32f7756 --- /dev/null +++ b/fas/fas.spec @@ -0,0 +1,71 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +Name: fas +Version: 0.1 +Release: 1%{?dist} +Summary: Fedora Account System + +Group: Development/Languages +License: GPLv2 +URL: https://fedorahosted.org/fas2/ +Source0: https://fedorahosted.org/releases/f/e/fedora-infrastructure/ +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch +BuildRequires: python-devel +BuildRequires: setuptools-devel +Requires: TurboGears >= 1.0.4 +Requires: python-sqlalchemy >= 0.4 +Requires: python-turbomail +Requires: python-fedora-infrastructure >= 0.2.99.2 + +%description +The Fedora Account System is a web application that manages the accounts of +Fedora Project Contributors. It's built in TurboGears and comes with a json +API for querying against remotely. + +The python-fedora-infrastructure package has a TurboGears identity provider +that works with the Account System. + +%package clients +Summary: Clients for the Fedora Account System +Group: Applications/System +Requires: python-fedora +Requires: rhpl + +%description -n clients +Additional scripts that work as clients to the accounts system. + +%prep +%setup -q + + +%build +%{__python} setup.py build --install-data='%{_datadir}/fas' + +%install +rm -rf $RPM_BUILD_ROOT +%{__python} setup.py install -O1 --skip-build --install-data='%{_datadir}/fas' --root $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_sbindir} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} +mv $RPM_BUILD_ROOT%{_bindir}/start-fas $RPM_BUILD_ROOT%{_sbindir} +# Unreadable by others because it's going to contain a database password. +install -m 0600 fas.cfg $RPM_BUILD_ROOT%{_sysconfdir} + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc README TODO COPYING fas2.sql +%{python_sitelib}/* +%{_sbindir}/start-fas +%config(noreplace) %{_sysconfdir}/* + +%files -n clients +%{_bindir}/* + +%changelog +* Mon Mar 10 2008 Toshio Kuratomi - 0.1-1 +- Initial Build.