summaryrefslogtreecommitdiff
path: root/python-HTMLTemplate.spec
blob: 0f101eb70ea12747c4b5e39c88bf3cc65063cea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

%define 	module	HTMLTemplate

Summary:	Another (X)HTML template Python module
Summary(pl.UTF-8):	Kolejny moduł Pythona do przetwarzania szablonów (X)HTML
Name:		python-%{module}
Version:	1.4.1
Release:	2
License:	LGPL
Group:		Libraries/Python
Source0:	http://freespace.virgin.net/hamish.sanderson/%{module}-%{version}.tar.gz
# Source0-md5:	74bbaee9b851b17b5c5cd1658ea42897
URL:		http://freespace.virgin.net/hamish.sanderson/htmltemplate.html
BuildRequires:	python-devel >= 1:2.3
%pyrequires_eq	python-libs
BuildArch:	noarch
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
HTMLTemplate converts (X)HTML templates into a simple Python object
model that can be manipulated by ordinary Python scripts. Fast,
powerful and easy to use.

%description -l pl.UTF-8
HTMLTemplate przekształca szablony (X)HTML w proste drzewo obiektów w
Pythonie, które może być przetwarzane przy pomocy skryptów pisanych w
tym języku. Moduł HTMLTemplte jest szybki, efektywny i łatwy w użyciu.

%package doc
Summary:	Documentation for HTMLTemplate module
Summary(pl.UTF-8):	Dokumentacja do modułu HTMLTemplate
Group:		Libraries/Python
Requires:	%{name} = %{version}-%{release}

%description doc
This package contains documentation files for HTMLTemplate Python
module.

%description doc -l pl.UTF-8
Pakiet zawierający dokumentację dla modułu Pythona HTMLTemplate.

%package examples
Summary:	Examples for HTMLTemplate module
Summary(pl.UTF-8):	Przykłady do modułu HTMLTemplate
Group:		Libraries/Python
Requires:	%{name} = %{version}-%{release}

%description examples
This package contains example files for HTMLTemplate Python module.

%description examples -l pl.UTF-8
Pakiet zawierający przykładowe skrypty dla modułu Pythona HTMLTemplate.

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

%build
python setup.py build_ext

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{py_sitescriptdir},%{_examplesdir}/%{name}-%{version}}

python setup.py install \
	--root=$RPM_BUILD_ROOT \
	--install-lib=%{py_sitescriptdir} \
	--optimize=2

find $RPM_BUILD_ROOT%{py_sitescriptdir} -name \*.py -exec rm {} \;

cp -a Examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc README.txt
%{py_sitescriptdir}/HTMLTemplate.py[oc]

%files doc
%defattr(644,root,root,755)
%doc Documentation/{Manual.txt,Tutorial_1.txt,Tutorial_2.txt,FAQ.txt}

%files examples
%defattr(644,root,root,755)
%{_examplesdir}/%{name}-%{version}