[packages/gallery] - migrate to apache 2.4 - rel 2
baggins
baggins at pld-linux.org
Wed May 15 19:02:54 CEST 2013
commit 2f0bb0fed0268467f4f5e48aada634c5a5964051
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed May 15 19:02:41 2013 +0200
- migrate to apache 2.4
- rel 2
gallery-httpd.conf | 27 +++++++++++++++++++++++++++
gallery.spec | 10 ++++++----
2 files changed, 33 insertions(+), 4 deletions(-)
---
diff --git a/gallery.spec b/gallery.spec
index da459b1..5857789 100644
--- a/gallery.spec
+++ b/gallery.spec
@@ -5,7 +5,7 @@ Summary: Web based photo album viewer and creator
Summary(pl.UTF-8): Przeglądarka i generator albumów zdjęć w postaci stron WWW
Name: gallery
Version: 2.3
-Release: 1
+Release: 2
License: GPL
Group: Applications/Publishing
Source0: http://dl.sourceforge.net/gallery/%{name}-%{version}-full.tar.gz
@@ -13,6 +13,7 @@ Source0: http://dl.sourceforge.net/gallery/%{name}-%{version}-full.tar.gz
#Source0: http://galleryupdates.jpmullan.com/G2/%{name}-nightly.tar.gz
Source1: %{name}-apache.conf
Source2: %{name}-lighttpd.conf
+Source3: %{name}-httpd.conf
Patch0: %{name}-setup.patch
URL: http://gallery.sourceforge.net/
BuildRequires: rpmbuild(macros) >= 1.268
@@ -24,6 +25,7 @@ Requires: webserver(php) >= 4.1.0
#Suggests: jhead
#Suggests: jpegtran
#Suggests: php-gd
+Conflicts: apache-base < 2.4.0-1
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -79,7 +81,7 @@ cp -a images lib modules themes $RPM_BUILD_ROOT%{_appdir}
cp -a install upgrade $RPM_BUILD_ROOT%{_appdir}
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
+install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
touch $RPM_BUILD_ROOT%{_sysconfdir}/config.php
touch $RPM_BUILD_ROOT%{_sysconfdir}/login.txt
@@ -100,10 +102,10 @@ rm -rf $RPM_BUILD_ROOT
%triggerun -- apache1 < 1.3.37-3, apache1-base
%webapp_unregister apache %{_webapp}
-%triggerin -- apache < 2.2.0, apache-base
+%triggerin -- apache-base
%webapp_register httpd %{_webapp}
-%triggerun -- apache < 2.2.0, apache-base
+%triggerun -- apache-base
%webapp_unregister httpd %{_webapp}
%triggerin -- lighttpd
diff --git a/gallery-httpd.conf b/gallery-httpd.conf
new file mode 100644
index 0000000..503ea2f
--- /dev/null
+++ b/gallery-httpd.conf
@@ -0,0 +1,27 @@
+Alias /gallery /usr/share/gallery
+
+<Directory /usr/share/gallery>
+ Require all granted
+
+ php_value post_max_size 20m
+ php_value upload_max_filesize 20m
+ php_value memory_limit 16m
+ php_value magic_quotes_gpc off
+ php_value session.save_handler files
+ php_value register_globals off
+
+ Options -Indexes +FollowSymLinks
+ <IfModule mod_rewrite.c>
+ RewriteEngine On
+ RewriteBase /gallery/
+
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^([^\.\?/]+)/([0-9]+)$ /gallery/view_photo.php?set_albumName=$1&index=$2 [QSA]
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^([^\.\?/]+)/([A-Za-z_0-9\-]+)$ /gallery/view_photo.php?set_albumName=$1&id=$2 [QSA]
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^([^\.\?/]+)/$ /gallery/$1 [R]
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^([^\.\?/]+)$ /gallery/view_album.php?set_albumName=$1 [QSA]
+ </IfModule>
+</Directory>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gallery.git/commitdiff/2f0bb0fed0268467f4f5e48aada634c5a5964051
More information about the pld-cvs-commit
mailing list