Group :: Development/Java
RPM: jarjar
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Packager: Igor Vlasenko <viy at altlinux.ru>
BuildRequires: /proc
BuildRequires: jpackage-1.5-compat
# 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
Name: jarjar
Version: 0.9
Release: alt1_2jpp5
Epoch: 0
Summary: Jar Jar Links
License: GPLv2+
URL: http://tonicsystems.com/products/jarjar/
Group: Development/Java
Source0: http://downloads.sourceforge.net/jarjar/jarjar-src-0.9.tar.bz2
Source1: jarjar-0.9.pom
BuildRequires: ant >= 0:1.6
BuildRequires: ant-junit >= 0:1.6
BuildRequires: jpackage-utils >= 0:1.7.2
BuildRequires: junit
BuildRequires: asm2
BuildRequires: gnu-regexp
BuildRequires: maven2-plugins
Requires: asm2
Requires: gnu-regexp
Requires(post): jpackage-utils >= 0:1.7.2
Requires(postun): jpackage-utils >= 0:1.7.2
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
%endif
%if ! %{gcj_support}
BuildArch: noarch
%endif
BuildRequires: maven2
%description
Jar Jar Links is a utility that makes it easy to repackage Java
libraries and embed them into your own distribution. This is
useful for two reasons:
You can easily ship a single jar file with no external dependencies.
You can avoid problems where your library depends on a specific
version of a library, which may conflict with the dependencies of
another library.
%package maven2-plugin
Summary: Maven2 plugin for %{name}
Group: Development/Java
Requires: maven2
Requires: %{name} = %{epoch}:%{version}-%{release}
%description maven2-plugin
%{summary}.
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
%description javadoc
%{summary}.
%prep
%setup -q -n %{name}-%{version}
# remove all binary libs
find . -name "*.jar" | xargs -t rm
%build
pushd lib
ln -sf $(build-classpath gnu-regexp)
ln -sf $(build-classpath asm2/asm2) asm.jar
ln -sf $(build-classpath asm2/asm2-commons) asm-commons.jar
ln -sf $(build-classpath asm2/asm2-util) asm-util.jar
ln -sf $(build-classpath maven2/plugin-api) maven-plugin-api.jar
popd
export OPT_JAR_LIST="ant/ant-junit junit"
export CLASSPATH=$(build-classpath ant)
ant jar jar-util javadoc mojo test
%install
# jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}
install -m 644 dist/%{name}-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -m 644 dist/%{name}-util-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-util-%{version}.jar
install -m 644 dist/%{name}-plugin-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-maven2-plugin-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
%add_to_maven_depmap tonic jarjar %{version} JPP %{name}
%add_to_maven_depmap com.tonicsystems jarjar %{version} JPP %{name}
%add_to_maven_depmap tonic jarjar-util %{version} JPP %{name}-util
%add_to_maven_depmap com.tonicsystems jarjar-util %{version} JPP %{name}-util
%add_to_maven_depmap tonic jarjar-plugin %{version} JPP %{name}-plugin
%add_to_maven_depmap com.tonicsystems jarjar-plugin %{version} JPP %{name}-plugin
# poms
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -pm 644 %{SOURCE1} \
$RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}.pom
# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr dist/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
%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
%doc COPYING
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{name}-util-%{version}.jar
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-util.jar
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/%{name}*-%{version}.jar.*
%endif
%files maven2-plugin
%{_javadir}/%{name}-maven2-plugin-%{version}.jar
%{_javadir}/%{name}-maven2-plugin.jar
%files javadoc
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog
…
Full changelog you can see here
BuildRequires: /proc
BuildRequires: jpackage-1.5-compat
# 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
Name: jarjar
Version: 0.9
Release: alt1_2jpp5
Epoch: 0
Summary: Jar Jar Links
License: GPLv2+
URL: http://tonicsystems.com/products/jarjar/
Group: Development/Java
Source0: http://downloads.sourceforge.net/jarjar/jarjar-src-0.9.tar.bz2
Source1: jarjar-0.9.pom
BuildRequires: ant >= 0:1.6
BuildRequires: ant-junit >= 0:1.6
BuildRequires: jpackage-utils >= 0:1.7.2
BuildRequires: junit
BuildRequires: asm2
BuildRequires: gnu-regexp
BuildRequires: maven2-plugins
Requires: asm2
Requires: gnu-regexp
Requires(post): jpackage-utils >= 0:1.7.2
Requires(postun): jpackage-utils >= 0:1.7.2
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
%endif
%if ! %{gcj_support}
BuildArch: noarch
%endif
BuildRequires: maven2
%description
Jar Jar Links is a utility that makes it easy to repackage Java
libraries and embed them into your own distribution. This is
useful for two reasons:
You can easily ship a single jar file with no external dependencies.
You can avoid problems where your library depends on a specific
version of a library, which may conflict with the dependencies of
another library.
%package maven2-plugin
Summary: Maven2 plugin for %{name}
Group: Development/Java
Requires: maven2
Requires: %{name} = %{epoch}:%{version}-%{release}
%description maven2-plugin
%{summary}.
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
%description javadoc
%{summary}.
%prep
%setup -q -n %{name}-%{version}
# remove all binary libs
find . -name "*.jar" | xargs -t rm
%build
pushd lib
ln -sf $(build-classpath gnu-regexp)
ln -sf $(build-classpath asm2/asm2) asm.jar
ln -sf $(build-classpath asm2/asm2-commons) asm-commons.jar
ln -sf $(build-classpath asm2/asm2-util) asm-util.jar
ln -sf $(build-classpath maven2/plugin-api) maven-plugin-api.jar
popd
export OPT_JAR_LIST="ant/ant-junit junit"
export CLASSPATH=$(build-classpath ant)
ant jar jar-util javadoc mojo test
%install
# jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}
install -m 644 dist/%{name}-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -m 644 dist/%{name}-util-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-util-%{version}.jar
install -m 644 dist/%{name}-plugin-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-maven2-plugin-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
%add_to_maven_depmap tonic jarjar %{version} JPP %{name}
%add_to_maven_depmap com.tonicsystems jarjar %{version} JPP %{name}
%add_to_maven_depmap tonic jarjar-util %{version} JPP %{name}-util
%add_to_maven_depmap com.tonicsystems jarjar-util %{version} JPP %{name}-util
%add_to_maven_depmap tonic jarjar-plugin %{version} JPP %{name}-plugin
%add_to_maven_depmap com.tonicsystems jarjar-plugin %{version} JPP %{name}-plugin
# poms
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -pm 644 %{SOURCE1} \
$RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}.pom
# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr dist/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
%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
%doc COPYING
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{name}-util-%{version}.jar
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-util.jar
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/%{name}*-%{version}.jar.*
%endif
%files maven2-plugin
%{_javadir}/%{name}-maven2-plugin-%{version}.jar
%{_javadir}/%{name}-maven2-plugin.jar
%files javadoc
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog
…
Full changelog you can see here