]> git.pld-linux.org Git - packages/weechat.git/blob - weechat.spec
- release 2 (by relup.sh)
[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 Summary:        WeeChat - fast and light chat environment
20 Summary(pl.UTF-8):      WeeChat - szybkie i lekkie środowisko do rozmów
21 Name:           weechat
22 Version:        1.2
23 Release:        2
24 License:        GPL v3+
25 Group:          Applications/Communications
26 Source0:        http://www.weechat.org/files/src/%{name}-%{version}.tar.gz
27 # Source0-md5:  7e561d9093af164c2ab32634ece0e0ef
28 Patch2:         %{name}-curses.patch
29 URL:            http://www.weechat.org/
30 %{?with_doc:BuildRequires:      asciidoc}
31 %{?with_aspell:BuildRequires:   aspell-devel}
32 BuildRequires:  cmake
33 BuildRequires:  curl-devel
34 BuildRequires:  gettext-tools
35 %{?with_gnutls:BuildRequires:   gnutls-devel}
36 %{?with_guile:BuildRequires:    guile-devel}
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 %{?with_doc:BuildRequires:      source-highlight}
44 %{?with_js:BuildRequires:       v8-devel}
45 %if %{with python}
46 BuildRequires:  python-devel
47 BuildRequires:  python-modules
48 %endif
49 BuildRequires:  rpmbuild(macros) >= 1.129
50 %{?with_ruby:BuildRequires:     ruby-devel}
51 BuildRequires:  tcl-devel
52 Obsoletes:      weechat-common
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %define         skip_post_check_so      ruby.so.0.0.0
56
57 %description
58 WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat
59 environment for many operating systems. Everything can be done with a
60 keyboard. It is customizable and extensible with scripts.
61
62 %description -l pl.UTF-8
63 WeeChat (Wee Ehanced Environment for Chat) to szybkie i lekkie
64 środowisko do rozmów dla wielu systemów operacyjnych. Pozwala wszystko
65 zrobić przy pomocy klawiatury. Jest konfigurowalne i rozszerzalne za
66 pomocą skryptów.
67
68 %package doc
69 Summary:        Manual for weechat
70 Group:          Documentation
71 %if "%{_rpmversion}" >= "5"
72 BuildArch:      noarch
73 %endif
74
75 %description doc
76 HTML documentation for weechat.
77
78 %prep
79 %setup -q
80 %patch2 -p0
81
82 %{__sed} -i -e 's#PYTHON_LIB=.*#PYTHON_LIB=%{_libdir}#g' configure.ac
83 %{__sed} -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac
84
85 %build
86 install -d build
87 cd build
88 %cmake \
89         -DPREFIX=%{_prefix} \
90         -DLIBDIR=%{_libdir} \
91         -DENABLE_NCURSES=ON \
92         -DENABLE_ASPELL=%{?with_aspell:ON}%{!?with_aspell:OFF} \
93         -DENABLE_GNUTLS=%{?with_gnutls:ON}%{!?with_gnutls:OFF} \
94         -DENABLE_DOC=%{?with_doc:ON}%{!?with_doc:OFF} \
95         -DENABLE_PERL=%{?with_perl:ON}%{!?with_perl:OFF} \
96         -DENABLE_PYTHON=%{?with_python:ON}%{!?with_python:OFF} \
97         -DENABLE_RUBY=%{?with_ruby:ON}%{!?with_ruby:OFF} \
98         -DENABLE_LUA=%{?with_lua:ON}%{!?with_lua:OFF} \
99         -DENABLE_GUILE=%{?with_guile:ON}%{!?with_guile:OFF} \
100         -DENABLE_TCL=%{?with_tcl:ON}%{!?with_tcl:OFF} \
101         -DENABLE_MAN=ON \
102         ..
103
104 %{__make} VERBOSE=1
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108 %{__make} -C build install \
109         DESTDIR=$RPM_BUILD_ROOT
110
111 # symlink to "weechat"
112 %{__rm} $RPM_BUILD_ROOT%{_bindir}/weechat-curses
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 -f %{name}.lang
124 %defattr(644,root,root,755)
125 %doc AUTHORS.asciidoc ChangeLog.asciidoc README.asciidoc ReleaseNotes.asciidoc
126 %attr(755,root,root) %{_bindir}/weechat
127 %{_mandir}/man1/weechat.1*
128 %lang(de) %{_mandir}/de/man1/weechat.1*
129 %lang(fr) %{_mandir}/fr/man1/weechat.1*
130 %lang(it) %{_mandir}/it/man1/weechat.1*
131 %lang(ja) %{_mandir}/ja/man1/weechat.1*
132 %lang(pl) %{_mandir}/pl/man1/weechat.1*
133 %lang(ru) %{_mandir}/ru/man1/weechat.1*
134 %{_iconsdir}/hicolor/*/apps/weechat.png
135
136 %dir %{_libdir}/%{name}
137 %dir %{_libdir}/%{name}/plugins
138 %attr(755,root,root) %{_libdir}/%{name}/plugins/alias.so
139 %attr(755,root,root) %{_libdir}/%{name}/plugins/charset.so
140 %attr(755,root,root) %{_libdir}/%{name}/plugins/exec.so
141 %attr(755,root,root) %{_libdir}/%{name}/plugins/fifo.so
142 %attr(755,root,root) %{_libdir}/%{name}/plugins/irc.so
143 %attr(755,root,root) %{_libdir}/%{name}/plugins/logger.so
144 %attr(755,root,root) %{_libdir}/%{name}/plugins/relay.so
145 %attr(755,root,root) %{_libdir}/%{name}/plugins/script.so
146 %attr(755,root,root) %{_libdir}/%{name}/plugins/trigger.so
147 %attr(755,root,root) %{_libdir}/%{name}/plugins/xfer.so
148
149 # addons
150 %{?with_aspell:%attr(755,root,root) %{_libdir}/%{name}/plugins/aspell.so}
151
152 # language bindings
153 %{?with_guile:%attr(755,root,root) %{_libdir}/%{name}/plugins/guile.so}
154 %{?with_lua:%attr(755,root,root) %{_libdir}/%{name}/plugins/lua.so}
155 %{?with_perl:%attr(755,root,root) %{_libdir}/%{name}/plugins/perl.so}
156 %{?with_python:%attr(755,root,root) %{_libdir}/%{name}/plugins/python.so}
157 %{?with_ruby:%attr(755,root,root) %{_libdir}/%{name}/plugins/ruby.so}
158 %{?with_tcl:%attr(755,root,root) %{_libdir}/%{name}/plugins/tcl.so}
159 %{?with_js:%attr(755,root,root) %{_libdir}/%{name}/plugins/javascript.so}
160
161 %if %{with doc}
162 %files doc
163 %defattr(644,root,root,755)
164 %dir %{_docdir}/%{name}
165 %lang(de) %{_docdir}/%{name}/*.de.html
166 %lang(en) %{_docdir}/%{name}/*.en.html
167 %lang(es) %{_docdir}/%{name}/*.es.html
168 %lang(fr) %{_docdir}/%{name}/*.fr.html
169 %lang(it) %{_docdir}/%{name}/*.it.html
170 %lang(ja) %{_docdir}/%{name}/*.ja.html
171 %lang(pl) %{_docdir}/%{name}/*.pl.html
172 %lang(ru) %{_docdir}/%{name}/*.ru.html
173 %endif
This page took 0.03676 seconds and 4 git commands to generate.