]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with gtk3 # use GTK+ 3.x instead of 2.x (disables python) | |
4 | %bcond_without python # Python support | |
5 | ||
6 | %if %{with gtk3} | |
7 | %undefine with_python | |
8 | %endif | |
9 | Summary: Pluma - MATE Text Editor | |
10 | Summary(pl.UTF-8): Pluma - edytor tekstu dla środowiska MATE | |
11 | Name: pluma | |
12 | Version: 1.8.1 | |
13 | Release: 2 | |
14 | License: GPL v2+ | |
15 | Group: X11/Applications/Editors | |
16 | Source0: http://pub.mate-desktop.org/releases/1.8/%{name}-%{version}.tar.xz | |
17 | # Source0-md5: 21da09ecd167e2799f89f396cfd8efeb | |
18 | Patch0: %{name}-python.patch | |
19 | URL: http://mate-desktop.org/ | |
20 | BuildRequires: autoconf >= 2.63.2 | |
21 | BuildRequires: automake >= 1:1.10 | |
22 | BuildRequires: docbook-dtd412-xml | |
23 | BuildRequires: enchant-devel >= 1.2.0 | |
24 | BuildRequires: gettext-tools >= 0.17 | |
25 | BuildRequires: glib2-devel >= 1:2.32.0 | |
26 | %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.20} | |
27 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0} | |
28 | BuildRequires: gtk-doc >= 1.0 | |
29 | %{!?with_gtk3:BuildRequires: gtksourceview2-devel >= 2.9.7} | |
30 | %{?with_gtk3:BuildRequires: gtksourceview3-devel >= 3.0} | |
31 | BuildRequires: intltool >= 0.40.0 | |
32 | BuildRequires: iso-codes >= 0.35 | |
33 | BuildRequires: libsoup-devel >= 2.4 | |
34 | BuildRequires: libtool >= 2:2.2.6 | |
35 | BuildRequires: libxml2-devel >= 1:2.5.0 | |
36 | BuildRequires: mate-common | |
37 | BuildRequires: pkgconfig | |
38 | %if %{with python} | |
39 | BuildRequires: python-devel >= 1:2.5 | |
40 | BuildRequires: python-gtksourceview2-devel >= 2.9.2 | |
41 | BuildRequires: python-pygobject-devel >= 2.15.4 | |
42 | BuildRequires: python-pygtk-devel >= 2:2.12.0 | |
43 | %endif | |
44 | BuildRequires: rpm-pythonprov | |
45 | BuildRequires: rpmbuild(find_lang) >= 1.36 | |
46 | BuildRequires: xorg-lib-libSM-devel >= 1.0.0 | |
47 | BuildRequires: xorg-lib-libX11-devel | |
48 | BuildRequires: yelp-tools | |
49 | Requires(post,postun): glib2 >= 1:2.32.0 | |
50 | Requires: enchant >= 1.2.0 | |
51 | Requires: glib2 >= 1:2.32.0 | |
52 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.20} | |
53 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} | |
54 | %{!?with_gtk3:Requires: gtksourceview2 >= 2.9.7} | |
55 | %{?with_gtk3:Requires: gtksourceview3 >= 3.0} | |
56 | Requires: iso-codes >= 0.35 | |
57 | Requires: libxml2 >= 1:2.5.0 | |
58 | %if %{with python} | |
59 | Requires: python-gtksourceview2 >= 2.9.2 | |
60 | Requires: python-pygobject >= 2.15.4 | |
61 | Requires: python-pygtk-gtk >= 2:2.12.0 | |
62 | %endif | |
63 | Requires: xorg-lib-libSM >= 1.0.0 | |
64 | Obsoletes: mate-text-editor | |
65 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
66 | ||
67 | %description | |
68 | Pluma is a small and lightweight UTF-8 text editor for the MATE | |
69 | environment. Based on gedit, the text editor for the GNOME 2 | |
70 | environment. | |
71 | ||
72 | %description -l pl.UTF-8 | |
73 | Pluma to mały i lekki edytor tekstu w UTF-8 dla środowiska MATE. Jest | |
74 | oparty na programie gedit - edytorze tekstu dla środowiska GNOME 2. | |
75 | ||
76 | %package devel | |
77 | Summary: Header files for Pluma plugins development | |
78 | Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia wtyczek edytora Pluma | |
79 | Group: X11/Development/Libraries | |
80 | # doesn't require base | |
81 | Requires: glib2-devel >= 1:2.32.0 | |
82 | %{!?with_gtk3:Requires: gtk+2-devel >= 2:2.20} | |
83 | %{?with_gtk3:Requires: gtk+3-devel >= 3.0.0} | |
84 | %{!?with_gtk3:Requires: gtksourceview2-devel >= 2.9.7} | |
85 | %{?with_gtk3:Requires: gtksourceview3-devel >= 3.0} | |
86 | ||
87 | %description devel | |
88 | Header files for Pluma plugins development. | |
89 | ||
90 | %description devel -l pl.UTF-8 | |
91 | Pliki nagłówkowe do tworzenia wtyczek edytora Pluma. | |
92 | ||
93 | %package apidocs | |
94 | Summary: Pluma API documentation | |
95 | Summary(pl.UTF-8): Dokumentacja API edytora Pluma | |
96 | Group: Documentation | |
97 | %if "%{_rpmversion}" >= "5" | |
98 | BuildArch: noarch | |
99 | %endif | |
100 | ||
101 | %description apidocs | |
102 | Pluma API documentation. | |
103 | ||
104 | %description apidocs -l pl.UTF-8 | |
105 | Dokumentacja API edytora Pluma. | |
106 | ||
107 | %prep | |
108 | %setup -q | |
109 | %patch0 -p1 | |
110 | ||
111 | %build | |
112 | mate-doc-common --copy | |
113 | %{__intltoolize} | |
114 | %{__libtoolize} | |
115 | %{__aclocal} -I m4 | |
116 | %{__autoconf} | |
117 | %{__autoheader} | |
118 | %{__automake} | |
119 | %configure \ | |
120 | %{!?with_python:--disable-python} \ | |
121 | --disable-schemas-compile \ | |
122 | --disable-silent-rules \ | |
123 | %{?with_gtk3:--with-gtk=3.0} \ | |
124 | --with-html-dir=%{_gtkdocdir} | |
125 | ||
126 | %{__make} | |
127 | ||
128 | %install | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | %{__make} install \ | |
131 | DESTDIR=$RPM_BUILD_ROOT | |
132 | ||
133 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/pluma/{plugin-loaders,plugins}/*.la | |
134 | ||
135 | # mate < 1.5 did not exist in PLD, avoid dependency on mate-conf | |
136 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/MateConf/gsettings/pluma.convert | |
137 | ||
138 | %find_lang pluma --with-mate | |
139 | ||
140 | %clean | |
141 | rm -rf $RPM_BUILD_ROOT | |
142 | ||
143 | %post | |
144 | %glib_compile_schemas | |
145 | ||
146 | %postun | |
147 | %glib_compile_schemas | |
148 | ||
149 | %files -f pluma.lang | |
150 | %defattr(644,root,root,755) | |
151 | %doc AUTHORS ChangeLog NEWS README | |
152 | %attr(755,root,root) %{_bindir}/pluma | |
153 | %dir %{_libdir}/pluma | |
154 | %attr(755,root,root) %{_libdir}/pluma/pluma-bugreport.sh | |
155 | %dir %{_libdir}/pluma/plugin-loaders | |
156 | %attr(755,root,root) %{_libdir}/pluma/plugin-loaders/libcloader.so | |
157 | %if %{with python} | |
158 | %attr(755,root,root) %{_libdir}/pluma/plugin-loaders/libpythonloader.so | |
159 | %endif | |
160 | %dir %{_libdir}/pluma/plugins | |
161 | # C plugins | |
162 | %attr(755,root,root) %{_libdir}/pluma/plugins/libchangecase.so | |
163 | %{_libdir}/pluma/plugins/changecase.pluma-plugin | |
164 | %attr(755,root,root) %{_libdir}/pluma/plugins/libdocinfo.so | |
165 | %{_libdir}/pluma/plugins/docinfo.pluma-plugin | |
166 | %attr(755,root,root) %{_libdir}/pluma/plugins/libfilebrowser.so | |
167 | %{_libdir}/pluma/plugins/filebrowser.pluma-plugin | |
168 | %attr(755,root,root) %{_libdir}/pluma/plugins/libmodelines.so | |
169 | %{_libdir}/pluma/plugins/modelines.pluma-plugin | |
170 | %attr(755,root,root) %{_libdir}/pluma/plugins/libsort.so | |
171 | %{_libdir}/pluma/plugins/sort.pluma-plugin | |
172 | %attr(755,root,root) %{_libdir}/pluma/plugins/libspell.so | |
173 | %{_libdir}/pluma/plugins/spell.pluma-plugin | |
174 | %attr(755,root,root) %{_libdir}/pluma/plugins/libtaglist.so | |
175 | %{_libdir}/pluma/plugins/taglist.pluma-plugin | |
176 | %attr(755,root,root) %{_libdir}/pluma/plugins/libtime.so | |
177 | %{_libdir}/pluma/plugins/time.pluma-plugin | |
178 | %if %{with python} | |
179 | # Python plugins | |
180 | %{_libdir}/pluma/plugins/externaltools | |
181 | %{_libdir}/pluma/plugins/externaltools.pluma-plugin | |
182 | %{_libdir}/pluma/plugins/pythonconsole | |
183 | %{_libdir}/pluma/plugins/pythonconsole.pluma-plugin | |
184 | %{_libdir}/pluma/plugins/quickopen | |
185 | %{_libdir}/pluma/plugins/quickopen.pluma-plugin | |
186 | %{_libdir}/pluma/plugins/snippets | |
187 | %{_libdir}/pluma/plugins/snippets.pluma-plugin | |
188 | %endif | |
189 | %{_datadir}/glib-2.0/schemas/org.mate.pluma.gschema.xml | |
190 | %{_datadir}/glib-2.0/schemas/org.mate.pluma.plugins.filebrowser.gschema.xml | |
191 | %{_datadir}/glib-2.0/schemas/org.mate.pluma.plugins.time.gschema.xml | |
192 | %{_datadir}/pluma | |
193 | %{_desktopdir}/pluma.desktop | |
194 | %{_mandir}/man1/pluma.1* | |
195 | ||
196 | %files devel | |
197 | %defattr(644,root,root,755) | |
198 | %{_includedir}/pluma | |
199 | %{_pkgconfigdir}/pluma.pc | |
200 | ||
201 | %files apidocs | |
202 | %defattr(644,root,root,755) | |
203 | %{_gtkdocdir}/pluma |