diff --git a/README.md b/README.md index b87362d..a8e09c9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # libmcal +mcal stands for Modular Calendar Access Library. +libmcal is a C library for accessing calendars, written to be very modular, with pluggable drivers. +One of the main drivers it handles is ICAP, an internet protocol that has very close ties with the IMAP protocol. +Using ICAP, you can access a calendar in very much the same way as you use IMAP to access a remote mailbox. + diff --git a/libmcal-0.7-flex-2.5.37.patch b/libmcal-0.7-flex-2.5.37.patch new file mode 100644 index 0000000..8c2e386 --- /dev/null +++ b/libmcal-0.7-flex-2.5.37.patch @@ -0,0 +1,14 @@ +--- libmcal.orig/icalroutines.h 2003-01-28 18:45:21.000000000 +0100 ++++ libmcal/icalroutines.h 2013-02-04 01:54:27.833995640 +0100 +@@ -48,8 +48,10 @@ + + + /* ICAL parser. */ ++#ifndef ical_yytext + extern char *ical_yytext; +-extern int ical_yyleng; ++extern size_t ical_yyleng; ++#endif + int ical_yylex(void); + void ical_usebuf(const char *buf, size_t size); + void ical_preprocess(char *buf, size_t *size); diff --git a/libmcal-0.7-flexfix.patch b/libmcal-0.7-flexfix.patch new file mode 100644 index 0000000..0088dce --- /dev/null +++ b/libmcal-0.7-flexfix.patch @@ -0,0 +1,29 @@ +--- libmcal/icalscanner.lex 2003-01-28 09:45:21.000000000 -0800 ++++ libmcal/icalscanner.lex.new 2006-04-01 22:47:58.515410944 -0800 +@@ -32,13 +32,6 @@ + */ + + #include "icalroutines.h" +- +-void +-ical_usebuf(const char *buf, size_t size) +-{ +- BEGIN(INITIAL); +- yy_scan_bytes(buf, size); +-} + %} + + +@@ -68,3 +61,12 @@ + {LF} BEGIN(INITIAL); return ICALTOK_LF; + . return ICALTOK_JUNK; + <> return ICALTOK_EOF; ++ ++%% ++ ++void ++ical_usebuf(const char *buf, size_t size) ++{ ++ BEGIN(INITIAL); ++ yy_scan_bytes(buf, size); ++} diff --git a/libmcal.spec b/libmcal.spec new file mode 100644 index 0000000..ed08ba7 --- /dev/null +++ b/libmcal.spec @@ -0,0 +1,76 @@ +Name: libmcal +Version: 0.7 +Release: 2mamba +Summary: A C library for accessing calendars +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://mcal.check.com +Source: http://downloads.sourceforge.net/sourceforge/libmcal/libmcal-%{version}.tar.gz +Patch0: libmcal-%{version}-flexfix.patch +Patch1: libmcal-0.7-flex-2.5.37.patch +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +License: GPL +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +mcal stands for Modular Calendar Access Library. +libmcal is a C library for accessing calendars, written to be very modular, with pluggable drivers. +One of the main drivers it handles is ICAP, an internet protocol that has very close ties with the IMAP protocol. +Using ICAP, you can access a calendar in very much the same way as you use IMAP to access a remote mailbox. + +%package devel +Summary: A C library for accessing calendars +Group: Development/Libraries + +%description devel +mcal stands for Modular Calendar Access Library. +libmcal is a C library for accessing calendars, written to be very modular, with pluggable drivers. +One of the main drivers it handles is ICAP, an internet protocol that has very close ties with the IMAP protocol. +Using ICAP, you can access a calendar in very much the same way as you use IMAP to access a remote mailbox. +This package contains the mcal headers and static library. + +%prep +%setup -q -n libmcal +%patch0 -p1 +%patch1 -p1 + +%build +%configure + +%ifarch x86_64 +export OTHER_CFLAGS="-fPIC" +%endif +%make + +%install +sed -i "s|/usr/local/mcal|%{buildroot}%{_libdir}/mcal|" Makefile +sed -i "s|/lib/|/%{_lib}/|" Makefile +mkdir -p %{buildroot}%{_libdir}/mcal/ +mkdir -p %{buildroot}%{_libdir}/mcal/include/ +#mkdir -p %{buildroot}/usr/lib/mcal/{lib,include} +#usr/{lib,include} +%makeinstall +cp {cal_misc.h,icalroutines.h} %{buildroot}%{_libdir}/mcal/include + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files devel +%defattr(-,root,root) +%{_libdir}/mcal/include/*.h +%{_libdir}/mcal/*.a +%{_libdir}/mcal/*.so + +%changelog +* Mon Feb 04 2013 Silvan Calarco 0.7-2mamba +- added patch against flex 2.5.37 + +* Tue Jul 03 2007 Tiziana Ferro 0.7-1mamba +- update to 0.7 + +* Wed Sep 10 2003 Silvan Calarco 0.6-1qilnx +- first build