libIDL.spec
author laca
Fri, 29 Oct 2004 01:28:51 +0000
changeset 4365 d8676a6421af
parent 4276 2a2c7f354601
child 4409 4fec71e58697
permissions -rw-r--r--
2004-10-29 Laszlo Peter <[email protected]> * GConf.spec, ORBit2.spec, atk.spec, glib2.spec, gtk2.spec, libIDL.spec, libbonobo.spec, libglade.spec, pango.spec: use $CC64 as the 64-bit compiler, if defined

Name:         libIDL
License:      LGPL
Group:        System/Libraries
Version:      0.8.3
Release:      21
Distribution: Cinnabar
Vendor:       Sun Microsystems, Inc.
Summary:      IDL parsing library
Source:       http://ftp.gnome.org/pub/GNOME/sources/libIDL/0.8/libIDL-%{version}.tar.bz2
Source1:      libIDL-2.3.gz
URL:          http://www.gnome.org
Docdir:       %{_defaultdocdir}/doc
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
AutoReqProv:  on
Prereq:       /sbin/ldconfig

%define glib2_version 2.4.0
%define pkgconfig_version 0.15.0

Requires:      glib2 >= %{glib2_version}
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: pkgconfig >= %{pkgconfig_version}

%description
libIDL is a small library for creating parse trees of CORBA v2.2
compliant Interface Definition Language (IDL) files, which is a
specification for defining interfaces which can be used between
different CORBA implementations.

%package devel
Summary:      IDL parsing library development libraries and header files.
Group:        Development/Languages/Other
Requires:     %{name} = %{version}
Requires:     glib2-devel >= %{glib2_version}

%description devel
libIDL is a small library for creating parse trees of CORBA v2.2
compliant Interface Definition Language (IDL) files, which is a
specification for defining interfaces which can be used between
different CORBA implementations.

%prep
%setup -q

%ifos solaris
%ifarch amd64 sparcv9
cd ..
cp -rp libIDL-%{version} libIDL-%{version}-64
%endif
%endif


%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
  CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
fi

CONFLAGS="--prefix=%{_prefix} --infodir=%{_infodir}"

%ifos solaris
%ifarch amd64 sparcv9
CPUS=$(($CPUS*4))

cd ../libIDL-%version-64

export CFLAGS="$CFLAGS64"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH64"
export CC=${CC64:-$CC}
save_PATH="$PATH"
ccdir=`dirname $CC`
export PATH=$ccdir:$PATH

./configure $CONFLAGS					\
            --bindir=%{_bindir}/%{_arch64}		\
            --libdir=%{_libdir}/%{_arch64}		\
            --libexecdir=%{_libexecdir}/%{_arch64}	\
            --sysconfdir=%{_sysconfdir}/%{_arch64}

make -j $CPUS

cd ../libIDL-%version

export CFLAGS="$CFLAGS32"
export RPM_OPT_FLAGS="$CFLAGS"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH32"
export CC=${CC32:-$CC}
export PATH="$save_PATH"

%endif
%endif

CFLAGS="$RPM_OPT_FLAGS"				\
./configure $CONFLAGS				\
            --sysconfdir=%{_sysconfdir}
make -j $CPUS

%install

%ifos solaris
%ifarch amd64 sparcv9
cd ../libIDL-%version-64
make install DESTDIR=$RPM_BUILD_ROOT
cd ../libIDL-%version
%endif
%endif

make DESTDIR=$RPM_BUILD_ROOT install
install -d $RPM_BUILD_ROOT/usr/share/man/man3
install --mode=0644 %SOURCE1 $RPM_BUILD_ROOT/usr/share/man/man3
rm $RPM_BUILD_ROOT%{_libdir}/*.a
rm $RPM_BUILD_ROOT%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files
%defattr(-,root,root)
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_bindir}/*
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.so
%{_includedir}/*
%{_mandir}/man3/*
%{_infodir}/*.info.gz

%changelog
* Fri Oct 29 2004 - [email protected]
- use $CC64 for the 64-bit build if defined

* Sat Oct  2 2004 - [email protected]
- Create 64bit libraries for Solaris

* Thu Jul 08 2004 - [email protected]
- ported to rpm4

* Wed Jul 07 2004 - [email protected]
- added "-j $CPUS" to make to speed up builds

* Wed Jan 28 2004 - <[email protected]> 0.8.3-1
- Upgrade to 0.8.3

* Mon Dec 15 2003 - <[email protected]>
- Add back the man pages.

* Thu Aug 14 2003 - <[email protected]>
- move lib*.so to -devel, remove *.a, *.la

* Fri Aug 01 2003 - <[email protected]> 0.8.2-1
- Upgrade to 0.8.2

* Tue May 20 2003 - <[email protected]>
- initial Sun release