]> git.pld-linux.org Git - packages/ApacheJServ.git/blobdiff - ApacheJServ.spec
- EA based on where java-sun is available; rel 3
[packages/ApacheJServ.git] / ApacheJServ.spec
index 08f357b0e36e07531e99848dd0db9a33eb74d033..39eb3acb22a6a11cc1109500032a4ce837120970 100644 (file)
@@ -11,7 +11,7 @@ Summary:      Servlet engine with support for the leading web server
 Summary(pl):   Silnik serwletów ze wsparciem dla wiod±cego serwera WWW
 Name:          ApacheJServ
 Version:       1.1.2
-Release:       0.79
+Release:       3
 License:       freely distributable & usable (JServ), LGPL (JSDK)
 Group:         Networking/Daemons
 Source0:       http://java.apache.org/jserv/dist/%{name}-%{version}.tar.gz
@@ -20,15 +20,18 @@ Source1:    http://www.euronet.nl/~pauls/java/servlet/download/classpathx_servlet-%
 # Source1-md5: a81feddb91b1358f9aaed94e83eddb54
 Source2:       %{name}.conf
 Source3:       %{name}.init
+Source4:       %{name}.sysconfig
+Source5:       runjserv
 Patch0:                %{name}-enable-secret.patch
 Patch1:                %{name}-ac.patch
 Patch2:                %{name}-jre-env.patch
+Patch3:                %{name}-config.patch
 URL:           http://java.apache.org/
 BuildRequires: apache1-devel >= 1.3.9-8
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: gettext-devel
-BuildRequires: rpmbuild(macros) >= 1.228
+BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: sed >= 4.0
 %if %{with gcj}
 BuildRequires: fastjar
@@ -51,6 +54,8 @@ Provides:     jsdk20
 Provides:      jserv
 Provides:      user(jserv)
 Obsoletes:     ApacheJServ-init
+Obsoletes:     jserv
+ExclusiveArch: i586 i686 pentium3 pentium4 athlon %{x8664}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
@@ -107,6 +112,7 @@ Dokumentacja do ApacheJServ.
 %patch0 -p0
 %patch1 -p0
 %patch2 -p1
+%patch3 -p1
 
 sed -i -e '
        s|@JSDK_CLASSES@|%{_javadir}/servlet-2.0.jar|g
@@ -120,6 +126,8 @@ sed -i -e '/^SUBDIRS/s,java,,' src/Makefile.am
 sed -i -e '/^SUBDIRS/s,example,,' Makefile.am
 
 %build
+export JAVA_HOME="%{java_home}"
+
 if [ ! -f _autotools.done.1 ]; then
        %{__gettextize}
        %{__libtoolize}
@@ -145,15 +153,17 @@ fi
 
 ### JSERV
 CFLAGS="$(%{apxs} -q CFLAGS) %{rpmcflags}"
+dir=$(pwd)
 %configure \
        %{!?debug:--disable-debugging} \
        --with-apxs=%{apxs} \
        --with-logdir=%{logdir} \
        --with-servlets=%{_datadir}/jserv/servlets \
-       %{!?with_gcj:GCJ=javac GCJFLAGS= CLASSPATH=`pwd` JAVAC_OPT="-source 1.4"} \
-    %{!?with_gcj:--with-javac=%{_bindir}/javac --with-java=%{_bindir}/java --with-jdk-home=%{_libdir}/java} \
-    %{?with_gcj:--with-javac=%{_bindir}/gcj --with-jar=%{_bindir}/fastjar} \
-       --with-JSDK=`pwd`/classpathx_servlet-%{jsdkversion}/servlet-2.0.jar
+       --with-java-platform=1.4 \
+       --with-JSDK=$dir/classpathx_servlet-%{jsdkversion}/servlet-2.0.jar \
+       %{!?with_gcj:GCJ=javac GCJFLAGS= CLASSPATH=$dir JAVAC_OPT="-source 1.4"} \
+       %{!?with_gcj:--with-javac=%{javac} --with-java=%{java} --with-jdk-home=$JAVA_HOME} \
+       %{?with_gcj:--with-javac=%{_bindir}/gcj --with-jar=%{_bindir}/fastjar} \
 
 %{__make} %{!?with_gcj:OBJEXT=class JAVAC_OPT='-source 1.4'} \
        -C src/java
@@ -161,10 +171,12 @@ CFLAGS="$(%{apxs} -q CFLAGS) %{rpmcflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{httpdconf}/conf.d,%{_javadir}}
+install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{httpdconf}/conf.d,%{_javadir},%{_sbindir}}
 
 install %{SOURCE2} $RPM_BUILD_ROOT%{httpdconf}/conf.d/80_mod_jserv.conf
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/jserv
+install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/jserv
+install %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -211,9 +223,7 @@ fi
 
 %preun
 if [ "$1" = 0 ]; then
-       if [ -f /var/lock/subsys/jserv ]; then
-               /etc/rc.d/init.d/jserv stop 1>&2
-       fi
+       %service jserv stop
        /sbin/chkconfig --del jserv
 fi
 
@@ -247,6 +257,8 @@ fi
 %attr(640,root,jserv) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jserv.properties
 %attr(640,root,jserv) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zone.properties
 %attr(754,root,root) /etc/rc.d/init.d/jserv
+%attr(755,root,root) %{_sbindir}/runjserv
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/jserv
 %{_javadir}/ApacheJServ.jar
 %{_javadir}/servlet-2.0.jar
 %dir %{_datadir}/jserv
This page took 0.033066 seconds and 4 git commands to generate.