[iipsrv/el6] Initial import

Johan Cwiklinski trasher at fedoraproject.org
Tue May 28 19:25:30 UTC 2013


commit ee41f451db9bc5956c7af5d6e02ad10acca53387
Author: Johan Cwiklinski <johan at x-tnd.be>
Date:   Tue May 28 18:46:18 2013 +0200

    Initial import

 .gitignore                       |    2 +
 iipsrv-httpd.conf                |   26 ++++
 iipsrv-remove-bundled-fcgi.patch |   27 ++++
 iipsrv.initd                     |  112 ++++++++++++++++
 iipsrv.initd.conf                |    8 +
 iipsrv.service                   |   28 ++++
 iipsrv.spec                      |  271 ++++++++++++++++++++++++++++++++++++++
 sources                          |    2 +
 8 files changed, 476 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..e2b8eef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/README.rpm
+/iipsrv-1.0.0-0b63de7.tar.gz
diff --git a/iipsrv-httpd.conf b/iipsrv-httpd.conf
new file mode 100644
index 0000000..2ddc24d
--- /dev/null
+++ b/iipsrv-httpd.conf
@@ -0,0 +1,26 @@
+ScriptAlias /iipsrv /usr/libexec/iipsrv/iipsrv.fcgi
+
+# Set our environment variables for the IIP server
+DefaultInitEnv VERBOSITY "5"
+DefaultInitEnv LOGFILE "/var/log/httpd/iipsrv.log"
+DefaultInitEnv MAX_IMAGE_CACHE_SIZE "10"
+DefaultInitEnv JPEG_QUALITY "50"
+DefaultInitEnv MAX_CVT "3000"
+# Define the idle timeout as unlimited and the number of
+# processes we want
+FcgidIdleTimeout -1
+FcgidMaxProcessesPerClass 1
+
+<Directory /usr/libexec/iipsrv/>
+    <IfModule mod_authz_core.c>
+        # Apache 2.4
+        Require all granted
+    </IfModule>
+    <IfModule !mod_authz_core.c>
+        # Apache 2.2
+        Order allow,deny
+        Allow from All
+    </IfModule>
+</Directory>
+
+
diff --git a/iipsrv-remove-bundled-fcgi.patch b/iipsrv-remove-bundled-fcgi.patch
new file mode 100644
index 0000000..c80bcbe
--- /dev/null
+++ b/iipsrv-remove-bundled-fcgi.patch
@@ -0,0 +1,27 @@
+diff -up iipsrv-0b63de7ac7519f8d0f21a040c087a7d11c6eb59b/configure.in.patch iipsrv-0b63de7ac7519f8d0f21a040c087a7d11c6eb59b/configure.in
+--- iipsrv-0b63de7ac7519f8d0f21a040c087a7d11c6eb59b/configure.in.patch	2013-05-19 09:10:18.411553576 +0200
++++ iipsrv-0b63de7ac7519f8d0f21a040c087a7d11c6eb59b/configure.in	2013-05-19 09:10:50.724551795 +0200
+@@ -293,10 +293,7 @@ AC_SUBST(LIBS)
+ AC_PROG_MAKE_SET
+ AC_CONFIG_FILES([Makefile \
+ 	src/Makefile \
+-	man/Makefile \
+-	fcgi/Makefile \
+-	fcgi/include/Makefile \
+-	fcgi/libfcgi/Makefile])
++	man/Makefile])
+ AC_OUTPUT
+ 
+ # Print out option status
+diff -up iipsrv-0b63de7ac7519f8d0f21a040c087a7d11c6eb59b/Makefile.am.patch iipsrv-0b63de7ac7519f8d0f21a040c087a7d11c6eb59b/Makefile.am
+--- iipsrv-0b63de7ac7519f8d0f21a040c087a7d11c6eb59b/Makefile.am.patch	2013-05-19 09:10:31.308552865 +0200
++++ iipsrv-0b63de7ac7519f8d0f21a040c087a7d11c6eb59b/Makefile.am	2013-05-19 09:10:58.706551355 +0200
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = dist-bzip2
+ ACLOCAL_AMFLAGS = -I m4
+ 
+-SUBDIRS = fcgi src man
++SUBDIRS = src man
+ 
+-EXTRA_DIST = TODO COPYING.FCGI doc windows
++EXTRA_DIST = TODO doc windows
diff --git a/iipsrv.initd b/iipsrv.initd
new file mode 100644
index 0000000..a605e7d
--- /dev/null
+++ b/iipsrv.initd
@@ -0,0 +1,112 @@
+#!/bin/sh
+#
+# iipsrv - Light-weight streaming for viewing and zooming of ultra high-resolution images
+#
+# chkconfig: - 90 10
+# description: Light-weight streaming for viewing and zooming of ultra high-resolution images
+
+# http://fedoraproject.org/wiki/FCNewInit/Initscripts
+### BEGIN INIT INFO
+# Provides: iipsrv
+# Required-Start: network
+# Required-Stop: network
+# Default-Start: 
+# Default-Stop: 0 1 6
+# Short-Description: Start and stop iipsrv
+# Description: 
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+exec="/usr/libexec/iipsrv/iipsrv.fcgi"
+prog="iipsrv"
+user="iipsrv"
+
+IP=127.0.0.1
+PORT=9002
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+    echo -n $"Starting $prog: "
+    $exec --bind $IP:$PORT 2>&1 &
+    pid=$!
+    sleep 1
+    if /bin/kill -0 $pid 2>/dev/null; then
+       echo $pid >/var/run/$prog.pid
+       success "iipsrv started"
+       retval=0
+    else
+       failure "iipsrv failed to start"
+       retval=1
+    fi
+    echo
+    [ $retval -eq 0 ] && touch $lockfile
+    return $retval
+}
+
+stop() {
+    echo -n $"Stopping $prog: "
+    killproc $prog
+    retval=$?
+    echo
+    [ $retval -eq 0 ] && rm -f $lockfile
+    return $retval
+}
+
+restart() {
+    stop
+    start
+}
+
+reload() {
+    restart
+}
+
+force_reload() {
+    restart
+}
+
+rh_status() {
+    # run checks to determine if the service is running or use generic status
+    status $prog
+}
+
+rh_status_q() {
+    rh_status >/dev/null 2>&1
+}
+
+case "$1" in
+    start)
+        rh_status_q && exit 0
+        $1
+        ;;
+    stop)
+        rh_status_q || exit 0
+        $1
+        ;;
+    restart)
+        $1
+        ;;
+    reload)
+        rh_status_q || exit 7
+        $1
+        ;;
+    force-reload)
+        force_reload
+        ;;
+    status)
+        rh_status
+        ;;
+    condrestart|try-restart)
+        rh_status_q || exit 0
+        restart
+        ;;
+    *)
+        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+        exit 2
+esac
+
diff --git a/iipsrv.initd.conf b/iipsrv.initd.conf
new file mode 100644
index 0000000..4b27c6e
--- /dev/null
+++ b/iipsrv.initd.conf
@@ -0,0 +1,8 @@
+#IIPImage server configuration file for SysV
+IP=127.0.0.1
+PORT=9002
+
+#Some other variables can be declared here. See documentation.
+#export VERBOSITY=5
+#export MEMCACHED_SERVERS=localhost
+#export WATERMARK=/tmp/watermark.tif
diff --git a/iipsrv.service b/iipsrv.service
new file mode 100644
index 0000000..b440527
--- /dev/null
+++ b/iipsrv.service
@@ -0,0 +1,28 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades.  If you want to customize, the
+# best way is to create a file "/etc/systemd/system/iipsrv.service",
+# containing
+#	.include /lib/systemd/system/iipsrv.service
+#	...make your changes here...
+# For more info about custom unit files, see
+# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
+
+# For example, if you want to change default iipsrv port to 9000,
+# create a file named "/etc/systemd/system/iipsrv.service" containing:
+#	.include /lib/systemd/system/iipsrv.service
+#	[Service]
+#	Environment=PORT=9000
+
+
+[Unit]
+Description=IIPImage Server
+After=network.target
+
+[Service]
+Environment=IP=127.0.0.1
+Environment=PORT=9002
+User=iipsrv
+ExecStart=/usr/libexec/iipsrv/iipsrv.fcgi --bind ${IP}:${PORT}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/iipsrv.spec b/iipsrv.spec
new file mode 100644
index 0000000..18b66d8
--- /dev/null
+++ b/iipsrv.spec
@@ -0,0 +1,271 @@
+%global commit 0b63de7ac7519f8d0f21a040c087a7d11c6eb59b
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
+%if 0%{?fedora} >= 18
+%global with_systemd 1
+%else
+%global with_systemd 0
+%endif
+%{!?_initddir: %{expand: %%global _initddir %{_initrddir}}}
+
+Name:           iipsrv
+Version:        1.0.0
+Release:        0.7.git%{shortcommit}%{?dist}
+Summary:        Light-weight streaming for viewing and zooming of ultra high-resolution images
+
+Group:          Applications/Multimedia
+License:        GPLv3+
+URL:            http://iipimage.sourceforge.net
+Source0:        https://github.com/ruven/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
+Source1:        iipsrv-httpd.conf
+Source2:        README.rpm
+Source10:       iipsrv.service
+Source11:       iipsrv.initd
+Source12:       iipsrv.initd.conf
+Patch0:         iipsrv-remove-bundled-fcgi.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:  zlib-devel
+BuildRequires:  libjpeg-devel
+BuildRequires:  libtiff-devel
+BuildRequires:  fcgi-devel
+%if 0%{?rhel} != 5
+BuildRequires:  lcms2-devel
+%endif
+BuildRequires:  libpng-devel
+%if 0%{?fedora}
+BuildRequires:  libmemcached-devel
+%endif
+%if %{with_systemd}
+BuildRequires:  systemd-units
+%endif
+BuildRequires:  autoconf
+BuildRequires:  automake
+BuildRequires:  libtool
+%if %{with_systemd}
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+%else
+Requires(post): chkconfig
+Requires(preun): chkconfig
+# for /sbin/service
+Requires(preun): initscripts
+Requires(postun): initscripts
+%endif
+
+
+%description
+Light-weight streaming client-server system for the web-based viewing and
+zooming of ultra high-resolution images. It is designed to be bandwidth
+and memory efficient and usable even over a slow internet connection.
+
+The system can handle both 8 and 16 bit images, CIELAB colorimetric images and
+scientific imagery such as multispectral images. The fast streaming is
+tile-based meaning the client only needs to download the portion of the whole
+image that is visible on the screen of the user at their current viewing
+resolution and not the entire image.
+This makes it possible to view, navigate and zoom in real-time around
+multi-gigapixel size images that would be impossible to download and
+manipulate on the local machine. It also makes the system very scalable as
+the number of image tile downloads will remain the same regardless of the
+size of the source image. In addition, to reduce the bandwidth necessary even
+further, the tiles sent back are dynamically JPEG compressed with a level of
+compression that can be optimized for the available bandwidth by the client.
+
+
+%package httpd-fcgi
+Summary:         Apache HTTPD files for %{name}
+Group:           Applications/Multimedia
+Requires:        %{name} = %{version}-%{release}
+Requires:        httpd
+Requires:        mod_fcgid
+%if %{with_systemd}
+Requires(post):  systemd-units
+%else
+Requires(post):  initscripts
+%endif
+%if 0%{?rhel} != 5
+#EL-5 does not handle noarch subpackages correctly
+BuildArch:       noarch
+%endif
+
+
+%description httpd-fcgi
+IIPImage server Apache/mod_fcgid files
+
+
+%prep
+%setup -q -n %{name}-%{commit}
+%patch0 -p1
+#fix man
+sed -e "s/\.Iiipsrv/.I iipsrv/" -i man/%{name}.8
+#specfific fixes for el5...
+%if 0%{?rhel}  == 5
+sed 's/AC_PROG_MAKE_SET/AC_PROG_MAKE_SET\
+AC_PROG_RANLIB/' -i configure.in
+mkdir m4
+%endif
+#remove bundled lib
+rm -rf src/fcgi
+%if 0%{?rhel}  == 5
+#directives names has changed since pre ASF releases of mod_fcgid
+#see http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#upgrade
+sed -i \
+  -e 's/FcgidIdleTimeout/IdleTimeout/' \
+  -e 's/FcgidMaxProcessesPerClass/DefaultMaxClassProcessCount/' \
+  %{SOURCE1}
+%endif
+
+
+%build
+./autogen.sh
+%configure
+make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
+install -m 0644 -D -p %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/%{name}.conf
+
+mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name}
+install -m 0755 -D -p src/iipsrv.fcgi $RPM_BUILD_ROOT%{_libexecdir}/%{name}/%{name}.fcgi
+
+cp %{SOURCE2} .
+
+%if %{with_systemd}
+#systemd stuff
+mkdir -p $RPM_BUILD_ROOT%{_unitdir}
+install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
+%else
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/
+install -m 0644 -D -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
+#install initd script
+mkdir -p $RPM_BUILD_ROOT%{_initddir}
+install -m755 %{SOURCE11} $RPM_BUILD_ROOT%{_initddir}/%{name}
+%endif
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%post httpd-fcgi
+%if %{with_systemd}
+/bin/systemctl condrestart httpd.service
+%else
+/sbin/service condrestart httpd
+%endif
+
+
+%pre
+%{_sbindir}/useradd -r -s /sbin/nologin %{name} 2> /dev/null || :
+
+
+%preun
+%if %{with_systemd}
+%systemd_preun %{name}.service
+%else
+if [ $1 = 0 ]; then
+    # Package removal, not upgrade
+    service %{name} stop > /dev/null 2>&1 || :
+    chkconfig --del %{name} || :
+fi
+%endif
+
+
+%post
+%if %{with_systemd}
+%systemd_post %{name}.service
+%else
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    chkconfig --add %{name} || :
+fi
+%endif
+
+%postun
+%if %{with_systemd}
+%systemd_postun_with_restart %{name}.service
+%else
+if [ $1 -ge 1 ]; then
+    /sbin/service %{name} condrestart >/dev/null 2>&1 || :
+fi
+%endif
+
+
+%files
+%defattr(-,root,root,-)
+%doc README AUTHORS ChangeLog TODO COPYING doc/* README.rpm
+%{_libexecdir}/%{name}/%{name}.fcgi
+%if %{with_systemd}
+%{_unitdir}/%{name}.service
+%else
+%{_initddir}/%{name}
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
+%endif
+%{_mandir}/man8/%{name}.8.gz
+
+
+%files httpd-fcgi
+%defattr(-,root,root,-)
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
+
+
+%changelog
+* Fri May 24 2013 Johan Cwiklinski <johan AT x-tnd DOT be> - 1.0.0-0.7.git0b63de7
+- Fix license
+- Set httpd-fcgi sub-package noarch (exept for EL5)
+- Add missing BuilRequires
+- Fix unconsistent scriplets
+- Add missing SysV postun
+- Add missing SysV Requires
+- Add comment on service file on how to tune
+- Add missing Requires on httpd-fcgi subpackage
+- Remove bundled lib
+- New mod_fcgid directives names (except for el5)
+
+* Wed May 22 2013 Johan Cwiklinski <johan AT x-tnd DOT be> - 1.0.0-0.6.git0b63de7
+- Systemd configuration directives are now handled in unit file
+
+* Sun May 20 2013 Johan Cwiklinski <johan AT x-tnd DOT be> - 1.0.0-0.5.git0b63de7
+- Add SysV service files
+
+* Sun May 19 2013 Johan Cwiklinski <johan AT x-tnd DOT be> - 1.0.0-0.4.git0b63de7
+- Add iipsrv systemd service and user
+- Remove Requires on mod_fcgi
+- Fix service name for non fedora
+
+* Sun May 19 2013 Johan Cwiklinski <johan AT x-tnd DOT be> - 1.0.0-0.3.git0b63de7
+- Remove strip and reactivate debuginfo package
+- Use system fcgi and not bundeld one, remove -devel subpackage
+- Do not install stuff in /var/www
+- Create httpd-fcgi subpackage
+
+* Sat May 18 2013 Johan Cwiklinski <johan AT x-tnd DOT be> - 1.0.0-0.2.git0b63de7
+- Specfile cleanup
+- Replace %%define by %%global
+
+* Sun May 05 2013 Johan  Cwiklinski <johan AT x-tnd DOT be> - 1.0.0-0.1.git0b63de7
+- Rebuild from latest GIT snapshot
+
+* Thu Apr 21 2011 Johan Cwiklinski <johan AT x-tnd DOT be> - 0.9.9-3.trashy
+- memcached support (for Fedora only, does not compile on EL 5/6)
+
+* Wed Apr 20 2011 Johan Cwiklinski <johan AT x-tnd DOT be> - 0.9.9-2.trashy
+- Upgrade to 0.9.9
+
+* Sat Jul 24 2010 Johan Cwiklinski <johan AT x-tnd DOT be> - 0.9.9-1.20100724
+- Upgrade to latest SVN
+
+* Wed Dec 23 2009 Johan Cwiklinski <johan AT x-tnd DOT be> - 0.9.9-1.20091202
+- Upgrade to latest SVN
+
+* Wed Dec 23 2009 Johan Cwiklinski <johan AT x-tnd DOT be> - 0.9.8-1.20090722
+- Rebuild for F-12
+
+* Mon Mar 30 2009 Johan Cwiklinski <johan AT x-tnd DOT be> - 0.9.8-1.20090331
+- Initial packaging
diff --git a/sources b/sources
index e69de29..9f6b455 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+ee31ce137a5ab78b5a4282ca0c18497f  README.rpm
+212dc98a13d86387b8bf12d619eb9aac  iipsrv-1.0.0-0b63de7.tar.gz


More information about the scm-commits mailing list