]> git.pld-linux.org Git - packages/weechat.git/blob - weechat.spec
- rebuild with perl 5.28.0
[packages/weechat.git] / weechat.spec
1 # TODO:
2 # - consider doing subpackages for all those plugins (which one should be in main package ?)
3 # - desktop file (icon exists, but no desktop file?)
4 #
5 # Conditional build:
6 # Features
7 %bcond_without  aspell  # don't build aspell support
8 %bcond_without  gnutls  # don't build gnutls support
9 %bcond_without  doc     # don't build docs
10 # Bindings
11 %bcond_without  guile   # don't enable Scheme (guile) scripting language
12 %bcond_without  lua     # don't enable Lua scripting language
13 %bcond_without  perl    # don't enable Perl scripting language
14 %bcond_without  python  # don't enable Python scripting language
15 %bcond_without  ruby    # don't enable Ruby scripting language
16 %bcond_without  tcl     # don't enable Tcl scripting language
17 %bcond_without  js      # don't enable JavaScript scripting language (V8 engine)
18
19 %ifnarch %{ix86} %{x8664} arm mips
20 %undefine       with_js
21 %endif
22
23 Summary:        WeeChat - fast and light chat environment
24 Summary(pl.UTF-8):      WeeChat - szybkie i lekkie środowisko do rozmów
25 Name:           weechat
26 Version:        1.5
27 Release:        8
28 License:        GPL v3+
29 Group:          Applications/Communications
30 Source0:        http://www.weechat.org/files/src/%{name}-%{version}.tar.gz
31 # Source0-md5:  6e4f9c2ec870aab0696c43936800d733
32 Patch2:         %{name}-curses.patch
33 URL:            http://www.weechat.org/
34 %{?with_doc:BuildRequires:      asciidoc}
35 %{?with_aspell:BuildRequires:   aspell-devel}
36 BuildRequires:  cmake
37 BuildRequires:  curl-devel
38 BuildRequires:  gettext-tools
39 %{?with_gnutls:BuildRequires:   gnutls-devel}
40 %{?with_guile:BuildRequires:    guile-devel}
41 BuildRequires:  libgcrypt-devel
42 %{?with_lua:BuildRequires:      lua51-devel}
43 BuildRequires:  ncurses-devel
44 %{?with_perl:BuildRequires:     perl-devel}
45 BuildRequires:  pkgconfig
46 BuildRequires:  sed >= 4.0
47 %{?with_doc:BuildRequires:      source-highlight}
48 %{?with_js:BuildRequires:       v8-devel}
49 %if %{with python}
50 BuildRequires:  python-devel
51 BuildRequires:  python-modules
52 %endif
53 BuildRequires:  rpmbuild(macros) >= 1.129
54 %{?with_ruby:BuildRequires:     ruby-devel}
55 %{?with_tcl:BuildRequires:      tcl-devel}
56 Obsoletes:      weechat-common
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 %define         skip_post_check_so      ruby.so.0.0.0
60
61 %description
62 WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat
63 environment for many operating systems. Everything can be done with a
64 keyboard. It is customizable and extensible with scripts.
65
66 %description -l pl.UTF-8
67 WeeChat (Wee Ehanced Environment for Chat) to szybkie i lekkie
68 środowisko do rozmów dla wielu systemów operacyjnych. Pozwala wszystko
69 zrobić przy pomocy klawiatury. Jest konfigurowalne i rozszerzalne za
70 pomocą skryptów.
71
72 %package doc
73 Summary:        Manual for weechat
74 Group:          Documentation
75 %if "%{_rpmversion}" >= "5"
76 BuildArch:      noarch
77 %endif
78
79 %description doc
80 HTML documentation for weechat.
81
82 %prep
83 %setup -q
84 %patch2 -p0
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         ..
107
108 %{__make} VERBOSE=1
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112 %{__make} -C build install \
113         DESTDIR=$RPM_BUILD_ROOT
114
115 # symlink to "weechat"
116 %{__rm} $RPM_BUILD_ROOT%{_bindir}/weechat-curses
117
118 # no -devel, drop
119 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/%{name}
120 %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
121
122 %find_lang %{name}
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %files -f %{name}.lang
128 %defattr(644,root,root,755)
129 %doc AUTHORS.asciidoc ChangeLog.asciidoc README.asciidoc ReleaseNotes.asciidoc
130 %attr(755,root,root) %{_bindir}/weechat
131 %{_mandir}/man1/weechat.1*
132 %lang(cs) %{_mandir}/cs/man1/weechat.1*
133 %lang(de) %{_mandir}/de/man1/weechat.1*
134 %lang(fr) %{_mandir}/fr/man1/weechat.1*
135 %lang(it) %{_mandir}/it/man1/weechat.1*
136 %lang(ja) %{_mandir}/ja/man1/weechat.1*
137 %lang(pl) %{_mandir}/pl/man1/weechat.1*
138 %lang(ru) %{_mandir}/ru/man1/weechat.1*
139 %{_iconsdir}/hicolor/*/apps/weechat.png
140
141 %dir %{_libdir}/%{name}
142 %dir %{_libdir}/%{name}/plugins
143 %attr(755,root,root) %{_libdir}/%{name}/plugins/alias.so
144 %attr(755,root,root) %{_libdir}/%{name}/plugins/charset.so
145 %attr(755,root,root) %{_libdir}/%{name}/plugins/exec.so
146 %attr(755,root,root) %{_libdir}/%{name}/plugins/fifo.so
147 %attr(755,root,root) %{_libdir}/%{name}/plugins/irc.so
148 %attr(755,root,root) %{_libdir}/%{name}/plugins/logger.so
149 %attr(755,root,root) %{_libdir}/%{name}/plugins/relay.so
150 %attr(755,root,root) %{_libdir}/%{name}/plugins/script.so
151 %attr(755,root,root) %{_libdir}/%{name}/plugins/trigger.so
152 %attr(755,root,root) %{_libdir}/%{name}/plugins/xfer.so
153
154 # addons
155 %{?with_aspell:%attr(755,root,root) %{_libdir}/%{name}/plugins/aspell.so}
156
157 # language bindings
158 %{?with_guile:%attr(755,root,root) %{_libdir}/%{name}/plugins/guile.so}
159 %{?with_lua:%attr(755,root,root) %{_libdir}/%{name}/plugins/lua.so}
160 %{?with_perl:%attr(755,root,root) %{_libdir}/%{name}/plugins/perl.so}
161 %{?with_python:%attr(755,root,root) %{_libdir}/%{name}/plugins/python.so}
162 %{?with_ruby:%attr(755,root,root) %{_libdir}/%{name}/plugins/ruby.so}
163 %{?with_tcl:%attr(755,root,root) %{_libdir}/%{name}/plugins/tcl.so}
164 %{?with_js:%attr(755,root,root) %{_libdir}/%{name}/plugins/javascript.so}
165
166 %if %{with doc}
167 %files doc
168 %defattr(644,root,root,755)
169 %dir %{_docdir}/%{name}
170 %lang(cs) %{_docdir}/%{name}/*.cs.html
171 %lang(de) %{_docdir}/%{name}/*.de.html
172 %lang(en) %{_docdir}/%{name}/*.en.html
173 %lang(es) %{_docdir}/%{name}/*.es.html
174 %lang(fr) %{_docdir}/%{name}/*.fr.html
175 %lang(it) %{_docdir}/%{name}/*.it.html
176 %lang(ja) %{_docdir}/%{name}/*.ja.html
177 %lang(pl) %{_docdir}/%{name}/*.pl.html
178 %lang(ru) %{_docdir}/%{name}/*.ru.html
179 %endif
This page took 0.104383 seconds and 3 git commands to generate.