%define apacheuser apache %define apachegroup apache %define oleversion 0.0.0 Summary: Web Based LDAP Administration Program Name: gosa Version: 2.5.14 Release: 11 License: GPL Group: System/Configuration/Other URL: https://gosa.gonicus.de Source: ftp://oss.GONICUS.de/pub/gosa/beta/%{name}-%{version}.tar.bz2 Source1: gosa.conf.mdv Source2: README.urpmi # http://www.bettina-attack.de/jonny/view.php/projects/php_ole/ Source3: php_ole-%{oleversion}.tar.bz2 Requires: apache-mod_php Requires: apache-mod_socache_shmcb Requires: php-ldap Requires: php-imap Requires: php-mbstring Requires: php-mysql Requires: php-xml Requires: php-gd Requires: php-snmp Requires: php-iconv Requires: php-cups Requires: fping Requires: imagemagick Requires: smbldap-tools BuildArch: noarch %description GOsa is a combination of system-administrator and end-user web interface, designed to handle LDAP based setups. Provided is access to posix, shadow, samba, proxy, fax, and kerberos accounts. It is able to manage the postfix/cyrus server combination and can write user adapted sieve scripts. Access GOsa at http://localhost/gosa/ %package schema Group: System/Configuration/Other Summary: Schema Definitions for the GOSA package Requires: openldap-servers openldap-clients %description schema Contains the Schema definition files for the GOSA admin package. %prep %setup -q -a 3 find . -depth -name CVS -type d | xargs rm -rf cp %{SOURCE2} . %build %install mkdir -p %{buildroot}%{_datadir}/%{name} # (sb) seems broken - bad path to includes sed -i 's|Excel/||g' include/php_writeexcel/class.excel.php # (sb) copy the missing includes from SOURCE3 and rename docs cp php_ole-%{oleversion}/*.php include/php_writeexcel for i in README HOMEPAGE LICENSE; do \ mv php_ole-%{oleversion}/$i $i.php_ole; \ done DIRS="ihtml plugins html include locale" for i in $DIRS; do \ cp -ua $i %{buildroot}%{_datadir}/%{name}/$i ; \ done # (sb) make rpmlint happier find doc -type f | xargs chmod -x # (sb) error during setup if this isn't found mkdir -p %{buildroot}%{_datadir}/%{name}/contrib cp -a contrib/gosa.conf %{buildroot}%{_datadir}/%{name}/contrib # (sb) used by smarty compile mkdir -p %{buildroot}/var/spool/gosa # Copy default config mkdir -p %{buildroot}%{_sysconfdir}/%{name} install -m 640 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf mkdir -p %{buildroot}%{_webappconfdir} cat > %{buildroot}%{_webappconfdir}/%{name}.conf < Require host 127.0.0.1 ErrorDocument 403 "Access denied per %{_webappconfdir}/%{name}.conf" EOF mkdir -p %{buildroot}%{_datadir}/openldap/schema/%{name} mv contrib/openldap/*.schema %{buildroot}%{_datadir}/openldap/schema/%{name} cat > %{buildroot}%{_datadir}/openldap/schema/%{name}/%{name}-core.schema < %{buildroot}%{_datadir}/openldap/schema/%{name}/example.ldif < %{buildroot}%{_datadir}/openldap/schema/%{name}/%{name}.ldif <> /etc/openldap/schema/local.schema if [ -f /var/lock/subsys/ldap ]; then /etc/rc.d/init.d/ldap restart 1>&2; fi %postun schema sed -i "s|^include %{_datadir}/openldap/schema/%{name}/%{name}-core.schema||" %{_sysconfdir}/openldap/schema/local.schema if [ "$1" = "0" ]; then if [ -f /var/lock/subsys/ldap ]; then /etc/rc.d/init.d/ldap restart 1>&2 fi fi %clean %files %doc AUTHORS README README.urpmi %doc Changelog COPYING INSTALL FAQ doc/* #%doc contrib/altlinux contrib/fix_config.sh #%doc contrib/mysql contrib/opensides contrib/patches %doc contrib/scripts contrib/vacation_example.txt %doc *.php_ole %config(noreplace) %{_webappconfdir}/%{name}.conf %attr(0750, %{apacheuser}, %{apachegroup}) %dir /var/spool/%{name} %{_datadir}/%{name} %dir %{_sysconfdir}/%{name} %attr(0640, root, %{apachegroup}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf %files schema %doc COPYING AUTHORS README README.urpmi %doc contrib/demo.ldif contrib/openldap/slapd.conf %dir %{_datadir}/openldap/schema/%{name} %{_datadir}/openldap/schema/%{name}/*