summary refs log blame commit diff stats
path: root/hexchat.spec
blob: f66719d2b13f33dd5ecb0229e8f70ae99cca8bc8 (plain) (tree)
16d32fde
/* HexChat
 * Copyright (C) 1998-2010 Peter Zelezny.
 * Copyright (C) 2009-2013 Berke Viktor.
 *
 * This program 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, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#ifndef HEXCHAT_TYPEDEF_H
#define HEXCHAT_TYPEDEF_H

#ifdef WIN32

#ifndef SSIZE_T_DEFINED
#ifdef ssize_t
#undef ssize_t
#endif
#ifdef _WIN64
typedef __int64          ssize_t;
#else
typedef _W64 int         ssize_t;
#endif
#define SSIZE_T_DEFINED
#endif

#ifndef fstat
#define fstat _fstat
#define stat _stat
#endif

#endif

#endif
mitter berkeviktor@aol.com <berkeviktor@aol.com> 2011-02-24 04:14:30 +0100 add xchat r1489' href='/git-repos/torxchat.git/commit/xchat.spec?h=feature/tls-srp&id=4a6ceffb98a0b785494f680d3776c4bfc4052f9e'>4a6ceffb ^
16d32fde ^
4a6ceffb ^
















746d9b54 ^
4a6ceffb ^




746d9b54 ^
4a6ceffb ^




746d9b54 ^
4a6ceffb ^







16d32fde ^






4a6ceffb ^
746d9b54 ^
16d32fde ^
4a6ceffb ^


16d32fde ^
4a6ceffb ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141



                                                                
                  




                                

                                                                                 


















                                                                                         



                                                          

            
                                                                            






                                                                           
                                      


                                                  
                                                                               





























                                                                                 
                                                         

                                    
                                                                  


                                                 
                                    
















                                                                    
                                                                                                         




                                                               
                                                                                                             




                                                               
                                                                                                             







                           






                                                         
                     
                                                             
                                                       


                     
                                 
 
%define _default_patch_fuzz 2
%define gconf_version 2.14

Summary:   A popular and easy to use graphical IRC (chat) client
Name:      hexchat
Version:   2.8.8
Release:   0%{?dist}
Epoch:     1
Group:     Applications/Internet
License:   GPLv2+
URL:       http://www.hexchat.org
Source:    https://github.com/downloads/hexchat/hexchat/hexchat-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# Patches 0-9 reserved for official xchat.org patches

BuildRequires: perl perl(ExtUtils::Embed) python-devel openssl-devel pkgconfig, tcl-devel
BuildRequires: GConf2-devel
BuildRequires: dbus-devel >= 0.60, dbus-glib-devel >= 0.60
BuildRequires: glib2-devel >= 2.10.0, gtk2-devel >= 2.10.0, bison >= 1.35
BuildRequires: gettext /bin/sed
BuildRequires: libtool
BuildRequires: libsexy-devel
BuildRequires: desktop-file-utils >= 0.10
# For gconftool-2:
Requires(post): GConf2 >= %{gconf_version}
Requires(preun): GConf2 >= %{gconf_version}

# Ensure that a compatible libperl is installed
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

Provides: hexchat-perl = %{epoch}:%{version}-%{release}
Obsoletes: hexchat-perl < %{epoch}:%{version}-%{release}
Provides: hexchat-python = %{epoch}:%{version}-%{release}
Obsoletes: hexchat-python < %{epoch}:%{version}-%{release}

%description
HexChat is an easy to use graphical IRC chat client for the X Window System.
It allows you to join multiple IRC channels (chat rooms) at the same time, 
talk publicly, private one-on-one conversations etc. Even file transfers
are possible.

This includes the plugins to run the Perl and Python scripts.

%package tcl
Summary: Tcl script plugin for HexChat
Group: Applications/Internet
Requires: %{name} = %{epoch}:%{version}-%{release}
%description tcl
This package contains the HexChat plugin providing the Tcl scripting interface.

%prep
%setup -q

%build
# Remove CVS files from source dirs so they're not installed into doc dirs.
find . -name CVS -type d | xargs rm -rf

export CFLAGS="$RPM_OPT_FLAGS $(perl -MExtUtils::Embed -e ccopts)"
export LDFLAGS=$(perl -MExtUtils::Embed -e ldopts)

%configure --disable-textfe \
           --enable-gtkfe \
           --enable-openssl \
           --enable-python \
           --enable-tcl=%{_libdir} \
           --enable-ipv6 \
           --enable-spell=libsexy \
           --enable-shm

# gtkspell breaks Input Method commit with ENTER

make %{?_smp_mflags}


%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1

# Get rid of libtool archives
%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/hexchat/plugins/*.la

# Install the .desktop file properly
%{__rm} -f $RPM_BUILD_ROOT%{_datadir}/applications/hexchat.desktop
desktop-file-install --vendor="" \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  --add-category=IRCClient \
  --add-category=GTK hexchat.desktop

%find_lang %{name}

# do not Provide plugins .so
%define _use_internal_dependency_generator 0
%{__cat} << \EOF > %{name}.prov
#!%{_buildshell}
%{__grep} -v %{_docdir} - | %{__find_provides} $* \
	| %{__sed} '/\.so\(()(64bit)\)\?$/d'
EOF
%define __find_provides %{_builddir}/%{name}-%{version}/%{name}.prov
%{__chmod} +x %{__find_provides}


%post
# Install schema
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule /etc/gconf/schemas/apps_hexchat_url_handler.schemas >& /dev/null || :


%pre
if [ "$1" -gt 1 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/apps_hexchat_url_handler.schemas >& /dev/null || :
fi

%preun
if [ "$1" -eq 0 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/apps_hexchat_url_handler.schemas >& /dev/null || :
fi

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root)
%doc README ChangeLog
%doc plugins/plugin20.html plugins/perl/hexchat-perl.html
%{_bindir}/hexchat
%dir %{_libdir}/hexchat
%dir %{_libdir}/hexchat/plugins
%{_libdir}/hexchat/plugins/perl.so
%{_libdir}/hexchat/plugins/python.so
%{_datadir}/applications/hexchat.desktop
%{_datadir}/pixmaps/*
%{_sysconfdir}/gconf/schemas/apps_hexchat_url_handler.schemas
%{_datadir}/dbus-1/services/org.hexchat.service.service

%files tcl
%defattr(-,root,root)
%{_libdir}/hexchat/plugins/tcl.so