LDAPAccountManager/lam-packaging/RPM/ldap-account-manager.spec

212 lines
7.5 KiB
Plaintext
Raw Normal View History

2011-06-08 18:12:50 +00:00
%define httpd_confdir @@HTTP_CONF_DIR@@
%define lam_dir ldap-account-manager
2008-07-29 18:29:24 +00:00
%define lam_uid @@USER@@
%define lam_gid @@GROUP@@
2008-08-03 19:07:41 +00:00
%define lam_distribution @@DISTRIBUTION@@
%define is_suse %(test suse = %lam_distribution && echo 1 || echo 0)
%define is_fedora %(test fedora = %lam_distribution && echo 1 || echo 0)
2010-03-27 11:24:18 +00:00
%define _binary_payload w9.bzdio
%define _source_payload w9.bzdio
2006-01-20 15:49:20 +00:00
Name: ldap-account-manager
License: GPL
Group: Productivity/Networking/Web/Frontends
Version: @@VERSION@@
2008-08-10 12:15:24 +00:00
Release: 0.%lam_distribution.1
2013-07-23 18:29:53 +00:00
Source0: ldap-account-manager-%{version}.tar.bz2
2013-05-12 08:51:34 +00:00
URL: https://www.ldap-account-manager.org/
2006-01-20 15:49:20 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Summary: Administration of LDAP users, groups and hosts via Web GUI
2008-08-10 12:15:24 +00:00
Summary(de): Administration von Benutzern, Gruppen und Hosts für LDAP-Server
2008-07-29 18:29:24 +00:00
Vendor: Roland Gruber
Packager: Roland Gruber <post@rolandgruber.de>
2006-01-20 15:49:20 +00:00
BuildArchitectures: noarch
2008-08-03 18:08:27 +00:00
AutoReqProv: no
2008-08-03 19:02:21 +00:00
%if %is_suse
2008-08-10 12:15:24 +00:00
Requires: php5
2011-03-24 21:05:14 +00:00
Requires: php5-ldap
Requires: php5-hash
Requires: php5-gd
2011-03-26 12:34:33 +00:00
Requires: php5-gettext
2008-08-10 12:15:24 +00:00
Requires: perl
%endif
%if %is_fedora
2008-08-10 14:08:21 +00:00
Requires: php
Requires: perl
2008-08-03 18:08:27 +00:00
%endif
2006-01-20 15:49:20 +00:00
2008-07-29 18:29:24 +00:00
2006-01-20 15:49:20 +00:00
%description
2008-08-10 12:15:24 +00:00
LDAP Account Manager (LAM) runs on an existing webserver.
It manages user, group and host accounts. Currently LAM supports
2014-09-15 16:11:05 +00:00
these account types: Samba 3/4, Unix, Kolab 2/3, address book
2010-02-16 19:18:33 +00:00
entries, NIS mail aliases and MAC addresses. There is an integrated LDAP browser
to allow access to the raw LDAP attributes. You
2008-08-10 12:15:24 +00:00
can use templates for account creation and use multiple configuration
profiles. Account information can be exported as PDF file. There is also
a script included which manages quota and homedirectories.
%description -l de
LDAP Account Manager (LAM) läuft auf einem exisierenden Webserver.
LAM verwaltet Benutzer, Gruppen und Hosts. Zur Zeit werden folgende Account-Typen
2014-09-15 16:11:05 +00:00
unterstützt: Samba 3/4, Unix, Kolab 2/3, Addressbuch Einträge, NIS
2010-02-16 19:18:33 +00:00
mail Aliase und MAC-Addressen. Es gibt einen integrierten LDAP-Browser mit dem
man die LDAP-Einträge direkt bearbeiten kann. Zum Anlegen von Accounts können
2008-08-10 12:15:24 +00:00
Vorlagen definiert werden. Es können mehrere Konfigurations-Profile
definiert werden. Account-Informationen können als PDF exportiert
werden. Außerdem exisitiert ein Script mit dem man Quotas und
Home-Verzeichnisse verwalten kann.
2006-01-20 15:49:20 +00:00
%prep
2011-06-11 13:05:48 +00:00
pwd
2011-06-11 13:12:34 +00:00
cp $RPM_SOURCE_DIR/lam.apache.conf $RPM_BUILD_DIR/
2014-07-27 17:48:59 +00:00
cp $RPM_SOURCE_DIR/lam.nginx.conf $RPM_BUILD_DIR/
2006-01-20 15:49:20 +00:00
%setup -n ldap-account-manager-%{version}
%build
%install
rm -rf $RPM_BUILD_ROOT
2011-06-08 18:12:50 +00:00
mkdir -p $RPM_BUILD_ROOT/usr/share/%{lam_dir}
cp -dR * $RPM_BUILD_ROOT/usr/share/%{lam_dir}
mkdir -p $RPM_BUILD_ROOT/var/lib/%{lam_dir}
mv $RPM_BUILD_ROOT/usr/share/%{lam_dir}/config $RPM_BUILD_ROOT/var/lib/%{lam_dir}
2011-06-11 13:28:38 +00:00
ln -s /var/lib/%{lam_dir}/config $RPM_BUILD_ROOT/usr/share/%{lam_dir}/config
2012-10-28 19:47:46 +00:00
mkdir -p $RPM_BUILD_ROOT/var/lib/%{lam_dir}/config/pdf
mkdir -p $RPM_BUILD_ROOT/var/lib/%{lam_dir}/config/profiles
2011-06-08 18:12:50 +00:00
mv $RPM_BUILD_ROOT/usr/share/%{lam_dir}/tmp $RPM_BUILD_ROOT/var/lib/%{lam_dir}
2011-06-11 13:28:38 +00:00
ln -s /var/lib/%{lam_dir}/tmp $RPM_BUILD_ROOT/usr/share/%{lam_dir}/tmp
2011-06-08 18:12:50 +00:00
mv $RPM_BUILD_ROOT/usr/share/%{lam_dir}/sess $RPM_BUILD_ROOT/var/lib/%{lam_dir}
2011-06-11 13:28:38 +00:00
ln -s /var/lib/%{lam_dir}/sess $RPM_BUILD_ROOT/usr/share/%{lam_dir}/sess
2011-06-11 13:15:20 +00:00
mkdir -p $RPM_BUILD_ROOT%{httpd_confdir}
2011-06-11 13:12:34 +00:00
cp $RPM_BUILD_DIR/lam.apache.conf $RPM_BUILD_ROOT%{httpd_confdir}/
2014-07-27 17:48:59 +00:00
mkdir -p $RPM_BUILD_ROOT/etc/%{lam_dir}
cp $RPM_BUILD_DIR/lam.nginx.conf $RPM_BUILD_ROOT/etc/%{lam_dir}/
2006-01-20 15:49:20 +00:00
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT
%post
2011-06-11 17:57:00 +00:00
if [ ! -f /var/lib/%{lam_dir}/config/config.cfg ]; then
2014-07-12 14:24:05 +00:00
cp /var/lib/%{lam_dir}/config/config.cfg.sample /var/lib/%{lam_dir}/config/config.cfg
2011-06-11 17:57:00 +00:00
chmod 600 /var/lib/%{lam_dir}/config/config.cfg
chown %{lam_uid}:%{lam_gid} /var/lib/%{lam_dir}/config/config.cfg
2011-06-11 18:35:22 +00:00
if [ ! -f /var/lib/%{lam_dir}/config/lam.conf ]; then
2014-07-12 14:24:05 +00:00
cp /var/lib/%{lam_dir}/config/lam.conf.sample /var/lib/%{lam_dir}/config/lam.conf
chmod 600 /var/lib/%{lam_dir}/config/lam.conf
chown %{lam_uid}:%{lam_gid} /var/lib/%{lam_dir}/config/lam.conf
2011-06-11 18:35:22 +00:00
fi
2011-06-11 17:57:00 +00:00
fi
2011-06-08 18:12:50 +00:00
%if %is_suse
2013-11-10 10:06:22 +00:00
/usr/sbin/a2enmod version > /dev/null
2012-10-07 10:19:17 +00:00
/etc/init.d/apache2 reload
2011-06-08 18:12:50 +00:00
%endif
%if %is_fedora
2013-11-09 13:27:20 +00:00
if [ -e /etc/init.d/httpd ]; then
/etc/init.d/httpd reload
else
/bin/systemctl reload httpd.service
fi
2011-06-08 18:12:50 +00:00
%endif
%postun
%if %is_suse
2012-10-07 10:19:17 +00:00
/etc/init.d/apache2 reload
%endif
%if %is_fedora
2013-11-09 13:27:20 +00:00
if [ -e /etc/init.d/httpd ]; then
/etc/init.d/httpd reload
else
/bin/systemctl reload httpd.service
fi
%endif
2006-01-20 15:49:20 +00:00
%files
%defattr(-, root, root)
2011-06-12 19:11:04 +00:00
%dir %attr(700, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}
2011-06-08 18:12:50 +00:00
%doc COPYING HISTORY README VERSION docs/*
2011-06-13 15:05:16 +00:00
%attr(700, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}/sess
%attr(700, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}/tmp
2011-06-13 14:35:21 +00:00
%dir %attr(700, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}/config
2012-10-28 18:54:50 +00:00
%dir %attr(700, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}/config/templates/pdf
%dir %attr(700, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}/config/templates/profiles
2011-06-13 14:45:44 +00:00
%dir %attr(700, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}/config/selfService
2014-07-12 14:24:05 +00:00
/var/lib/%{lam_dir}/config/*.sample
2011-06-11 13:41:18 +00:00
/var/lib/%{lam_dir}/config/.htaccess
2013-01-05 15:43:03 +00:00
/var/lib/%{lam_dir}/config/pdf/.htaccess
/var/lib/%{lam_dir}/config/profiles/.htaccess
2011-06-11 13:41:18 +00:00
/var/lib/%{lam_dir}/config/language
2012-10-28 19:38:38 +00:00
%dir %attr(700, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}/config/pdf
%dir %attr(700, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}/config/profiles
2012-10-28 18:54:50 +00:00
/var/lib/%{lam_dir}/config/templates/pdf/.htaccess
%attr(-, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}/config/templates/pdf/logos
/var/lib/%{lam_dir}/config/templates/profiles/.htaccess
2011-06-11 13:41:18 +00:00
/var/lib/%{lam_dir}/config/selfService/.htaccess
2012-10-28 18:54:50 +00:00
%config(noreplace) %attr(-, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}/config/templates/pdf/default.*
%config(noreplace) %attr(-, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}/config/templates/profiles/default.*
2011-06-12 19:01:36 +00:00
%config(noreplace) %attr(-, %{lam_uid}, %{lam_gid}) /var/lib/%{lam_dir}/config/selfService/default.*
2011-06-08 18:12:50 +00:00
/usr/share/%{lam_dir}
2011-06-11 13:41:18 +00:00
%{httpd_confdir}
2014-09-15 16:06:51 +00:00
/etc/%{lam_dir}/lam.nginx.conf
2006-01-20 15:49:20 +00:00
2008-07-27 13:39:22 +00:00
%changelog
2012-10-28 18:54:50 +00:00
* Sun Oct 28 2012 - Roland Gruber post@rolandgruber.de
- Config file changes
2012-10-07 10:19:17 +00:00
* Sun Oct 07 2012 - Roland Gruber post@rolandgruber.de
- Apache reload instead of restart
2011-06-08 18:12:50 +00:00
* Wed Jun 08 2011 - Roland Gruber post@rolandgruber.de
- Install into /usr/share/ldap-account-manager
2011-04-09 16:33:37 +00:00
* Sat Apr 09 2011 - Roland Gruber post@rolandgruber.de
- Do not overwrite config files
2009-11-07 18:38:19 +00:00
* Sat Nov 07 2009 - Roland Gruber post@rolandgruber.de
- Added LAM manuals
2008-07-27 13:39:22 +00:00
* Sat Jul 26 2008 - Roland Gruber post@rolandgruber.de
- Added subpackage for lamdaemon
2006-01-20 15:49:20 +00:00
* Wed Jan 11 2006 - Iain Lea iain@bricbrac.de
- Updated for 1.0 series on Fedora Core
* Mon Dec 12 2005 - Iain Lea iain@bricbrac.de
- Updated for 0.5.x series on Fedora Core
* Sun Mar 21 2004 - TiloLutz@gmx.de
- Initial release 0.1.0 - 0.4.5
2008-07-27 13:39:22 +00:00
%package lamdaemon
Summary: Quota and home directory management for LDAP Account Manager
2008-08-10 12:15:24 +00:00
Summary(de): Verwaltung von Quotas und Heimatverzeichnissen für LDAP Account Manager
2008-07-27 13:39:22 +00:00
Group: Productivity/Networking/Web/Frontends
2008-08-10 12:15:24 +00:00
AutoReqProv: no
%if %is_suse
Requires: perl
Requires: sudo
%endif
%if %is_fedora
2008-08-10 14:08:21 +00:00
Requires: perl
Requires: sudo
2008-08-10 12:15:24 +00:00
%endif
2008-07-27 13:39:22 +00:00
%description lamdaemon
Lamdaemon is part of LDAP Account Manager. This package
needs to be installed on the server where the home directories
reside and/or quotas should be managed.
2008-08-10 12:15:24 +00:00
%description lamdaemon -l de
Lamdaemon ist Teil von LDAP Account Manager. Dieses Paket
wird auf dem Server installiert, auf dem Quotas und
Heimatverzeichnisse verwaltet werden sollen.
2008-07-27 13:39:22 +00:00
%files lamdaemon
2011-06-13 14:38:43 +00:00
%dir /usr/share/%{lam_dir}
%dir /usr/share/%{lam_dir}/lib
2011-06-08 18:12:50 +00:00
/usr/share/%{lam_dir}/lib/lamdaemon.pl
2013-04-24 18:30:44 +00:00
%doc COPYING HISTORY README VERSION
2008-07-27 13:39:22 +00:00