]>
Commit | Line | Data |
---|---|---|
574c6d64 ER |
1 | # TODO |
2 | # - ui subpackage? | |
3 | # - subpackage for python? | |
4 | # - add -avoid-version libtool to avoid versioned libraries in %{_libdir}/ethos/plugin-loaders | |
5c40879d | 5 | # |
6 | # Conditional build | |
574c6d64 ER |
7 | %bcond_without apidocs # disable gtk-doc |
8 | ||
9 | %define packname ethos | |
9cf16116 CM |
10 | Summary: Reusable plugin framework for glib and gtk+ |
11 | Name: libethos | |
12 | Version: 0.2.2 | |
6aeb278a | 13 | Release: 3 |
9cf16116 CM |
14 | License: LGPL v2.1 |
15 | Group: Libraries | |
574c6d64 | 16 | Source0: http://ftp.dronelabs.com/sources/%{packname}/0.2/%{packname}-%{version}.tar.gz |
2ee8d7af | 17 | # Source0-md5: 36cf1ef444a224556bba4d441c400300 |
9cf16116 CM |
18 | URL: http://git.dronelabs.com/ethos/about/ |
19 | Patch0: %{name}-pyc.patch | |
5c40879d | 20 | BuildRequires: autoconf >= 2.59 |
21 | BuildRequires: automake | |
228b7d5d | 22 | BuildRequires: docbook-dtd412-xml |
683a0749 | 23 | BuildRequires: gettext-tools |
9cf16116 | 24 | BuildRequires: gjs-devel |
228b7d5d | 25 | BuildRequires: glibc-misc |
5c40879d | 26 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.7} |
27 | BuildRequires: intltool | |
228b7d5d | 28 | BuildRequires: libtool |
5c40879d | 29 | BuildRequires: pkgconfig |
9cf16116 CM |
30 | BuildRequires: python-devel |
31 | BuildRequires: python-pygobject-devel | |
32 | BuildRequires: python-pygtk-devel | |
5c40879d | 33 | BuildRequires: rpm-pythonprov |
574c6d64 | 34 | BuildRequires: rpmbuild(macros) >= 1.219 |
9cf16116 | 35 | BuildRequires: vala |
574c6d64 ER |
36 | Requires: python-pygtk-gtk |
37 | Requires: vala | |
9cf16116 CM |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
40 | %description | |
41 | Ethos is a plugin framework that is written in C using the GLib and | |
42 | GObject libraries. The goal is to have a single framework for | |
43 | applications that lower the barrier to entry for extensions. To enable | |
44 | as many communities as possible, various language bindings are | |
45 | provided to allow extensions in the language of choice. | |
46 | ||
47 | Ethos includes a GUI library as well named libethos-ui. This library | |
48 | provides a gtk+ widget for managing plugins within your application. | |
49 | Typically, you can simply add this to a "Plugins" tab in your | |
50 | applications preferences dialog. | |
51 | ||
52 | %package devel | |
53 | Summary: Header files for libethos library | |
54 | Group: Development/Libraries | |
55 | Requires: %{name} = %{version}-%{release} | |
56 | Requires: gobject-introspection-devel | |
57 | Requires: pkgconfig | |
58 | ||
59 | %description devel | |
60 | Header files for libethos library. | |
61 | ||
5c40879d | 62 | %package apidocs |
63 | Summary: Ethos library API documentation | |
64 | Summary(pl.UTF-8): Dokumentacja API biblioteki Ethos. | |
65 | Group: Documentation | |
66 | Requires: gtk-doc-common | |
67 | ||
68 | %description apidocs | |
69 | Ethos library API documentation. | |
70 | ||
71 | %description apidocs -l pl.UTF-8 | |
72 | Dokumentacja API biblioteki Ethos. | |
73 | ||
9cf16116 | 74 | %prep |
574c6d64 | 75 | %setup -q -n %{packname}-%{version} |
9cf16116 CM |
76 | %patch0 -p0 |
77 | ||
78 | %build | |
5c40879d | 79 | %{__intltoolize} |
80 | %{__libtoolize} | |
81 | %{__aclocal} -I m4 | |
82 | %{__autoconf} | |
83 | %{__automake} | |
84 | %configure \ | |
9cf16116 | 85 | --enable-introspection \ |
5c40879d | 86 | --%{?with_apidocs:en}%{!?with_apidocs:dis}able-gtk-doc |
6aeb278a | 87 | %{__make} -j1 |
9cf16116 CM |
88 | |
89 | %install | |
90 | rm -rf $RPM_BUILD_ROOT | |
5c40879d | 91 | %{__make} install \ |
92 | DESTDIR=$RPM_BUILD_ROOT \ | |
574c6d64 | 93 | INSTALL="install -p" \ |
5c40879d | 94 | HTML_DIR=%{_gtkdocdir} |
95 | ||
96 | %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}} | |
97 | ||
574c6d64 ER |
98 | %py_postclean |
99 | ||
100 | rm -f $RPM_BUILD_ROOT%{py_sitedir}/gtk-2.0/*.la | |
101 | rm -f $RPM_BUILD_ROOT%{_libdir}/ethos/plugin-loaders/*.la | |
102 | ||
103 | # TODO use -avoid-version in libtool instead | |
104 | rm -f $RPM_BUILD_ROOT%{_libdir}/ethos/plugin-loaders/*.so.0 | |
105 | for a in $RPM_BUILD_ROOT%{_libdir}/ethos/plugin-loaders/lib*.so.*.*.*; do | |
106 | l=${a%.0.0.0} | |
107 | mv $a $l | |
108 | done | |
109 | ||
110 | %find_lang %{packname} | |
9cf16116 CM |
111 | |
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %post -p /sbin/ldconfig | |
9cf16116 CM |
116 | %postun -p /sbin/ldconfig |
117 | ||
574c6d64 | 118 | %files -f %{packname}.lang |
9cf16116 CM |
119 | %defattr(644,root,root,755) |
120 | %doc COPYING AUTHORS README NEWS | |
574c6d64 ER |
121 | %attr(755,root,root) %{_libdir}/libethos-1.0.so.*.*.* |
122 | %attr(755,root,root) %ghost %{_libdir}/libethos-1.0.so.0 | |
123 | %attr(755,root,root) %{_libdir}/libethos-ui-1.0.so.*.*.* | |
124 | %attr(755,root,root) %ghost %{_libdir}/libethos-ui-1.0.so.0 | |
125 | ||
9cf16116 CM |
126 | %dir %{_libdir}/ethos |
127 | %dir %{_libdir}/ethos/plugin-loaders | |
574c6d64 ER |
128 | %attr(755,root,root) %{_libdir}/ethos/plugin-loaders/libcloader.so |
129 | %attr(755,root,root) %{_libdir}/ethos/plugin-loaders/libjsloader.so | |
130 | %attr(755,root,root) %{_libdir}/ethos/plugin-loaders/libpythonloader.so | |
131 | ||
132 | %dir %{_datadir}/ethos | |
133 | %dir %{_datadir}/ethos/icons | |
505a867f | 134 | %{_datadir}/ethos/icons/*.png |
9cf16116 | 135 | |
574c6d64 ER |
136 | %{_libdir}/girepository-1.0/Ethos-1.0.typelib |
137 | ||
138 | %{_datadir}/vala/vapi/ethos-1.0.vapi | |
139 | %{_datadir}/vala/vapi/ethos-ui-1.0.vapi | |
140 | ||
141 | %{_datadir}/pygtk/2.0/defs/ethos.defs | |
142 | %{_datadir}/pygtk/2.0/defs/ethosui.defs | |
143 | ||
144 | %attr(755,root,root) %{py_sitedir}/gtk-2.0/_ethos.so | |
145 | %attr(755,root,root) %{py_sitedir}/gtk-2.0/_ethosui.so | |
146 | %dir %{py_sitedir}/gtk-2.0/ethos | |
147 | %{py_sitedir}/gtk-2.0/ethos/*.py[co] | |
148 | ||
9cf16116 CM |
149 | %files devel |
150 | %defattr(644,root,root,755) | |
151 | %{_includedir}/ethos-1.0 | |
574c6d64 ER |
152 | %{_pkgconfigdir}/ethos-1.0.pc |
153 | %{_pkgconfigdir}/ethos-ui-1.0.pc | |
154 | %{_libdir}/libethos-1.0.so | |
155 | %{_libdir}/libethos-ui-1.0.so | |
156 | %{_libdir}/libethos-1.0.la | |
157 | %{_libdir}/libethos-ui-1.0.la | |
9cf16116 | 158 | %{_datadir}/gir-1.0/Ethos-1.0.gir |
5c40879d | 159 | |
160 | %if %{with apidocs} | |
161 | %files apidocs | |
162 | %defattr(644,root,root,755) | |
574c6d64 | 163 | %{_gtkdocdir}/%{packname} |
5c40879d | 164 | %endif |