2 # TODO: python unpackaged files: some of them are needed by program. It's impossible to postclean them
4 Summary: Python 2D chemical structure drawing tool
5 Summary(pl.UTF-8): Narzędzie do rysowania dwuwymiarowych struktur chemicznych
10 Group: X11/Applications/Science
11 Source0: http://bkchem.zirael.org/download/%{name}-%{version}.tar.gz
12 # Source0-md5: 41c55059794399526f4f6fc74af556bb
13 Source1: %{name}.desktop
14 URL: http://bkchem.zirael.org/
15 BuildRequires: python-devel >= 1:2.5
16 BuildRequires: python-modules
17 BuildRequires: rpm-pythonprov
18 #BuildRequires: rpmbuild(macros) >= 1.219
21 Requires: python-PyXML
22 Requires: python-devel-tools
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 BKchem is a free (as in free software :o) chemical drawing program. It
28 was conceived and written by Beda Kosata. Supported file formats are
29 SVG and CML. The output looks best with the Adobe SVG viewer, but
30 sodipodi and batik do a reasonable job as well.
32 %description -l pl.UTF-8
33 BKchem to wolnodostępny program do rysunków chemicznych. Jego
34 pomysłodawcą i autorem jest Beda Kosata. Obsługiwane formaty
35 plików to SVG i CML. Wyjście wygląda najlepiej pod przeglądarką
36 SVG firmy Adobe, ale sodipodi i batik także wyświetlają je
40 Summary: High quality PDF and PNG export plugin
41 Summary(pl.UTF-8): Wtyczka do tworzenia wysokiej jakości plików PDF i PNG
42 Group: X11/Applications/Science
43 Requires: %{name} = %{version}-%{release}
44 Requires: python-pycairo >= 0.5.1
46 %description plugin-cairo
47 The plugin, that allowes exporting the picture to the high quality PDF
48 and PNG files. It uses Cairo and pycario libraries.
50 %description plugin-cairo -l pl.UTF-8
51 Wtyczka umożliwiająca eksportowanie do plików PDF i PNG, o wysokiej
52 jakości. Używane są biblioteki Cairo oraz pycairo.
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{%{_bindir},%{_desktopdir},%{_pixmapsdir}}
63 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
64 install images/bkchem.png $RPM_BUILD_ROOT%{_pixmapsdir}/bkchem.png
68 sed -e "s@$RPM_BUILD_ROOT@@g" -i $RPM_BUILD_ROOT%{_bindir}/%{name}
69 sed -e "s@%{name}.py@%{name}.pyo@g" -i $RPM_BUILD_ROOT%{_bindir}/%{name}
70 sed -e "s@$RPM_BUILD_ROOT@@g" -i $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/site_config.py
74 rm -rf $RPM_BUILD_ROOT%{_docdir}/bkchem
79 rm -rf $RPM_BUILD_ROOT
82 %defattr(644,root,root,755)
83 %doc PKG-INFO README doc/*
84 %attr(755,root,root) %{_bindir}/%{name}
86 %{_desktopdir}/%{name}.desktop
87 %{_pixmapsdir}/%{name}.png
88 %dir %{py_sitescriptdir}/%{name}
89 %{py_sitescriptdir}/%{name}/*.py[co]
90 %{py_sitescriptdir}/%{name}/site_config.py
91 %{py_sitescriptdir}/%{name}/%{name}.py
92 %dir %{py_sitescriptdir}/%{name}/plugins
93 %{py_sitescriptdir}/%{name}/plugins/*.py[co]
94 %dir %{py_sitescriptdir}/%{name}/oasa
95 %{py_sitescriptdir}/%{name}/oasa/*.py[co]
96 %dir %{py_sitescriptdir}/%{name}/oasa/oasa/graph
97 %{py_sitescriptdir}/%{name}/oasa/oasa/graph/*.py[co]
98 %dir %{py_sitescriptdir}/%{name}/oasa/oasa
99 %{py_sitescriptdir}/%{name}/oasa/oasa/*.py[co]
100 %dir %{py_sitescriptdir}/%{name}/plugins/piddle
101 %{py_sitescriptdir}/%{name}/plugins/piddle/*.py[co]
102 %{py_sitescriptdir}/*.egg-info
103 %exclude %{py_sitescriptdir}/%{name}/plugins/*cairo*
106 %defattr(644,root,root,755)
107 %{py_sitescriptdir}/%{name}/plugins/*cairo*