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