]> git.pld-linux.org Git - packages/ApacheJServ.git/blobdiff - ApacheJServ.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/ApacheJServ.git] / ApacheJServ.spec
index bfac78f771880024a9d0afbdad06959531222dfa..efaa4b6a676230c5904c6baa5528361ff9a51d8b 100644 (file)
@@ -1,23 +1,14 @@
-# TODO
-# - separate package for jsdk?
-#
-# Conditional build:
-%bcond_with    gcj     # use GCJ instead of javac
-#
 %define                apxs            /usr/sbin/apxs1
-%define                jsdkversion     20000924
 %define                mod_name        jserv
 Summary:       Servlet engine with support for the leading web server
-Summary(pl):   Silnik serwletów ze wsparciem dla wiod±cego serwera WWW
+Summary(pl.UTF-8):     Silnik serwletów ze wsparciem dla wiodącego serwera WWW
 Name:          ApacheJServ
 Version:       1.1.2
-Release:       2
-License:       freely distributable & usable (JServ), LGPL (JSDK)
+Release:       11
+License:       freely distributable & usable
 Group:         Networking/Daemons
 Source0:       http://java.apache.org/jserv/dist/%{name}-%{version}.tar.gz
 # Source0-md5: 6d48a1b9fcc5eea4dfebaae29ba5a485
-Source1:       http://www.euronet.nl/~pauls/java/servlet/download/classpathx_servlet-%{jsdkversion}.tar.gz
-# Source1-md5: a81feddb91b1358f9aaed94e83eddb54
 Source2:       %{name}.conf
 Source3:       %{name}.init
 Source4:       %{name}.sysconfig
@@ -26,33 +17,30 @@ Patch0:             %{name}-enable-secret.patch
 Patch1:                %{name}-ac.patch
 Patch2:                %{name}-jre-env.patch
 Patch3:                %{name}-config.patch
-URL:           http://java.apache.org/
+Patch4:                doc-overwrite.patch
+URL:           http://archive.apache.org/dist/java/jserv/
 BuildRequires: apache1-devel >= 1.3.9-8
 BuildRequires: autoconf
 BuildRequires: automake
-BuildRequires: gettext-devel
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: gettext-tools
+BuildRequires: jdk
+BuildRequires: jpackage-utils
+BuildRequires: rpm-javaprov
+BuildRequires: rpmbuild(macros) >= 1.300
 BuildRequires: sed >= 4.0
-%if %{with gcj}
-BuildRequires: fastjar
-BuildRequires: gcc-java
-BuildRequires: jdkgcj
-Requires:      /usr/bin/gij
-%else
-BuildRequires: java-sun
-Requires:      java-sun-jre
-%endif
+BuildRequires: servlet = 2.0
 Requires(post,preun):  rc-scripts
 Requires(pre): /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
-Requires:      %{name} = %{version}-%{release}
+Requires:      jpackage-utils
+Requires:      jre
 Requires:      rc-scripts >= 0.4.0.19
+Requires:      servlet = 2.0
 Provides:      group(jserv)
-Provides:      jsdk20
-Provides:      jserv
 Provides:      user(jserv)
+Obsoletes:     ApacheJServ-doc
 Obsoletes:     ApacheJServ-init
 Obsoletes:     jserv
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -60,94 +48,65 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
 %define                httpdconf       %(%{apxs} -q SYSCONFDIR 2>/dev/null)
 %define                _sysconfdir     /etc/jserv
-%define                logdir          /var/log/jserv
-%define                _noautocompressdoc  package-list
 
 %description
 Apache JServ is a servlet engine, developed by the Java Apache Project
 <http://java.apache.org/>. The Apache JServ servlet engine is written
 in 100pc Java application, and listens for servlet requests using the
 Apache Java protocol (AJp). Typically, these requests will originate
-from the mod_jserv Apache module (DSO included). This package contains
-a LGPL'ed implementation of Sun's Java Servlet API version 2.0 by Paul
-Siegmann <http://www.euronet.nl/~pauls/java/servlet/>.
+from the mod_jserv Apache module (DSO included).
 
-%description -l pl
+%description -l pl.UTF-8
 Apache JServ jest silnikiem serwletowym, rozwijanym przez Java Apache
 Project <http://java.apache.org/>. Silnik serwletowy Apache JServ
-zosta³ napisany od pocz±tku do koñca w Javie; nas³uchuje wywo³añ
-serwletu wykorzystuj±c protokó³ Apache Java (AJp). Zazwyczaj wywo³ania
-te pochodz± z modu³u Apache mod_jservmodule (³±cznie z DSO). Pakiet
-ten zawiera implementacjê Java Servlet API Suna w wersji 2.0 napisan±
-przez Paula Siegmanna (na licencji LGPL)
-<http://www.euronet.nl/~pauls/java/servlet/>.
+został napisany od początku do końca w Javie; nasłuchuje wywołań
+serwletu wykorzystując protokół Apache Java (AJp). Zazwyczaj wywołania
+te pochodzą z modułu Apache mod_jservmodule (łącznie z DSO).
 
 %package -n apache1-mod_jserv
 Summary:       JServ module for Apache
