ldap-account-manager/ldap-account-manager.spec

246 lines
8.1 KiB
RPMSpec
Raw Normal View History

%define serverdir %(apxs -q htdocsdir 2>/dev/null)
# To create a customized installation of bbPress:
# autospec -u magento -a5 \
# -d "installdir=%serverdir/../www.example.com, \
# sitename=example, \
# adminmail=webmaster@example.com"
%if "%{?installdir}" == ""
%define installdir %{serverdir}/lam
%endif
%if "%{?sitename}" != ""
%if "%{?servername}" == ""
%define servername %(basename %installdir 2>/dev/null)
%endif
%define serverlogdir %(apxs -q logfiledir 2>/dev/null)
%else
%if "%{?aliasdir}" == ""
%define aliasdir /lam
%endif
%endif
#% define rcver_append .RC1
Name: ldap-account-manager
Version: 3.9
Release: 2mamba
Summary: A webfrontend for managing accounts stored in an openLDAP server.
Group: Applications/Web
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://lam.sourceforge.net/
Source: http://downloads.sourceforge.net/sourceforge/lam/ldap-account-manager-%{version}%{?rcver_append}.tar.gz
Patch0: %{name}-3.3.0-installdirs.patch
Patch1: %{name}-3.3.0-sync_ldap_names_with_smbldaptools.patch
Patch2: %{name}-3.3.0-default_user_profile.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: perl-devel
## AUTOBUILDREQ-END
BuildRequires: apache
Requires: apache >= 2.0.48
Requires(post):apache-mod_php
Requires(post):openldap-server
Requires: php >= 4.3.6
Requires: php-ldap >= 4.3.6
#Requires: ldap-scripts
Provides: lam
Obsoletes: lam
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch: noarch
%description
LDAP Account Manager (LAM) is a webfrontend for managing accounts stored in an openLDAP server.
Features:
- management of Unix user and group accounts (posixAccount/posixGroup)
- management of Samba 2.x/3 user and host accounts (sambaAccount/sambaSamAccount)
- profiles for account creation
- editor for organizational units (OU)
- account creation via file upload
- automatic creation/deletion of home directories
- setting quotas
- support for LDAP+SSL
- multi-language support (English, French, German, Hungarian, Japanese)
- multiple configuration files
- PDF output for user/group/host accounts
- additional text for user PDFs
- supports multiple password hashes
%prep
%setup -q -n ldap-account-manager-%{version}%{?rcver_append}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%configure \
--sysconfdir=%{_sysconfdir}/lam \
--localstatedir=%{_localstatedir}/lam \
--htmldir=%{_docdir}/html/lam \
--with-httpd-user=httpd \
--with-httpd-group=nobody \
--with-web-root=%{installdir}
%make
%install
%makeinstall
#mkdir -p %{buildroot}/var/www/html/lam
#install -m 0644 index.html %{buildroot}/var/www/html/lam
#cp -R config lib sess tmp graphics locale style help templates %{buildroot}/var/www/html/lam
mv %{buildroot}%{_sysconfdir}/lam/config.cfg_sample %{buildroot}%{_sysconfdir}/lam/config.cfg
mv %{buildroot}%{_sysconfdir}/lam/lam.conf_sample %{buildroot}%{_sysconfdir}/lam/lam.conf
mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/lam.desktop << EOF
[Desktop Entry]
Name=LDAP Account Manager
Comment=LDAP Account Manager
Exec=konqueror http://localhost/lam
Type=Application
Terminal=0
Icon=personal
Categories=Application;System;
EOF
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
if [ $1 -eq 1 ]; then
# new install
[ -e %{_sysconfdir}/openldap/slapd.conf ] && {
eval suffix=`grep ^suffix %{_sysconfdir}/openldap/slapd.conf | awk '{ print $2 }'`
eval rootdn=`grep ^rootdn %{_sysconfdir}/openldap/slapd.conf | awk '{ print $2 }'`
}
[ "$suffix" -a "$rootdn" ] && {
sed -i "s|cn=Manager,dc=my-domain,dc=com|$rootdn|
s|#treesuffix: dc=yourdomain,dc=org|treesuffix: $suffix|
s|dc=my-domain,dc=com|$suffix|" \
%{_sysconfdir}/lam/lam.conf
}
# RANDOM_PASSWD=`%{_bindir}/mkpasswd -l 8 -s 0`
# sed -i "s|^passwd: lam|passwd: $RANDOM_PASSWD|" \
# %{_localstatedir}/www/html/lam/config/lam.conf
fi
:
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/lam
%config(noreplace) %{_sysconfdir}/lam/config.cfg
%config(noreplace) %{_sysconfdir}/lam/lam.conf
%dir %{_sysconfdir}/lam/selfService
%{_sysconfdir}/lam/selfService/.htaccess
%{_sysconfdir}/lam/selfService/*
%dir %{_sysconfdir}/lam/language
%dir %{_sysconfdir}/lam/pdf
%{_sysconfdir}/lam/pdf/.htaccess
%{_sysconfdir}/lam/pdf/*
%attr(0755,apache,apache) %dir %{_sysconfdir}/lam/profiles
%{_sysconfdir}/lam/profiles/.htaccess
%config(noreplace) %attr(0755,apache,apache) %{_sysconfdir}/lam/profiles/*
%dir %{_sysconfdir}/lam/shells
%{_sysconfdir}/lam/.htaccess
#%{_sysconfdir}/lam/passwordMailTemplate.txt
%dir %attr(0755,apache,apache) %{installdir}
%{installdir}/index.html
%{installdir}/config
%dir %attr(0755,apache,apache) %{installdir}/lib
%{installdir}/lib/.htaccess
%{installdir}/lib/*
%dir %attr(0755,apache,apache) %{installdir}/graphics
%{installdir}/graphics/.htaccess
%{installdir}/graphics/*
%dir %attr(0755,apache,apache) %{installdir}/help
%{installdir}/help/.htaccess
%{installdir}/help/*
%dir %attr(0755,apache,apache) %{installdir}/locale
%{installdir}/locale/.htaccess
%{installdir}/locale/*/LC_MESSAGES/messages.*
%{installdir}/sess
%dir %attr(0755,apache,apache) %{installdir}/style
%{installdir}/style/.htaccess
%{installdir}/style/*
%dir %attr(0755,apache,apache) %{installdir}/templates
%{installdir}/templates/.htaccess
%{installdir}/templates/*
%{installdir}/tmp
%{installdir}/VERSION
%{_datadir}/applications/lam.desktop
%attr(0750,apache,nobody) %{_localstatedir}/lam/sess
%attr(0750,apache,nobody) %{_localstatedir}/lam/tmp
%dir %{_docdir}/html/lam
%{_docdir}/html/lam/*
%doc COPYING
#HISTORY README
%changelog
* Wed Feb 06 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 3.9-2mamba
- fix apxs path
* Fri Oct 12 2012 Automatic Build System <autodist@mambasoft.it> 3.9-1mamba
- automatic version update by autodist
* Thu Aug 16 2012 Automatic Build System <autodist@mambasoft.it> 3.8-1mamba
- automatic version update by autodist
* Sat Jul 07 2012 Automatic Build System <autodist@mambasoft.it> 3.7-1mamba
- automatic version update by autodist
* Mon Apr 11 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.0-4mamba
- modify defaul user profile to comply with smaba and smbldap-tools configuration
- set /etc/lam/profiles permission to allow profile settings modification from web interface
* Tue Mar 15 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.0-3mamba
- renamed from lam to ldap-account-manager
- install using provided configure/make
* Thu Mar 10 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.0-2mamba
- added requirement for apache-mod_php
* Thu Feb 17 2011 Automatic Build System <autodist@mambasoft.it> 3.3.0-1mamba
- automatic update by autodist
* Mon Nov 08 2010 Automatic Build System <autodist@mambasoft.it> 3.2.0-1mamba
- automatic update by autodist
* Mon Aug 09 2010 Automatic Build System <autodist@mambasoft.it> 3.1.0-1mamba
- automatic update by autodist
* Thu May 13 2010 Automatic Build System <autodist@mambasoft.it> 3.0.0-1mamba
- automatic update by autodist
* Wed Jul 01 2009 Automatic Build System <autodist@mambasoft.it> 2.6.0-1mamba
- automatic update by autodist
* Sun Mar 15 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.0-1mamba
- automatic update by autodist
* Tue Dec 02 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.0-1mamba
- update to 2.4.0
* Thu Jan 17 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.0-1mamba
- update to 2.2.0
- removed uppercase patch (note: needs to be rechecked)
- build as noarch
* Wed Jul 14 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.6-3qilnx
- added a patch to make general_dn check case insensitive
* Tue Jul 13 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.6-2qilnx
- changed defaults for lam.conf
* Fri Jul 02 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.6-1qilnx
- new version build
* Tue May 25 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.5-2qilnx
- added KDE menu entry
- fixed lam.conf with QiLinux default limits for UID and GID
* Wed May 06 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.5-1qilnx
- first build