diff --git a/.openchange.metadata b/.openchange.metadata
new file mode 100644
index 0000000..f0ef118
--- /dev/null
+++ b/.openchange.metadata
@@ -0,0 +1 @@
+2ae9a1bfafcd09c99dcca5aad64ad4474bb02c7a SOURCES/openchange-2.0-QUADRANT.tar.gz
diff --git a/README.md b/README.md
deleted file mode 100644
index 0e7897f..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-The master branch has no content
-
-Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6
-
-If you find this file in a distro specific branch, it means that no content has been checked in yet
diff --git a/SOURCES/doxygen_to_devhelp.xsl b/SOURCES/doxygen_to_devhelp.xsl
new file mode 100644
index 0000000..39f2471
--- /dev/null
+++ b/SOURCES/doxygen_to_devhelp.xsl
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .html#
+
+
+
+
+
+
diff --git a/SOURCES/libmapi-0.8.2-libmapi-conflict.patch b/SOURCES/libmapi-0.8.2-libmapi-conflict.patch
new file mode 100644
index 0000000..9a9c3c2
--- /dev/null
+++ b/SOURCES/libmapi-0.8.2-libmapi-conflict.patch
@@ -0,0 +1,312 @@
+diff -up openchange-2.0-QUADRANT/libmapi.pc.in.libmapi-conflict openchange-2.0-QUADRANT/libmapi.pc.in
+--- openchange-2.0-QUADRANT/libmapi.pc.in.libmapi-conflict 2013-01-24 19:55:36.000000000 +0100
++++ openchange-2.0-QUADRANT/libmapi.pc.in 2013-01-31 18:41:08.405877184 +0100
+@@ -8,7 +8,7 @@ datadir=@datadir@
+ Name: MAPI
+ Description: MAPI Protocol Implementation
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -lmapi
++Libs: -L${libdir} -lmapi-openchange
+ Libs.private: @LIBS@
+ Cflags: -I${includedir}
+ Requires: talloc dcerpc ndr tevent
+diff -up openchange-2.0-QUADRANT/Makefile.libmapi-conflict openchange-2.0-QUADRANT/Makefile
+--- openchange-2.0-QUADRANT/Makefile.libmapi-conflict 2013-01-24 19:55:36.000000000 +0100
++++ openchange-2.0-QUADRANT/Makefile 2013-01-31 18:42:59.285237972 +0100
+@@ -159,7 +159,7 @@ LIBMAPI_SO_VERSION = 0
+
+ libmapi: idl \
+ libmapi/version.h \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+
+ libmapi-install: libmapi \
+ libmapi-installpc \
+@@ -192,8 +192,8 @@ endif
+ rm -f *~
+ rm -f */*~
+ rm -f */*/*~
+- rm -f libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) libmapi.$(SHLIBEXT).* \
+- libmapi.$(SHLIBEXT)
++ rm -f libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION) libmapi-openchange.$(SHLIBEXT).* \
++ libmapi-openchange.$(SHLIBEXT)
+
+ clean:: libmapi-clean
+
+@@ -210,10 +210,10 @@ libmapi-installpc:
+ libmapi-installlib:
+ @echo "[*] install: libmapi library"
+ $(INSTALL) -d $(DESTDIR)$(libdir)
+- $(INSTALL) -m 0755 libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)
+- ln -sf libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapi.$(SHLIBEXT)
++ $(INSTALL) -m 0755 libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)
++ ln -sf libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapi-openchange.$(SHLIBEXT)
+ ifeq ($(MANUALLY_CREATE_SYMLINKS), yes)
+- ln -sf libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION)
++ ln -sf libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapi-openchange.$(SHLIBEXT).$(LIBMAPI_SO_VERSION)
+ endif
+
+ libmapi-installheader:
+@@ -254,7 +254,7 @@ libmapi-uninstallpc:
+ rm -f $(DESTDIR)$(libdir)/pkgconfig/libmapi.pc
+
+ libmapi-uninstalllib:
+- rm -f $(DESTDIR)$(libdir)/libmapi.*
++ rm -f $(DESTDIR)$(libdir)/libmapi-openchange.*
+
+ libmapi-uninstallheader:
+ rm -rf $(DESTDIR)$(includedir)/libmapi
+@@ -265,7 +265,7 @@ libmapi-uninstallscript:
+ rm -f $(DESTDIR)$(datadir)/setup/profiles/oc_profiles*
+ rm -rf $(DESTDIR)$(datadir)/setup/profiles
+
+-libmapi.$(SHLIBEXT).$(PACKAGE_VERSION): \
++libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION): \
+ libmapi/emsmdb.po \
+ libmapi/async_emsmdb.po \
+ libmapi/IABContainer.po \
+@@ -309,10 +309,10 @@ libmapi.$(SHLIBEXT).$(PACKAGE_VERSION):
+ libmapi/socket/interface.po \
+ libmapi/socket/netif.po
+ @echo "Linking $@"
+- @$(CC) $(DSOOPT) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION) -o $@ $^ $(LIBS)
++ @$(CC) $(DSOOPT) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libmapi-openchange.$(SHLIBEXT).$(LIBMAPI_SO_VERSION) -o $@ $^ $(LIBS)
+
+
+-libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION): libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++libmapi-openchange.$(SHLIBEXT).$(LIBMAPI_SO_VERSION): libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ ln -fs $< $@
+
+ libmapi/version.h: VERSION
+@@ -347,7 +347,7 @@ libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION)
+ libmapi++/src/object.po \
+ libmapi++/src/profile.po \
+ libmapi++/src/session.po \
+- libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(LIBMAPI_SO_VERSION)
+ @echo "Linking $@"
+ @$(CXX) $(DSOOPT) $(CXXFLAGS) $(LDFLAGS) -Wl,-soname,libmapipp.$(SHLIBEXT).$(LIBMAPIPP_SO_VERSION) -o $@ $^ $(LIBS)
+
+@@ -428,7 +428,7 @@ clean:: libmapixx-tests-clean
+
+ bin/libmapixx-test: libmapi++/tests/test.cpp \
+ libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking sample application $@"
+ @$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+@@ -443,7 +443,7 @@ libmapixx-attach-clean:
+
+ bin/libmapixx-attach: libmapi++/tests/attach_test.po \
+ libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking sample application $@"
+ @$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
+
+@@ -453,7 +453,7 @@ libmapixx-exception: bin/libmapixx-excep
+
+ bin/libmapixx-exception: libmapi++/tests/exception_test.cpp \
+ libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking exception test application $@"
+ @$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
+
+@@ -473,7 +473,7 @@ libmapixx-profiletest-clean:
+
+ bin/libmapixx-profiletest: libmapi++/tests/profile_test.po \
+ libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking profile test application $@"
+ @$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
+
+@@ -494,7 +494,7 @@ libmapixx-messages-clean:
+
+ libmapi++/examples/foldertree: libmapi++/examples/foldertree.cpp \
+ libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking foldertree example application $@"
+ @$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
+
+@@ -502,7 +502,7 @@ clean:: libmapixx-foldertree-clean
+
+ libmapi++/examples/messages: libmapi++/examples/messages.cpp \
+ libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking messages example application $@"
+ @$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
+
+@@ -569,7 +569,7 @@ libmapiadmin-uninstallheader:
+ libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSION): \
+ libmapiadmin/mapiadmin_user.po \
+ libmapiadmin/mapiadmin.po \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) $(DSOOPT) $(LDFLAGS) -Wl,-soname,libmapiadmin.$(SHLIBEXT).$(LIBMAPIADMIN_SO_VERSION) -o $@ $^ $(LIBS) $(LIBMAPIADMIN_LIBS)
+
+@@ -646,7 +646,7 @@ libocpf.$(SHLIBEXT).$(PACKAGE_VERSION):
+ libocpf/ocpf_dump.po \
+ libocpf/ocpf_api.po \
+ libocpf/ocpf_write.po \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) $(DSOOPT) $(LDFLAGS) -Wl,-soname,libocpf.$(SHLIBEXT).$(LIBOCPF_SO_VERSION) -o $@ $^ $(LIBS)
+
+@@ -720,7 +720,7 @@ mapiproxy/dcesrv_mapiproxy.$(SHLIBEXT):
+ gen_ndr/ndr_exchange.po
+
+ @echo "Linking $@"
+- @$(CC) -o $@ $(DSOOPT) $^ -L. $(LDFLAGS) $(LIBS) $(SAMBASERVER_LIBS) $(SAMDB_LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ @$(CC) -o $@ $(DSOOPT) $^ -L. $(LDFLAGS) $(LIBS) $(SAMBASERVER_LIBS) $(SAMDB_LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+
+ mapiproxy/dcesrv_mapiproxy.c: gen_ndr/ndr_exchange_s.c gen_ndr/ndr_exchange.c
+
+@@ -767,7 +767,7 @@ mapiproxy/libmapiproxy.$(SHLIBEXT).$(PAC
+ mapiproxy/libmapiproxy/mapi_handles.po \
+ mapiproxy/libmapiproxy/entryid.po \
+ mapiproxy/libmapiproxy/modules.po \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) -Wl,-soname,libmapiproxy.$(SHLIBEXT).$(LIBMAPIPROXY_SO_VERSION) $^ -L. $(LIBS) $(TDB_LIBS) $(DL_LIBS)
+
+@@ -912,7 +912,7 @@ mapiproxy/libmapistore.$(SHLIBEXT).$(PAC
+ mapiproxy/libmapistore/mapistore_replica_mapping.po \
+ mapiproxy/libmapistore/mapistore_namedprops.po \
+ mapiproxy/libmapistore/mapistore_notification.po \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) -o $@ $(DSOOPT) $^ -L. $(LDFLAGS) $(LIBS) $(TDB_LIBS) $(DL_LIBS) -Wl,-soname,libmapistore.$(SHLIBEXT).$(LIBMAPISTORE_SO_VERSION)
+
+@@ -934,7 +934,7 @@ mapistore_test: bin/mapistore_test
+ bin/mapistore_test: mapiproxy/libmapistore/tests/mapistore_test.o \
+ mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+- @$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt -L. libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ @$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt -L. libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+
+ mapistore_clean:
+ rm -f mapiproxy/libmapistore/tests/*.o
+@@ -1103,7 +1103,7 @@ clean:: openchangeclient-clean
+
+ bin/openchangeclient: utils/openchangeclient.o \
+ utils/openchange-tools.o \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) \
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION) \
+ libocpf.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt
+@@ -1132,7 +1132,7 @@ clean:: mapiprofile-clean
+
+ bin/mapiprofile: utils/mapiprofile.o \
+ utils/openchange-tools.o \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt
+
+@@ -1160,7 +1160,7 @@ clean:: openchangepfadmin-clean
+
+ bin/openchangepfadmin: utils/openchangepfadmin.o \
+ utils/openchange-tools.o \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) \
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION) \
+ libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBMAPIADMIN_LIBS) -lpopt
+@@ -1192,7 +1192,7 @@ clean:: exchange2mbox-clean
+
+ bin/exchange2mbox: utils/exchange2mbox.o \
+ utils/openchange-tools.o \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt $(MAGIC_LIBS)
+
+@@ -1256,7 +1256,7 @@ bin/exchange2ical: utils/exchange2ical_t
+ libexchange2ical/ical2exchange.o \
+ libexchange2ical/ical2exchange_property.o \
+ utils/openchange-tools.o \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(ICAL_LIBS) -lpopt
+
+@@ -1320,7 +1320,7 @@ bin/mapitest: utils/mapitest/mapitest.o
+ utils/mapitest/modules/module_lcid.o \
+ utils/mapitest/modules/module_mapidump.o \
+ utils/mapitest/modules/module_lzxpress.o \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt $(SUBUNIT_LIBS)
+
+@@ -1378,7 +1378,7 @@ clean:: openchangemapidump-clean
+ bin/openchangemapidump: utils/backup/openchangemapidump.o \
+ utils/backup/openchangebackup.o \
+ utils/openchange-tools.o \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt
+
+@@ -1429,7 +1429,7 @@ check_fasttransfer-clean::
+ clean:: check_fasttransfer-clean
+
+ bin/check_fasttransfer: testprogs/check_fasttransfer.o \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) \
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION) \
+ mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt
+@@ -1456,7 +1456,7 @@ test_asyncnotif-clean::
+ clean:: test_asyncnotif-clean
+
+ bin/test_asyncnotif: testprogs/test_asyncnotif.o \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt
+
+@@ -1501,13 +1501,13 @@ pyopenchange: $(pythonscriptdir)/opench
+
+ $(pythonscriptdir)/openchange/mapi.$(SHLIBEXT): pyopenchange/pymapi.c \
+ pyopenchange/pymapi_properties.c \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
+ @$(CC) $(CFLAGS) -fno-strict-aliasing $(DSOOPT) $(LDFLAGS) -o $@ $^ $(PYTHON_CFLAGS) $(PYTHON_LIBS) $(LIBS)
+
+ # $(pythonscriptdir)/openchange/ocpf.$(SHLIBEXT): pyopenchange/pyocpf.c \
+ # libocpf.$(SHLIBEXT).$(PACKAGE_VERSION) \
+-# libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
++# libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION)
+ # @echo "Linking $@"
+ # @$(CC) $(CFLAGS) $(DSOOPT) $(LDFLAGS) -o $@ $^ $(PYTHON_CFLAGS) $(PYTHON_LIBS) $(LIBS)
+
+@@ -1625,7 +1625,7 @@ ctags:
+
+ test:: check
+
+-check:: libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION)
++check:: libmapi-openchange.$(SHLIBEXT).$(LIBMAPI_SO_VERSION)
+ # FIXME: Set up server
+ ./bin/mapitest --mapi-calls
+
+@@ -1698,7 +1698,7 @@ libqtmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
+
+ qt/demo/demoapp: qt/demo/demoapp.o \
+ qt/demo/main.o \
+- libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) \
++ libmapi-openchange.$(SHLIBEXT).$(PACKAGE_VERSION) \
+ libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
+ libqtmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
+ @echo "Linking $@"
diff --git a/SOURCES/openchange-0.9-generate-xml-doc.patch b/SOURCES/openchange-0.9-generate-xml-doc.patch
new file mode 100644
index 0000000..994ffc3
--- /dev/null
+++ b/SOURCES/openchange-0.9-generate-xml-doc.patch
@@ -0,0 +1,257 @@
+diff -up openchange-2.0-QUADRANT/Doxyfile.in.generate-xml-doc openchange-2.0-QUADRANT/Doxyfile.in
+--- openchange-2.0-QUADRANT/Doxyfile.in.generate-xml-doc 2013-01-24 19:55:36.000000000 +0100
++++ openchange-2.0-QUADRANT/Doxyfile.in 2013-02-14 12:23:27.594802658 +0100
+@@ -224,7 +224,7 @@ SUBGROUPING = YES
+ # Private class members and static file members will be hidden unless
+ # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+-EXTRACT_ALL = NO
++EXTRACT_ALL = YES
+
+ # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+ # will be included in the documentation.
+@@ -918,13 +918,13 @@ MAN_LINKS = YES
+ # generate an XML file that captures the structure of
+ # the code including all documentation.
+
+-GENERATE_XML = NO
++GENERATE_XML = YES
+
+ # The XML_OUTPUT tag is used to specify where the XML pages will be put.
+ # If a relative path is entered the value of OUTPUT_DIRECTORY will be
+ # put in front of it. If left blank `xml' will be used as the default path.
+
+-XML_OUTPUT = xml
++XML_OUTPUT = xml/overview
+
+ # The XML_SCHEMA tag can be used to specify an XML schema,
+ # which can be used by a validating XML parser to check the
+diff -up openchange-2.0-QUADRANT/libmapiadmin/Doxyfile.in.generate-xml-doc openchange-2.0-QUADRANT/libmapiadmin/Doxyfile.in
+--- openchange-2.0-QUADRANT/libmapiadmin/Doxyfile.in.generate-xml-doc 2013-01-24 19:55:36.000000000 +0100
++++ openchange-2.0-QUADRANT/libmapiadmin/Doxyfile.in 2013-02-14 12:23:27.594802658 +0100
+@@ -224,7 +224,7 @@ SUBGROUPING = YES
+ # Private class members and static file members will be hidden unless
+ # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+-EXTRACT_ALL = NO
++EXTRACT_ALL = YES
+
+ # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+ # will be included in the documentation.
+@@ -916,13 +916,13 @@ MAN_LINKS = YES
+ # generate an XML file that captures the structure of
+ # the code including all documentation.
+
+-GENERATE_XML = NO
++GENERATE_XML = YES
+
+ # The XML_OUTPUT tag is used to specify where the XML pages will be put.
+ # If a relative path is entered the value of OUTPUT_DIRECTORY will be
+ # put in front of it. If left blank `xml' will be used as the default path.
+
+-XML_OUTPUT = xml
++XML_OUTPUT = xml/libmapiadmin
+
+ # The XML_SCHEMA tag can be used to specify an XML schema,
+ # which can be used by a validating XML parser to check the
+diff -up openchange-2.0-QUADRANT/libmapi/Doxyfile.in.generate-xml-doc openchange-2.0-QUADRANT/libmapi/Doxyfile.in
+--- openchange-2.0-QUADRANT/libmapi/Doxyfile.in.generate-xml-doc 2013-01-24 19:55:36.000000000 +0100
++++ openchange-2.0-QUADRANT/libmapi/Doxyfile.in 2013-02-14 12:23:27.594802658 +0100
+@@ -224,7 +224,7 @@ SUBGROUPING = YES
+ # Private class members and static file members will be hidden unless
+ # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+-EXTRACT_ALL = NO
++EXTRACT_ALL = YES
+
+ # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+ # will be included in the documentation.
+@@ -922,13 +922,13 @@ MAN_LINKS = YES
+ # generate an XML file that captures the structure of
+ # the code including all documentation.
+
+-GENERATE_XML = NO
++GENERATE_XML = YES
+
+ # The XML_OUTPUT tag is used to specify where the XML pages will be put.
+ # If a relative path is entered the value of OUTPUT_DIRECTORY will be
+ # put in front of it. If left blank `xml' will be used as the default path.
+
+-XML_OUTPUT = xml
++XML_OUTPUT = xml/libmapi
+
+ # The XML_SCHEMA tag can be used to specify an XML schema,
+ # which can be used by a validating XML parser to check the
+diff -up openchange-2.0-QUADRANT/libmapi++/Doxyfile.in.generate-xml-doc openchange-2.0-QUADRANT/libmapi++/Doxyfile.in
+--- openchange-2.0-QUADRANT/libmapi++/Doxyfile.in.generate-xml-doc 2013-01-24 19:55:36.000000000 +0100
++++ openchange-2.0-QUADRANT/libmapi++/Doxyfile.in 2013-02-14 12:23:27.595802671 +0100
+@@ -224,7 +224,7 @@ SUBGROUPING = YES
+ # Private class members and static file members will be hidden unless
+ # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+-EXTRACT_ALL = NO
++EXTRACT_ALL = YES
+
+ # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+ # will be included in the documentation.
+@@ -901,13 +901,13 @@ MAN_LINKS = YES
+ # generate an XML file that captures the structure of
+ # the code including all documentation.
+
+-GENERATE_XML = NO
++GENERATE_XML = YES
+
+ # The XML_OUTPUT tag is used to specify where the XML pages will be put.
+ # If a relative path is entered the value of OUTPUT_DIRECTORY will be
+ # put in front of it. If left blank `xml' will be used as the default path.
+
+-XML_OUTPUT = xml
++XML_OUTPUT = xml/libmapi++
+
+ # The XML_SCHEMA tag can be used to specify an XML schema,
+ # which can be used by a validating XML parser to check the
+diff -up openchange-2.0-QUADRANT/libocpf/Doxyfile.in.generate-xml-doc openchange-2.0-QUADRANT/libocpf/Doxyfile.in
+--- openchange-2.0-QUADRANT/libocpf/Doxyfile.in.generate-xml-doc 2013-01-24 19:55:36.000000000 +0100
++++ openchange-2.0-QUADRANT/libocpf/Doxyfile.in 2013-02-14 12:23:27.595802671 +0100
+@@ -224,7 +224,7 @@ SUBGROUPING = YES
+ # Private class members and static file members will be hidden unless
+ # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+-EXTRACT_ALL = NO
++EXTRACT_ALL = YES
+
+ # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+ # will be included in the documentation.
+@@ -920,13 +920,13 @@ MAN_LINKS = YES
+ # generate an XML file that captures the structure of
+ # the code including all documentation.
+
+-GENERATE_XML = NO
++GENERATE_XML = YES
+
+ # The XML_OUTPUT tag is used to specify where the XML pages will be put.
+ # If a relative path is entered the value of OUTPUT_DIRECTORY will be
+ # put in front of it. If left blank `xml' will be used as the default path.
+
+-XML_OUTPUT = xml
++XML_OUTPUT = xml/libocpf
+
+ # The XML_SCHEMA tag can be used to specify an XML schema,
+ # which can be used by a validating XML parser to check the
+diff -up openchange-2.0-QUADRANT/Makefile.generate-xml-doc openchange-2.0-QUADRANT/Makefile
+--- openchange-2.0-QUADRANT/Makefile.generate-xml-doc 2013-02-14 12:23:27.592802631 +0100
++++ openchange-2.0-QUADRANT/Makefile 2013-02-14 12:26:02.032792012 +0100
+@@ -1588,32 +1588,31 @@ uninstallman:
+ @./script/uninstallman.sh $(DESTDIR)$(mandir) $(manpages)
+
+ doxygen:
+- @if test ! -d apidocs ; then \
+- echo "Doxify API documentation: HTML and man pages"; \
+- mkdir -p apidocs/html; \
+- mkdir -p apidocs/man; \
+- $(DOXYGEN) Doxyfile; \
+- $(DOXYGEN) libmapi/Doxyfile; \
+- $(DOXYGEN) libmapiadmin/Doxyfile; \
+- $(DOXYGEN) libocpf/Doxyfile; \
+- $(DOXYGEN) libmapi++/Doxyfile; \
+- $(DOXYGEN) mapiproxy/Doxyfile; \
+- $(DOXYGEN) utils/mapitest/Doxyfile; \
+- $(DOXYGEN) mapiproxy/libmapistore/Doxyfile; \
+- cp -f doc/doxygen/index.html apidocs/html; \
+- cp -f doc/doxygen/pictures/* apidocs/html/overview; \
+- cp -f doc/doxygen/pictures/* apidocs/html/libmapi; \
+- cp -f doc/doxygen/pictures/* apidocs/html/libmapiadmin; \
+- cp -f doc/doxygen/pictures/* apidocs/html/libmapi++; \
+- cp -f doc/doxygen/pictures/* apidocs/html/libocpf; \
+- cp -f doc/doxygen/pictures/* apidocs/html/mapitest; \
+- cp -f doc/doxygen/pictures/* apidocs/html/mapiproxy; \
+- cp -f doc/doxygen/pictures/* apidocs/html/libmapistore; \
+- cp -f mapiproxy/documentation/pictures/* apidocs/html/mapiproxy;\
+- rm -f apidocs/man/man3/todo.3; \
+- rm -f apidocs/man/man3/bug.3; \
+- rm -f apidocs/man/man3/*.c.3; \
+- fi
++ echo "Doxify API documentation: HTML and man pages"
++ mkdir -p apidocs/html
++ mkdir -p apidocs/man
++ mkdir -p apidocs/xml
++ $(DOXYGEN) Doxyfile
++ $(DOXYGEN) libmapi/Doxyfile
++ $(DOXYGEN) libmapiadmin/Doxyfile
++ $(DOXYGEN) libocpf/Doxyfile
++ $(DOXYGEN) libmapi++/Doxyfile
++ $(DOXYGEN) mapiproxy/Doxyfile
++ $(DOXYGEN) utils/mapitest/Doxyfile
++ $(DOXYGEN) mapiproxy/libmapistore/Doxyfile
++ cp -f doc/doxygen/index.html apidocs/html
++ cp -f doc/doxygen/pictures/* apidocs/html/overview
++ cp -f doc/doxygen/pictures/* apidocs/html/libmapi
++ cp -f doc/doxygen/pictures/* apidocs/html/libmapiadmin
++ cp -f doc/doxygen/pictures/* apidocs/html/libmapi++
++ cp -f doc/doxygen/pictures/* apidocs/html/libocpf
++ cp -f doc/doxygen/pictures/* apidocs/html/mapitest
++ cp -f doc/doxygen/pictures/* apidocs/html/mapiproxy
++ cp -f doc/doxygen/pictures/* apidocs/html/libmapistore
++ cp -f mapiproxy/documentation/pictures/* apidocs/html/mapiproxy
++ rm -f apidocs/man/man3/todo.3
++ rm -f apidocs/man/man3/bug.3
++ rm -f apidocs/man/man3/*.c.3
+
+ etags:
+ etags `find $(srcdir) -name "*.[ch]"`
+diff -up openchange-2.0-QUADRANT/mapiproxy/Doxyfile.in.generate-xml-doc openchange-2.0-QUADRANT/mapiproxy/Doxyfile.in
+--- openchange-2.0-QUADRANT/mapiproxy/Doxyfile.in.generate-xml-doc 2013-01-24 19:55:36.000000000 +0100
++++ openchange-2.0-QUADRANT/mapiproxy/Doxyfile.in 2013-02-14 12:23:27.596802685 +0100
+@@ -286,7 +286,7 @@ SYMBOL_CACHE_SIZE = 0
+ # Private class members and static file members will be hidden unless
+ # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+-EXTRACT_ALL = NO
++EXTRACT_ALL = YES
+
+ # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+ # will be included in the documentation.
+@@ -1118,13 +1118,13 @@ MAN_LINKS = YES
+ # generate an XML file that captures the structure of
+ # the code including all documentation.
+
+-GENERATE_XML = NO
++GENERATE_XML = YES
+
+ # The XML_OUTPUT tag is used to specify where the XML pages will be put.
+ # If a relative path is entered the value of OUTPUT_DIRECTORY will be
+ # put in front of it. If left blank `xml' will be used as the default path.
+
+-XML_OUTPUT = xml
++XML_OUTPUT = xml/mapiproxy
+
+ # The XML_SCHEMA tag can be used to specify an XML schema,
+ # which can be used by a validating XML parser to check the
+diff -up openchange-2.0-QUADRANT/utils/mapitest/Doxyfile.in.generate-xml-doc openchange-2.0-QUADRANT/utils/mapitest/Doxyfile.in
+--- openchange-2.0-QUADRANT/utils/mapitest/Doxyfile.in.generate-xml-doc 2013-01-24 19:55:36.000000000 +0100
++++ openchange-2.0-QUADRANT/utils/mapitest/Doxyfile.in 2013-02-14 12:23:27.596802685 +0100
+@@ -224,7 +224,7 @@ SUBGROUPING = YES
+ # Private class members and static file members will be hidden unless
+ # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+-EXTRACT_ALL = NO
++EXTRACT_ALL = YES
+
+ # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+ # will be included in the documentation.
+@@ -914,13 +914,13 @@ MAN_LINKS = YES
+ # generate an XML file that captures the structure of
+ # the code including all documentation.
+
+-GENERATE_XML = NO
++GENERATE_XML = YES
+
+ # The XML_OUTPUT tag is used to specify where the XML pages will be put.
+ # If a relative path is entered the value of OUTPUT_DIRECTORY will be
+ # put in front of it. If left blank `xml' will be used as the default path.
+
+-XML_OUTPUT = xml
++XML_OUTPUT = xml/mapitest
+
+ # The XML_SCHEMA tag can be used to specify an XML schema,
+ # which can be used by a validating XML parser to check the
diff --git a/SOURCES/openchange-1.0-OC_RULE_ADD-fix.patch b/SOURCES/openchange-1.0-OC_RULE_ADD-fix.patch
new file mode 100644
index 0000000..0a772a7
--- /dev/null
+++ b/SOURCES/openchange-1.0-OC_RULE_ADD-fix.patch
@@ -0,0 +1,46 @@
+diff -up openchange-2.0-QUADRANT/configure.ac.OC_RULE_ADD-fix openchange-2.0-QUADRANT/configure.ac
+--- openchange-2.0-QUADRANT/configure.ac.OC_RULE_ADD-fix 2013-02-14 10:55:32.037997680 +0100
++++ openchange-2.0-QUADRANT/configure.ac 2013-02-14 10:58:08.012868678 +0100
+@@ -657,11 +657,20 @@ AC_SUBST(OC_MAPISTORE_CLEAN)
+ AC_SUBST(OC_MAPISTORE_INSTALL)
+ AC_SUBST(OC_MAPISTORE_UNINSTALL)
+
++OC_SERVER=
++OC_SERVER_CLEAN=
++OC_SERVER_INSTALL=
++OC_SERVER_UNINSTALL=
++AC_SUBST(OC_SERVER)
++AC_SUBST(OC_SERVER_CLEAN)
++AC_SUBST(OC_SERVER_INSTALL)
++AC_SUBST(OC_SERVER_UNINSTALL)
++
+ dnl ##########################################################################
+ dnl mapiproxy server
+ dnl ##########################################################################
+ if test x$PYTHON != x; then
+- if test "x$SAMBASERVER_LIBS" != x ; then
++ if test "x$SAMDB_LIBS" != x -a "x$SAMBASERVER_LIBS" != x ; then
+ mapiproxy=1
+ fi
+ fi
+@@ -684,10 +693,16 @@ AC_ARG_ENABLE(pymapi, AC_HELP_STRING([--
+ PYCDIR=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='\\$(prefix)')"`
+ AC_SUBST(PYCDIR)
+
+-dnl Enable pyopenchange by default
+-PYMAPIALL="$PYMAPIALL pyopenchange"
+-PYMAPIINSTALL="$PYMAPIALLINSTALL pyopenchange-install"
+-PYMAPIUNINSTALL="$PYMAPIUNINSTALL pyopenchange-uninstall"
++PYMAPIALL=
++PYMAPIINSTALL=
++PYMAPIUNINSTALL=
++
++if test x$enable_pymapi = xyes ; then
++ dnl Enable pyopenchange by default
++ PYMAPIALL="$PYMAPIALL pyopenchange"
++ PYMAPIINSTALL="$PYMAPIALLINSTALL pyopenchange-install"
++ PYMAPIUNINSTALL="$PYMAPIUNINSTALL pyopenchange-uninstall"
++fi
+
+ AC_SUBST(PYMAPIALL)
+ AC_SUBST(PYMAPIINSTALL)
diff --git a/SOURCES/openchange-2.0-multilib-issue-libmapi-version-h.patch b/SOURCES/openchange-2.0-multilib-issue-libmapi-version-h.patch
new file mode 100644
index 0000000..d9b39b7
--- /dev/null
+++ b/SOURCES/openchange-2.0-multilib-issue-libmapi-version-h.patch
@@ -0,0 +1,21 @@
+diff -up openchange-2.0-QUADRANT/script/mkversion.sh.multilib-issue-libmapi-version-h openchange-2.0-QUADRANT/script/mkversion.sh
+--- openchange-2.0-QUADRANT/script/mkversion.sh.multilib-issue-libmapi-version-h 2013-01-24 19:55:36.000000000 +0100
++++ openchange-2.0-QUADRANT/script/mkversion.sh 2013-09-19 15:00:43.106758507 +0200
+@@ -80,9 +80,14 @@ OPENCHANGE_SYS_KERNEL_NAME=`uname -s`
+ OPENCHANGE_SYS_KERNEL_RELEASE=`uname -r`
+ OPENCHANGE_SYS_PROCESSOR=`uname -p`
+
+-echo "#define OPENCHANGE_SYS_KERNEL_NAME \"${OPENCHANGE_SYS_KERNEL_NAME}\"" >> $TMPFILE
+-echo "#define OPENCHANGE_SYS_KERNEL_RELEASE \"${OPENCHANGE_SYS_KERNEL_RELEASE}\"" >> $TMPFILE
+-echo "#define OPENCHANGE_SYS_PROCESSOR \"${OPENCHANGE_SYS_PROCESSOR}\"" >> $TMPFILE
++# skip for a multilib issues
++# echo "#define OPENCHANGE_SYS_KERNEL_NAME \"${OPENCHANGE_SYS_KERNEL_NAME}\"" >> $TMPFILE
++# echo "#define OPENCHANGE_SYS_KERNEL_RELEASE \"${OPENCHANGE_SYS_KERNEL_RELEASE}\"" >> $TMPFILE
++# echo "#define OPENCHANGE_SYS_PROCESSOR \"${OPENCHANGE_SYS_PROCESSOR}\"" >> $TMPFILE
++echo "/* 'Unset' to avoid multilib issues */" >> $TMPFILE
++echo "#define OPENCHANGE_SYS_KERNEL_NAME \"Unset\"" >> $TMPFILE
++echo "#define OPENCHANGE_SYS_KERNEL_RELEASE \"Unset\"" >> $TMPFILE
++echo "#define OPENCHANGE_SYS_PROCESSOR \"Unset\"" >> $TMPFILE
+
+ mv "$TMPFILE" "$OUTPUT_FILE"
+
diff --git a/SPECS/openchange.spec b/SPECS/openchange.spec
new file mode 100644
index 0000000..5538448
--- /dev/null
+++ b/SPECS/openchange.spec
@@ -0,0 +1,478 @@
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+
+%global samba_version 4.0.1
+%global talloc_version 2.0.5
+%global nickname QUADRANT
+
+%global build_python_package 0
+
+%if 0%{?rhel}
+%global build_server_package 0
+%else
+# currently disabled also for rawhide (f18), due to samba4 changes
+%global build_server_package 0
+%endif
+
+### Abstract ###
+
+# Licensing Note: The code is GPLv3+ and the IDL files are public domain.
+
+Name: openchange
+Version: 2.0
+Release: 2%{?dist}
+Group: Applications/System
+Summary: Provides access to Microsoft Exchange servers using native protocols
+License: GPLv3+ and Public Domain
+URL: http://www.openchange.org/
+Source0: http://tracker.openchange.org/attachments/download/220/openchange-%{version}-%{nickname}.tar.gz
+Source1: doxygen_to_devhelp.xsl
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+### Build Dependencies ###
+
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: bison
+BuildRequires: doxygen
+BuildRequires: file-devel
+BuildRequires: flex
+BuildRequires: gcc
+BuildRequires: libical-devel
+BuildRequires: libldb-devel
+BuildRequires: libtalloc-devel >= %{talloc_version}
+BuildRequires: libtdb-devel
+BuildRequires: pkgconfig
+BuildRequires: libxslt
+BuildRequires: popt-devel
+BuildRequires: python-devel
+BuildRequires: samba-common >= %{samba_version}
+BuildRequires: samba-devel >= %{samba_version}
+BuildRequires: samba-libs >= %{samba_version}
+BuildRequires: samba-pidl >= %{samba_version}
+BuildRequires: sqlite-devel
+BuildRequires: zlib-devel
+
+# Certain versions of libtevent have incorrect
+# internal ABI versions
+Conflicts: libtevent < 0.9.13
+
+### Patches ###
+
+# OpenChange's libmapi conflicts with Zarafa's libmapi.
+# Zarafa is older than OpenChange, so it wins.
+Patch0: libmapi-0.8.2-libmapi-conflict.patch
+
+# RH bug #552984
+Patch1: openchange-0.9-generate-xml-doc.patch
+
+# Do not build server and python parts
+Patch2: openchange-1.0-OC_RULE_ADD-fix.patch
+
+# Avoid multilib issue in libmapi/version.h
+Patch3: openchange-2.0-multilib-issue-libmapi-version-h.patch
+
+%description
+OpenChange provides libraries to access Microsoft Exchange servers
+using native protocols.
+
+%package devel
+Summary: Developer tools for OpenChange libraries
+Group: Development/Libraries
+Requires: openchange = %{version}-%{release}
+%if %{build_server_package}
+Requires: openchange-server = %{version}-%{release}
+%endif
+
+%description devel
+This package provides the development tools and headers for
+OpenChange, providing libraries to access Microsoft Exchange servers
+using native protocols.
+
+%package devel-docs
+Summary: Developer documentation for OpenChange libraries
+Group: Development/Libraries
+Requires: devhelp
+Requires: openchange = %{version}-%{release}
+BuildArch: noarch
+
+%description devel-docs
+This package contains developer documentation for Openchange.
+
+%package client
+Summary: User tools for OpenChange libraries
+Group: Applications/System
+Requires: openchange = %{version}-%{release}
+
+%description client
+This package provides the user tools for OpenChange, providing access to
+Microsoft Exchange servers using native protocols.
+
+%if %{build_python_package}
+%package python
+Summary: Python bindings for OpenChange libraries
+Group: Development/Libraries
+Requires: openchange = %{version}-%{release}
+
+%description python
+This module contains a wrapper that allows the use of OpenChange via Python.
+%endif
+
+%if %{build_server_package}
+%package server
+Summary: Server-side modules for OpenChange
+Group: Applications/System
+Requires: openchange = %{version}-%{release}
+Requires: sqlite
+
+%description server
+This package provides the server elements for OpenChange.
+%endif
+
+%prep
+%setup -q -n %{name}-%{version}-%{nickname}
+%patch0 -p1 -b .libmapi-conflict
+%patch1 -p1 -b .generate-xml-doc
+%patch2 -p1 -b .OC_RULE_ADD-fix
+%patch3 -p1 -b .multilib-issue-libmapi-version-h
+
+%build
+./autogen.sh
+%configure \
+%if %{build_python_package}
+ --enable-pymapi \
+%endif
+ --with-modulesdir=%{_libdir}/samba/modules
+
+# Parallel builds prohibited by makefile
+make
+rm -r apidocs
+make doxygen
+
+xsltproc -o openchange-libmapi.devhelp --stringparam "booktitle" "MAPI client library (libmapi)" --stringparam "bookpart" "libmapi" %{SOURCE1} apidocs/xml/libmapi/index.xml
+xsltproc -o openchange-libmapiadmin.devhelp --stringparam "booktitle" "MAPI administration libraries (libmapiadmin)" --stringparam "bookpart" "libmapiadmin" %{SOURCE1} apidocs/xml/libmapiadmin/index.xml
+xsltproc -o openchange-libocpf.devhelp --stringparam "booktitle" "OpenChange Property Files (libocpf)" --stringparam "bookpart" "libocpf" %{SOURCE1} apidocs/xml/libocpf/index.xml
+xsltproc -o openchange-mapitest.devhelp --stringparam "booktitle" "MA regression test framework (mapitest)" --stringparam "bookpart" "mapitest" %{SOURCE1} apidocs/xml/mapitest/index.xml
+xsltproc -o openchange-mapiproxy.devhelp --stringparam "booktitle" "MAPIProxy project (mapiproxy)" --stringparam "bookpart" "mapiproxy" %{SOURCE1} apidocs/xml/mapiproxy/index.xml
+xsltproc -o openchange-libmapi++.devhelp --stringparam "booktitle" "C++ bindings for libmapi (libmapi++)" --stringparam "bookpart" "libmapi++" %{SOURCE1} apidocs/xml/libmapi++/index.xml
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+cp -r libmapi++ $RPM_BUILD_ROOT%{_includedir}
+
+# This makes the right links, as rpmlint requires that the
+# ldconfig-created links be recorded in the RPM.
+/sbin/ldconfig -N -n $RPM_BUILD_ROOT/%{_libdir}
+
+mkdir $RPM_BUILD_ROOT%{_mandir}
+cp -r doc/man/man1 $RPM_BUILD_ROOT%{_mandir}
+
+# Skip man3 for now, it doesn't work anyway
+# cp -r apidocs/man/man3 $RPM_BUILD_ROOT%{_mandir}
+rm -r apidocs/man/man3
+
+#%if ! %{build_python_package}
+#rm -r $RPM_BUILD_ROOT%{python_sitearch}/openchange
+#%endif
+
+%if ! %{build_server_package}
+# XXX OC_RULE_ADD patch disables build of this, no need to delete it.
+#rm $RPM_BUILD_ROOT%{_libdir}/libmapiserver.so.*
+#rm -r $RPM_BUILD_ROOT%{_libdir}/samba/modules/*
+#rm $RPM_BUILD_ROOT%{_libdir}/samba/dcerpc_server/dcesrv_mapiproxy.so
+rm $RPM_BUILD_ROOT%{_libdir}/nagios/check_exchange
+rm -r $RPM_BUILD_ROOT%{_datadir}/setup/*
+%endif
+
+%if !%{build_python_package} && !%{build_server_package}
+rm $RPM_BUILD_ROOT%{_bindir}/check_fasttransfer
+%endif
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-libmapi
+cp openchange-libmapi.devhelp $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-libmapi
+cp -r apidocs/html/libmapi/* $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-libmapi
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-libmapiadmin
+cp openchange-libmapiadmin.devhelp $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-libmapiadmin
+cp -r apidocs/html/libmapiadmin/* $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-libmapiadmin
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-libocpf
+cp openchange-libocpf.devhelp $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-libocpf
+cp -r apidocs/html/libocpf/* $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-libocpf
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-mapitest
+cp openchange-mapitest.devhelp $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-mapitest
+cp -r apidocs/html/mapitest/* $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-mapitest
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-mapiproxy
+cp openchange-mapiproxy.devhelp $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-mapiproxy
+cp -r apidocs/html/mapiproxy/* $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-mapiproxy
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-libmapi++
+cp openchange-libmapi++.devhelp $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-libmapi++
+cp -r apidocs/html/libmapi++/* $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchange-libmapi++
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%if %{build_server_package}
+%post server -p /sbin/ldconfig
+
+%postun server -p /sbin/ldconfig
+%endif
+
+%files
+%defattr(-,root,root,-)
+%doc ChangeLog COPYING IDL_LICENSE.txt VERSION
+%{_libdir}/libmapi-openchange.so.*
+%{_libdir}/libmapiadmin.so.*
+%if %{build_python_package} || %{build_server_package}
+%{_libdir}/libmapiproxy.so.*
+%{_libdir}/libmapistore.so.*
+%endif
+%{_libdir}/libocpf.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/*
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/*
+
+%files devel-docs
+%defattr(-,root,root,-)
+#%{_mandir}/man3/*
+%doc %{_datadir}/devhelp/books/*
+%doc apidocs/html/libmapi
+%doc apidocs/html/libocpf
+%doc apidocs/html/overview
+%doc apidocs/html/index.html
+
+%files client
+%defattr(-,root,root,-)
+%{_bindir}/*
+%{_mandir}/man1/*
+%{_datadir}/mapitest/*
+
+%if %{build_python_package}
+%files python
+%defattr(-,root,root,-)
+%{python_sitearch}/openchange
+%endif
+
+%if %{build_server_package}
+%files server
+%defattr(-,root,root,-)
+%{_libdir}/libmapiserver.so.*
+%{_libdir}/samba/dcerpc_server/dcesrv_mapiproxy.so
+%{_libdir}/samba/modules/*
+%if !0%{?rhel}
+%{_libdir}/nagios/check_exchange
+%endif
+%{_datadir}/setup/*
+%endif
+
+%changelog
+* Thu Sep 19 2013 Milan Crha - 2.0-2
+- Add patch to fix multilib issue in libmapi/version.h
+- Move devel-docs subpackage to noarch
+
+* Thu Feb 14 2013 Milan Crha - 2.0-1
+- Update to OpenChange 2.0
+
+* Thu Feb 14 2013 Fedora Release Engineering - 1.0-13
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Fri Oct 26 2012 Milan Crha - 1.0-12
+- Add patch for Gnome bug #682449 (WriteStream fails)
+
+* Mon Aug 06 2012 Milan Crha - 1.0-11
+- Add patch for Red Hat bug #845618 (incorrect symbol resolution)
+
+* Thu Jul 26 2012 Milan Crha - 1.0-10
+- Remove check_fasttransfer from openchange-client, if not building server package
+
+* Fri Jul 20 2012 Fedora Release Engineering - 1.0-9
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Tue Jul 10 2012 Milan Crha - 1.0-8
+- Add patch for OpenChange bug #397 (crash under MAPIUninitialize)
+- Disable build of python and mapiproxy
+
+* Fri Jun 01 2012 Milan Crha - 1.0-7
+- Add patch to use system's popt.h
+- Add patch to compile only certain parts of the package
+- Disable openchange-server for rawhide too (due to samba4 changes)
+
+* Thu May 17 2012 Matthew Barnes -1.0-6
+- Do not build openchange-server in RHEL.
+ (And make disabling the subpackage actually work.)
+
+* Wed May 02 2012 Milan Crha - 1.0-5
+- Do not include nagios/check_exchange in RHEL
+
+* Tue Apr 24 2012 Milan Crha - 1.0-4
+- Bump samba4 dependency
+
+* Thu Apr 19 2012 Matthew Barnes - 1.0-3
+- Add BR: libical-devel (RH bug #803640).
+
+* Wed Apr 18 2012 Milan Crha - 1.0-2
+- Bump samba4 dependency
+
+* Tue Apr 03 2012 Milan Crha - 1.0-1
+- Update to 1.0
+- Enable packages for server part and python bindings
+- Skip man3 pages, which are generated incomplete (use devhelp instead)
+
+* Fri Jan 13 2012 Fedora Release Engineering - 0.11-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Tue Aug 30 2011 Milan Crha - 0.11-3
+- Fix package version number
+
+* Mon Aug 29 2011 Stephen Gallagher - 0.11-2.1
+- Rebuild against fixed libtevent version
+
+* Mon Aug 29 2011 Milan Crha - 0.11-2
+- Sync version and changes with Fedora 16 package
+
+* Thu Aug 11 2011 Milan Crha - 0.11-1
+- Update to OpenChange 0.11 Transporter upstream release
+- Remove unnecessary build modification patches.
+- Add patch to not use mapi_ctx->session as a TALLOC_CTX (OpenChange issue #366)
+- Add patch to read/write PidNameKeywords (OpenChange issue #367)
+
+* Wed Apr 6 2011 Matthew Barnes - 0.10.9-4
+- OpenChange relies on a private Samba 4 library (libsamba-util-common).
+ Add extra linker flags to libmapi.pc to compensate.
+
+* Wed Apr 6 2011 Matthew Barnes - 0.10.9-3
+- Move libmapiproxy.so, libmapistore.so and mapistore backend libraries
+ to the main package so the client subpackage is installable.
+
+* Fri Mar 25 2011 Simo Sorce - 0.10.9-2
+- New snapshot that avoid bison issues.
+- Also add patch that fix build (previously erroneously preapplied in the
+ snapshot tarball)
+- Fix timestamps in tarball
+- Fix specfile's install and files section to cope with newer version changes
+
+* Fri Mar 25 2011 Simo Sorce - 0.10.9-1
+- Upgrade to a 0.11 development snapshot.
+- Required by the new samba4 packages.
+
+* Mon Feb 21 2011 Milan Crha - 0.9-14
+- Rebuild against newer libldb
+
+* Tue Feb 08 2011 Fedora Release Engineering - 0.9-13
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Wed Feb 02 2011 Milan Crha - 0.9-12
+- Add patch for message sending, found by Gianluca Cecchi (RH bug #674034)
+
+* Thu Dec 16 2010 Matthew Barnes - 0.9-11
+- Re-fix man-pages file conflict (RH bug #654729).
+
+* Thu Dec 02 2010 Milan Crha - 0.9-10
+- Add patch for talloc abort in FindGoodServer, found by Jeff Raber (RH bug #602661)
+
+* Wed Sep 29 2010 jkeating - 0.9-9
+- Rebuilt for gcc bug 634757
+
+* Mon Sep 13 2010 Matthew Barnes - 0.9-8
+- Backport unicode and properties support (RH bug #605364).
+
+* Wed Jul 21 2010 David Malcolm - 0.9-7
+- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
+
+* Thu Jun 24 2010 Matthew Barnes - 0.9-6
+- Disable python and server subpackages until they're needed.
+
+* Wed Jun 23 2010 Matthew Barnes - 0.9-5
+- More spec file cleanups.
+
+* Fri Jun 18 2010 Matthew Barnes - 0.9-4
+- Spec file cleanups.
+
+* Mon May 24 2010 Matthew Barnes - 0.9-3
+- Avoid a file conflict with man-pages package.
+
+* Sat Jan 09 2010 Matthew Barnes - 0.9-2
+- Add a devel-docs subpackage (RH bug #552984).
+
+* Sat Dec 26 2009 Matthew Barnes - 0.9-1
+- Update to 0.9 (COCHRANE)
+- Bump samba4 requirement to alpha10.
+
+* Wed Sep 23 2009 Matthew Barnes - 0.8.2-5
+- Rebuild.
+
+* Sat Jul 25 2009 Fedora Release Engineering - 0.8.2-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Mon Jun 29 2009 Matthew Barnes - 0.8.2-3
+- Rename libmapi so as not to conflict with Zarafa (RH bug #505783).
+
+* Thu May 07 2009 Matthew Barnes - 0.8.2-2
+- Do not own the pkgconfig directory (RH bug #499655).
+
+* Tue Mar 31 2009 Matthew Barnes - 0.8.2-1
+- Update to 0.8.2
+- Add a server subpackage.
+- Add BuildRequires: sqlite-devel (for server)
+
+* Sun Mar 08 2009 Matthew Barnes - 0.8-6
+- Fix build breakage.
+- Explicitly require libldb-devel.
+- Bump samba4 requirement to alpha7.
+
+* Wed Feb 25 2009 Matthew Barnes - 0.8-5
+- Rebuild with correct tarball.
+
+* Wed Feb 25 2009 Matthew Barnes - 0.8-4
+- Formal package review cleanups.
+
+* Wed Feb 25 2009 Matthew Barnes - 0.8-3
+- Add documentation files.
+
+* Thu Feb 19 2009 Matthew Barnes - 0.8-2
+- Add some missing build requirements.
+
+* Tue Jan 20 2009 Matthew Barnes - 0.8-1
+- Update to 0.8 (ROMULUS)
+
+* Sat Jan 17 2009 Matthew Barnes - 0.8-0.7.svn949
+- Add missing BuildRequires: zlib-devel
+
+* Sat Dec 27 2008 Matthew Barnes - 0.8-0.6.svn949
+- Update to SVN revision 949.
+
+* Mon Dec 15 2008 Matthew Barnes - 0.8-0.5.svn909
+- Package review feedback (RH bug #453395).
+
+* Fri Dec 12 2008 Matthew Barnes - 0.8-0.4.svn909
+- Update to SVN revision 909.
+- Bump the samba4 requirement.
+
+* Fri Aug 29 2008 Andrew Bartlett - 0:0.8-0.3.svn960.fc9
+- Bump version
+- Don't make the Samba4 version distro-dependent
+
+* Sat Jul 26 2008 Brad Hards - 0:0.8-0.2.svnr674.fc10
+- Bump version
+- Install documentation / man pages correctly
+- Remove epoch (per https://bugzilla.redhat.com/show_bug.cgi?id=453395)
+- Remove %%post and %%postun (per https://bugzilla.redhat.com/show_bug.cgi?id=453395)
+- Remove talloc dependency (per https://bugzilla.redhat.com/show_bug.cgi?id=453395)
+- Take out libmapiproxy, because we aren't up to server side yet.
+
+* Sat Jul 12 2008 Andrew Bartlett - 0:0.7-0.2.svnr627.fc9
+- Add popt-devel BR
+
+* Mon Jun 30 2008 Andrew Bartlett - 0:0.7-0.1.svnr627.fc9
+- Initial package of OpenChange for Fedora