]>
Commit | Line | Data |
---|---|---|
9b0a01c6 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # disable gtk-doc | |
4 | %bcond_without static_libs # don't build static library | |
5b8d28e3 | 5 | |
a0abb63b | 6 | %define src_name diacanvas2 |
5b8d28e3 | 7 | |
8 | Summary: Library for easely creating diagrams | |
9e568462 | 9 | Summary(pl.UTF-8): Biblioteka do prostego tworzenia diagramów |
5b8d28e3 | 10 | Name: diacanvas |
037ef109 | 11 | Version: 0.14.4 |
6698c2f1 | 12 | Release: 1 |
5b8d28e3 | 13 | License: GPL |
14 | Group: X11/Libraries | |
38f856b5 | 15 | Source0: http://dl.sourceforge.net/diacanvas/%{src_name}-%{version}.tar.gz |
037ef109 | 16 | # Source0-md5: b3db6c961de3023489a4d2419dab89bd |
d8c92f17 | 17 | URL: http://diacanvas.sourceforge.net/ |
9b0a01c6 | 18 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.0} |
935d7d55 | 19 | BuildRequires: libgnomeprintui-devel >= 2.2.0 |
4df466c4 | 20 | BuildRequires: libtool |
31e9f36c | 21 | BuildRequires: pkgconfig |
935d7d55 JB |
22 | # for canvas.defs |
23 | BuildRequires: python-gnome-devel >= 2.0.0 | |
24 | BuildRequires: python-pygtk-devel >= 1:2.0.0 | |
5b8d28e3 | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
f2ba8991 | 27 | %define pydefsdir %(pkg-config --variable=defsdir pygtk-2.0) |
5b8d28e3 | 28 | |
29 | %description | |
5261bf0d | 30 | Library for easy diagrams creation. |
5b8d28e3 | 31 | |
9e568462 JR |
32 | %description -l pl.UTF-8 |
33 | Biblioteka do prostego tworzenia diagramów. | |
5b8d28e3 | 34 | |
35 | %package devel | |
36 | Summary: Diacanvas header files and development documentation | |
9e568462 | 37 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja biblioteki Diacanvas |
5b8d28e3 | 38 | Group: X11/Development/Libraries |
38f856b5 | 39 | Requires: %{name} = %{version}-%{release} |
5b8d28e3 | 40 | |
41 | %description devel | |
42 | Diacanvas header files and development documentation. | |
43 | ||
9e568462 JR |
44 | %description devel -l pl.UTF-8 |
45 | Pliki nagłówkowe i dokumentacja biblioteki Diacanvas. | |
5b8d28e3 | 46 | |
47 | %package static | |
48 | Summary: Diacanvas static libraries | |
9e568462 | 49 | Summary(pl.UTF-8): Biblioteki statyczne Diacanvas |
5b8d28e3 | 50 | Group: X11/Development/Libraries |
38f856b5 | 51 | Requires: %{name}-devel = %{version}-%{release} |
5b8d28e3 | 52 | |
53 | %description static | |
54 | Diacanvas static libraries. | |
55 | ||
9e568462 | 56 | %description static -l pl.UTF-8 |
5b8d28e3 | 57 | Biblioteki statyczne Diacanvas. |
58 | ||
9b0a01c6 | 59 | %package apidocs |
7ac0a4c3 | 60 | Summary: Diacanvas API documentation |
9e568462 | 61 | Summary(pl.UTF-8): Dokumentacja API Diacanvas |
7ac0a4c3 JB |
62 | Group: Documentation |
63 | Requires: gtk-doc-common | |
9b0a01c6 | 64 | |
65 | %description apidocs | |
66 | Diacanvas API documentation. | |
67 | ||
9e568462 | 68 | %description apidocs -l pl.UTF-8 |
7ac0a4c3 JB |
69 | Dokumentacja API Diacanvas. |
70 | ||
5b8d28e3 | 71 | %package -n python-%{name} |
72 | Summary: Diacanvas Python bindings | |
9e568462 | 73 | Summary(pl.UTF-8): Wiązania języka Python do biblioteki Diacanvas |
5b8d28e3 | 74 | Group: Libraries/Python |
38f856b5 | 75 | Requires: %{name} = %{version}-%{release} |
a3e780e3 | 76 | %pyrequires_eq python-libs |
0aaf9b2a | 77 | Requires: python-pygtk-gtk >= 1.99.16 |
5b8d28e3 | 78 | |
79 | %description -n python-%{name} | |
80 | Diacanvas Python bindings. | |
81 | ||
9e568462 JR |
82 | %description -n python-%{name} -l pl.UTF-8 |
83 | Wiązania języka Python do biblioteki Diacanvas. | |
5b8d28e3 | 84 | |
85 | %package -n python-%{name}-devel | |
86 | Summary: Diacanvas Python bindings development files | |
9e568462 | 87 | Summary(pl.UTF-8): Pliki dla programistów wiązań języka Python do biblioteki Diacanvas |
5b8d28e3 | 88 | Group: Development/Languages/Python |
38f856b5 | 89 | Requires: %{name} = %{version}-%{release} |
5b8d28e3 | 90 | |
91 | %description -n python-%{name}-devel | |
92 | Diacanvas Python bindings development files. | |
93 | ||
9e568462 JR |
94 | %description -n python-%{name}-devel -l pl.UTF-8 |
95 | Pliki dla programistów wiązań języka Python do biblioteki Diacanvas. | |
5b8d28e3 | 96 | |
97 | %prep | |
98 | %setup -q -n %{src_name}-%{version} | |
5b8d28e3 | 99 | |
100 | %build | |
5b8d28e3 | 101 | %configure \ |
6a0f346a | 102 | --%{?with_static_libs:en}%{!?with_static_libs:dis}able-static \ |
5b8d28e3 | 103 | --enable-gnome-print \ |
935d7d55 | 104 | --enable-python \ |
6a0f346a JB |
105 | --%{?with_apidocs:en}%{!?with_apidocs:dis}able-gtk-doc \ |
106 | %{?with_apidocs:--with-html-dir=%{_gtkdocdir}} | |
5b8d28e3 | 107 | |
6698c2f1 | 108 | %{__make} |
5b8d28e3 | 109 | |
110 | %install | |
111 | rm -rf $RPM_BUILD_ROOT | |
5b8d28e3 | 112 | |
f2957b22 | 113 | %{__make} install \ |
6698c2f1 | 114 | DESTDIR=$RPM_BUILD_ROOT |
5b8d28e3 | 115 | |
6698c2f1 | 116 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
117 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
118 | %py_postclean | |
935d7d55 | 119 | rm -f $RPM_BUILD_ROOT%{py_sitedir}/%{name}/*.{la,a} |
38f856b5 | 120 | |
5b8d28e3 | 121 | %find_lang %{name} |
122 | ||
123 | %clean | |
124 | rm -rf $RPM_BUILD_ROOT | |
125 | ||
38f856b5 JB |
126 | %post -p /sbin/ldconfig |
127 | %postun -p /sbin/ldconfig | |
128 | ||
5b8d28e3 | 129 | %files -f %{name}.lang |
130 | %defattr(644,root,root,755) | |
131 | %doc README ChangeLog TODO NEWS AUTHORS | |
38f856b5 | 132 | %attr(755,root,root) %{_libdir}/*.so.*.*.* |
5b8d28e3 | 133 | |
134 | %files devel | |
135 | %defattr(644,root,root,755) | |
136 | %attr(755,root,root) %{_libdir}/*.so | |
ff6417c3 | 137 | %{_libdir}/*.la |
5b8d28e3 | 138 | %{_includedir}/diacanvas |
5b8d28e3 | 139 | %{_pkgconfigdir}/* |
140 | ||
9b0a01c6 | 141 | %if %{with static_libs} |
5b8d28e3 | 142 | %files static |
143 | %defattr(644,root,root,755) | |
9b0a01c6 | 144 | %{_libdir}/lib*.a |
145 | %endif | |
146 | ||
147 | %if %{with apidocs} | |
148 | %files apidocs | |
149 | %defattr(644,root,root,755) | |
150 | %{_gtkdocdir}/* | |
151 | %endif | |
5b8d28e3 | 152 | |
153 | %files -n python-%{name} | |
154 | %defattr(644,root,root,755) | |
155 | %dir %{py_sitedir}/%{name} | |
156 | %attr(755,root,root) %{py_sitedir}/%{name}/*.so | |
5b8d28e3 | 157 | %{py_sitedir}/%{name}/*.py[co] |
158 | ||
159 | %files -n python-%{name}-devel | |
160 | %defattr(644,root,root,755) | |
161 | %{pydefsdir}/* |