]> git.pld-linux.org Git - packages/weechat.git/blob - weechat.spec
Up to 0.4.2, removing GTK interface
[packages/weechat.git] / weechat.spec
1 # TODO:
2 # - consider doing subpackages for all those plugins (which one should be in main package ?)
3 #
4 # Conditional build:
5 # Features
6 %bcond_without  aspell  # don't build aspell support
7 %bcond_without  gnutls  # don't build gnutls support
8 %bcond_without  doc     # don't build docs
9 # Bindings
10 %bcond_without  guile   # don't enable Scheme (guile) scripting language
11 %bcond_without  lua     # don't enable Lua scripting language
12 %bcond_without  perl    # don't enable Perl scripting language
13 %bcond_without  python  # don't enable Python scripting language
14 %bcond_without  ruby    # don't enable Ruby scripting language
15 %bcond_without  tcl     # don't enable Tcl scripting language
16
17 Summary:        WeeChat - fast and light chat environment
18 Summary(pl.UTF-8):      WeeChat - szybkie i lekkie środowisko do rozmów
19 Name:           weechat
20 Version:        0.4.2
21 Release:        1
22 License:        GPL v3+
23 Group:          Applications/Communications
24 Source0:        http://www.weechat.org/files/src/%{name}-%{version}.tar.gz
25 # Source0-md5:  fd584c258aace2aa898f40e1fcf06084
26 Patch1:         %{name}-plugins_header.patch
27 Patch5:         weechat-0.4.0-ruby-version.patch
28 URL:            http://www.weechat.org/
29 %{?with_aspell:BuildRequires:   aspell-devel}
30 BuildRequires:  cmake
31 BuildRequires:  curl-devel
32 BuildRequires:  gettext-devel
33 %{?with_gnutls:BuildRequires:   gnutls-devel}
34 %{?with_guile:BuildRequires:    guile-devel}
35 BuildRequires:  libatomic_ops
36 BuildRequires:  libgcrypt-devel
37 %{?with_lua:BuildRequires:      lua51-devel}
38 BuildRequires:  ncurses-devel
39 %{?with_perl:BuildRequires:     perl-devel}
40 BuildRequires:  pkgconfig
41 BuildRequires:  sed >= 4.0
42 %if %{with python}
43 BuildRequires:  python-devel
44 BuildRequires:  python-modules
45 %endif
46 BuildRequires:  rpmbuild(macros) >= 1.129
47 %{?with_ruby:BuildRequires:     ruby-devel}
48 BuildRequires:  tcl-devel
49 Requires:       %{name}-common = %{version}-%{release}
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %define         skip_post_check_so      ruby.so.0.0.0
53
54 %description
55 WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat
56 environment for many operating systems. Everything can be done with a
57 keyboard. It is customizable and extensible with scripts.
58
59 %description -l pl.UTF-8
60 WeeChat (Wee Ehanced Environment for Chat) to szybkie i lekkie
61 środowisko do rozmów dla wielu systemów operacyjnych. Pozwala wszystko
62 zrobić przy pomocy klawiatury. Jest konfigurowalne i rozszerzalne za
63 pomocą skryptów.
64
65 %package common
66 Summary:        WeeChat common files
67 Group:          Applications/Communications
68
69 %description common
70 WeeChat common files for Curses and GTK UI.
71
72 %package doc
73 Summary:        Manual for weechat
74 Group:          Documentation
75
76 %description doc
77 HTML documentation for weechat.
78
79 %prep
80 %setup -q
81 %patch1 -p1
82 %patch5 -p1
83
84 %{__sed} -i -e 's#PYTHON_LIB=.*#PYTHON_LIB=%{_libdir}#g' configure.ac
85 %{__sed} -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac
86
87 %build
88 install -d build
89 cd build
90 %cmake \
91         -DPREFIX=%{_prefix} \
92         -DLIBDIR=%{_libdir} \
93         -DENABLE_NCURSES=ON \
94         -DENABLE_ASPELL=%{?with_aspell:ON}%{!?with_aspell:OFF} \
95         -DENABLE_GNUTLS=%{?with_gnutls:ON}%{!?with_gnutls:OFF} \
96         -DENABLE_DOC=%{?with_doc:ON}%{!?with_doc:OFF} \
97         -DENABLE_PERL=%{?with_perl:ON}%{!?with_perl:OFF} \
98         -DENABLE_PYTHON=%{?with_python:ON}%{!?with_python:OFF} \
99         -DENABLE_RUBY=%{?with_ruby:ON}%{!?with_ruby:OFF} \
100         -DENABLE_LUA=%{?with_lua:ON}%{!?with_lua:OFF} \
101         -DENABLE_GUILE=%{?with_guile:ON}%{!?with_guile:OFF} \
102         -DENABLE_TCL=%{?with_tcl:ON}%{!?with_tcl:OFF} \
103     -DENABLE_MAN=ON \
104     -DENABLE_DOC=ON \
105         ..
106
107 %{__make} VERBOSE=1
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111 %{__make} -C build install \
112         DESTDIR=$RPM_BUILD_ROOT
113
114 # no -devel, drop
115 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/%{name}
116 %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
117
118 %find_lang %{name}
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %files
124 %defattr(644,root,root,755)
125 %attr(755,root,root) %{_bindir}/weechat
126 %{_mandir}/man1/weechat.1*
127
128 %files common -f %{name}.lang
129 %defattr(644,root,root,755)
130 %doc AUTHORS ChangeLog NEWS README
131 %dir %{_libdir}/weechat
132 %dir %{_libdir}/weechat/plugins
133 %attr(755,root,root) %{_libdir}/weechat/plugins/alias.so*
134 %attr(755,root,root) %{_libdir}/weechat/plugins/charset.so*
135 %attr(755,root,root) %{_libdir}/weechat/plugins/fifo.so*
136 %attr(755,root,root) %{_libdir}/weechat/plugins/irc.so*
137 %attr(755,root,root) %{_libdir}/weechat/plugins/logger.so*
138 %attr(755,root,root) %{_libdir}/weechat/plugins/relay.so*
139 %attr(755,root,root) %{_libdir}/weechat/plugins/rmodifier.so*
140 %attr(755,root,root) %{_libdir}/weechat/plugins/script.so*
141 %attr(755,root,root) %{_libdir}/weechat/plugins/xfer.so*
142
143 # addons
144 %{?with_aspell:%attr(755,root,root) %{_libdir}/weechat/plugins/aspell.so*}
145
146 # language bindings
147 %{?with_guile:%attr(755,root,root) %{_libdir}/weechat/plugins/guile.so*}
148 %{?with_lua:%attr(755,root,root) %{_libdir}/weechat/plugins/lua.so*}
149 %{?with_perl:%attr(755,root,root) %{_libdir}/weechat/plugins/perl.so*}
150 %{?with_python:%attr(755,root,root) %{_libdir}/weechat/plugins/python.so*}
151 %{?with_ruby:%attr(755,root,root) %{_libdir}/weechat/plugins/ruby.so*}
152 %{?with_tcl:%attr(755,root,root) %{_libdir}/weechat/plugins/tcl.so*}
153
154 %if %{with doc}
155 %files doc
156 %defattr(644,root,root,755)
157 %dir %{_docdir}/%{name}
158 %lang(de) %{_docdir}/%{name}/*.de.html
159 %lang(en) %{_docdir}/%{name}/*.en.html
160 %lang(es) %{_docdir}/%{name}/*.es.html
161 %lang(fr) %{_docdir}/%{name}/*.fr.html
162 %lang(it) %{_docdir}/%{name}/*.it.html
163 %lang(ja) %{_docdir}/%{name}/*.ja.html
164 %lang(pl) %{_docdir}/%{name}/*.pl.html
165 %lang(ru) %{_docdir}/%{name}/*.ru.html
166 %endif
This page took 0.038632 seconds and 4 git commands to generate.