# HG changeset patch
# Parent 19a36ac5d0b55244c4b3bdef8cb6f98874a9d961
[work-in-progress] Add possibility to build with CMake

diff -r 19a36ac5d0b5 .hgignore
--- a/.hgignore	Sun Jan 13 06:17:13 2013 +0200
+++ b/.hgignore	Sun Jan 13 06:40:40 2013 +0200
@@ -34,3 +34,5 @@
 tags
 mcabber/ptodo
 mcabber/ppatches
+
+mcabber/build
diff -r 19a36ac5d0b5 mcabber/CMakeLists.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/CMakeLists.txt	Sun Jan 13 06:40:40 2013 +0200
@@ -0,0 +1,303 @@
+## Copyright 2010-2012 Myhailo Danylenko
+# This file is part of mcabber.
+#
+# mcabber is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+cmake_minimum_required ( VERSION 2.6 )
+project ( mcabber C )
+set ( PROJECT_VERSION "0.10.2-dev" )
+
+## User settable options
+option ( ENABLE_DEBUG    "Enable debugging output"                       OFF ) # XXX is it really used?
+option ( USE_SIGWINCH    "Compile with SIGWINCH handler"                 OFF )
+option ( XEP0022         "Enable obsolete Message Events (XEP-0022)"     OFF ) # + XEP0085?
+option ( MODULES_ENABLE  "Enable dynamic module loading"                 ON  )
+option ( WANT_LIBIDN     "Compile with libidn support"                   ON  )
+option ( WANT_GPGME      "Compile with PGP support (libgpgme required)"  ON  )
+option ( WANT_OTR        "Compile with OTR support"                      OFF )
+option ( WANT_ENCHANT    "Use enchant for spell-checking"                OFF )
+option ( WANT_ASPELL     "Use aspell for spell-checking"                 OFF )
+option ( ENABLE_HGCSET   "Report hg changeset in version string"         OFF )
+
+# FIXME
+set ( DATA_DIR   "${CMAKE_INSTALL_PREFIX}/share"               CACHE PATH "Path to data files" )
+set ( PKGLIB_DIR "${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}" CACHE PATH "Path to modules"    )
+
+set ( MCABBER_BRANCH  "experimental"     )
+set ( MCABBER_VERSION ${PROJECT_VERSION} )
+
+## Check for build dependencies
+find_package(PkgConfig REQUIRED)
+
+# Standard includes
+include ( CheckIncludeFiles )
+check_include_files ( "wctype.h"       HAVE_WCTYPE_H       )
+check_include_files ( "localcharset.h" HAVE_LOCALCHARSET_H )
+# Standard functions
+include ( CheckSymbolExists )
+check_symbol_exists ( arc4random "stdlib.h" HAVE_ARC4RANDOM )
+check_symbol_exists ( iswblank   "wctype.h" HAVE_ISWBLANK   )
+set ( CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE )
+check_symbol_exists ( strcasestr "string.h" HAVE_STRCASESTR )
+set ( CMAKE_REQUIRED_DEFINITIONS -D_XOPEN_SOURCE )
+check_symbol_exists ( wcwidth    "wchar.h"  HAVE_WCHAR_H    ) # TODO change to HAVE_WCWIDTH (used @utf8.h)
+check_symbol_exists ( timezone   "time.h"   HAVE_TIMEZONE   )
+# Types
+include ( CheckStructHasMember )
+check_struct_has_member ( "struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF )
+
+# Glib
+pkg_check_modules ( GLIB REQUIRED glib-2.0>=2.14.0 )
+if ( MODULES_ENABLE )
+	pkg_check_modules ( GMODULE REQUIRED gmodule-2.0 )
+endif ()
+
+# Loudmouth
+pkg_check_modules ( LM REQUIRED loudmouth-1.0>=1.4.2 )
+set ( CMAKE_REQUIRED_INCLUDES  ${LM_INCLUDE_DIRS}         )
+set ( CMAKE_REQUIRED_LIBRARIES ${LM_LIBRARIES}            )
+set ( CMAKE_REQUIRESD_FLAGS    ${LM_LDFLAGS} ${LM_CFLAGS} )
+check_symbol_exists ( lm_connection_unregister_reply_handler "loudmouth/loudmouth.h" HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER )
+
+# Libidn
+if ( WANT_LIBIDN )
+	pkg_check_modules ( LIBIDN libidn )
+	if ( LIBIDN_FOUND )
+		set ( HAVE_LIBIDN TRUE )
+	endif ()
+endif ()
+
+# Ncursesw / Ncurses / Curses
+pkg_check_modules ( CURSES ncursesw )
+if ( CURSES_FOUND )
+	pkg_check_modules ( PANEL REQUIRED panelw )
+	set ( HAVE_UNICODE TRUE )
+else()
+	pkg_check_modules ( CURSES ncurses )
+	if ( CURSES_FOUND )
+		pkg_check_modules ( PANEL REQUIRED panel )
+		set ( HAVE_UNICODE FALSE )
+	else ()
+		find_package ( Curses )
+		# XXX just fail?
+	endif ()
+endif ()
+set ( CMAKE_REQUIRED_INCLUDES  ${CURSES_INCLUDE_DIRS}             )
+set ( CMAKE_REQUIRED_LIBRARIES ${CURSES_LIBRARIES}                )
+set ( CMAKE_REQUIRED_FLAGS     ${CURSES_LDFLAGS} ${CURSES_CFLAGS} )
+check_symbol_exists ( ESCDELAY "curses.h" HAVE_ESCDELAY )
+
+# Gpgme
+if ( WANT_GPGME )
+	find_program ( GPGME_CONFIG_EXECUTABLE gpgme-config DOC "Path to gpgme-config executable" )
+	if ( GPGME_CONFIG_EXECUTABLE )
+		execute_process ( COMMAND ${GPGME_CONFIG_EXECUTABLE} --libs   OUTPUT_VARIABLE GPGME_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE )
+		execute_process ( COMMAND ${GPGME_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE GPGME_CFLAGS    OUTPUT_STRIP_TRAILING_WHITESPACE )
+		set ( HAVE_GPGME TRUE )
+	endif ()
+endif ()
+
+# Libotr
+if ( WANT_OTR )
+	pkg_check_modules ( LIBOTR libotr>=4.0.0 )
+	if ( LIBOTR_FOUND )
+		set ( HAVE_LIBOTR TRUE )
+	else()
+		# libotr started shipping .pc starting from 3.2.0...
+		pkg_check_modules ( LIBOTR libotr>=3.1.0 )
+		if ( LIBOTR_FOUND )
+			set ( HAVE_LIBOTR TRUE )
+			set ( HAVE_LIBOTR3 TRUE )
+		endif()
+	endif ()
+endif ()
+
+# Spellcheckers
+if ( WANT_ENCHANT )
+	pkg_check_modules ( ENCHANT enchant )
+	if ( ENCHANT_FOUND )
+		set ( WITH_ENCHANT TRUE )
+	endif ()
+elseif ( WANT_ASPELL )
+	find_package ( ASPELL )
+	if ( ASPELL_FOUND )
+		set ( WITH_ASPELL TRUE )
+	endif ()
+endif ()
+
+# LaTeX for guide
+find_package ( LATEX )
+if ( PDFLATEX_COMPILER AND BIBTEX_COMPILER )
+	set ( HAVE_LATEX TRUE )
+endif ()
+
+## HG Changeset
+if ( ENABLE_HGCSET )
+	find_program ( HG_EXECUTABLE hg DOC "Path to hg (mercurial) to request changeset information" )
+	if ( HG_EXECUTABLE )
+		execute_process ( COMMAND hg identify --id OUTPUT_VARIABLE HGCSET OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET )
+	endif ()
+endif ()
+
+link_directories ( ${GLIB_LIBRARY_DIRS}
+                   ${GMODULE_LIBRARY_DIRS}
+                   ${LM_LIBRARY_DIRS}
+				   ${LIBIDN_LIBRARY_DIRS}
+				   ${ENCHANT_LIBRARY_DIRS}
+				   ${CURSES_LIBRARY_DIRS}
+				   ${PANEL_LIBRARY_DIRS}
+				   ${LIBOTR_LIBRARY_DIRS} )
+
+## Define targets
+set ( mcabber_SUBSYSTEMS
+	caps commands compl events hbuf help histolog hooks
+	modules nohtml otr pgp roster screen settings utf8 utils
+	xmpp xmpp_helper xmpp_iq xmpp_iqrequest xmpp_muc xmpp_s10n )
+if ( NOT MODULES_ENABLE )
+	list ( APPEND mcabber_SUBSYSTEMS extcmd fifo )
+endif ()
+set ( mcabber_SOURCES
+	mcabber/api.h
+	mcabber/main.c
+	mcabber/logprint.h
+	mcabber/xmpp_defines.h
+	${mcabber_BINARY_DIR}/include/mcabber/config.h
+	${mcabber_BINARY_DIR}/include/mcabber/hgcset.h )
+foreach ( PART IN LISTS mcabber_SUBSYSTEMS )
+	list ( APPEND mcabber_SOURCES mcabber/${PART}.c mcabber/${PART}.h )
+endforeach ()
+add_executable ( mcabber ${mcabber_SOURCES} )
+
+if ( MODULES_ENABLE )
+	add_library ( beep      MODULE modules/beep/beep.c                          )
+	add_library ( eventcmd  MODULE modules/eventcmd/eventcmd.c mcabber/extcmd.c )
+	add_library ( fifo      MODULE modules/fifo/fifo_module.c mcabber/fifo.c    )
+	add_library ( urlregex  MODULE modules/urlregex/urlregex.c                  )
+	add_library ( xttitle   MODULE modules/xttitle/xttitle.c                    )
+endif ()
+
+## Compiler setup
+configure_file ( config.h.in include/mcabber/config.h )
+configure_file ( hgcset.h.in include/mcabber/hgcset.h ) # TODO: eliminate
+include_directories ( SYSTEM
+                      ${GLIB_INCLUDE_DIRS}
+                      ${GMODULE_INCLUDE_DIRS}
+                      ${LM_INCLUDE_DIRS}
+					  ${LIBIDN_INCLUDE_DIRS}
+					  ${ENCHANT_INCLUDE_DIRS}
+					  ${ASPELL_INCLUDE_DIR}
+					  ${CURSES_INCLUDE_DIRS}
+					  ${PANEL_INCLUDE_DIRS}
+					  ${LIBOTR_INCLUDE_DIRS} )
+target_link_libraries ( mcabber
+                        ${GLIB_LIBRARIES}
+                        ${GMODULE_LIBRARIES}
+                        ${LM_LIBRARIES}
+					    ${LIBIDN_LIBRARIES}
+					    ${ENCHANT_LIBRARIES}
+						${ASPELL_LIBRARIES}
+					    ${CURSES_LIBRARIES}
+					    ${PANEL_LIBRARIES}
+						${GPGME_LIBRARIES}
+						${LIBOTR_LIBRARIES} )
+target_link_libraries ( fifo
+                        ${GLIB_LIBRARIES} )
+target_link_libraries ( eventcmd
+                        ${GLIB_LIBRARIES} )
+target_link_libraries ( xttitle
+                        ${GLIB_LIBRARIES} )
+include_directories ( ${mcabber_SOURCE_DIR}
+                      ${mcabber_BINARY_DIR}/include
+					  ${mcabber_BINARY_DIR}/include/mcabber )
+set_target_properties ( mcabber PROPERTIES
+					    COMPILE_FLAGS "-Wall ${GPGME_CFLAGS} -D_GNU_SOURCE" )
+
+## Extra targets
+if ( HAVE_LATEX )
+	add_custom_command ( OUTPUT guide.aux
+	                    COMMAND ${PDFLATEX_COMPILER} -output-directory=${mcabber_BINARY_DIR} guide >/dev/null
+						DEPENDS doc/guide/guide.png doc/guide/guide.tex
+						WORKING_DIRECTORY ${mcabber_SOURCE_DIR}/doc/guide )
+	add_custom_command ( OUTPUT guide.bbl
+	                    COMMAND BIBINPUTS=${mcabber_SOURCE_DIR}/doc/guide ${BIBTEX_COMPILER} guide >/dev/null
+						DEPENDS guide.aux doc/guide/guide.bib
+						WORKING_DIRECTORY ${mcabber_BINARY_DIR} )
+	add_custom_command ( OUTPUT guide.pdf
+						COMMAND   ${PDFLATEX_COMPILER} -output-directory=${mcabber_BINARY_DIR} guide >/dev/null
+						DEPENDS guide.bbl guide.aux doc/guide/guide.png doc/guide/guide.tex
+						WORKING_DIRECTORY ${mcabber_SOURCE_DIR}/doc/guide )
+	add_custom_target ( guide ALL ${PDFLATEX_COMPILER} -output-directory=${mcabber_BINARY_DIR} guide >/dev/null
+						DEPENDS guide.pdf
+						WORKING_DIRECTORY ${mcabber_SOURCE_DIR}/doc/guide
+						SOURCES doc/guide/guide.bib doc/guide/guide.png doc/guide/guide.tex )
+endif ()
+
+## Packaging information
+set(CPACK_PACKAGE_NAME    ${PROJECT_NAME})
+set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
+set(CPACK_PACKAGE_VENDOR  "McKael")
+set(CPACK_PACKAGE_CONTACT "Mikael BERTHE <mikael@lilotux.net>")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Small Jabber (XMPP) console client")
+set(CPACK_PACKAGE_DESCRIPTION_FILE ${mcabber_SOURCE_DIR}/README)
+set(CPACK_RESOURCE_FILE_LICENSE    ${mcabber_SOURCE_DIR}/COPYING)
+set(CPACK_RESOURCE_FILE_README     ${mcabber_SOURCE_DIR}/README)
+set(CPACK_RESOURCE_FILE_WELCOME    ${mcabber_SOURCE_DIR}/README)
+set(CPACK_SOURCE_GENERATOR TBZ2)
+set(CPACK_GENERATOR DEB CACHE STRING "Binary package generator, eg DEB, RPM, TGZ, NSIS...")
+set(CPACK_DEBIAN_PACKAGE_SECTION libs)
+# XXX: tmp=`tempfile`; obj=${mcabber_BINARY_DIR}/mcabber.so; ldd $obj > $tmp; objdump -p $obj | \grep NEEDED | sed -e 's/.*NEEDED *//' | xargs -I "{}" grep -F "{}" $tmp | sed -e 's/.*=> *\(\S*\).*/\1/' | xargs dpkg -S | cut -d : -f 1 | sort -u ; \rm $tmp
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "")
+find_program(DPKG_EXECUTABLE dpkg)
+if(DPKG_EXECUTABLE)
+	execute_process(COMMAND ${DPKG_EXECUTABLE} --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
+else()
+	set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386 CACHE STRING "Architecture of package")
+endif()
+set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
+# XXX: Set package name directly to get rid of -Sources?
+set(CPACK_SOURCE_IGNORE_FILES "/\\\\..*;\\\\.swp;~$;/build/;\\\\.tar\\\\.;\\\\.deb;\\\\.so")
+include(CPack)
+
+## Preinstallation stuff
+if ( MODULES_ENABLE )
+	# build time variables (cflags)
+	configure_file ( mcabber.pc.in.in mcabber.pc.in @ONLY )
+	# install time variables (paths)
+	install ( CODE "configure_file ( ${mcabber_BINARY_DIR}/mcabber.pc.in ${mcabber_BINARY_DIR}/mcabber.pc )" )
+endif ()
+# full executable path in menu entry
+install ( CODE "configure_file ( ${mcabber_SOURCE_DIR}/mcabber.menu.in ${mcabber_BINARY_DIR}/mcabber.menu )" )
+
+## Set up installer
+install ( TARGETS mcabber                                                 DESTINATION bin )
+if ( MODULES_ENABLE )
+	install ( DIRECTORY mcabber/ ${mcabber_BINARY_DIR}/include/mcabber/   DESTINATION include/mcabber  FILES_MATCHING PATTERN "*.h" PATTERN ".*" EXCLUDE )
+	install ( TARGETS beep eventcmd fifo urlregex xttitle                 DESTINATION lib/mcabber    )
+	install ( FILES ${mcabber_BINARY_DIR}/mcabber.pc                      DESTINATION lib/pkgconfig  )
+endif ()
+install ( DIRECTORY doc/help                                              DESTINATION share/mcabber    FILES_MATCHING PATTERN "*.txt" )
+install ( FILES doc/mcabber.1                                             DESTINATION share/man/man1 )
+install ( FILES mcabber.desktop                                           DESTINATION share/applications )
+install ( FILES ${mcabber_BINARY_DIR}/mcabber.menu                        DESTINATION share/menu                      RENAME mcabber )
+install ( FILES mcabberrc.example                                         DESTINATION share/doc/${CPACK_PACKAGE_NAME}/examples )
+install ( FILES ChangeLog                                                 DESTINATION share/doc/${CPACK_PACKAGE_NAME} RENAME changelog )
+install ( FILES COPYING                                                   DESTINATION share/doc/${CPACK_PACKAGE_NAME} RENAME copyright )
+install ( FILES AUTHORS README TODO ChangeLog.api doc/HOWTO_modules.txt doc/README_PGP.txt DESTINATION share/doc/${CPACK_PACKAGE_NAME} )
+install ( DIRECTORY contrib                                               DESTINATION share/doc/${CPACK_PACKAGE_NAME} )
+install ( FILES doc/mcabber.1.html doc/manpage.css                        DESTINATION share/doc/${CPACK_PACKAGE_NAME}/html )
+if ( HAVE_LATEX )
+	install ( FILES ${mcabber_BINARY_DIR}/guide.pdf                       DESTINATION share/doc/${CPACK_PACKAGE_NAME} ) # :/
+endif ()
+
+## The End ## vim: se ts=4 sw=4: ##
diff -r 19a36ac5d0b5 mcabber/config.h.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/config.h.in	Sun Jan 13 06:40:40 2013 +0200
@@ -0,0 +1,51 @@
+/* help @help.c */
+#define DATA_DIR                      "@DATA_DIR@"
+/* conditional @main.c */ /* does it have any effect really? */
+#cmakedefine ENABLE_DEBUG             @ENABLE_DEBUG@
+/* conditional @main.c */
+#cmakedefine ENABLE_HGCSET            @ENABLE_HGCSET@
+/* @xmpp.c */
+#cmakedefine HAVE_ARC4RANDOM          @HAVE_ARC4RANDOM@
+/* @screen.c */
+#cmakedefine HAVE_ESCDELAY            @HAVE_ESCDELAY@
+/* alot */
+#cmakedefine HAVE_GPGME               @HAVE_GPGME@
+/* @utf8.h */
+#cmakedefine HAVE_ISWBLANK            @HAVE_ISWBLANK@
+/* @utils.c */
+#cmakedefine HAVE_LIBIDN              @HAVE_LIBIDN@
+/* alot */
+#cmakedefine HAVE_LIBOTR              @HAVE_LIBOTR@
+/* otr.[ch] */
+#cmakedefine HAVE_LIBOTR3             @HAVE_LIBOTR3@
+/* @screen.c */
+#cmakedefine HAVE_LOCALCHARSET_H      @HAVE_LOCALCHARSET_H@
+#cmakedefine HAVE_NCURSESW_NCURSES_H  @HAVE_NCURSESW_NCURSES_H@
+#cmakedefine HAVE_NCURSES_NCURSES_H   @HAVE_NCURSES_NCURSES_H@
+/* @utils */
+#cmakedefine HAVE_STRCASESTR          @HAVE_STRCASESTR@
+/* utils, xmpp_iq */
+#cmakedefine HAVE_TIMEZONE            @HAVE_TIMEZONE@
+#cmakedefine HAVE_TM_GMTOFF           @HAVE_TM_GMTOFF@
+/* utils, main */
+#cmakedefine HAVE_UNICODE             @HAVE_UNICODE@
+#cmakedefine HAVE_WCHAR_H             @HAVE_WCHAR_H@
+#cmakedefine HAVE_WCTYPE_H            @HAVE_WCTYPE_H@
+/* modules */
+#define MCABBER_BRANCH                "@MCABBER_BRANCH@"
+#define MCABBER_VERSION               "@MCABBER_VERSION@"
+#cmakedefine MODULES_ENABLE           @MODULES_ENABLE@
+/* identification */
+#define PACKAGE_NAME                  "@PROJECT_NAME@"
+#define PACKAGE_STRING                "@PROJECT_NAME@ @PROJECT_VERSION@"
+#define PACKAGE_VERSION               "@PROJECT_VERSION@"
+/* modules */
+#define PKGLIB_DIR                    "@PKGLIB_DIR@"
+/* option */
+#cmakedefine USE_SIGWINCH             @USE_SIGWINCH@
+/* spelling */
+#cmakedefine WITH_ASPELL              @WITH_ASPELL@
+#cmakedefine WITH_ENCHANT             @WITH_ENCHANT@
+/* option, also XEP0085? */
+#cmakedefine XEP0022                  @XEP0022@
+/* end */
diff -r 19a36ac5d0b5 mcabber/configure.ac
--- a/mcabber/configure.ac	Sun Jan 13 06:17:13 2013 +0200
+++ b/mcabber/configure.ac	Sun Jan 13 06:40:40 2013 +0200
@@ -35,9 +35,8 @@
 
 # Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h locale.h netdb.h netinet/in.h stddef.h \
-                  stdlib.h string.h strings.h sys/socket.h sys/time.h \
-                  syslog.h termios.h wchar.h wctype.h localcharset.h])
+AC_CHECK_HEADERS([fcntl.h locale.h stdlib.h string.h sys/time.h \
+                  termios.h wchar.h wctype.h localcharset.h])
 AC_CHECK_HEADERS([unistd.h], , AC_MSG_ERROR([Missing header file]))
 AC_VAR_TIMEZONE_EXTERNALS
 
