# Copyright (c) 2000-2008, 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 section free Name: jcip-annotations Version: 1.0 Release: %mkrel 1.0.2 Epoch: 0 Summary: Java Concurrency in Practice License: Creative Commons Attribution License Group: Development/Java URL: http://www.jcip.net/ Source0: http://www.jcip.net/jcip-annotations-src.jar Source1: http://repo1.maven.org/maven/livetribe/maven/m2/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.pom #Patch0: aQute-bndlib-Filter.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %if %{gcj_support} BuildRequires: java-gcj-compat-devel %endif %if ! %{gcj_support} BuildArch: noarch %endif BuildRequires: jpackage-utils >= 0:1.7.5 BuildRequires: java-rpmbuild #BuildRequires: ant >= 0:1.6.5 #BuildRequires: ecj #BuildRequires: eclipse-ecj #BuildRequires: eclipse-platform #BuildRequires: eclipse-rcp Requires: java >= 0:1.5.0 #Requires: ant >= 0:1.6.5 #Requires: ecj #Requires: eclipse-ecj #Requires: eclipse-platform #Requires: eclipse-rcp Requires(post): jpackage-utils >= 0:1.7.4 Requires(postun): jpackage-utils >= 0:1.7.4 %description Java Concurrency in Practice %package javadoc Summary: Javadoc for %{name} Group: Development/Java %description javadoc Javadoc for %{name}. %prep %setup -q -c mkdir -p target/site/apidocs/ mkdir -p target/classes/ mkdir -p src/main/java/ mv net src/main/java #%patch0 -b .sav0 %build %javac -d target/classes $(find src/main/java -name "*.java") %javadoc -d target/site/apidocs -sourcepath src/main/java net.jcip.annotations for f in $(find aQute/ -type f -not -name "*.class"); do cp $f target/classes/$f done pushd target/classes %jar cmf ../../META-INF/MANIFEST.MF ../%{name}-%{version}.jar * popd %install rm -rf $RPM_BUILD_ROOT # jars install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -m 644 target/%{name}-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar %add_to_maven_depmap net.jcip jcip-annotations %{version} JPP %{name} (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # pom install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom # javadoc install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} %{gcj_compile} %clean rm -rf $RPM_BUILD_ROOT %post %update_maven_depmap %if %{gcj_support} %{update_gcjdb} %endif %postun %update_maven_depmap %if %{gcj_support} %{clean_gcjdb} %endif %files %defattr(-,root,root,-) %{_javadir}/* %{_datadir}/maven2 %{_mavendepmapfragdir} %{gcj_files} %files javadoc %defattr(-,root,root,-) %doc %{_javadocdir}/%{name}-%{version} %doc %{_javadocdir}/%{name} %changelog * Fri Sep 04 2009 Thierry Vignaud <tvignaud@mandriva.com> 0:1.0-1.0.2mdv2010.0 + Revision: 429597 - rebuild * Tue Aug 12 2008 Alexander Kurtakov <akurtakov@mandriva.org> 0:1.0-1.0.1mdv2009.0 + Revision: 271258 - fix group - BR java-rpmbuild - import jcip-annotations