# Copyright (c) 2000-2005, JPackage Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # 3. Neither the name of the JPackage Project nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # %define gcj_support 0 %define full_name jakarta-%{name} %define section free Name: regexp Version: 1.5 Release: %mkrel 0.0.8 Epoch: 0 Summary: Simple regular expressions API License: Apache License Group: Development/Java Url: http://jakarta.apache.org/%{name}/ Source0: http://www.apache.org/dist/jakarta/regexp/jakarta-regexp-%{version}.tar.gz Source1: regexp-1.5.pom BuildRequires: java-rpmbuild >= 0:1.6 Requires(pre): jpackage-utils >= 0:1.6 Requires(postun): jpackage-utils >= 0:1.6 BuildRequires: ant >= 1.6 %if ! %{gcj_support} BuildArch: noarch %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %if %{gcj_support} BuildRequires: java-gcj-compat-devel %endif %description Regexp is a 100% Pure Java Regular Expression package that was graciously donated to the Apache Software Foundation by Jonathan Locke. He originally wrote this software back in 1996 and it has stood up quite well to the test of time. It includes complete Javadoc documentation as well as a simple Applet for visual debugging and testing suite for compatibility. %package javadoc Group: Development/Java Summary: Javadoc for %{name} %description javadoc Javadoc for %{name}. %prep %setup -q -n %{full_name}-%{version} for j in $(find . -name "*.jar"); do mv $j $j.no done %build mkdir lib export CLASSPATH= export OPT_JAR_LIST= %{ant} -Djakarta-site2.dir=. jar javadocs %install rm -rf $RPM_BUILD_ROOT # jars install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -m 644 build/*.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) # javadoc install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -r docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} rm -rf docs/api %{__ln_s} %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # fix end-of-line for i in `find $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -type f -name "*.html" -o -name "*.css"`; do %{__perl} -pi -e 's/\r\n/\n/g' $i done %if %{gcj_support} %{_bindir}/aot-compile-rpm %endif mkdir -p %{buildroot}%{_mavenpomdir} install -m 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom %add_to_maven_depmap %{name} %{name} %{version} JPP %{name} %add_to_maven_depmap jakarta-%{name} jakarta-%{name} %{version} JPP %{name} %clean rm -rf $RPM_BUILD_ROOT %post %update_maven_depmap %if %{gcj_support} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %postun %update_maven_depmap %if %{gcj_support} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %files %defattr(0644,root,root,0755) %doc LICENSE %{_javadir}/*.jar %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %if %{gcj_support} %dir %{_libdir}/gcj/%{name} %attr(-,root,root) %{_libdir}/gcj/%{name}/* %endif %files javadoc %defattr(0644,root,root,0755) %{_javadocdir}/%{name}-%{version} %dir %{_javadocdir}/%{name} %changelog * Mon Jan 14 2013 umeabot <umeabot> 0:1.5-0.0.8.mga3 + Revision: 380280 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Aug 13 2012 pterjan <pterjan> 0:1.5-0.0.7.mga3 + Revision: 281156 - Drop useless Requires(post,postun), there are no scriptlets on this package * Sun Aug 21 2011 gil <gil> 0:1.5-0.0.6.mga3 + Revision: 134698 - added maven2 pom * Fri Jan 14 2011 ahmad <ahmad> 0:1.5-0.0.5.mga1 + Revision: 17881 - imported package regexp