[packages/w3pw] move webserver configs to separate file

glen glen at pld-linux.org
Sun Nov 16 13:20:56 CET 2014


commit 53cf875a7796eee25bb99300c73f22eeef024963
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Nov 16 14:20:03 2014 +0200

    move webserver configs to separate file

 apache.conf   |  4 ++++
 lighttpd.conf |  3 +++
 w3pw.spec     | 27 ++++++++-------------------
 3 files changed, 15 insertions(+), 19 deletions(-)
---
diff --git a/w3pw.spec b/w3pw.spec
index 7aa1c3c..e247eb6 100644
--- a/w3pw.spec
+++ b/w3pw.spec
@@ -3,11 +3,13 @@
 Summary:	Web-based password wallet manager
 Name:		w3pw
 Version:	1.40
-Release:	0.10
+Release:	0.11
 License:	GPL v2
 Group:		Applications/WWW
 Source0:	http://downloads.sourceforge.net/project/w3pw/w3pw/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	df718531136f3314b8582fbdd4e80791
+Source1:	apache.conf
+Source2:	lighttpd.conf
 URL:		http://w3pw.sourceforge.net/
 BuildRequires:	rpm-php-pearprov >= 4.4.2-11
 BuildRequires:	rpmbuild(macros) >= 1.268
@@ -51,19 +53,6 @@ Features:
 %prep
 %setup -q
 
-cat > apache.conf <<'EOF'
-Alias /%{name} %{_appdir}/htdocs
-<Directory %{_appdir}/htdocs>
-	Allow from all
-</Directory>
-EOF
-
-cat > lighttpd.conf <<'EOF'
-alias.url += (
-    "/%{name}" => "%{_appdir}/htdocs",
-)
-EOF
-
 # simple sql to create and load db schema
 cat << 'EOF' > init.sql
 CREATE DATABASE w3pw;
@@ -92,13 +81,13 @@ EOF
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{htdocs,sql}}
-cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
-cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
-cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
+cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
 
-cp -a *.html *.php $RPM_BUILD_ROOT%{_appdir}/htdocs
 cp -a include $RPM_BUILD_ROOT%{_appdir}
-cp -a *.sql $RPM_BUILD_ROOT%{_appdir}/sql
+cp -p *.html *.php $RPM_BUILD_ROOT%{_appdir}/htdocs
+cp -p *.sql $RPM_BUILD_ROOT%{_appdir}/sql
 mv $RPM_BUILD_ROOT{%{_appdir}/include,%{_sysconfdir}}/config.php
 
 %triggerin -- apache1 < 1.3.37-3, apache1-base
diff --git a/apache.conf b/apache.conf
new file mode 100644
index 0000000..cf906f8
--- /dev/null
+++ b/apache.conf
@@ -0,0 +1,4 @@
+Alias /w3pw /usr/share/w3pw/htdocs
+<Directory /usr/share/w3pw/htdocs>
+	Allow from all
+</Directory>
diff --git a/lighttpd.conf b/lighttpd.conf
new file mode 100644
index 0000000..c523b6c
--- /dev/null
+++ b/lighttpd.conf
@@ -0,0 +1,3 @@
+alias.url += (
+    "/w3pw" => "/usr/share/w3pw/htdocs",
+)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/w3pw.git/commitdiff/42a96959fb6cc3cef2469cb175c9a977e4830df0



More information about the pld-cvs-commit mailing list