@@ -58,10 +57,8 @@
 AC_TYPE_SIGNAL
 AC_FUNC_STRFTIME
 AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([alarm arc4random bzero gethostbyname gethostname inet_ntoa \
-                isascii memmove memset modf select setlocale socket strcasecmp \
-                strchr strdup strncasecmp strrchr strstr strcasestr vsnprintf \
-                iswblank])
+AC_CHECK_FUNCS([arc4random memset setlocale strcasecmp strchr strncasecmp \
+                strrchr strstr strcasestr iswblank])
 
 
 AC_CHECK_DECLS([strptime],,,
diff -r 19a36ac5d0b5 mcabber/hgcset.h.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/hgcset.h.in	Sun Jan 13 06:40:40 2013 +0200
@@ -0,0 +1,3 @@
+/* this can go to config.h */
+#define HGCSET "@HGCSET@"
+/* end */
diff -r 19a36ac5d0b5 mcabber/mcabber.menu.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/mcabber.menu.in	Sun Jan 13 06:40:40 2013 +0200
@@ -0,0 +1,2 @@
+?package(mcabber):needs="text" section="Applications/Network/Communication"\
+  title="mcabber" command="@CMAKE_INSTALL_PREFIX@/bin/mcabber"
diff -r 19a36ac5d0b5 mcabber/mcabber.pc.in.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/mcabber.pc.in.in	Sun Jan 13 06:40:40 2013 +0200
@@ -0,0 +1,14 @@
+prefix=${CMAKE_INSTALL_PREFIX}
+exec_prefix=$${EMPTY}{prefix}
+libdir=$${EMPTY}{prefix}/lib
+includedir=$${EMPTY}{prefix}/include
+datadir=@DATA_DIR@
+pkglibdir=@PKGLIB_DIR@
+
+Name:             MCabber
+Description:      Modular XMPP client
+URL:              http://mcabber.com
+Requires.private: glib-2.0 gmodule-2.0 loudmouth-1.0
+Version:          @PROJECT_VERSION@
+Libs: 
+Cflags:           -I$${EMPTY}{includedir} @LIBOTR_CFLAGS@ @GPGME_CFLAGS@
