install in /usr/share and /var/lib

This commit is contained in:
Roland Gruber 2011-06-08 18:12:50 +00:00
parent c9b3eb008a
commit 79751e9a98
3 changed files with 79 additions and 15 deletions

View File

@ -0,0 +1,45 @@
Alias /lam /usr/share/ldap-account-manager
<Directory /usr/share/ldap-account-manager>
Options +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html
</Directory>
<Directory /var/lib/ldap-account-manager/tmp>
Options -Indexes
</Directory>
<Directory /var/lib/ldap-account-manager/sess>
Options -Indexes
Order allow,deny
Deny from all
</Directory>
<Directory /var/lib/ldap-account-manager/config>
Options -Indexes
Order allow,deny
Deny from all
</Directory>
<Directory /usr/share/ldap-account-manager/lib>
Options -Indexes
Order allow,deny
Deny from all
</Directory>
<Directory /usr/share/ldap-account-manager/help>
Options -Indexes
Order allow,deny
Deny from all
</Directory>
<Directory /usr/share/ldap-account-manager/locale>
Options -Indexes
Order allow,deny
Deny from all
</Directory>

View File

@ -1,5 +1,5 @@
%define httpd_rootdir @@HTTP_DIR@@ %define httpd_confdir @@HTTP_CONF_DIR@@
%define lam_dir lam %define lam_dir ldap-account-manager
%define lam_uid @@USER@@ %define lam_uid @@USER@@
%define lam_gid @@GROUP@@ %define lam_gid @@GROUP@@
%define lam_distribution @@DISTRIBUTION@@ %define lam_distribution @@DISTRIBUTION@@
@ -64,26 +64,45 @@ Home-Verzeichnisse verwalten kann.
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{httpd_rootdir}/%{lam_dir} mkdir -p $RPM_BUILD_ROOT/usr/share/%{lam_dir}
cp -dR * $RPM_BUILD_ROOT%{httpd_rootdir}/%{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}
ln -s $RPM_BUILD_ROOT/var/lib/%{lam_dir}/config $RPM_BUILD_ROOT/usr/share/%{lam_dir}/config
mv $RPM_BUILD_ROOT/usr/share/%{lam_dir}/tmp $RPM_BUILD_ROOT/var/lib/%{lam_dir}
ln -s $RPM_BUILD_ROOT/var/lib/%{lam_dir}/tmp $RPM_BUILD_ROOT/usr/share/%{lam_dir}/tmp
mv $RPM_BUILD_ROOT/usr/share/%{lam_dir}/sess $RPM_BUILD_ROOT/var/lib/%{lam_dir}
ln -s $RPM_BUILD_ROOT/var/lib/%{lam_dir}/sess $RPM_BUILD_ROOT/usr/share/%{lam_dir}/sess
cp lam-packaging/RPM/lam.apache.conf %{httpd_confdir}/
%clean %clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT
%post %post
chown %{lam_uid}.%{lam_gid} -R $RPM_BUILD_ROOT%{httpd_rootdir}/%{lam_dir}/config chown %{lam_uid}.%{lam_gid} -R $RPM_BUILD_ROOT/var/lib/%{lam_dir}/config
chown %{lam_uid}.%{lam_gid} -R $RPM_BUILD_ROOT%{httpd_rootdir}/%{lam_dir}/tmp chown %{lam_uid}.%{lam_gid} -R $RPM_BUILD_ROOT/var/lib/%{lam_dir}/tmp
chown %{lam_uid}.%{lam_gid} -R $RPM_BUILD_ROOT%{httpd_rootdir}/%{lam_dir}/sess chown %{lam_uid}.%{lam_gid} -R $RPM_BUILD_ROOT/var/lib/%{lam_dir}/sess
%if %is_suse
/etc/init.d/apache2 restart
%endif
%if %is_fedora
/etc/init.d/httpd restart
%endif
%files %files
%defattr(-, root, root) %defattr(-, root, root)
%doc COPYING HISTORY README docs/* %doc COPYING HISTORY README VERSION docs/*
%config(noreplace) %{httpd_rootdir}/%{lam_dir}/config/profiles/default.* %config(noreplace) /var/lib/%{lam_dir}/config/profiles/default.*
%config(noreplace) %{httpd_rootdir}/%{lam_dir}/config/pdf/default.* %config(noreplace) /var/lib/%{lam_dir}/config/pdf/default.*
%config(noreplace) %{httpd_rootdir}/%{lam_dir}/config/selfService/default.* %config(noreplace) /var/lib/%{lam_dir}/config/selfService/default.*
%{httpd_rootdir}/%{lam_dir} /usr/share/%{lam_dir}
/var/lib/%{lam_dir}
%changelog %changelog
* Wed Jun 08 2011 - Roland Gruber post@rolandgruber.de
- Install into /usr/share/ldap-account-manager
* Sat Apr 09 2011 - Roland Gruber post@rolandgruber.de * Sat Apr 09 2011 - Roland Gruber post@rolandgruber.de
- Do not overwrite config files - Do not overwrite config files
@ -129,6 +148,6 @@ wird auf dem Server installiert, auf dem Quotas und
Heimatverzeichnisse verwaltet werden sollen. Heimatverzeichnisse verwaltet werden sollen.
%files lamdaemon %files lamdaemon
%{httpd_rootdir}/%{lam_dir}/lib/lamdaemon.pl /usr/share/%{lam_dir}/lib/lamdaemon.pl
%doc COPYING HISTORY README VERSION docs/* %doc COPYING HISTORY README VERSION docs/*

View File

@ -105,13 +105,13 @@ cp lam-packaging/RPM/ldap-account-manager.spec lam-packaging/RPM/ldap-account-ma
perl -pi -e "s/\\@\\@DISTRIBUTION\\@\\@/fedora/g" lam-packaging/RPM/ldap-account-manager-fedora.spec perl -pi -e "s/\\@\\@DISTRIBUTION\\@\\@/fedora/g" lam-packaging/RPM/ldap-account-manager-fedora.spec
perl -pi -e "s/\\@\\@USER\\@\\@/apache/g" lam-packaging/RPM/ldap-account-manager-fedora.spec perl -pi -e "s/\\@\\@USER\\@\\@/apache/g" lam-packaging/RPM/ldap-account-manager-fedora.spec
perl -pi -e "s/\\@\\@GROUP\\@\\@/apache/g" lam-packaging/RPM/ldap-account-manager-fedora.spec perl -pi -e "s/\\@\\@GROUP\\@\\@/apache/g" lam-packaging/RPM/ldap-account-manager-fedora.spec
perl -pi -e "s/\\@\\@HTTP_DIR\\@\\@/\\/var\\/www\\/html/g" lam-packaging/RPM/ldap-account-manager-fedora.spec perl -pi -e "s/\\@\\@HTTP_CONF_DIR\\@\\@/\\/etc\\/httpd\\/conf.d/g" lam-packaging/RPM/ldap-account-manager-fedora.spec
cp lam-packaging/RPM/ldap-account-manager.spec lam-packaging/RPM/ldap-account-manager-suse.spec cp lam-packaging/RPM/ldap-account-manager.spec lam-packaging/RPM/ldap-account-manager-suse.spec
perl -pi -e "s/\\@\\@DISTRIBUTION\\@\\@/suse/g" lam-packaging/RPM/ldap-account-manager-suse.spec perl -pi -e "s/\\@\\@DISTRIBUTION\\@\\@/suse/g" lam-packaging/RPM/ldap-account-manager-suse.spec
perl -pi -e "s/\\@\\@USER\\@\\@/wwwrun/g" lam-packaging/RPM/ldap-account-manager-suse.spec perl -pi -e "s/\\@\\@USER\\@\\@/wwwrun/g" lam-packaging/RPM/ldap-account-manager-suse.spec
perl -pi -e "s/\\@\\@GROUP\\@\\@/www/g" lam-packaging/RPM/ldap-account-manager-suse.spec perl -pi -e "s/\\@\\@GROUP\\@\\@/www/g" lam-packaging/RPM/ldap-account-manager-suse.spec
perl -pi -e "s/\\@\\@HTTP_DIR\\@\\@/\\/srv\\/www\\/htdocs/g" lam-packaging/RPM/ldap-account-manager-suse.spec perl -pi -e "s/\\@\\@HTTP_CONF_DIR\\@\\@/\\/etc\\/apache2\\/conf.d/g" lam-packaging/RPM/ldap-account-manager-suse.spec
mkdir RPM mkdir RPM
mkdir LAMPro/RPM mkdir LAMPro/RPM