]> git.pld-linux.org Git - packages/bkchem.git/blob - bkchem.spec
automatic change: use py_build/py_install macros
[packages/bkchem.git] / bkchem.spec
1 #
2 # TODO: python unpackaged files: some of them are needed by program. It's impossible to postclean them
3 #
4 Summary:        Python 2D chemical structure drawing tool
5 Summary(pl.UTF-8):      Narzędzie do rysowania dwuwymiarowych struktur chemicznych
6 Name:           bkchem
7 Version:        0.13.0
8 Release:        0.1
9 License:        GPL v2+
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
19 Requires:       Pmw
20 Requires:       python
21 Requires:       python-PyXML
22 Requires:       python-devel-tools
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
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.
31
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
37 sensownie.
38
39 %package plugin-cairo
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
45
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.
49
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.
53
54 %prep
55 %setup -q
56
57 %build
58 %py_build
59
60 %install
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
65 %py_install
66
67 #fix executable
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
71
72 %find_lang BKchem
73
74 rm -rf $RPM_BUILD_ROOT%{_docdir}/bkchem
75
76 #%%py_postclean
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81 %files -f BKchem.lang
82 %defattr(644,root,root,755)
83 %doc PKG-INFO README doc/*
84 %attr(755,root,root) %{_bindir}/%{name}
85 %{_datadir}/%{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*
104
105 %files plugin-cairo
106 %defattr(644,root,root,755)
107 %{py_sitescriptdir}/%{name}/plugins/*cairo*
This page took 0.055279 seconds and 3 git commands to generate.