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