lemonldap-ng/build/redhat/lemonldap-ng.spec

296 lines
11 KiB
RPMSpec
Raw Normal View History

2009-01-05 18:13:16 +01:00
#==============================================================================
# Specification file for LemonLDAP::NG
#
# Install LemonLDAP::NG modules, htdocs and scripts
# Authority: dries
# Upstream: Xavier Guimard <x,guimard$free,fr>
2009-01-05 18:13:16 +01:00
#==============================================================================
#==============================================================================
# Variables
#==============================================================================
%define perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
%define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
%define real_name lemonldap-ng
%define real_version 0.9.3.2
2009-01-05 18:13:16 +01:00
%define lm_prefix /usr
%define lm_sharedir /usr/share/lemonldap-ng
%define lm_examplesdir %{lm_sharedir}/examples
2009-01-05 18:13:16 +01:00
%define lm_vardir /var/lib/lemonldap-ng
%define lm_confdir /etc/lemonldap-ng
%define lm_storagefile %{lm_confdir}/storage.conf
%define lm_apacheuser apache
%define lm_apachegroup apache
%define lm_dnsdomain example.com
%define lm_ldaphost localhost
%define lm_ldapport 389
%define lm_ldapsuffix dc=example,dc=com
#==============================================================================
# Main package
#==============================================================================
Name: %{real_name}
Version: %{real_version}
Release: 1.el5.ow2
Summary: LemonLDAP-NG WebSSO
Group: Applications/System
2009-01-05 18:13:16 +01:00
License: Artistic/GPL
URL: http://lemonldap.ow2.org
Source0: http://download.forge.objectweb.org/lemonldap/%{name}-%{version}.tar.gz
Patch0: lemonldap-ng-cronjob-0.9.3.2.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
2009-01-05 18:13:16 +01:00
Packager: Clement Oudot
Vendor: OW2
2009-01-05 18:13:16 +01:00
BuildArch: noarch
BuildRequires: perl
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
2009-01-05 18:13:16 +01:00
Requires: perl(Apache::Session), mod_perl
Requires: perl-Lemonldap-NG-Conf >= 0.91
Requires: perl-Lemonldap-NG-Handler >= 0.90
Requires: perl-Lemonldap-NG-Manager >= 0.87
Requires: perl-Lemonldap-NG-Portal >= 0.86
Requires: lemonldap-ng-doc >= %{real_version}
%description
LemonLDAP::NG is a modular Web-SSO based on Apache::Session modules. It simplifies the build of a protected area with a few changes in the application. It manages both authentication and authorization and provides headers for accounting. So you can have a full AAA protection for your web space as described below.
2009-01-05 18:13:16 +01:00
#==============================================================================
# Documentation
#==============================================================================
%package -n lemonldap-ng-doc
Summary: LemonLDAP-NG documentation
Group: Applications/System
%description -n lemonldap-ng-doc
This package contains html documentation.
#==============================================================================
# Conf (Common)
#==============================================================================
%package -n perl-Lemonldap-NG-Conf
Summary: LemonLDAP-NG Common Modules
Version: 0.91
2009-01-05 18:13:16 +01:00
Group: Applications/System
%description -n perl-Lemonldap-NG-Conf
This package installs the configuration libraries used by other LemonLDAP::NG modules.
#==============================================================================
# Handler
#==============================================================================
%package -n perl-Lemonldap-NG-Handler
Summary: LemonLDAP-NG Handler Modules
Version: 0.90
2009-01-05 18:13:16 +01:00
Group: Applications/System
%description -n perl-Lemonldap-NG-Handler
This package installs the Apache module part (handler) used to protect web areas.
#==============================================================================
# Manager
#==============================================================================
%package -n perl-Lemonldap-NG-Manager
Summary: LemonLDAP-NG Manager Modules
Version: 0.87
2009-01-05 18:13:16 +01:00
Group: Applications/System
%description -n perl-Lemonldap-NG-Manager
This package installs the administration interface (manager).
#==============================================================================
# Portal
#==============================================================================
%package -n perl-Lemonldap-NG-Portal
Summary: LemonLDAP-NG Portal Modules
Version: 0.86
2009-01-05 18:13:16 +01:00
Group: Applications/System
%description -n perl-Lemonldap-NG-Portal
This package installs the authentication portal.
#==============================================================================
2009-01-05 18:13:16 +01:00
# Source preparation
#==============================================================================
%prep
%setup -n %{real_name}-%{real_version} -q
%patch0 -p0
2009-01-05 18:13:16 +01:00
# Remove unwanted provides/requires
# We remove Lemonldap::NG requires because the requires are set in the header
2009-01-05 18:13:16 +01:00
cat << \EOF > %{name}-prov
#!/bin/sh
%{__perl_provides} $* |\
sed -e '/perl(My::Package)/d'
EOF
%define __perl_provides %{_builddir}/%{name}-%{real_version}/%{name}-prov
2009-01-05 18:13:16 +01:00
chmod +x %{__perl_provides}
cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} $* |\
sed -e '/perl(lasso)/d' |\
sed -e '/perl(SOAP::Lite)/d' |\
sed -e '/perl(SOAP::Transport::HTTP)/d' |\
sed -e '/perl(Log::Log4perl)/d' |\
sed -e '/perl(Lemonldap::NG/d' |\
2009-01-05 18:13:16 +01:00
sed -e '/perl(AuthCAS)/d'
EOF
%define __perl_requires %{_builddir}/%{name}-%{real_version}/%{name}-req
2009-01-05 18:13:16 +01:00
chmod +x %{__perl_requires}
#==============================================================================
2009-01-05 18:13:16 +01:00
# Building
#==============================================================================
%build
2009-01-05 18:13:16 +01:00
%{__make} %{?_smp_mflags} configure STORAGECONFFILE=%{lm_storagefile} PERLOPTIONS="INSTALLDIRS=vendor"
%{__make} %{?_smp_mflags}
#==============================================================================
2009-01-05 18:13:16 +01:00
# Installation
#==============================================================================
%install
rm -rf %{buildroot}
2009-01-05 18:13:16 +01:00
# Tests
%{__make} %{?_smp_mflags} test
# Install
%{__make} %{?_smp_mflags} install \
DESTDIR=%{buildroot} \
PREFIX=%{lm_prefix} \
BINDIR=%{lm_sharedir}/bin \
DOCUMENTROOT=%{lm_vardir} \
EXAMPLESDIR=%{lm_examplesdir} \
HANDLERDIR=%{lm_vardir}/handler \
PORTALSKINSDIR=%{lm_sharedir}/portal-skins \
MANAGERDATADIR=%{lm_sharedir}/manager-imgs \
SESSIONSEXPLORERDATADIR=%{lm_sharedir}/sessions-explorer-imgs \
STORAGECONFFILE=%{lm_storagefile} \
TOOLSDIR=%{lm_sharedir}/ressources \
CONFDIR=%{lm_confdir} \
CRONDIR=/etc/cron.d \
DATADIR=%{lm_vardir} \
APACHEUSER=%{lm_apacheuser} \
APACHEGROUP=%{lm_apachegroup} \
DNSDOMAIN=%{lm_dnsdomain} \
LDAPHOST=%{lm_ldaphost} \
LDAPPORT=%{lm_ldapport} \
LDAPSUFFIX=%{lm_ldapsuffix}
#==============================================================================
2009-01-05 18:13:16 +01:00
# Post Installation
#==============================================================================
2009-01-05 18:13:16 +01:00
%post
# Set UNIX rights
2009-01-05 18:13:16 +01:00
chown -R %{lm_apacheuser}:%{lm_apachegroup} %{lm_vardir}/conf
chmod 750 %{lm_vardir}/conf
chmod 640 %{lm_vardir}/conf/*
chgrp %{lm_apachegroup} %{lm_storagefile}
chmod 640 %{lm_storagefile}
chown -R %{lm_apacheuser}:%{lm_apachegroup} %{lm_vardir}/sessions
chmod 770 %{lm_vardir}/sessions
chmod 770 %{lm_vardir}/sessions/lock
chgrp %{lm_apachegroup} %{lm_confdir}/apply.conf
chmod 640 %{lm_confdir}/apply.conf
# Create symlink in Apache configuration
# We use "z-lemonldap-ng" so that Apache read the file after "perl.conf"
ln -s %{lm_confdir}/apache2.conf /etc/httpd/conf.d/z-lemonldap-ng.conf
echo "LemonLDAP::NG installation success - please restart Apache"
#==============================================================================
2009-01-05 18:13:16 +01:00
# Pre uninstallation
#==============================================================================
2009-01-05 18:13:16 +01:00
%preun
# Remove symlink in Apache configuration
rm -f /etc/httpd/conf.d/z-lemonldap-ng.conf
echo "LemonLDAP::NG uninstallation success - please restart Apache"
#==============================================================================
2009-01-05 18:13:16 +01:00
# Cleaning
#==============================================================================
%clean
rm -rf %{buildroot}
#==============================================================================
2009-01-05 18:13:16 +01:00
# Files
#==============================================================================
%files
%defattr(-,root,root,-)
2009-01-05 18:13:16 +01:00
%config %{lm_confdir}
%config %{lm_vardir}/conf
%doc changelog COPYING INSTALL README
2009-01-05 18:13:16 +01:00
%{lm_sharedir}
%{lm_vardir}/handler
%{lm_vardir}/liberty-alliance-sp-portal
%{lm_vardir}/manager
%{lm_vardir}/portal
%{lm_vardir}/sessions
%{lm_vardir}/test
/etc/cron.d/lemonldap-ng
2009-01-05 18:13:16 +01:00
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod
%files -n lemonldap-ng-doc
%doc %{lm_vardir}/doc
%files -n perl-Lemonldap-NG-Conf
%doc %{_mandir}/man3/Lemonldap::NG::Common*.3pm.gz
%{perl_vendorlib}/Lemonldap/NG/Common.pm
%{perl_vendorlib}/Lemonldap/NG/Common/
%{perl_vendorlib}/i386-linux-thread-multi/auto/Lemonldap/NG/Common/
%files -n perl-Lemonldap-NG-Handler
%doc %{_mandir}/man3/Lemonldap::NG::Handler*.3pm.gz
%{perl_vendorlib}/Lemonldap/NG/Handler.pm
%{perl_vendorlib}/Lemonldap/NG/Handler/
%{perl_vendorlib}/i386-linux-thread-multi/auto/Lemonldap/NG/Handler/
%files -n perl-Lemonldap-NG-Manager
%doc %{_mandir}/man3/Lemonldap::NG::Manager*.3pm.gz
%{perl_vendorlib}/Lemonldap/NG/Manager.pm
%{perl_vendorlib}/Lemonldap/NG/Manager/
%{perl_vendorlib}/i386-linux-thread-multi/auto/Lemonldap/NG/Manager/
%{perl_vendorlib}/auto/Lemonldap/NG/Manager/
%files -n perl-Lemonldap-NG-Portal
%doc %{_mandir}/man3/Lemonldap::NG::Portal*.3pm.gz
%{perl_vendorlib}/Lemonldap/NG/Portal.pm
%{perl_vendorlib}/Lemonldap/NG/Portal/
%{perl_vendorlib}/i386-linux-thread-multi/auto/Lemonldap/NG/Portal/
%{perl_vendorlib}/auto/Lemonldap/NG/Portal/
#==============================================================================
2009-01-05 18:13:16 +01:00
# Changelog
#==============================================================================
%changelog
* Mon Jan 5 2009 Clement Oudot <coudot@linagora.com> - 0.9.3.2-1.el5.ow2
2009-01-05 18:13:16 +01:00
- Updated to release 0.9.3.2.
- Use internal version number for perl modules (compatibility with RPMforge packages)
2009-01-05 18:13:16 +01:00
- Merge with existing .spec file from RPMforge.
- Use the same directories as the Debian package.
- Create a symlink in Apache confguration.
2009-01-05 18:13:16 +01:00
* Thu Nov 20 2008 Jean-Christophe Toussaint <jean-christophe.toussaint@ac-nancy-metz.fr> - 0.9.2-1DSI
- Updated to release 0.9.2.
- Using official tar.gz from forge.
* Tue Oct 7 2008 David Hannequin <david.hannequin@linagora.com>
2009-01-05 18:13:16 +01:00
- New spec file
* Sun Mar 02 2008 Dag Wieers <dag@wieers.com> - 0.85-1
- Updated to release 0.85.
* Tue Nov 13 2007 Dag Wieers <dag@wieers.com> - 0.84-1
- Updated to release 0.84.
* Wed May 02 2007 Dries Verachtert <dries@ulyssis.org> - 0.81-1
- Updated to release 0.81.
* Sun Apr 29 2007 Dries Verachtert <dries@ulyssis.org> - 0.75-1
- Initial package.