[packages/occ] keep webserver configs as files
glen
glen at pld-linux.org
Sun Sep 25 01:12:46 CEST 2016
commit 22f42dc6b0e034495c509299c5a505a559cca4e2
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Sep 25 02:12:07 2016 +0300
keep webserver configs as files
it's easier to update back/forth from existing system
apache.conf | 12 ++++++++++++
lighttpd.conf | 3 +++
occ.spec | 29 +++++------------------------
3 files changed, 20 insertions(+), 24 deletions(-)
---
diff --git a/occ.spec b/occ.spec
index 26b7a69..2f663e5 100644
--- a/occ.spec
+++ b/occ.spec
@@ -8,6 +8,8 @@ License: GPL v2
Group: Applications/WWW
Source0: http://downloads.sourceforge.net/lgames/%{name}-%{version}.tar.gz
# Source0-md5: e0db96d6b867eded1c6c8a00b30fd50d
+Source1: apache.conf
+Source2: lighttpd.conf
Patch0: %{name}-datadir.patch
URL: http://lgames.sourceforge.net/OCC/
BuildRequires: rpmbuild(macros) >= 1.268
@@ -57,27 +59,6 @@ celu przeanalizowania dowolnym narzędziem, np. Fritzem.
%setup -q
%patch0 -p1
-cat > apache.conf <<'EOF'
-Alias /%{name} %{_appdir}
-<Directory %{_appdir}>
- # Apache 2.x
- <IfModule !mod_authz_core.c>
- Order allow,deny
- Allow from all
- </IfModule>
- # Apache 2.4
- <IfModule mod_authz_core.c>
- Require all granted
- </IfModule>
-</Directory>
-EOF
-
-cat > lighttpd.conf <<'EOF'
-alias.url += (
- "/%{name}" => "%{_appdir}",
-)
-EOF
-
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},/var/lib/%{name}}
@@ -85,9 +66,9 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},/var/lib/%{name}}
cp -a images *.php *.js $RPM_BUILD_ROOT%{_appdir}
cp -a occ-data tmp $RPM_BUILD_ROOT/var/lib/%{name}
-cp -p apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
-cp -p apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
-cp -p lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
%clean
rm -rf $RPM_BUILD_ROOT
diff --git a/apache.conf b/apache.conf
new file mode 100644
index 0000000..4c218cb
--- /dev/null
+++ b/apache.conf
@@ -0,0 +1,12 @@
+Alias /occ /usr/share/occ
+<Directory /usr/share/occ>
+ # Apache 2.x
+ <IfModule !mod_authz_core.c>
+ Order allow,deny
+ Allow from all
+ </IfModule>
+ # Apache 2.4
+ <IfModule mod_authz_core.c>
+ Require all granted
+ </IfModule>
+</Directory>
diff --git a/lighttpd.conf b/lighttpd.conf
new file mode 100644
index 0000000..fe2aa99
--- /dev/null
+++ b/lighttpd.conf
@@ -0,0 +1,3 @@
+alias.url += (
+ "/occ" => "/usr/share/occ",
+)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/occ.git/commitdiff/22f42dc6b0e034495c509299c5a505a559cca4e2
More information about the pld-cvs-commit
mailing list