]>
Commit | Line | Data |
---|---|---|
b122ebc2 | 1 | # |
2 | # TODO: some unpackaged files | |
3 | # | |
24360470 | 4 | Summary: Python 2D chemical structure drawing tool |
8a2bb026 | 5 | Summary(pl.UTF-8): Narzędzie do rysowania dwuwymiarowych struktur chemicznych |
24360470 | 6 | Name: bkchem |
b122ebc2 | 7 | Version: 0.12.1 |
a2e593b6 | 8 | Release: 0.1 |
3d625ad7 | 9 | License: GPL v2+ |
3be44e7f | 10 | Group: X11/Applications/Science |
a2e593b6 | 11 | Source0: http://bkchem.zirael.org/download/%{name}-%{version}.tar.gz |
b122ebc2 | 12 | # Source0-md5: 15936865fff423056510503732a62d23 |
3be2cda1 | 13 | Source1: %{name}.desktop |
6b65245b | 14 | URL: http://bkchem.zirael.org/ |
20575a5a | 15 | BuildRequires: python |
24360470 | 16 | BuildRequires: python-devel |
4cda0716 | 17 | BuildRequires: python-modules |
24360470 | 18 | Requires: python |
0a00e5a9 | 19 | Requires: python-devel-tools |
24360470 | 20 | Requires: Pmw |
21 | Requires: python-PyXML | |
3be44e7f JB |
22 | BuildArch: noarch |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24360470 | 24 | |
25 | %description | |
26 | BKchem is a free (as in free software :o) chemical drawing program. It | |
3be44e7f | 27 | was conceived and written by Beda Kosata. Supported file formats are |
24360470 | 28 | SVG and CML. The output looks best with the Adobe SVG viewer, but |
29 | sodipodi and batik do a reasonable job as well. | |
30 | ||
5022c38c JR |
31 | %description -l pl.UTF-8 |
32 | BKchem to wolnodostępny program do rysunków chemicznych. Jego | |
33 | pomysłodawcą i autorem jest Beda Kosata. Obsługiwane formaty plików to | |
34 | SVG i CML. Wyjście wygląda najlepiej pod przeglądarką SVG firmy Adobe, | |
35 | ale sodipodi i batik także wyświetlają je sensownie. | |
3be44e7f | 36 | |
a4887039 | 37 | %package plugin-cairo |
38 | Summary: High quality PDF and PNG export plugin | |
8a2bb026 | 39 | Summary(pl.UTF-8): Wtyczka do tworzenia wysokiej jakości plików PDF i PNG |
a4887039 | 40 | Group: X11/Applications/Science |
41 | Requires: %{name} = %{version}-%{release} | |
42 | Requires: python-pycairo >= 0.5.1 | |
43 | ||
44 | %description plugin-cairo | |
45 | The plugin, that allowes exporting the picture to the high quality PDF | |
46 | and PNG files. It uses Cairo and pycario libraries. | |
47 | ||
5022c38c | 48 | %description plugin-cairo -l pl.UTF-8 |
a2e593b6 | 49 | Wtyczka umożliwiająca eksportowanie do plików PDF i PNG, o wysokiej |
5022c38c | 50 | jakości. Używane są biblioteki Cairo oraz pycairo. |
a4887039 | 51 | |
24360470 | 52 | %prep |
a2e593b6 | 53 | %setup -q |
24360470 | 54 | |
55 | %build | |
91ddb393 | 56 | %{__python} setup.py build |
24360470 | 57 | |
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
0eeacd11 | 60 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_desktopdir},%{_pixmapsdir}} |
aa7f1969 | 61 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} |
f5b2bb1d | 62 | install images/bkchem.png $RPM_BUILD_ROOT%{_pixmapsdir}/bkchem.png |
91ddb393 | 63 | %{__python} setup.py install \ |
24360470 | 64 | --root=$RPM_BUILD_ROOT \ |
65 | --optimize=2 | |
66 | ||
67 | #fix executable | |
4cda0716 | 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 | |
24360470 | 71 | |
72 | %find_lang BKchem | |
73 | ||
988ccfcf | 74 | rm -rf $RPM_BUILD_ROOT%{_docdir}/bkchem |
75 | ||
24360470 | 76 | %clean |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %files -f BKchem.lang | |
80 | %defattr(644,root,root,755) | |
11450334 | 81 | %doc README RELEASE doc/* |
24360470 | 82 | %attr(755,root,root) %{_bindir}/%{name} |
83 | %{_datadir}/%{name} | |
aa7f1969 | 84 | %{_desktopdir}/%{name}.desktop |
0eeacd11 JB |
85 | %{_pixmapsdir}/%{name}.png |
86 | %dir %{py_sitescriptdir}/%{name} | |
24360470 | 87 | %{py_sitescriptdir}/%{name}/*.py[co] |
4cda0716 | 88 | %{py_sitescriptdir}/%{name}/site_config.py |
24360470 | 89 | %{py_sitescriptdir}/%{name}/%{name}.py |
90 | %dir %{py_sitescriptdir}/%{name}/plugins | |
91 | %{py_sitescriptdir}/%{name}/plugins/*.py[co] | |
92 | %dir %{py_sitescriptdir}/%{name}/oasa | |
93 | %{py_sitescriptdir}/%{name}/oasa/*.py[co] | |
94 | %dir %{py_sitescriptdir}/%{name}/oasa/oasa/graph | |
95 | %{py_sitescriptdir}/%{name}/oasa/oasa/graph/*.py[co] | |
96 | %dir %{py_sitescriptdir}/%{name}/oasa/oasa | |
97 | %{py_sitescriptdir}/%{name}/oasa/oasa/*.py[co] | |
47f9ba96 | 98 | %dir %{py_sitescriptdir}/%{name}/plugins/piddle |
99 | %{py_sitescriptdir}/%{name}/plugins/piddle/*.py[co] | |
a4887039 | 100 | %exclude %{py_sitescriptdir}/%{name}/plugins/*cairo* |
101 | ||
102 | %files plugin-cairo | |
fbba1a67 | 103 | %defattr(644,root,root,755) |
a4887039 | 104 | %{py_sitescriptdir}/%{name}/plugins/*cairo* |