Omit CHALLENGE hashes in the server tab
[rofl0r-ixchat.git] / xchat.spec
blob406d9866618b33cc8dd1e18028561b2d8eb48aec
1 %define _default_patch_fuzz 2
2 %define gconf_version 2.14
4 Summary: A popular and easy to use graphical IRC (chat) client
5 Name: xchat
6 Version: 2.8.8
7 Release: 0%{?dist}
8 Epoch: 1
9 Group: Applications/Internet
10 License: GPLv2+
11 URL: http://www.xchat.org
12 Source: http://www.xchat.org/files/source/2.8/xchat-%{version}.tar.bz2
13 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
15 # Patches 0-9 reserved for official xchat.org patches
17 BuildRequires: perl perl(ExtUtils::Embed) python-devel openssl-devel pkgconfig, tcl-devel
18 BuildRequires: GConf2-devel
19 BuildRequires: dbus-devel >= 0.60, dbus-glib-devel >= 0.60
20 BuildRequires: glib2-devel >= 2.10.0, gtk2-devel >= 2.10.0, bison >= 1.35
21 BuildRequires: gettext /bin/sed
22 BuildRequires: libtool
23 BuildRequires: libsexy-devel
24 BuildRequires: desktop-file-utils >= 0.10
25 # For gconftool-2:
26 Requires(post): GConf2 >= %{gconf_version}
27 Requires(preun): GConf2 >= %{gconf_version}
29 # Ensure that a compatible libperl is installed
30 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
32 Provides: xchat-perl = %{epoch}:%{version}-%{release}
33 Obsoletes: xchat-perl < %{epoch}:%{version}-%{release}
34 Provides: xchat-python = %{epoch}:%{version}-%{release}
35 Obsoletes: xchat-python < %{epoch}:%{version}-%{release}
37 %description
38 X-Chat is an easy to use graphical IRC chat client for the X Window System.
39 It allows you to join multiple IRC channels (chat rooms) at the same time,
40 talk publicly, private one-on-one conversations etc. Even file transfers
41 are possible.
43 This includes the plugins to run the Perl and Python scripts.
45 %package tcl
46 Summary: Tcl script plugin for X-Chat
47 Group: Applications/Internet
48 Requires: %{name} = %{epoch}:%{version}-%{release}
49 %description tcl
50 This package contains the X-Chat plugin providing the Tcl scripting interface.
52 %prep
53 %setup -q
55 %build
56 # Remove CVS files from source dirs so they're not installed into doc dirs.
57 find . -name CVS -type d | xargs rm -rf
59 export CFLAGS="$RPM_OPT_FLAGS $(perl -MExtUtils::Embed -e ccopts)"
60 export LDFLAGS=$(perl -MExtUtils::Embed -e ldopts)
62 %configure --disable-textfe \
63 --enable-gtkfe \
64 --enable-openssl \
65 --enable-python \
66 --enable-tcl=%{_libdir} \
67 --enable-ipv6 \
68 --enable-spell=libsexy \
69 --enable-shm
71 # gtkspell breaks Input Method commit with ENTER
73 make %{?_smp_mflags}
76 %install
77 %{__rm} -rf $RPM_BUILD_ROOT
78 %{__make} install DESTDIR=$RPM_BUILD_ROOT GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
80 # Get rid of libtool archives
81 %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/xchat/plugins/*.la
83 # Install the .desktop file properly
84 %{__rm} -f $RPM_BUILD_ROOT%{_datadir}/applications/xchat.desktop
85 desktop-file-install --vendor="" \
86 --dir $RPM_BUILD_ROOT%{_datadir}/applications \
87 --add-category=IRCClient \
88 --add-category=GTK xchat.desktop
90 %find_lang %{name}
92 # do not Provide plugins .so
93 %define _use_internal_dependency_generator 0
94 %{__cat} << \EOF > %{name}.prov
95 #!%{_buildshell}
96 %{__grep} -v %{_docdir} - | %{__find_provides} $* \
97 | %{__sed} '/\.so\(()(64bit)\)\?$/d'
98 EOF
99 %define __find_provides %{_builddir}/%{name}-%{version}/%{name}.prov
100 %{__chmod} +x %{__find_provides}
103 %post
104 # Install schema
105 export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
106 gconftool-2 --makefile-install-rule /etc/gconf/schemas/apps_xchat_url_handler.schemas >& /dev/null || :
109 %pre
110 if [ "$1" -gt 1 ]; then
111 export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
112 gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/apps_xchat_url_handler.schemas >& /dev/null || :
115 %preun
116 if [ "$1" -eq 0 ]; then
117 export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
118 gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/apps_xchat_url_handler.schemas >& /dev/null || :
121 %clean
122 %{__rm} -rf $RPM_BUILD_ROOT
124 %files -f %{name}.lang
125 %defattr(-,root,root)
126 %doc README ChangeLog
127 %doc plugins/plugin20.html plugins/perl/xchat2-perl.html
128 %{_bindir}/xchat
129 %dir %{_libdir}/xchat
130 %dir %{_libdir}/xchat/plugins
131 %{_libdir}/xchat/plugins/perl.so
132 %{_libdir}/xchat/plugins/python.so
133 %{_datadir}/applications/xchat.desktop
134 %{_datadir}/pixmaps/*
135 %{_sysconfdir}/gconf/schemas/apps_xchat_url_handler.schemas
136 %{_datadir}/dbus-1/services/org.xchat.service.service
138 %files tcl
139 %defattr(-,root,root)
140 %{_libdir}/xchat/plugins/tcl.so