Package apache-commons-codec: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | BuildRequires: /proc BuildRequires: jpackage-compat # Copyright (c) 2000-2010, 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 with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}} %define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}} %define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}} %define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}} %bcond_without maven #def_with gcj_support %bcond_with gcj_support %bcond_without repolib %define repodir %{_javadir}/repository.jboss.com/apache-%{base_name}/%{version}-brew %define repodirlib %{repodir}/lib %define repodirres %{repodir}/resources %define repodirsrc %{repodir}/src %if %with gcj_support %define gcj_support 0 %else %define gcj_support 0 %endif %define base_name codec %define short_name commons-%{base_name} Name: apache-commons-codec Version: 1.4 Release: alt3_5jpp6 Summary: Apache Commons Codec Package License: Apache Software License 2.0 Group: Development/Java Epoch: 0 URL: http://commons.apache.org/codec/ Source0: http://www.apache.org/dist/jakarta/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz Source1: %{name}-settings.xml Source2: %{name}-jpp-depmap.xml Source3: %{name}-component-info.xml BuildRequires: jpackage-utils >= 0:1.7.5 BuildRequires: ant >= 0:1.7 BuildRequires: ant-junit BuildRequires: junit BuildRequires: java-javadoc %if %with maven BuildRequires: apache-commons-parent >= 0:12 BuildRequires: maven2 >= 0:2.0.8 BuildRequires: maven-surefire-maven-plugin BuildRequires: maven-surefire-provider-junit BuildRequires: maven2-plugin-antrun BuildRequires: maven2-plugin-assembly BuildRequires: maven2-plugin-compiler BuildRequires: maven2-plugin-idea BuildRequires: maven2-plugin-install BuildRequires: maven2-plugin-jar BuildRequires: maven2-plugin-javadoc BuildRequires: maven2-plugin-resources %endif Requires(post): jpackage-utils >= 0:1.7.5 Requires(postun): jpackage-utils >= 0:1.7.5 %if ! %{gcj_support} BuildArch: noarch %endif Provides: jakarta-%{short_name} = %{epoch}:%{version}-%{release} Obsoletes: jakarta-%{short_name} <= %{epoch}:%{version}-%{release} Provides: %{short_name} = %{epoch}:%{version}-%{release} Obsoletes: %{short_name} <= %{epoch}:%{version}-%{release} %if %{gcj_support} BuildRequires: java-gcj-compat-devel Requires(post): java-gcj-compat Requires(postun): java-gcj-compat %endif Source44: import.info %description Commons Codec is an attempt to provide definitive implementations of commonly used encoders and decoders. %if %with repolib %package repolib Summary: Artifacts to be uploaded to a repository library Group: Development/Java Provides: jakarta-%{short_name}-repolib = %{epoch}:%{version}-%{release} Obsoletes: jakarta-%{short_name}-repolib <= %{epoch}:%{version}-%{release} Provides: %{short_name}-repolib = %{epoch}:%{version}-%{release} Obsoletes: %{short_name}-repolib <= %{epoch}:%{version}-%{release} %description repolib Artifacts to be uploaded to a repository library. This package is not meant to be installed but so its contents can be extracted through rpm2cpio %endif %package javadoc Summary: Javadoc for %{name} Group: Development/Documentation Requires: java-javadoc Provides: jakarta-%{short_name}-javadoc = %{epoch}:%{version}-%{release} Obsoletes: jakarta-%{short_name}-javadoc <= %{epoch}:%{version}-%{release} Provides: %{short_name}-javadoc = %{epoch}:%{version}-%{release} Obsoletes: %{short_name}-javadoc <= %{epoch}:%{version}-%{release} BuildArch: noarch %description javadoc Javadoc for %{name}. %prep %setup -q -n %{short_name}-%{version}-src #fixes eof encoding %{__sed} -i 's/\r//' LICENSE.txt %{__sed} -i 's/\r//' RELEASE-NOTES.txt %if %with maven cp -p %{SOURCE1} settings.xml sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" settings.xml sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml sed -i -e "s|<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/maven2/plugins</url>|g" settings.xml sed -i -e "s|<url>__ECLIPSEDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/eclipse/plugins</url>|g" settings.xml mkdir external_repo ln -s %{_javadir} external_repo/JPP %endif %build %if %with maven export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository mkdir -p ${MAVEN_REPO_LOCAL} export MAVEN_OPTS="-Dmaven2.jpp.mode=true -Dmaven2.jpp.depmap.file=%{SOURCE2} -Dmaven.repo.local=${MAVEN_REPO_LOCAL} -Dproject.build.directory=$(pwd)/target" mvn-jpp -Dmaven.compile.target=1.5 -Dmaven.javadoc.source=1.5 \ -e \ -s $(pwd)/settings.xml \ install javadoc:javadoc %else export CLASSPATH=$(build-classpath junit) ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 -Dbuild.sysclasspath=first \ -Dconf.home=src/conf \ -Dbuild.home=build \ -Dsource.home=src/java \ -Dtest.home=src/test \ -Ddist.home=dist \ -Dcomponent.title=%{short_name} \ -Dcomponent.version=%{version} \ -Dfinal.name=%{name}-%{version} \ -Dextension.name=%{short_name} \ test jar javadoc %endif %install # jars mkdir -p $RPM_BUILD_ROOT%{_javadir} %if %with maven cp -p target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar %else cp -p dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar %endif ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{short_name}-%{version}.jar ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{short_name}.jar ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/jakarta-%{short_name}-%{version}.jar ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/jakarta-%{short_name}.jar # Install pom file install -dm 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms cp -p pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-apache-commons-codec.pom %add_to_maven_depmap commons-codec commons-codec %{version} JPP apache-commons-codec %add_to_maven_depmap org.apache.commons commons-codec %{version} JPP apache-commons-codec # javadoc mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %if %with maven cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %else cp -pr dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %endif ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/jakarta-%{short_name}-%{version} ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/jakarta-%{short_name} ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} %if %{gcj_support} %{_bindir}/aot-compile-rpm %endif %if %with repolib %{__install} -d -m 0755 %{buildroot}%{repodir} %{__install} -d -m 0755 %{buildroot}%{repodirlib} %{__install} -p -m 0644 %{SOURCE3} %{buildroot}%{repodir}/component-info.xml tag=`/bin/echo %{name}-%{version}-%{release} | %{__sed} 's|\.|_|g'` %{__sed} -i "s/@TAG@/$tag/g" %{buildroot}%{repodir}/component-info.xml %{__sed} -i "s/@VERSION@/%{version}-brew/g" %{buildroot}%{repodir}/component-info.xml %{__sed} -i 's/project name=""/project name="%{name}"/g' %{buildroot}%{repodir}/component-info.xml %{__install} -d -m 0755 %{buildroot}%{repodirsrc} %{__install} -p -m 0644 %{SOURCE0} %{buildroot}%{repodirsrc} %{__install} -p -m 0644 %{SOURCE1} %{buildroot}%{repodirsrc} %{__install} -p -m 0644 %{SOURCE2} %{buildroot}%{repodirsrc} %{__install} -p -m 0644 %{SOURCE3} %{buildroot}%{repodirsrc} %{__cp} -p %{buildroot}%{_javadir}/%{name}-%{version}.jar %{buildroot}%{repodirlib}/%{short_name}.jar %endif %files %doc LICENSE.txt RELEASE-NOTES.txt %{_javadir}/*.jar %{_datadir}/maven2/poms/* %{_mavendepmapfragdir}/* %if %{gcj_support} %{_libdir}/gcj/%{name}/apache-commons-codec-1.4.jar.* %endif %files javadoc %{_javadocdir}/* %if %with repolib %files repolib %{repodir} %endif %changelog * Sun Jan 02 2011 Igor Vlasenko <viy@altlinux.ru> 0:1.4-alt3_5jpp6 - fixed repolib * Thu Dec 30 2010 Igor Vlasenko <viy@altlinux.ru> 0:1.4-alt2_5jpp6 - fixed repolib * Wed Dec 29 2010 Igor Vlasenko <viy@altlinux.ru> 0:1.4-alt1_5jpp6 - new version |