]> git.pld-linux.org Git - packages/apache-mod_ruby.git/commitdiff
- initial import (work by Marcin Kurzyna <m.kurzyna (at) nius.waw.pl>)
authorAdam Gołębiowski <adamg@pld-linux.org>
Sun, 26 Oct 2003 15:04:06 +0000 (15:04 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache-mod_ruby-struct.patch -> 1.1
    apache-mod_ruby.conf -> 1.1
    apache-mod_ruby.spec -> 1.1

apache-mod_ruby-struct.patch [new file with mode: 0644]
apache-mod_ruby.conf [new file with mode: 0644]
apache-mod_ruby.spec [new file with mode: 0644]

diff --git a/apache-mod_ruby-struct.patch b/apache-mod_ruby-struct.patch
new file mode 100644 (file)
index 0000000..89720dd
--- /dev/null
@@ -0,0 +1,21 @@
+diff -urN mod_ruby.orig/connection.c mod_ruby-1.0.7/connection.c
+--- mod_ruby.orig/connection.c Wed Mar 27 06:17:20 2002
++++ mod_ruby-1.0.7/connection.c        Wed Oct 22 22:25:36 2003
+@@ -100,7 +100,7 @@
+ #ifdef APACHE2
+     return INT2NUM(conn->local_addr->port);
+ #else
+-    return INT2NUM(ntohs(conn->local_addr.sin_port));
++    return INT2NUM(ntohs(conn->server->port));
+ #endif
+ }
+@@ -112,7 +112,7 @@
+ #ifdef APACHE2
+     return INT2NUM(conn->remote_addr->port);
+ #else
+-    return INT2NUM(ntohs(conn->remote_addr.sin_port));
++    return INT2NUM(ntohs(conn->server->port));
+ #endif
+ }
diff --git a/apache-mod_ruby.conf b/apache-mod_ruby.conf
new file mode 100644 (file)
index 0000000..5aa7ea3
--- /dev/null
@@ -0,0 +1,16 @@
+<IfModule mod_ruby.c>
+    RubyRequire apache/ruby-run
+    
+    # Excucute files under /ruby as Ruby scripts
+    <Location /ruby>
+    SetHandler ruby-object
+    RubyHandler Apache::RubyRun.instance
+    Options ExecCGI
+    </Location>
+    
+    # Execute *.rbx files as Ruby scripts
+    <Files *.rbx>
+    SetHandler ruby-object
+    RubyHandler Apache::RubyRun.instance
+    </Files>
+</IfModule>
diff --git a/apache-mod_ruby.spec b/apache-mod_ruby.spec
new file mode 100644 (file)
index 0000000..d4b74f1
--- /dev/null
@@ -0,0 +1,79 @@
+%define                mod_name        mod_ruby
+%define        apxs            /usr/sbin/apxs
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
+%define                _httpdconf      %{_sysconfdir}/httpd/httpd.conf
+%define                _modrubyconf    %{_sysconfdir}/httpd/mod_ruby.conf
+%define                _swap           /tmp/$$.swap
+Summary:       Apache module: mod_ruby - embeds the Ruby interpreter into the Apache web server
+Summary(pl):   Modu³ do Apache'a: mod_ruby - zapewnia obs³ugê skryptów rubego przez serwer Apache
+Name:          apache-%{mod_name}
+Version:       1.0.7
+Release:       0.9
+Group:         Networking/Daemons
+License:       GPL
+Source0:       http://www.modruby.net/archive/%{mod_name}-%{version}.tar.gz
+Source1:       %{name}.conf
+Patch0:                %{name}-struct.patch
+URL:           http://www.modruby.net/
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Requires:      ruby >= 1.6.4
+Requires:      apache >= 1.3.3
+BuildRequires: ruby >= 1.6.4
+BuildRequires: %{apxs}
+BuildRequires: apache-devel >= 1.3.3
+
+%description
+mod_ruby embeds the Ruby interpreter into the Apache web server,
+allowing Ruby CGI scripts to be executed natively. These scripts will
+start up much faster than without mod_ruby.
+
+%description -l pl
+mod_ruby zapewnia obs³ugê skryptów Ruby'ego bezpo¶rednio z poziomu
+Apache'a, dziêki czemu bêd± siê one ³adowa³y znacnie szybciej ni¿
+gdyby by³y wowo³ywane tradycyjnie.
+
+%prep
+%setup -q -n %{mod_name}-%{version}
+%patch0 -p1
+
+%build
+./configure.rb --with-apxs=%{apxs}
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
+#%{__make} DESTDIR=$RPM_BUILD_ROOT install
+
+install -d $RPM_BUILD_ROOT%{_pkglibdir}
+install %{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{mod_name}.so
+
+# Install the config file
+install -d %{buildroot}%{_sysconfdir}/httpd/
+install %{SOURCE1} $RPM_BUILD_ROOT%{_modrubyconf}
+
+%clean
+rm -rf %{buildroot}
+
+%post
+%{apxs} -e -a -n ruby %{_pkglibdir}/%{mod_name}.so 1>&2
+echo "Include %{_modrubyconf}" >> %{_httpdconf}
+if [ -f /var/lock/subsys/httpd ]; then
+       /etc/rc.d/init.d/httpd restart 1>&2
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+       %{apxs} -e -A -n ruby %{_pkglibdir}/%{mod_name}.so 1>&2
+       if [ -f /var/lock/subsys/httpd ]; then
+               /etc/rc.d/init.d/httpd restart 1>&2
+       fi
+fi
+cat %{_httpdconf} | grep -v "Include %{_modrubyconf}" > %{_swap}
+mv %{_swap} %{_httpdconf}
+
+%files
+%defattr(644,root,root,755)
+%doc COPYING ChangeLog README.ja README.en examples doc/*
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/mod_ruby.conf
+%attr(755,root,root) %{_pkglibdir}/*
This page took 0.056035 seconds and 4 git commands to generate.