Projet

Général

Profil

Télécharger (4,49 ko) Statistiques
| Branche: | Révision:

root / fedora / larpe.spec @ master

1
%{!?python_sitearch: %define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')}
2
# eval to 2.3 if python isn't yet present, workaround for no python in fc4 minimal buildroot
3
%{!?python_version: %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]' || echo "2.3")}
4
%define apacheconfdir   %{_sysconfdir}/httpd/conf.d
5

    
6
Summary: Liberty Alliance Reverse Proxy
7
Name: larpe
8
Version: 0.2.9
9
Release: 2%{?dist}
10
License: GPL
11
Group: System Environment/Applications
12
Url: http://larpe.labs.libre-entreprise.org/
13
Source0: http://labs.libre-entreprise.org/frs/download.php/591/%{name}-%{version}.tar.gz
14
Buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
15
BuildRequires: python >= 2.3, python-quixote >= 2.0
16
BuildRequires: gettext
17
Requires: httpd >= 2.0, mod_scgi, mod_proxy_html
18
Requires: lasso-python >= 0.6.3, python-quixote >= 2.0, python-scgi
19
Requires: initscripts
20
Requires(post): /sbin/chkconfig
21
Requires(preun):/sbin/chkconfig
22
Requires(preun): /sbin/service
23

    
24
%description
25
Larpe is a Liberty Alliance Reverse Proxy. It allows any service provider (that is a website)
26
to use Liberty Alliance features (Identity federation, Single Sign On and Single Logout) without
27
changing the code of the service provider itself.
28

    
29
It uses the Lasso library which is certified by the Liberty Alliance consortium.
30

    
31
It is a quixote application and is commonly runned inside Apache web server.
32

    
33
%package doc
34
Summary: Documentation files for %{name} development.
35
Group: Documentation
36
BuildRequires: python-docutils, tetex-latex
37

    
38
%description doc
39
This package contains development documentation for %{name}.
40

    
41
%prep
42
%setup -q
43

    
44
# Change Apache vhost path in Larpe config
45
sed -i s#"/var/log/apache2/larpe-access.log"#"logs/larpe_access_log combined\n    TransferLog logs/larpe_access_log"# conf/apache2-vhost-larpe
46
sed -i s#"/var/log/apache2/larpe-error.log"#"logs/larpe_error_log"# conf/apache2-vhost-larpe
47
sed -i s#"APACHE_MAIN_VHOST.*$"#"APACHE_MAIN_VHOST='/etc/httpd/conf.d/larpe.conf'"# larpe/Defaults.py
48

    
49
%build
50

    
51
%install
52
rm -rf %{buildroot}
53

    
54
# install generic files
55
make install prefix=%{_prefix} DESTDIR=%{buildroot}
56

    
57
# install init script
58
install -d %{buildroot}/%{_initrddir}
59
install -p -m 0755 fedora/larpe.init %{buildroot}%{_initrddir}/larpe
60

    
61
# apache configuration
62
mkdir -p %{buildroot}%{apacheconfdir}
63
install -p -m 644 conf/apache2-vhost-larpe %{buildroot}%{apacheconfdir}/larpe.conf
64

    
65
# apache reload script
66
install -p -m 0755 fedora/larpe-reload-apache2-script %{buildroot}%{_sbindir}/
67

    
68
# install doc files
69
install -d -m 0755 %{buildroot}%{_datadir}/gtk-doc/html/larpe
70
make -C doc DESTDIR=%{buildroot}%{_datadir}/gtk-doc/html/larpe
71

    
72
%clean
73
rm -fr %{buildroot}
74

    
75
%post
76
/sbin/chkconfig --add %{name}
77

    
78
# manual post-installation
79
cat <<_EOF_
80
You must edit first %{apacheconfdir}/larpe.conf
81

    
82
You must enable Larpe with "chkconfig larpe on ; service larpe start"
83

    
84
You must also restart Apache with "service httpd restart"!
85
_EOF_
86

    
87
%preun
88
if [ $1 = 0 ]; then
89
	/sbin/service %{name} stop > /dev/null 2>&1
90
	/sbin/chkconfig --del %{name}
91
fi
92

    
93
%files
94
%defattr(-,root,root,755)
95
%config %{_initrddir}/larpe
96
%config(noreplace) %{apacheconfdir}/larpe.conf
97
%config(noreplace) %{_sysconfdir}/larpe/apache2-vhost-larpe-common
98
%{_sbindir}/larpectl
99
%{_sbindir}/larpe-reload-apache2
100
%{_sbindir}/larpe-reload-apache2-script
101
%{python_sitearch}/%{name}
102
%{_datadir}/%{name}
103
%{_datadir}/locale/fr/LC_MESSAGES/larpe.mo
104
/var/lib/larpe
105
%defattr(644,root,root,755)
106
%doc AUTHORS COPYING NEWS README
107

    
108
%files doc
109
%defattr(-,root,root)
110
%doc %{_datadir}/gtk-doc/html/%{name}
111

    
112
%changelog
113
* Tue Mar 05 2009 Jean-Marc Liger <jmliger@siris.sorbonne.fr> 0.2.9-2
114
- Added missing BuildRequires gettext
115
- Enabled larpe init script
116

    
117
* Mon Jan 19 2009 Damien Laniel <dlaniel@entrouvert.com> 0.2.9-1
118
- Updated to 0.2.9
119
- Use Larpe Makefile to install generic files
120
- Copy fedora specific files
121

    
122
* Sat Jan 17 2009 Jean-Marc Liger <jmliger@siris.sorbonne.fr> 0.2.1-2
123
- Added missing BuildRequires tetex-latex for doc subpackage
124
- Rebuilt on CentOS 4,5
125

    
126
* Wed Jan 14 2009 Jean-Marc Liger <jmliger@siris.sorbonne.fr> 0.2.1-1
127
- Updated to 0.2.1
128
- Added missing Requires lasso-python
129
- Added missing Requires python-scgi
130
- Rebuilt on CentOS 4,5
131

    
132
* Fri Mar 02 2007 Jean-Marc Liger <jmliger@siris.sorbonne.fr> 0.2.0-1
133
- Updated to 0.2.0
134
- Added BuildRequires python-quixote
135
- Built on Fedora Core 3 / RHEL 4 and Fedora Core 6 / RHEL 5
136

    
137
* Wed Jan 24 2007 Jean-Marc Liger <jmliger@siris.sorbonne.fr> 0.1.0-1
138
- First 0.1.0
139
- Built on Fedora Core 3 / RHEL 4 and Fedora Core 6 / RHEL 5
(3-3/3)