1%global enable_gtk2 @SPEC_ENABLE_GTK2@
2%global enable_gtk3 @SPEC_ENABLE_GTK3@
3%global enable_gtkdoc @SPEC_ENABLE_GTK_DOC@
4%global enable_vala @SPEC_ENABLE_VALA@
5
6Name: gtkspell3
7Version: 3.@GTK_SPELL_VERSION_MINOR@.@GTK_SPELL_VERSION_MICRO@
8Release: 1%{?dist}
9License: GPLv2+
10Group: System Environment/Libraries
11Summary: On-the-fly spell checking for GtkTextView widgets
12URL: http://gtkspell.sourceforge.net/
13Source: %{name}-%{version}.tar.xz
14
15Requires: iso-codes
16
17BuildRequires: enchant2-devel
18BuildRequires: gobject-introspection-devel
19BuildRequires: intltool
20BuildRequires: libtool
21BuildRequires: iso-codes-devel
22%{?enable_gtk2:BuildRequires: gtk2-devel}
23%{?enable_gtk3:BuildRequires: gtk3-devel}
24%{?enable_vala:BuildRequires: vala-devel vala-tools}
25%if 0%{enable_gtkdoc} == 1
26BuildRequires: gtk-doc glib2-doc
27%{?enable_gtk2:BuildRequires: gtk2-devel-docs}
28%{?enable_gtk3:BuildRequires: gtk3-devel-docs}
29%endif
30
31%package common
32Group: System Environment/Libraries
33Summary: Common files for GtkSpell
34
35%description common
36Common files for GtkSpell
37
38%description
39GtkSpell provides word-processor-style highlighting and replacement of
40misspelled words in a GtkTextView widget as you type. Right-clicking a
41misspelled word pops up a menu of suggested replacements.
42
43%package devel-common
44Group: Development/Libraries
45Summary: Development files for GtkSpell
46Requires: gtk3-devel
47Requires: pkgconfig
48
49%description devel-common
50The gtkspell3-devel package provides header and documentation files for developing
51applications which use GtkSpell.
52
53
54%if 0%{enable_gtk3} == 1
55%package gtk3
56Requires: %{name}-common = %{version}-%{release}
57Group: System Environment/Libraries
58Summary: GtkSpell for GTK+3
59
60%description gtk3
61GtkSpell library for use with GTK+3
62
63%package gtk3-devel
64Group: Development/Libraries
65Summary: Development files for GtkSpell for GTK+3
66Requires: %{name}-devel-common = %{version}-%{release}
67Requires: %{name}-gtk3 = %{version}-%{release}
68Requires: gtk3-devel
69Requires: pkgconfig
70
71%description gtk3-devel
72The gtkspell3-gtk3-devel package provides the library files for developing GTK+3
73applications which use GtkSpell.
74
75%if 0%{enable_vala} == 1
76%package gtk3-vala
77Group: Decelopment/Libraries
78Summary: Vala bindings for GtkSpell for GTK+3
79Requires: %{name}-gtk3-devel
80
81%description gtk3-vala
82The gtkspell3-gtk3-vala package provides vala bindings for developing GTK+3
83applications which use GtkSpell.
84%endif
85%endif
86
87
88%if 0%{enable_gtk2} == 1
89%package gtk2
90Requires: %{name}-common = %{version}-%{release}
91Group: System Environment/Libraries
92Summary: GtkSpell for GTK+2
93
94%description gtk2
95GtkSpell library for use with GTK+2
96
97%package gtk2-devel
98Group: Development/Libraries
99Summary: Development files for GtkSpell for GTK+2
100Requires: %{name}-devel-common = %{version}-%{release}
101Requires: %{name}-gtk2 = %{version}-%{release}
102Requires: gtk2-devel
103Requires: pkgconfig
104
105%description gtk2-devel
106The gtkspell3-gtk2-devel package provides the library files for developing GTK+2
107applications which use GtkSpell.
108
109%if 0%{enable_vala} == 1
110%package gtk2-vala
111Group: Decelopment/Libraries
112Summary: Vala bindings for GtkSpell for GTK+2
113Requires: %{name}-gtk2-devel
114
115%description gtk2-vala
116The gtkspell3-gtk2-vala package provides vala bindings for developing GTK+2
117applications which use GtkSpell.
118%endif
119%endif
120
121%prep
122%setup -q
123
124%build
125%configure --disable-static \
126	%{?enable_gtkdoc:--enable-gtk-doc} \
127	%{?enable_gtk2:--enable-gtk2=yes}%{!?enable_gtk2:--enable-gtk2=no} \
128	%{?enable_gtk3:--enable-gtk3=yes}%{!?enable_gtk3:--enable-gtk3=no} \
129	%{?enable_vala:--enable-vala=yes}%{!?enable_vala:--enable-vala=no}
130
131make %{?_smp_mflags}
132
133%install
134make DESTDIR=$RPM_BUILD_ROOT install
135find $RPM_BUILD_ROOT -name "*.la" -exec rm {} \;
136
137%find_lang %{name}
138
139%post -p /sbin/ldconfig
140
141%postun -p /sbin/ldconfig
142
143%files common -f %{name}.lang
144%doc AUTHORS ChangeLog COPYING README
145
146%files devel-common
147%{?enable_gtkdoc:%{_datadir}/gtk-doc/html/gtkspell3}
148%{_includedir}/gtkspell-3.0
149
150%if 0%{enable_gtk3} == 1
151%files gtk3
152%{_libdir}/libgtkspell3-3.so.0*
153%{_libdir}/girepository-1.0/GtkSpell-3.0.typelib
154
155%files gtk3-devel
156%{_libdir}/libgtkspell3-3.so
157%{_libdir}/pkgconfig/gtkspell3-3.0.pc
158%{_datadir}/gir-1.0/GtkSpell-3.0.gir
159
160%if 0%{enable_vala} == 1
161%files gtk3-vala
162%{_datadir}/vala/vapi/gtkspell3-3.0.*
163%endif
164%endif
165
166%if 0%{enable_gtk2} == 1
167%files gtk2
168%{_libdir}/libgtkspell3-2.so.0*
169%{_libdir}/girepository-1.0/GtkSpell-2.0.typelib
170
171%files gtk2-devel
172%{_libdir}/libgtkspell3-2.so
173%{_libdir}/pkgconfig/gtkspell3-2.0.pc
174%{_datadir}/gir-1.0/GtkSpell-2.0.gir
175
176%if 0%{enable_vala} == 1
177%files gtk2-vala
178%{_datadir}/vala/vapi/gtkspell3-2.0.*
179%endif
180%endif
181
182%changelog
183* Thu Sep 06 2012 Sandro Mani <manisandro@gmail.com> - 3.@GTK_SPELL_VERSION_MINOR@.@GTK_SPELL_VERSION_MICRO@-1
184- Initial package.
185