[El] Some GIS java packages should be imported into ELGIS

Ralph Apel r.apel at r-apel.de
Mon Dec 20 13:20:34 EST 2010


Hi Viji,

netcdf(-java) is among the optional stuff for geotools
protobuf(-java)  is among the optional stuff for netcdf(-java)

Unfortunately the protobuf-2.2.0 package from FC12 (and EL6 I guess)
doesn't have a -java subpackage. 
protobuf-2.3.0 from FC14 does.
One option would be to extend 2.2.0 with a -java subpackage.
If that step isn't possible, we could complement the FC12/EL6 package
set with a separate protobuf-java-2.2.0 package along the lines of the
attached spec.

Cheers
Ralph

On Sat, 2010-12-18 at 22:23 +0530, Viji V Nair wrote:
> Hi Mathieu/Ralf
> 
> I will be porting the same for EPEL6 also.
> 
> I am out of town for the last one week, will be back on normal
> activities by mid of next week only. I supposed to be back on last
> Monday, but my trip got extended. Please let me know if there is
> anything which needs my urgent attention.
> 
> Thanks
> Viji
> 
> 
> On Sat, Dec 18, 2010 at 5:03 PM, Mathieu Baudier <mbaudier at argeo.org> wrote:
> >> These will go into geotools requires and most of them are not of general
> >> interest.
> >
> > Great! I will work on this by mid-next week if it is ok for you.
> > _______________________________________________
> > el mailing list
> > el at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/el
> >
-------------- next part --------------
# 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 section   free

Name:           protobuf-java
Version:        2.2.0
Release:	1%{?dist}
Epoch:          0
Summary:        Protocol buffers

Group:          Development/Libraries/Java
License:        BSD
URL:            http://code.google.com/p/protobuf/
Source0:        protobuf-java-2.2.0.tar.gz
# svn export http://protobuf.googlecode.com/svn/tags/2.2.0/java protobuf-java-2.2.0
# tar czf protobuf-java-2.2.0.tar.gz protobuf-java-2.2.0/
Source2:        %{name}-jpp-depmap.xml
Source3:        %{name}-settings.xml
Source1:        protobuf-%{version}-unittest.proto
Source4:        protobuf-%{version}-unittest_import.proto
Source5:        protobuf-%{version}-unittest_mset.proto
Source6:        protobuf-%{version}-unittest_optimize_for.proto
Source7:        protobuf-%{version}-unittest_custom_options.proto
Source8:        protobuf-%{version}-unittest_lite.proto
Source9:        protobuf-%{version}-unittest_import_lite.proto
Source10:       protobuf-%{version}-unittest_lite_imports_nonlite.proto
Source11:       protobuf-%{version}-unittest_enormous_descriptor.proto
Source12:       protobuf-%{version}-testdata-golden_message 
Source13:       protobuf-%{version}-testdata-golden_packed_fields_message 
Source14:       protobuf-%{version}-testdata-text_format_unittest_data.txt
Source15:       protobuf-%{version}-testdata-text_format_unittest_extensions_data.txt


BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

BuildArch:      noarch
BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel >= 0:1.6.0
BuildRequires:  maven2 >= 0:2.0.8
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-surefire
BuildRequires:  maven-doxia-sitetools
BuildRequires:  maven-surefire-provider-junit4
BuildRequires:  google-parent
BuildRequires:  protobuf-devel >= 0:2.2.0
BuildRequires:  protobuf-devel < 0:2.2.1

Requires:  java >= 0:1.6.0

Requires(post):   jpackage-utils >= 0:1.7.5
Requires(postun): jpackage-utils >= 0:1.7.5

%description
Protocol Buffers are a way of encoding structured data in 
an efficient yet extensible format. Google uses Protocol 
Buffers for almost all of its internal RPC protocols and 
file formats. 

%package        javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation

%description    javadoc
%{summary}.

%prep
%setup -q -c 
mkdir -p src/google/protobuf/testdata
cp %{_bindir}/protoc src
cp %{_includedir}/google/protobuf/descriptor.proto src/google/protobuf/
cp %{SOURCE1} src/google/protobuf/unittest.proto
cp %{SOURCE4} src/google/protobuf/unittest_import.proto
cp %{SOURCE5} src/google/protobuf/unittest_mset.proto
cp %{SOURCE6} src/google/protobuf/unittest_optimize_for.proto
cp %{SOURCE7} src/google/protobuf/unittest_custom_options.proto
cp %{SOURCE8} src/google/protobuf/unittest_lite.proto
cp %{SOURCE9} src/google/protobuf/unittest_import_lite.proto
cp %{SOURCE10} src/google/protobuf/unittest_lite_imports_nonlite.proto
cp %{SOURCE11} src/google/protobuf/unittest_enormous_descriptor.proto
cp %{SOURCE12} src/google/protobuf/testdata/golden_message
cp %{SOURCE13} src/google/protobuf/testdata/golden_packed_fields_message
cp %{SOURCE14} src/google/protobuf/testdata/text_format_unittest_data.txt
cp %{SOURCE15} src/google/protobuf/testdata/text_format_unittest_extensions_data.txt


cp -p %{SOURCE3} maven2-settings.xml
sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/maven2/plugins</url>|g" maven2-settings.xml
sed -i -e "s|<url>__ECLIPSEDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/eclipse/plugins</url>|g" maven2-settings.xml
mkdir external_repo
ln -s %{_javadir} external_repo/JPP

%build
export M2SETTINGS=$(pwd)/maven2-settings.xml
export MAVEN_REPO_LOCAL=`pwd`/m2_repo/repository
cd %{name}-%{version}
mvn-jpp -e \
        -s ${M2SETTINGS} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        install javadoc:javadoc

%install
rm -rf $RPM_BUILD_ROOT
install -dm 755 $RPM_BUILD_ROOT%{_javadir}
install -dm 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms

install -m 644 %{name}-%{version}/target/%{name}-%{version}.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
install -m 644 %{name}-%{version}/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap com.google.protobuf protobuf-java %{version} JPP %{name}

# javadoc
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr %{name}-%{version}/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(0644,root,root,0755)
%{_javadir}/*.jar
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*

%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}

%changelog
* Mon Dec 20 2010 Ralph Apel <r.apel at r-apel.de> 2.2.0-1
- first release



More information about the el mailing list