-Summary(pl):   Modu³ JServ dla Apache'a
+Summary(pl.UTF-8):     Moduł JServ dla Apache'a
 Group:         Networking/Daemons
-Requires:      apache1 >= 1.3.33-2
+Requires:      apache1-base >= 1.3.33-2
 Obsoletes:     ApacheJServ-auto
 
 %description -n apache1-mod_jserv
 JServ module for Apache.
 
-%description -n apache1-mod_jserv -l pl
-Modu³ JServ dla Apache'a.
-
-%package doc
-Summary:       ApacheJServ documentation
-Summary(pl):   Dokumentacja do ApacheJServ
-Group:         Development/Languages/Java
-
-%description doc
-ApacheJserv documentation.
-
-%description doc -l pl
-Dokumentacja do ApacheJServ.
+%description -n apache1-mod_jserv -l pl.UTF-8
+Moduł JServ dla Apache'a.
 
 %prep
-%setup -q -a1
+%setup -q
 %patch0 -p0
 %patch1 -p0
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
-sed -i -e '
-       s|@JSDK_CLASSES@|%{_javadir}/servlet-2.0.jar|g
-' conf/jserv.properties.in
+# servlet-2.0 is the highest version the jserv code compiles with
+servlet_jar=$(find-jar servlet-2.0)
+%{__sed} -i -e "
+       s|@JSDK_CLASSES@|$servlet_jar|g
+       s|@JAVA@|%java|g
+" conf/jserv.properties.in
 
 # do not load module in provided jserv.conf; we do this in httpd.conf
-sed -i -e 's|@LOAD_OR_NOT@|#|g' conf/jserv.conf.in
+%{__sed} -i -e 's|@LOAD_OR_NOT@|#|g' conf/jserv.conf.in
 
 # we don't want gcj related deps
-sed -i -e '/^SUBDIRS/s,java,,' src/Makefile.am
-sed -i -e '/^SUBDIRS/s,example,,' Makefile.am
+%{__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
+if [ ! -f _autotools.stamp ]; then
        %{__gettextize}
        %{__libtoolize}
        %{__aclocal}
        %{__autoconf}
        %{__automake}
-       touch _autotools.done.1
-fi
-
-# prepare compilation
-if [ ! -f classpathx_servlet-%{jsdkversion}/servlet-2.0.jar ]; then
-       %{__make} -C classpathx_servlet-%{jsdkversion} jar_2_0
-fi
-
-if [ ! -d jsdk-doc ]; then
-       %{__make} -C classpathx_servlet-%{jsdkversion}/apidoc
-
-       # copy API-doc
-       mkdir jsdk-doc
-       cp classpathx_servlet-%{jsdkversion}/{README,AUTHORS,COPYING.LIB} jsdk-doc
-       cp -r classpathx_servlet-%{jsdkversion}/apidoc jsdk-doc
+       touch _autotools.stamp
 fi
 
 ### JSERV
@@ -156,10 +115,10 @@ dir=$(pwd)
 %configure \
        %{!?debug:--disable-debugging} \
        --with-apxs=%{apxs} \
-       --with-logdir=%{logdir} \
+       --with-logdir=/var/log/jserv \
        --with-servlets=%{_datadir}/jserv/servlets \
        --with-java-platform=1.4 \
-       --with-JSDK=$dir/classpathx_servlet-%{jsdkversion}/servlet-2.0.jar \
+       --with-JSDK=$(find-jar servlet-2.0) \
        %{!?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} \
@@ -191,12 +150,6 @@ install %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}
 
 install -d $RPM_BUILD_ROOT%{_datadir}/jserv/servlets
 
-### GNU JSDK-classes
-install classpathx_servlet-%{jsdkversion}/servlet-2.0.jar $RPM_BUILD_ROOT%{_javadir}
-
-find jsdk-doc -name 'Makefile*' | xargs rm -f
-rm -rf jsdk-doc/{COPYING.LIB,CVS} jsdk-doc/apidoc/CVS
-
 # duplicate
 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/jserv.conf
 rm -rf $RPM_BUILD_ROOT%{_prefix}/docs
@@ -251,6 +204,7 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc LICENSE README
+%doc index.html docs
 %dir %attr(750,root,jserv) %{_sysconfdir}
 %attr(640,root,jserv) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jserv.secret.key
 %attr(640,root,jserv) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jserv.properties
@@ -259,25 +213,12 @@ fi
 %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
 %dir %attr(750,root,jserv) %{_datadir}/jserv/servlets
-
-%if 0
-%{_datadir}/jserv/servlets/Hello.java
-%{_datadir}/jserv/servlets/Hello.class
-%{_datadir}/jserv/servlets/IsItWorking.java
-%{_datadir}/jserv/servlets/IsItWorking.class
-%endif
-%attr(770,root,jserv) %dir %{logdir}
+%attr(770,root,jserv) %dir /var/log/jserv
 
 %files -n apache1-mod_jserv
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_pkglibdir}/mod_jserv.so
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{httpdconf}/conf.d/80_mod_jserv.conf
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{httpdconf}/jserv.secret.key
-
-%files doc
-%defattr(644,root,root,755)
-%doc index.html docs
-%doc jsdk-doc
This page took 0.474294 seconds and 4 git commands to generate.