GRIB-351: pkgconfig libs are incorrect

This commit is contained in:
Shahram Najm 2013-04-15 15:27:18 +01:00
parent e3da5844c3
commit 39804dcc66
11 changed files with 34 additions and 174 deletions

View File

@ -8,7 +8,7 @@ CONFIGURE_DEPENDENCIES = $(top_srcdir)/version.sh
$(top_srcdir)/configure: $(top_srcdir)/version.sh
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = grib_api.pc grib_api_f90.pc
pkgconfig_DATA = rpms/grib_api.pc rpms/grib_api_f90.pc
if WITH_PERL
PERL_OPT = @PERLDIR@
@ -387,7 +387,7 @@ check-perf:
# -rm -f $(perf_dir)/report.out*
@echo "Testing and benchmarks have finished"
rpmspec = $(PACKAGE_TARNAME).spec
rpmspec = rpms/$(PACKAGE_TARNAME).spec
rpmmacros = \
--define="_rpmdir $${PWD}"\
@ -426,7 +426,7 @@ bindist:
$(MAKE) DESTDIR=$(abs_top_srcdir)/_dist
$(MAKE) DESTDIR=$(abs_top_srcdir)/_dist install
cd $(abs_top_srcdir)/_dist; \
find . -type f | grep $(prefix) | \
find . -type f -o -type l | grep $(prefix) | \
cpio -ov -H ustar > $(main_package) ; \
gzip $(main_package)

View File

