From 3ef2d32530668c3ea485cf165c7e129f0912898c3acabe1e6e346a07f95ff393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 21 Jul 2014 10:32:39 +0000 Subject: [PATCH 1/2] - Cleanup with spec-cleaner - Fix update-alternatives OBS-URL: https://build.opensuse.org/package/show/Java:packages/servletapi4?expand=0&rev=8 --- servletapi4.changes | 6 +++++ servletapi4.spec | 56 +++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 32 deletions(-) diff --git a/servletapi4.changes b/servletapi4.changes index 02c1287..ce431f6 100644 --- a/servletapi4.changes +++ b/servletapi4.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 21 10:32:00 UTC 2014 - tchvatal@suse.com + +- Cleanup with spec-cleaner +- Fix update-alternatives + ------------------------------------------------------------------- Fri Feb 7 08:46:53 UTC 2014 - fcrozat@suse.com diff --git a/servletapi4.spec b/servletapi4.spec index 8cef738..25d81d9 100644 --- a/servletapi4.spec +++ b/servletapi4.spec @@ -16,57 +16,46 @@ # -Name: servletapi4 -BuildRequires: ant -BuildRequires: java2-devel-packages -BuildRequires: xml-commons-apis %define base_name servletapi -%define major_version 4 -%define name %{base_name}%{major_version} %define full_name jakarta-%{base_name} -%define version 4.0.4 -%define release 3jpp -%define section free +Name: servletapi4 Version: 4.0.4 Release: 0 Summary: Java servlet and JSP implementation classes License: Apache-1.1 Group: Development/Libraries/Java +Url: http://jakarta.apache.org/tomcat/ Source: %{full_name}-4-src.tar.gz Patch150: java150_build.patch -Url: http://jakarta.apache.org/tomcat/ -Provides: servlet -PreReq: /usr/sbin/update-alternatives +BuildRequires: ant BuildRequires: ant >= 1.2 +BuildRequires: java2-devel-packages BuildRequires: javapackages-tools -BuildArch: noarch +BuildRequires: xml-commons-apis +Requires(post): %{_sbindir}/update-alternatives +Provides: servlet = %{version} +Obsoletes: servlet22 < %{version} +Obsoletes: servlet4 < %{version} +Provides: servlet22 = %{version} +Provides: servlet4 = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build -Obsoletes: servlet23 -Obsoletes: servlet4 -Provides: servlet23 -Provides: servlet4 +BuildArch: noarch %description This subproject contains the source code for the implementation classes of the Java Servlet and JSP APIs (packages javax.servlet). - - %package javadoc Summary: Javadoc for servletapi4 Group: Development/Libraries/Java -PreReq: coreutils %description javadoc This subproject contains the source code for the implementation classes of the Java Servlet and JSP APIs (packages javax.servlet). This package contains the javadoc documentation for the Java Servlet and JSP APIs. - - %prep -rm -rf $RPM_BUILD_ROOT -%setup -n %{full_name}-4-src +%setup -q -n %{full_name}-4-src %patch150 -p1 %build @@ -74,15 +63,16 @@ ant dist -Dservletapi.build=build -Dservletapi.dist=dist %install # jars -install -d -m 755 $RPM_BUILD_ROOT%{_javadir} -install -m 644 dist/lib/servlet.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar -(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) +install -d -m 755 %{buildroot}%{_javadir} +install -m 644 dist/lib/servlet.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar +(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # javadoc -install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} -cp -pr build/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} - -%clean -rm -rf $RPM_BUILD_ROOT +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +cp -pr build/docs/api/* %{buildroot}%{_javadocdir}/%{name} +# alternatives +mkdir -p %{buildroot}%{_sysconfdir}/alternatives/ +ln -s %{_javadir}/%{name}-%{version}.jar %{buildroot}%{_sysconfdir}/alternatives/servlet.jar +ln -s %{_sysconfdir}/alternatives/servlet.jar %{buildroot}%{_javadir}/servlet.jar %post update-alternatives --install %{_javadir}/servlet.jar servlet %{_javadir}/%{name}-%{version}.jar 40 @@ -96,6 +86,8 @@ fi %defattr(-,root,root) %doc LICENSE README.txt %{_javadir}/* +%{_javadir}/servlet.jar +%ghost %{_sysconfdir}/alternatives/servlet.jar %files javadoc %defattr(-,root,root) From 35406fe663c4b6e25aa265f9fb9f1f979379c3c5c91f4d9499aebb373557bcec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 28 Jul 2014 06:50:58 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/Java:packages/servletapi4?expand=0&rev=9 --- servletapi4.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/servletapi4.spec b/servletapi4.spec index 25d81d9..bdfbfcd 100644 --- a/servletapi4.spec +++ b/servletapi4.spec @@ -71,8 +71,7 @@ install -d -m 755 %{buildroot}%{_javadocdir}/%{name} cp -pr build/docs/api/* %{buildroot}%{_javadocdir}/%{name} # alternatives mkdir -p %{buildroot}%{_sysconfdir}/alternatives/ -ln -s %{_javadir}/%{name}-%{version}.jar %{buildroot}%{_sysconfdir}/alternatives/servlet.jar -ln -s %{_sysconfdir}/alternatives/servlet.jar %{buildroot}%{_javadir}/servlet.jar +ln -sf %{_sysconfdir}/alternatives/servlet.jar %{buildroot}%{_javadir}/servlet.jar %post update-alternatives --install %{_javadir}/servlet.jar servlet %{_javadir}/%{name}-%{version}.jar 40