From 53455a7d0d9684d7fe940b63caf07201e2b78792 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 20 May 2014 02:17:35 +0000 Subject: [PATCH] added the sample httpd/dav config file to the spec file --- codepot/README | 7 ++++--- codepot/codepot.spec.in | 9 ++++++++- codepot/etc/Makefile.am | 8 +------- codepot/etc/Makefile.in | 26 ++++++++------------------ 4 files changed, 21 insertions(+), 29 deletions(-) diff --git a/codepot/README b/codepot/README index b5ea3f60..03d98ae6 100644 --- a/codepot/README +++ b/codepot/README @@ -22,6 +22,7 @@ INSTALLATION * Initialize the mysql database using /etc/codepot/codepot.mysql. * Configure /etc/httpd/conf.d/codepot.conf * Configure /etc/codepot/codepot.ini + * Restart httpd Here is how to install Codepot into the standard locations under Ubuntu Linux. @@ -59,12 +60,12 @@ INSTALLATION $ mkdir -p /var/lib/codepot/svnrepo /var/lib/codepot/files $ mkdir -p /var/cache/codepot /var/log/codepot - * Customize CFGDIR/codepot.ini based on CFGDIR/codepot.ini-dist. + * Customize CFGDIR/codepot.ini * Initialize database using CFGDIR/codepot.mysql - * Configure apache web server ahthentication for subversion webdav access - using CFGDIR/codepot.a2ldap or CFGDIR/codepot.a2mysql + * Configure apache web server authentication for subversion webdav access + based on CFGDIR/codepot.httpd * To enable SSL $ sudo a2enmod ssl diff --git a/codepot/codepot.spec.in b/codepot/codepot.spec.in index 836177a6..3e813bcf 100644 --- a/codepot/codepot.spec.in +++ b/codepot/codepot.spec.in @@ -44,9 +44,9 @@ rm -rf $RPM_BUILD_ROOT /usr/sbin/codepot-user %config(noreplace) /etc/codepot/codepot.ini -%config(noreplace) /etc/httpd/conf.d/codepot.conf /etc/codepot/codepot.mysql /etc/codepot/codepot.a2ldap +/etc/codepot/codepot.httpd /etc/codepot/start-commit /etc/codepot/pre-commit /etc/codepot/post-commit @@ -70,10 +70,17 @@ rm -rf $RPM_BUILD_ROOT exit 0 %post +[ $1 -eq 0 ] && { + # install the httpd configuration file for the first installation + install -D -m 0644 %{_sysconfdir}/codepot/codepot.httpd %{_sysconfdir}/httpd/conf.d/codepot.conf +} exit 0 %preun exit 0 %postun +[ $1 -eq 0 ] && { + rm -f %{_sysconfdir}/httpd/conf.d/codepot.conf +} exit 0 diff --git a/codepot/etc/Makefile.am b/codepot/etc/Makefile.am index 64b15053..965e53d6 100644 --- a/codepot/etc/Makefile.am +++ b/codepot/etc/Makefile.am @@ -1,6 +1,6 @@ cfgdir=$(CFGDIR) -cfg_DATA = codepot.ini codepot.mysql codepot.a2ldap +cfg_DATA = codepot.ini codepot.mysql codepot.a2ldap codepot.httpd cfg_SCRIPTS = start-commit pre-commit post-commit pre-revprop-change post-revprop-change perldir=$(CFGDIR)/perl/Codepot @@ -8,9 +8,3 @@ perl_SCRIPTS=perl/Codepot/AccessHandler.pm perl/Codepot/AuthenHandler.pm EXTRA_DIST = $(cfg_DATA) $(cfg_SCRIPTS) $(perl_SCRIPTS) - -install-data-hook: - $(INSTALL) -D -m 0644 "@abs_top_builddir@/etc/codepot.httpd" "$(DESTDIR)@sysconfdir@/httpd/conf.d/codepot.conf" - -uninstall-hook: - $(RM) -f "$(DESTDIR)@sysconfdir@/httpd/conf.d/codepot.conf" diff --git a/codepot/etc/Makefile.in b/codepot/etc/Makefile.in index c7887d12..709e5b84 100644 --- a/codepot/etc/Makefile.in +++ b/codepot/etc/Makefile.in @@ -150,7 +150,7 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ wwwdir = @wwwdir@ -cfg_DATA = codepot.ini codepot.mysql codepot.a2ldap +cfg_DATA = codepot.ini codepot.mysql codepot.a2ldap codepot.httpd cfg_SCRIPTS = start-commit pre-commit post-commit pre-revprop-change post-revprop-change perldir = $(CFGDIR)/perl/Codepot perl_SCRIPTS = perl/Codepot/AccessHandler.pm perl/Codepot/AuthenHandler.pm @@ -343,8 +343,6 @@ info-am: install-data-am: install-cfgDATA install-cfgSCRIPTS \ install-perlSCRIPTS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-exec-am: @@ -372,26 +370,18 @@ ps-am: uninstall-am: uninstall-cfgDATA uninstall-cfgSCRIPTS uninstall-info-am \ uninstall-perlSCRIPTS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-cfgDATA install-cfgSCRIPTS \ - install-data install-data-am install-data-hook install-exec \ - install-exec-am install-info install-info-am install-man \ - install-perlSCRIPTS install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ - uninstall-am uninstall-cfgDATA uninstall-cfgSCRIPTS \ - uninstall-hook uninstall-info-am uninstall-perlSCRIPTS + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-perlSCRIPTS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-cfgDATA uninstall-cfgSCRIPTS uninstall-info-am \ + uninstall-perlSCRIPTS - -install-data-hook: - $(INSTALL) -D -m 0644 "@abs_top_builddir@/etc/codepot.httpd" "$(DESTDIR)@sysconfdir@/httpd/conf.d/codepot.conf" - -uninstall-hook: - $(RM) -f "$(DESTDIR)@sysconfdir@/httpd/conf.d/codepot.conf" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: