File mcal.spec of Package mcal
#
# spec file for package mcal (Version 0.7)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: mcal
#!BuildIgnore: flex
BuildRequires: flex-old
Version: 0.7
Release: 265
%define dver 0.9
%define mver 0.3
AutoReqProv: on
Group: Productivity/Office/Organizers
License: GPLv2+
Url: http://mcal.chek.com/
Summary: A Calendar Based on Libmcal
Source0: http://download.sourceforge.net/libmcal/libmcal-%{version}.tar.gz
Source1: http://download.sourceforge.net/libmcal/mcaldrivers-%{dver}.tar.gz
Source2: http://download.sourceforge.net/libmcal/mcal-%{mver}.tar.gz
Patch0: libmcal-%{version}.diff
Patch1: mcaldrivers-%{dver}.diff
Patch2: mcal-%{mver}.diff
Patch3: libmcal-makefile.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
MCAL is a calendar based on libmcal. The MCAL library is very similar
to the C client IMAP library. It offers a common and simple interface
for accessing calendars that can be stored in many different formats.
Both local and remote formats are supported.
Authors:
--------
Mark Musone <musone@chek.com>
Andrew Skalski <askalski@chek.com>
Jonathon Jude <jonathan.jude@telmat.fr>
Bob Allen <allenb@home-networking.org>
%package -n libmcal
License: LGPLv2.1+
AutoReqProv: on
Group: System/Libraries
Summary: Modular Calendar Access Library
%description -n libmcal
The MCAL library is very similar to the c-client IMAP library. It
offers a common, simple interface for accessing calendars that can be
stored in many different formats, both local and remote formats are
supported.
Authors:
--------
Mark Musone <musone@chek.com>
Andrew Skalski <askalski@chek.com>
Jonathon Jude <jonathan.jude@telmat.fr>
Bob Allen <allenb@home-networking.org>
%prep
%setup -q -n libmcal -a1 -a2
%patch0
%patch3
cd mcal-drivers
%patch1
cd ../mcal
%patch2
%build
export CFLAGS="$RPM_OPT_FLAGS -fPIC -Wall"
mv mcal-drivers/* .
(cd mstore;%{__make} %{?_smp_mflags} CFLAGS="$CFLAGS")
(cd icap;%{__make} %{?_smp_mflags} CFLAGS="$CFLAGS")
./configure \
--libdir=%{_libdir} \
--includedir=%{_includedir} \
--with-mstore \
--with-icap
%{__make} %{?_smp_mflags} CFLAGS="$CFLAGS"
(cd mcal; %{__make} %{?_smp_mflags} CFLAGS="$CFLAGS")
%install
make DESTDIR=$RPM_BUILD_ROOT install
install -d $RPM_BUILD_ROOT%{_includedir}/mcal/{icap,mstore}
install -d $RPM_BUILD_ROOT%{_bindir}
install -m 644 icap/icap.h $RPM_BUILD_ROOT%{_includedir}/mcal/icap/
install -m 644 mstore/mstore.h $RPM_BUILD_ROOT%{_includedir}/mcal/mstore/
install -m 755 mcal/mcal $RPM_BUILD_ROOT%{_bindir}
install -d -m 1777 $RPM_BUILD_ROOT/var/calendar
mv $RPM_BUILD_ROOT%{_libdir}/libmcal.so $RPM_BUILD_ROOT%{_libdir}/libmcal.so.%{version}
ln -sf libmcal.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libmcal.so
chmod 755 $RPM_BUILD_ROOT%{_libdir}/*.so*
rm -v $RPM_BUILD_ROOT%{_libdir}/*.a
%post -n libmcal -p /sbin/ldconfig
%postun -n libmcal -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files -n libmcal
%defattr(-,root,root)
%doc CHANGELOG FAQ-MCAL FEATURE-IMPLEMENTATION FUNCTION-REF.html HOW-TO-MCAL
%doc LICENSE README
%{_libdir}/lib*
%{_includedir}/*
%files -n mcal
%defattr(-,root,root)
%doc mcal/LICENSE
%{_bindir}/*
%changelog