Name: libgcal Version: 0.9.6 Release: 1 Summary: A library to access google calendar events and contacts Group: System Environment/Libraries License: BSD URL: http://code.google.com/p/libgcal/ Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tar.bz2 # The following patch has been provided by Peter Lemenkov on # http://peter.fedorapeople.org/patches/libgcal--pc_include_fix.diff Patch0: %{name}--pc_include_fix.diff Patch1: %{name}-%{version}-aix.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: curl-devel >= 7.19.7-1 BuildRequires: libxml2-devel >= 2.6.32-2 BuildRequires: patch %define _libdir64 %{_prefix}/lib64 %description This is a library to access google calendar events and contacts, its purpose is - provide easy access to available events/contacts - enable common operations: add, delete, edit - have few dependencies (up until now, only requires curl and libxml2) It implements Google Data API 2.0 and is tested on Linux and MacOSX. The library is available as 32-bit and 64-bit. %package devel Summary: Development files to use libgcal Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkg-config %description devel libgcal is a library to access google calendar events and contacts: these are the development files that can be used to link against it. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "gcc -maix64". %prep %setup -q export PATH=/opt/freeware/bin:$PATH %patch0 %patch1 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build export CC="cc -qcpluscmt" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/%{name}.so* ( cd ${RPM_BUILD_ROOT} for dir in include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/COPYING 32bit/README 32bit/Changelog.txt %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system) %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Tue Jan 11 2011 Michael Perzl - 0.9.6-1 - first version for AIX V5.1 and higher