From 47b67c7721bd7ee058b996857d32a506e5392267 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Apr 01 2014 12:36:14 +0000 Subject: Rebase on new irssi-otr upstream, thanks Martin Milata (rh# 1074217) --- diff --git a/irc-otr.spec b/irc-otr.spec index 04d454a..cd5173f 100644 --- a/irc-otr.spec +++ b/irc-otr.spec @@ -1,102 +1,57 @@ -%global gitrev 9ea5cc4 - Name: irc-otr -Version: 0.3 -Release: 9.git%{gitrev}%{?dist} -Summary: Off-The-Record Messaging plugin for various irc clients +Version: 1.0.0 +Release: 1%{?dist} +Summary: Off-The-Record Messaging plugin for irssi Group: Applications/Internet License: GPLv2+ -URL: http://irssi-otr.tuxfamily.org/ -# This comes from git HEAD, for libotr 4 support. -# git clone git://git.tuxfamily.org/gitroot/irssiotr/irssiotr.git \ -# irc-otr-0.3 -# tar --exclude-vcs -czf irc-otr-0.3-%{gitrev}.tar.gz irc-otr-0.3 -Source0: irc-otr-%{version}-%{gitrev}.tar.gz -# Was: -#Source0: ftp://download.tuxfamily.org/irssiotr/irc-otr-%{version}.tar.gz -Source1: http://www.xchat.org/docs/xchat-plugin.h -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: cmake >= 2.4.7 +URL: https://github.com/cryptodotis/irssi-otr +Source0: https://github.com/cryptodotis/irssi-otr/archive/v%{version}.tar.gz +# Already upstream, but not present in v1.0.0 +Patch0: irssi-otr-configure-module-dir.patch +Obsoletes: irssi-otr < 1.0.0-1 + BuildRequires: glib2-devel >= 2.13 BuildRequires: irssi-devel -BuildRequires: libotr-devel >= 3.1.0 -BuildRequires: python >= 2.5 +BuildRequires: libotr-devel >= 4.0.0 BuildRequires: pkgconfig +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +Requires: irssi %description This provides modules which implement Off-The-Record (OTR) Messaging -for a number of popular IRC clients. - - -%package -n irssi-otr -Summary: Off-The-Record messaging plugin for irssi -Group: Applications/Internet -Requires: glib2 >= 2.13 -Requires: irssi -Requires: libotr >= 3.1.0 - - -%description -n irssi-otr -This provides a module which implements Off-The-Record (OTR) Messaging -for Irssi. - - -%package -n xchat-otr -Summary: Off-The-Record messaging plugin for xchat -Group: Applications/Internet -Requires: glib2 >= 2.13 -Requires: libotr >= 3.1.0 -Requires: xchat - - -%description -n xchat-otr -This provides a module which implements Off-The-Record (OTR) Messaging -for X-Chat. +for the irssi IRC client. %prep -%setup -q -cp %{SOURCE1} xchat/ -ln -s xchat/xchat-plugin.h -sed -i -e \ - "s@FIND_PATH(XCHAT_INCLUDE_DIR NAMES xchat/xchat-plugin.h)@FIND_PATH(XCHAT_INCLUDE_DIR NAMES xchat/xchat-plugin.h PATH .)@" \ - CMakeLists.txt -sed -i -e \ - 's@INSTALL(FILES README LICENSE DESTINATION ${DOCDIR})@INSTALL(FILES ../README ../LICENSE DESTINATION ${DOCDIR})@' \ - irssi/CMakeLists.txt xchat/CMakeLists.txt +%setup -q -n irssi-otr-%{version} +%patch0 -p1 %build -%cmake -DIRCOTR_VERSION=%{version} . +./bootstrap +%configure --with-irssi-module-dir=%{_libdir}/irssi/modules make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -mv $RPM_BUILD_ROOT%{_docdir}/irssi-otr ./installed-docs -rm -f $RPM_BUILD_ROOT%{_docdir}/xchat-otr/{README,LICENSE} - +chmod +x $RPM_BUILD_ROOT%{_libdir}/irssi/modules/libotr.so -%clean -rm -rf $RPM_BUILD_ROOT - -%files -n irssi-otr +%files %defattr(-,root,root,-) -%doc installed-docs/* +%doc README.md LICENSE ChangeLog %{_libdir}/irssi/modules/libotr.so - - -%files -n xchat-otr -%defattr(-,root,root,-) -%doc installed-docs/* README.xchat -%{_libdir}/xchat/plugins/libxchatotr.so +%{_datadir}/irssi/help/otr %changelog +* Tue Apr 1 2014 Conrad Meyer - 1.0.0-1 +- Rebase on new irssi-otr upstream, thanks Martin Milata (rh# 1074217) + * Sat Dec 14 2013 Conrad Meyer - 0.3-9.git9ea5cc4 - Bump to git HEAD for libotr 4.0.0 update (# 992580) diff --git a/irssi-otr-configure-module-dir.patch b/irssi-otr-configure-module-dir.patch new file mode 100644 index 0000000..3fdc815 --- /dev/null +++ b/irssi-otr-configure-module-dir.patch @@ -0,0 +1,22 @@ +--- a/configure.ac ++++ a/configure.ac +@@ -69,9 +69,16 @@ CFLAGS="-Wall $CFLAGS -g -fno-strict-aliasing -fstack-protector-all -D_FORTIFY_S + DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_builddir)/src -I\$(top_builddir)/include" + AC_SUBST(DEFAULT_INCLUDES) + +-# Hardcoded here since irssi only searches in $HOME/.irssi/modules or this path +-# which is unfortunate... +-IRSSI_MODULE_DIR="/usr/lib/irssi/modules" ++# Irssi searches for modules in $HOME/.irssi/modules and $(libdir)/irssi/modules ++# where the value of $(libdir) may depend on your distribution, architecture, ++# and whether irssi was installed from package or from source. ++# The hardcoded value should work for most systems but you need to override it for ++# e.g. x86_64 Fedora. ++AC_ARG_WITH([irssi-module-dir], ++ AS_HELP_STRING([--with-irssi-module-dir=DIR], [Irssi module directory]), ++ [IRSSI_MODULE_DIR="$withval"], ++ [IRSSI_MODULE_DIR="/usr/lib/irssi/modules"]) ++ + AC_SUBST(IRSSI_MODULE_DIR) + + AC_CONFIG_FILES([ diff --git a/xchat-plugin.h b/xchat-plugin.h deleted file mode 100644 index 30b1929..0000000 --- a/xchat-plugin.h +++ /dev/null @@ -1,334 +0,0 @@ -/* You can distribute this header with your plugins for easy compilation */ -#ifndef XCHAT_PLUGIN_H -#define XCHAT_PLUGIN_H - -#include - -#define XCHAT_IFACE_MAJOR 1 -#define XCHAT_IFACE_MINOR 9 -#define XCHAT_IFACE_MICRO 11 -#define XCHAT_IFACE_VERSION ((XCHAT_IFACE_MAJOR * 10000) + \ - (XCHAT_IFACE_MINOR * 100) + \ - (XCHAT_IFACE_MICRO)) - -#define XCHAT_PRI_HIGHEST 127 -#define XCHAT_PRI_HIGH 64 -#define XCHAT_PRI_NORM 0 -#define XCHAT_PRI_LOW (-64) -#define XCHAT_PRI_LOWEST (-128) - -#define XCHAT_FD_READ 1 -#define XCHAT_FD_WRITE 2 -#define XCHAT_FD_EXCEPTION 4 -#define XCHAT_FD_NOTSOCKET 8 - -#define XCHAT_EAT_NONE 0 /* pass it on through! */ -#define XCHAT_EAT_XCHAT 1 /* don't let xchat see this event */ -#define XCHAT_EAT_PLUGIN 2 /* don't let other plugins see this event */ -#define XCHAT_EAT_ALL (XCHAT_EAT_XCHAT|XCHAT_EAT_PLUGIN) /* don't let anything see this event */ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _xchat_plugin xchat_plugin; -typedef struct _xchat_list xchat_list; -typedef struct _xchat_hook xchat_hook; -#ifndef PLUGIN_C -typedef struct _xchat_context xchat_context; -#endif - -#ifndef PLUGIN_C -struct _xchat_plugin -{ - /* these are only used on win32 */ - xchat_hook *(*xchat_hook_command) (xchat_plugin *ph, - const char *name, - int pri, - int (*callback) (char *word[], char *word_eol[], void *user_data), - const char *help_text, - void *userdata); - xchat_hook *(*xchat_hook_server) (xchat_plugin *ph, - const char *name, - int pri, - int (*callback) (char *word[], char *word_eol[], void *user_data), - void *userdata); - xchat_hook *(*xchat_hook_print) (xchat_plugin *ph, - const char *name, - int pri, - int (*callback) (char *word[], void *user_data), - void *userdata); - xchat_hook *(*xchat_hook_timer) (xchat_plugin *ph, - int timeout, - int (*callback) (void *user_data), - void *userdata); - xchat_hook *(*xchat_hook_fd) (xchat_plugin *ph, - int fd, - int flags, - int (*callback) (int fd, int flags, void *user_data), - void *userdata); - void *(*xchat_unhook) (xchat_plugin *ph, - xchat_hook *hook); - void (*xchat_print) (xchat_plugin *ph, - const char *text); - void (*xchat_printf) (xchat_plugin *ph, - const char *format, ...); - void (*xchat_command) (xchat_plugin *ph, - const char *command); - void (*xchat_commandf) (xchat_plugin *ph, - const char *format, ...); - int (*xchat_nickcmp) (xchat_plugin *ph, - const char *s1, - const char *s2); - int (*xchat_set_context) (xchat_plugin *ph, - xchat_context *ctx); - xchat_context *(*xchat_find_context) (xchat_plugin *ph, - const char *servname, - const char *channel); - xchat_context *(*xchat_get_context) (xchat_plugin *ph); - const char *(*xchat_get_info) (xchat_plugin *ph, - const char *id); - int (*xchat_get_prefs) (xchat_plugin *ph, - const char *name, - const char **string, - int *integer); - xchat_list * (*xchat_list_get) (xchat_plugin *ph, - const char *name); - void (*xchat_list_free) (xchat_plugin *ph, - xchat_list *xlist); - const char * const * (*xchat_list_fields) (xchat_plugin *ph, - const char *name); - int (*xchat_list_next) (xchat_plugin *ph, - xchat_list *xlist); - const char * (*xchat_list_str) (xchat_plugin *ph, - xchat_list *xlist, - const char *name); - int (*xchat_list_int) (xchat_plugin *ph, - xchat_list *xlist, - const char *name); - void * (*xchat_plugingui_add) (xchat_plugin *ph, - const char *filename, - const char *name, - const char *desc, - const char *version, - char *reserved); - void (*xchat_plugingui_remove) (xchat_plugin *ph, - void *handle); - int (*xchat_emit_print) (xchat_plugin *ph, - const char *event_name, ...); - int (*xchat_read_fd) (xchat_plugin *ph, - void *src, - char *buf, - int *len); - time_t (*xchat_list_time) (xchat_plugin *ph, - xchat_list *xlist, - const char *name); - char *(*xchat_gettext) (xchat_plugin *ph, - const char *msgid); - void (*xchat_send_modes) (xchat_plugin *ph, - const char **targets, - int ntargets, - int modes_per_line, - char sign, - char mode); - char *(*xchat_strip) (xchat_plugin *ph, - const char *str, - int len, - int flags); - void (*xchat_free) (xchat_plugin *ph, - void *ptr); -}; -#endif - - -xchat_hook * -xchat_hook_command (xchat_plugin *ph, - const char *name, - int pri, - int (*callback) (char *word[], char *word_eol[], void *user_data), - const char *help_text, - void *userdata); - -xchat_hook * -xchat_hook_server (xchat_plugin *ph, - const char *name, - int pri, - int (*callback) (char *word[], char *word_eol[], void *user_data), - void *userdata); - -xchat_hook * -xchat_hook_print (xchat_plugin *ph, - const char *name, - int pri, - int (*callback) (char *word[], void *user_data), - void *userdata); - -xchat_hook * -xchat_hook_timer (xchat_plugin *ph, - int timeout, - int (*callback) (void *user_data), - void *userdata); - -xchat_hook * -xchat_hook_fd (xchat_plugin *ph, - int fd, - int flags, - int (*callback) (int fd, int flags, void *user_data), - void *userdata); - -void * -xchat_unhook (xchat_plugin *ph, - xchat_hook *hook); - -void -xchat_print (xchat_plugin *ph, - const char *text); - -void -xchat_printf (xchat_plugin *ph, - const char *format, ...); - -void -xchat_command (xchat_plugin *ph, - const char *command); - -void -xchat_commandf (xchat_plugin *ph, - const char *format, ...); - -int -xchat_nickcmp (xchat_plugin *ph, - const char *s1, - const char *s2); - -int -xchat_set_context (xchat_plugin *ph, - xchat_context *ctx); - -xchat_context * -xchat_find_context (xchat_plugin *ph, - const char *servname, - const char *channel); - -xchat_context * -xchat_get_context (xchat_plugin *ph); - -const char * -xchat_get_info (xchat_plugin *ph, - const char *id); - -int -xchat_get_prefs (xchat_plugin *ph, - const char *name, - const char **string, - int *integer); - -xchat_list * -xchat_list_get (xchat_plugin *ph, - const char *name); - -void -xchat_list_free (xchat_plugin *ph, - xchat_list *xlist); - -const char * const * -xchat_list_fields (xchat_plugin *ph, - const char *name); - -int -xchat_list_next (xchat_plugin *ph, - xchat_list *xlist); - -const char * -xchat_list_str (xchat_plugin *ph, - xchat_list *xlist, - const char *name); - -int -xchat_list_int (xchat_plugin *ph, - xchat_list *xlist, - const char *name); - -time_t -xchat_list_time (xchat_plugin *ph, - xchat_list *xlist, - const char *name); - -void * -xchat_plugingui_add (xchat_plugin *ph, - const char *filename, - const char *name, - const char *desc, - const char *version, - char *reserved); - -void -xchat_plugingui_remove (xchat_plugin *ph, - void *handle); - -int -xchat_emit_print (xchat_plugin *ph, - const char *event_name, ...); - -char * -xchat_gettext (xchat_plugin *ph, - const char *msgid); - -void -xchat_send_modes (xchat_plugin *ph, - const char **targets, - int ntargets, - int modes_per_line, - char sign, - char mode); - -char * -xchat_strip (xchat_plugin *ph, - const char *str, - int len, - int flags); - -void -xchat_free (xchat_plugin *ph, - void *ptr); - -#if !defined(PLUGIN_C) && defined(WIN32) -#ifndef XCHAT_PLUGIN_HANDLE -#define XCHAT_PLUGIN_HANDLE (ph) -#endif -#define xchat_hook_command ((XCHAT_PLUGIN_HANDLE)->xchat_hook_command) -#define xchat_hook_server ((XCHAT_PLUGIN_HANDLE)->xchat_hook_server) -#define xchat_hook_print ((XCHAT_PLUGIN_HANDLE)->xchat_hook_print) -#define xchat_hook_timer ((XCHAT_PLUGIN_HANDLE)->xchat_hook_timer) -#define xchat_hook_fd ((XCHAT_PLUGIN_HANDLE)->xchat_hook_fd) -#define xchat_unhook ((XCHAT_PLUGIN_HANDLE)->xchat_unhook) -#define xchat_print ((XCHAT_PLUGIN_HANDLE)->xchat_print) -#define xchat_printf ((XCHAT_PLUGIN_HANDLE)->xchat_printf) -#define xchat_command ((XCHAT_PLUGIN_HANDLE)->xchat_command) -#define xchat_commandf ((XCHAT_PLUGIN_HANDLE)->xchat_commandf) -#define xchat_nickcmp ((XCHAT_PLUGIN_HANDLE)->xchat_nickcmp) -#define xchat_set_context ((XCHAT_PLUGIN_HANDLE)->xchat_set_context) -#define xchat_find_context ((XCHAT_PLUGIN_HANDLE)->xchat_find_context) -#define xchat_get_context ((XCHAT_PLUGIN_HANDLE)->xchat_get_context) -#define xchat_get_info ((XCHAT_PLUGIN_HANDLE)->xchat_get_info) -#define xchat_get_prefs ((XCHAT_PLUGIN_HANDLE)->xchat_get_prefs) -#define xchat_list_get ((XCHAT_PLUGIN_HANDLE)->xchat_list_get) -#define xchat_list_free ((XCHAT_PLUGIN_HANDLE)->xchat_list_free) -#define xchat_list_fields ((XCHAT_PLUGIN_HANDLE)->xchat_list_fields) -#define xchat_list_str ((XCHAT_PLUGIN_HANDLE)->xchat_list_str) -#define xchat_list_int ((XCHAT_PLUGIN_HANDLE)->xchat_list_int) -#define xchat_list_time ((XCHAT_PLUGIN_HANDLE)->xchat_list_time) -#define xchat_list_next ((XCHAT_PLUGIN_HANDLE)->xchat_list_next) -#define xchat_plugingui_add ((XCHAT_PLUGIN_HANDLE)->xchat_plugingui_add) -#define xchat_plugingui_remove ((XCHAT_PLUGIN_HANDLE)->xchat_plugingui_remove) -#define xchat_emit_print ((XCHAT_PLUGIN_HANDLE)->xchat_emit_print) -#define xchat_gettext ((XCHAT_PLUGIN_HANDLE)->xchat_gettext) -#define xchat_send_modes ((XCHAT_PLUGIN_HANDLE)->xchat_send_modes) -#define xchat_strip ((XCHAT_PLUGIN_HANDLE)->xchat_strip) -#define xchat_free ((XCHAT_PLUGIN_HANDLE)->xchat_free) -#endif - -#ifdef __cplusplus -} -#endif -#endif