@ -17,17 +17,21 @@ AC_CONFIG_MACRO_DIR([m4])
GRIB_API_MAIN_VERSION="${GRIB_API_MAJOR_VERSION}.${GRIB_API_MINOR_VERSION}.${GRIB_API_REVISION_VERSION}"
echo $GRIB_API_MAIN_VERSION
PACKAGE_VERSION="${GRIB_API_MAIN_VERSION}"
AC_SUBST(GRIB_API_MAIN_VERSION)
echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}"
AC_SUBST(GRIB_ABI_CURRENT)
AC_SUBST(GRIB_ABI_REVISION)
AC_SUBST(GRIB_ABI_AGE)
echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}"
# Ensure that make can run correctly
AM_SANITY_CHECK
AC_CONFIG_SRCDIR([src/grib_api.h])
AC_CONFIG_HEADER([src/config.h])
AC_CONFIG_FILES([grib_api.pc grib_api.spec grib_api_f90.pc])
AC_CONFIG_FILES([rpms/grib_api.pc rpms/grib_api.spec rpms/grib_api_f90.pc])
AM_INIT_AUTOMAKE($PACKAGE_NAME,[${PACKAGE_VERSION}],[http://www.ecmwf.int])
definition_files_path="${datadir}/grib_api/definitions"
@ -39,6 +43,12 @@ AC_DEFINE_UNQUOTED(GRIB_API_MAIN_VERSION,$GRIB_API_MAIN_VERSION,Grib Api version
AC_DEFINE_UNQUOTED(GRIB_API_MAJOR_VERSION,$GRIB_API_MAJOR_VERSION,Grib Api Major release)
AC_DEFINE_UNQUOTED(GRIB_API_MINOR_VERSION,$GRIB_API_MINOR_VERSION,Grib Api Minor release)
AC_DEFINE_UNQUOTED(GRIB_API_REVISION_VERSION,$GRIB_API_REVISION_VERSION,Grib Api Revision release)
AC_DEFINE_UNQUOTED(GRIB_ABI_CURRENT,$GRIB_ABI_CURRENT,Grib Api Current ABI version)
AC_DEFINE_UNQUOTED(GRIB_ABI_REVISION,$GRIB_ABI_REVISION,Grib Api Revision ABI version)
AC_DEFINE_UNQUOTED(GRIB_ABI_AGE,$GRIB_ABI_AGE,Grib Api Age of ABI version)
AH_TEMPLATE([_LARGE_FILE_API],
[Needs to be undefined on some AIX])
@ -617,7 +627,7 @@ AC_CHECK_FUNCS([bzero gettimeofday])
AX_LINUX_DISTRIBUTION
AC_OUTPUT( Makefile src/Makefile fortran/Makefile tools/Makefile definitions/Makefile samples/Makefile ifs_samples/grib1/Makefile ifs_samples/grib1_mlgrib2/Makefile ifs_samples/grib1_mlgrib2_ieee64/Makefile tests/Makefile mars_tests/Makefile examples/C/Makefile examples/F90/Makefile tigge/Makefile perl/GRIB-API/Makefile.PL perl/Makefile python/Makefile examples/python/Makefile rpms/grib_api.spec rpms/grib_api.pc rpms/grib_api_f90.pc)
AC_OUTPUT( Makefile src/Makefile fortran/Makefile tools/Makefile definitions/Makefile samples/Makefile ifs_samples/grib1/Makefile ifs_samples/grib1_mlgrib2/Makefile ifs_samples/grib1_mlgrib2_ieee64/Makefile tests/Makefile mars_tests/Makefile examples/C/Makefile examples/F90/Makefile tigge/Makefile perl/GRIB-API/Makefile.PL perl/Makefile python/Makefile examples/python/Makefile)
AC_MSG_NOTICE([

View File

@ -7,11 +7,11 @@ include_HEADERS = grib_api_f77.h
libgrib_api_f77_la_SOURCES= grib_fortran.c grib_f77.c
libgrib_api_f77_la_DEPENDENCIES = $(top_builddir)/src/libgrib_api.la
libgrib_api_f77_la_LDFLAGS = -release $(GRIB_API_MAIN_VERSION)
libgrib_api_f77_la_LDFLAGS = -version-info $(GRIB_ABI_CURRENT):$(GRIB_ABI_REVISION):$(GRIB_ABI_AGE)
libgrib_api_f90_la_SOURCES= grib_fortran.c grib_f90.f90
libgrib_api_f90_la_DEPENDENCIES = $(top_builddir)/src/libgrib_api.la grib_api_externals.h grib_api_visibility.h grib_api_constants.h grib_kinds.h
libgrib_api_f90_la_LDFLAGS = -release $(GRIB_API_MAIN_VERSION)
libgrib_api_f90_la_LDFLAGS = -version-info $(GRIB_ABI_CURRENT):$(GRIB_ABI_REVISION):$(GRIB_ABI_AGE)
libgrib_api_fortran_prototypes= grib_fortran.c

View File

@ -1,11 +0,0 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
includedir=@includedir@
libdir=@libdir@
Name: grib_api
Description: The grib_api library
Version: @VERSION@
Cflags: @CFLAGS@
Libs: @LDFLAGS@ @LIBS@

View File

@ -1,134 +0,0 @@
# -*- Mode:rpm-spec -*-
Summary: The ECMWF GRIB API is an application program interface accessible from C and FORTRAN programs developed for encoding and decoding WMO FM-92 GRIB edition 1 and edition 2 messages.
%define rel @RPM_RELEASE@
%define version @VERSION@
%define pkgname @PACKAGE@
%define prefix @prefix@
%define _prefix @prefix@
%define _target_platform @RPM_HOST_CPU@-@RPM_HOST_VENDOR@-@RPM_HOST_OS@
%define _target_cpu @RPM_HOST_CPU@
%define _enable_python %(test -z "@WITH_PYTHON_TRUE@" && echo 1 || echo 0)
%define _enable_fortran %(test -z "@WITH_FORTRAN_TRUE@" && echo 1 || echo 0)
%define _requires_openjpeg %(test -n "@LIB_OPENJPEG@" && echo 1 || echo 0)
%define _requires_jasper %(test -n "@LIB_JASPER@" && echo 1 || echo 0)
%define lt_release @LT_RELEASE@
%define lt_version @LT_CURRENT@.@LT_REVISION@.@LT_AGE@
%define __aclocal aclocal || aclocal -I ./macros
%define configure_args @RPM_CONFIGURE_ARGS@
Name: %{pkgname}
Version: %{version}
Release: %{rel}
Distribution: @LINUX_DISTRIBUTION_NAME@ @LINUX_DISTRIBUTION_VERSION@
Vendor: ECMWF
License: LGPL
Group: Scientific/Libraries
Source: %{pkgname}-%{version}.tar.gz
# %if %{_requires_jasper}
# Requires: libjasper
# %endif
# %if %{_requires_openjpeg}
# Requires: openjpeg
# %endif
Buildroot: /tmp/%{pkgname}-root
URL: http://www.ecmwf.int
Prefix: %{prefix}
BuildArchitectures: %{_target_cpu}
Packager: Software Services <software.support@ecmwf.int>
%description
The ECMWF GRIB API is an application program interface accessible from C and FORTRAN programs developed for encoding and decoding WMO FM-92 GRIB edition 1 and edition 2 messages.
%changelog
* Mon May 26 2005 - Get the changelog from JIRA
- Added kmymoney-ofx package
%prep
%setup
#%patch
%build
%GNUconfigure %{?configure_args}
# This is why we copy the CFLAGS to the CXXFLAGS in configure.in
# CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{prefix}
make
%install
# To make things work with BUILDROOT
echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
rm -rf "$RPM_BUILD_ROOT"
make DESTDIR="$RPM_BUILD_ROOT" install
%clean
%files
%defattr(-, root, root)
#%doc COPYRIGHT ChangeLog README AUTHORS NEWS
#%doc doc/*
%prefix/bin/*
%prefix/lib*/libgrib_api.so
%prefix/lib*/libgrib_api-%{version}.so
%prefix/share/grib_api/definitions/*
# If you install a library
%post
/sbin/ldconfig || exit 1
exit 0
# If you install a library
%postun
/sbin/ldconfig
exit 0
%package devel
Summary: Development files for %{pkgname}
Group: Scientific/Libraries
Requires: grib_api
%description devel
Development files for %{pkgname}.
The ECMWF GRIB API is an application program interface accessible from C and FORTRAN programs developed for encoding and decoding WMO FM-92 GRIB edition 1 and edition 2 messages.
%files devel
%defattr(-, root, root)
#%doc doc
%prefix/include/*
%prefix/lib*/*.a
%prefix/lib*/*.la
%prefix/lib*/pkgconfig/*
%prefix/share/grib_api/samples/*
%prefix/share/grib_api/ifs_samples/*
# Only generate package if python is enabled
%if %{_enable_python}
%package python
Summary: Python interface for %{pkgname}
Group: Scientific/Libraries
Requires: grib_api
%description python
Python interface for %{pkgname}.
The ECMWF GRIB API is an application program interface accessible from C and FORTRAN programs developed for encoding and decoding WMO FM-92 GRIB edition 1 and edition 2 messages.
%files python
%defattr(-, root, root)
%prefix/lib*/python*/*
%endif
# Only generate package if fortran is enabled
%if %{_enable_fortran}
%package fortran
Summary: Fortran 90 interface for %{pkgname}
Group: Scientific/Libraries
Requires: grib_api
%description fortran
Fortran 77 and 90 interface for %{pkgname}.
The ECMWF GRIB API is an application program interface accessible from C and FORTRAN programs developed for encoding and decoding WMO FM-92 GRIB edition 1
and edition 2 messages.
%files fortran
%defattr(-, root,root)
%prefix/lib*/*f90*
%prefix/lib*/*f77*
%endif

View File

@ -1,12 +0,0 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
includedir=@includedir@
libdir=@libdir@
FC=@FC@
Name: grib_api
Description: The grib_api library for Fortran 90
Version: @VERSION@
Cflags: @CFLAGS@ "@F90_MODULE_FLAG@@includedir@"
Libs: -L@libdir@ @LDFLAGS@ @LIBS@ -lgrib_api_f90 -lgrib_api

View File

@ -7,5 +7,6 @@ libdir=@libdir@
Name: grib_api
Description: The grib_api library
Version: @VERSION@
Cflags: @CFLAGS@
Libs: @LDFLAGS@ @LIBS@
Cflags: -I${includedir}
Libs: -L${libdir} -lgrib_api
Libs.private: -L${libdir} -lgrib_api @LIBS@

View File

@ -71,8 +71,8 @@ make DESTDIR="$RPM_BUILD_ROOT" install
%doc ChangeLog README AUTHORS NEWS LICENSE
#%doc doc/*
%prefix/bin/*
# %prefix/lib*/libgrib_api.so
# %prefix/lib*/libgrib_api-%{version}.so
%prefix/lib*/libgrib_api.so
%prefix/lib*/libgrib_api.so.*
%prefix/share/grib_api/definitions/*
# If you install a library
@ -91,9 +91,9 @@ The ECMWF GRIB API is an application program interface accessible from C and FOR
%files devel
%defattr(-, root, root)
#%doc doc
%prefix/include/*
%prefix/include/*.h
%prefix/lib*/*.a
# %prefix/lib*/*.la
%prefix/lib*/*.la
%prefix/lib*/pkgconfig/*
%prefix/share/grib_api/samples/*
%prefix/share/grib_api/ifs_samples/*
@ -124,6 +124,7 @@ The ECMWF GRIB API is an application program interface accessible from C and FOR
and edition 2 messages.
%files fortran
%defattr(-, root,root)
%prefix/include/*.mod
%prefix/lib*/*f90*
%prefix/lib*/*f77*
%endif

View File

@ -8,5 +8,6 @@ FC=@FC@
Name: grib_api
Description: The grib_api library for Fortran 90
Version: @VERSION@
Cflags: @CFLAGS@ "@F90_MODULE_FLAG@@includedir@"
Libs: -L@libdir@ @LDFLAGS@ @LIBS@ -lgrib_api_f90 -lgrib_api
Cflags: @F90_MODULE_FLAG@@includedir@
Libs: -L${libdir} -lgrib_api_f90
Libs.private: -L${libdir} -lgrib_api_f90 -lgrib_api @LIBS@

View File

@ -294,7 +294,7 @@ libgrib_api_la_SOURCES = $(libgrib_api_la_prototypes) grib_yacc.c grib_lex.c md
libgrib_api_la_LIBADD = @LIBOBJS@
libgrib_api_la_DEPENDENCIES = grib_api.h $(libgrib_api_la_LIBADD)
libgrib_api_la_LDFLAGS = -release $(GRIB_API_MAIN_VERSION)
libgrib_api_la_LDFLAGS = -version-info $(GRIB_ABI_CURRENT):$(GRIB_ABI_REVISION):$(GRIB_ABI_AGE)
# set the include path
INCLUDES= -I.

View File

@ -16,3 +16,7 @@ PACKAGE_NAME='grib_api'
GRIB_API_MAJOR_VERSION=2
GRIB_API_MINOR_VERSION=0
GRIB_API_REVISION_VERSION=0
GRIB_ABI_CURRENT=0
GRIB_ABI_REVISION=0
GRIB_ABI_AGE=0