File phpldapadmin.spec of Package phpldapadmin
#
# spec file for package phpldapadmin (Version 1.2.3)
#
%define serverroot /srv/www/htdocs/
Name: phpldapadmin
License: GPL
Group: Productivity/Networking/Web/Frontends
Autoreqprov: on
Version: 1.2.3
Release: 1
Summary: A web interface for LDAP server administration
URL: http://phpldapadmin.sourceforge.net/
Source: %{name}-%{version}.tar.bz2
Source1: phpldapadmin.conf
Patch0: %{name}-php55.patch
#Patch0: php-5.5-compat.patch
Patch1: fix_monitor_information_problems.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: coreutils
BuildRequires: tar
BuildRequires: bzip2
Requires: mod_php_any php-ldap php-gettext php-openssl php-xml php-pcre php-session
BuildArch: noarch
%description
phpLDAPadmin (also known as PLA) is a web-based LDAP client. It provides easy, anywhere-accessible, multi-language administration for your LDAP server.
Its hierarchical tree-viewer and advanced search functionality make it intuitive to browse and administer your LDAP directory. Since it is a web application, this LDAP browser works on many platforms, making your LDAP server easily manageable from any location.
phpLDAPadmin is the perfect LDAP browser for the LDAP professional and novice alike. Its user base consists mostly of LDAP administration professionals.
%prep
%setup
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
find . -type f -name '.cvsignore' -exec rm {} \;
%patch0
%patch1
%build
%install
install -m 755 -d $RPM_BUILD_ROOT%{serverroot}%{name}
cp -dR *.php config hooks htdocs lib locale templates $RPM_BUILD_ROOT%{serverroot}%{name}
touch $RPM_BUILD_ROOT%{serverroot}%{name}/config/config.php
# generate file list
find $RPM_BUILD_ROOT%{serverroot}%{name} -mindepth 1 -maxdepth 1 -type d | sed -e "s@$RPM_BUILD_ROOT@@" > FILELIST
find $RPM_BUILD_ROOT%{serverroot}%{name} -maxdepth 1 -type f | grep -v 'config.inc.php' | sed -e "s@$RPM_BUILD_ROOT@@" >> FILELIST
install -m 644 -D %{SOURCE1} $RPM_BUILD_ROOT/etc/apache2/conf.d/phpldapadmin.conf
%clean
rm -rf $RPM_BUILD_ROOT
%files -f FILELIST
%defattr(-,root,root)
%doc INSTALL LICENSE VERSION
%doc doc/*
%dir %{serverroot}%{name}
%dir /etc/apache2
%dir /etc/apache2/conf.d
%config(noreplace) /etc/apache2/conf.d/phpldapadmin.conf
# we don't need to install config/config.php, but we have to keep it
# in the filelist so that an update doesn't delete it
%ghost %{serverroot}%{name}/config/config.php
%changelog
* Sun May 08 2011 - gerrit.beine@gmx.de
- update to version 1.2.1
* Thu Dec 11 2008 - gerrit.beine@gmx.de
- package created