Sophie

Sophie

distrib > Arklinux > devel > x86_64 > media > main-src > by-pkgid > f132bbc01be54f9ca459b5b9a859daf6 > files > 2

django-1.2.3-1ark.src.rpm

%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}

Name:           django
Version:        1.2.3
Release:        1ark
Summary:        A high-level Python Web framework

Group:          Development/Languages
License:        BSD
URL:            http://www.djangoproject.com/
Source0:        http://media.djangoproject.com/releases/%(echo %version |cut -d. -f1-2)/Django-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-sphinx

%description
Django is a high-level Python Web framework that encourages rapid
development and a clean, pragmatic design. It focuses on automating as
much as possible and adhering to the DRY (Don't Repeat Yourself)
principle.


%package doc
Summary:        Documentation for Django
Group:          Documentation
Requires:       %{name} = %{version}-%{release}
Provides:       %{name}-docs = %{version}-%{release}
Obsoletes:      %{name}-docs < %{version}-%{release}

%description doc
This package contains the documentation for the Django high-level
Python Web framework.


%prep
%setup -q -n Django-%{version}

%build
%{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
# Language files; not under /usr/share, need to be handled manually
(cd $RPM_BUILD_ROOT && find . -name 'django*.mo') | %{__sed} -e 's|^.||' | %{__sed} -e \
  's:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' \
  >> %{name}.lang

# build documentation
(cd docs && make html)

# install man pages
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
cp -p docs/man/* $RPM_BUILD_ROOT%{_mandir}/man1/

# Fix items in %{_bindir}
mv $RPM_BUILD_ROOT%{_bindir}/django-admin.py $RPM_BUILD_ROOT%{_bindir}/django-admin

%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS LICENSE README
%{_bindir}/django-admin
%{_mandir}/man1/*
%attr(0755,root,root) %{python_sitelib}/django/conf/project_template/manage.py
%attr(0755,root,root) %{python_sitelib}/django/bin/profiling/gather_profile_stats.py
%attr(0755,root,root) %{python_sitelib}/django/bin/*-messages.py
%attr(0755,root,root) %{python_sitelib}/django/bin/daily_cleanup.py
%attr(0755,root,root) %{python_sitelib}/django/bin/django-admin.py
%{python_sitelib}/*

%files doc
%defattr(-,root,root,-)
%doc docs/_build/html/*

%changelog
* Wed Oct 20 2010 Bernhard Rosenkraenzer <bero@arklinux.org> 1.2.3-1ark
- 1.2.3
- Python 2.7

* Wed Aug 12 2009 Bernhard Rosenkraenzer <bero@arklinux.org> 1.1-1ark
- Initial Ark Linux package