]> git.pld-linux.org Git - packages/python-pykickstart.git/blob - python-pykickstart.spec
b6cf3ea815c2ab73577b32dba95b10590929b8c5
[packages/python-pykickstart.git] / python-pykickstart.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         module  pykickstart
7 Summary:        A Python 2 library for manipulating kickstart files
8 Summary(pl.UTF-8):      Biblioteka Pythona 2 do operowania na plikach kickstart
9 Name:           python-%{module}
10 Version:        3.32
11 Release:        1
12 License:        GPL v2
13 Group:          Libraries/Python
14 Source0:        https://github.com/pykickstart/pykickstart/archive/r%{version}/%{module}-%{version}.tar.gz
15 # Source0-md5:  3dc66875645787f3b390d2cb55977c8c
16 URL:            https://fedoraproject.org/wiki/pykickstart
17 BuildRequires:  gettext-tools
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.710
20 %if %{with python2}
21 BuildRequires:  python-devel >= 1:2.7
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-devel >= 1:3.2
25 %endif
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _duplicate_files_terminate_build        0
30
31 %description
32 Pykickstart is a Python 2 and Python 3 library consisting of a data
33 representation of kickstart files, a parser to read files into that
34 representation, and a writer to generate kickstart files.
35
36 %description -l pl.UTF-8
37 Pykickstart to biblioteka Pythona 2 i Pythona 3, składająca się z
38 reprezentacji danych plików kickstart, parsera do odczytu plików do
39 tej reprezentacji oraz generatora plików kickstart.
40
41 %package -n python3-%{module}
42 Summary:        A Python 3 library for manipulating kickstart files
43 Summary(pl.UTF-8):      Biblioteka Pythona 3 do operowania na plikach kickstart
44 Group:          Libraries/Python
45
46 %description -n python3-%{module}
47 Pykickstart is a Python 2 and Python 3 library consisting of a data
48 representation of kickstart files, a parser to read files into that
49 representation, and a writer to generate kickstart files.
50
51 %description -n python3-%{module} -l pl.UTF-8
52 Pykickstart to biblioteka Pythona 2 i Pythona 3, składająca się z
53 reprezentacji danych plików kickstart, parsera do odczytu plików do
54 tej reprezentacji oraz generatora plików kickstart.
55
56 %prep
57 %setup -q -n %{module}-r%{version}
58
59 %build
60 %if %{with python2}
61 %py_build
62 %endif
63
64 %if %{with python3}
65 %py3_build
66 %endif
67
68 %{__make} -C po
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72
73 %if %{with python2}
74 %py_install
75
76 %py_postclean
77 %endif
78
79 %if %{with python3}
80 %py3_install
81 %endif
82
83 %{__make} -C po install \
84         DESTDIR=$RPM_BUILD_ROOT \
85         INSTALL_NLS_DIR=$RPM_BUILD_ROOT%{_localedir}
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{with python2}
91 %files
92 %defattr(644,root,root,755)
93 %doc README.rst docs/{kickstart-docs.rst,programmers-guide}
94 %if 0
95 # TODO: package as *-2 or in -tools package?
96 %attr(755,root,root) %{_bindir}/ksflatten
97 %attr(755,root,root) %{_bindir}/ksshell
98 %attr(755,root,root) %{_bindir}/ksvalidator
99 %attr(755,root,root) %{_bindir}/ksverdiff
100 %{_mandir}/man1/ksflatten.1*
101 %{_mandir}/man1/ksshell.1*
102 %{_mandir}/man1/ksvalidator.1*
103 %{_mandir}/man1/ksverdiff.1*
104 %endif
105 %{py_sitescriptdir}/pykickstart
106 %{py_sitescriptdir}/pykickstart-%{version}-*.egg-info
107 %endif
108
109 %if %{with python3}
110 %files -n python3-%{module}
111 %defattr(644,root,root,755)
112 %doc README.rst docs/{kickstart-docs.rst,programmers-guide}
113 %attr(755,root,root) %{_bindir}/ksflatten
114 %attr(755,root,root) %{_bindir}/ksshell
115 %attr(755,root,root) %{_bindir}/ksvalidator
116 %attr(755,root,root) %{_bindir}/ksverdiff
117 %{_mandir}/man1/ksflatten.1*
118 %{_mandir}/man1/ksshell.1*
119 %{_mandir}/man1/ksvalidator.1*
120 %{_mandir}/man1/ksverdiff.1*
121 %{py3_sitescriptdir}/pykickstart
122 %{py3_sitescriptdir}/pykickstart-%{version}-*.egg-info
123 %endif
This page took 0.05266 seconds and 2 git commands to generate.