]> git.pld-linux.org Git - packages/newt.git/blob - newt.spec
18288a15bd8979332695fa7d131f03f4fb5406f6
[packages/newt.git] / newt.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # tutorial build
4 %bcond_without  python  # Python modules (any)
5 %bcond_without  python2 # Python 2 module
6 %bcond_without  python3 # Python 3 module
7 %bcond_without  tcl     # Tcl module
8 #
9 %if %{without python}
10 %undefine       with_python2
11 %undefine       with_python3
12 %endif
13 Summary:        Not Erik's Windowing Toolkit - text mode windowing with slang
14 Summary(de.UTF-8):      Nicht Eriks Windowing Toolkit - Textmodus-Windowing mit Slang
15 Summary(fr.UTF-8):      Not Erik's Windowing Toolkit - fenêtrage en mode texte avec slang
16 Summary(pl.UTF-8):      Not Erik's Windowing Toolkit - okna w trybie tekstowym ze slangiem
17 Summary(tr.UTF-8):      Not Erik's Windowing Toolkit - metin kipi pencereleme sistemi
18 Name:           newt
19 Version:        0.52.21
20 Release:        6
21 License:        LGPL v2
22 Group:          Libraries
23 Source0:        https://releases.pagure.org/newt/%{name}-%{version}.tar.gz
24 # Source0-md5:  a0a5fd6b53bb167a65e15996b249ebb5
25 Patch0:         %{name}-0.51.6-if1close.patch
26 Patch1:         %{name}-nopython.patch
27 Patch2:         %{name}-make.patch
28 Patch3:         gold.patch
29 URL:            https://pagure.io/newt
30 BuildRequires:  autoconf >= 2.50
31 %if %{with doc}
32 BuildRequires:  docbook-dtd30-sgml
33 BuildRequires:  docbook-utils
34 BuildRequires:  lynx
35 %endif
36 BuildRequires:  gettext-tools
37 BuildRequires:  popt-devel
38 %{?with_python2:BuildRequires:  python-devel >= 1:2.5}
39 %{?with_python3:BuildRequires:  python3-devel >= 1:3.2}
40 BuildRequires:  rpm-pythonprov
41 BuildRequires:  slang-devel >= 2.0.0
42 %{?with_tcl:BuildRequires:      tcl-devel >= 8.5}
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 Newt is a windowing toolkit for text mode built from the slang
47 library. It allows color text mode applications to easily use
48 stackable windows, push buttons, check boxes, radio buttons, lists,
49 entry fields, labels, and displayable text. Scrollbars are supported,
50 and forms may be nested to provide extra functionality. This pacakge
51 contains the shared library for programs that have been built with
52 newt.
53
54 %description -l de.UTF-8
55 Newt ist ein Windowing-Toolkit für Textmodus, konstruiert auf der
56 Grundlage der Slang-Library, mit dessen Hilfe Farbtext-Modus-
57 Applikationen leicht mit stapelbaren Fenstern, Schaltflächen,
58 Optionskästchen, Listen, Eingabefeldern, Etiketten und Display-Text
59 arbeiten können. Auch Bildlaufleisten erden unterstützt, und der
60 Einbau von Formularen ist möglich, wenn zusätzliche Funktionalität
61 gefordert ist.
62
63 %description -l fr.UTF-8
64 Newt est une boite à outil de fenétrage en mode texte, construit sur
65 la librarie slang. Elle permet aux applications en mode texte
66 d'utiliser simplement de multiples fenêtres, des bouttons, des cases à
67 cocher... Les barres de défilement sont supportées, et les fenêtres
68 peuvent être imbriquées pour donner des fonctionnalités nouvelles.
69
70 %description -l pl.UTF-8
71 Newt jest biblioteką typu toolkit ale do trybu tekstowego, osadzoną na
72 bibliotece slang. Umożliwia budowanie aplikacji pracujących w trybie
73 tekstowym umożliwiając operowanie na okienkach, przyciskach (push
74 button), listach wyboru, etykietach i elementach tekstowych jakie są
75 potrzebne przy tworzeniu interfejsu użytkownika w różnych aplikacjach.
76
77 %description -l tr.UTF-8
78 Newt ile karakter tabanlı ekranlarda renkli pencereler, kaydırma
79 çubukları, çeşitli tuşlar oluşturulabilir.
80
81 %package devel
82 Summary:        Developer's toolkit for newt windowing library
83 Summary(de.UTF-8):      Entwickler-Toolkit für die newt-Windowing-Library
84 Summary(fr.UTF-8):      Toolkit de développement pour la bibliothèque de fenêtrage newt
85 Summary(pl.UTF-8):      Pliki nagłówkowe dla newt
86 Summary(tr.UTF-8):      newt pencere kitaplığı için geliştirme dosyaları
87 Group:          Development/Libraries
88 Requires:       %{name} = %{version}-%{release}
89
90 %description devel
91 These are the header files and libraries for developing applications
92 which use newt. Newt is a windowing toolkit for text mode, which
93 provides many widgets and stackable windows.
94
95 %description devel -l de.UTF-8
96 Dies sind die Header-Dateien und Libraries zur Entwicklung von
97 Applikationen, die mit newt arbeiten. Newt ist ein Windowing-Toolkit
98 für Textmodus, der viele Widgets und stapelbare Fenster enthält.
99
100 %description devel -l fr.UTF-8
101 En-têtes et bibliothèques pour le développement d'applications
102 utilisant newt. newt est un tookit de fenêtrage pour le mode texte
103 offrant de nombreux widgets et des fenêtres empilables.
104
105 %description devel -l pl.UTF-8
106 Pliki nagłówkowe dla newt.
107
108 %description devel -l tr.UTF-8
109 Bu paket, newt ile geliştirme yapmak için gereken başlık dosyalarını
110 ve kitaplıkları içerir. Newt, metin ekranda çalışan bir pencereleme
111 kitaplığıdır.
112
113 %package static
114 Summary:        Newt static library
115 Summary(pl.UTF-8):      Biblioteka statyczna newt
116 Group:          Development/Libraries
117 Requires:       %{name}-devel = %{version}-%{release}
118
119 %description static
120 Newt static library.
121
122 %description static -l pl.UTF-8
123 Biblioteka statyczna newt.
124
125 %package tcl
126 Summary:        Newt Tcl bindings
127 Summary(pl.UTF-8):      Dodatki do Tcl z Newta
128 Group:          Development/Languages/Tcl
129 Requires:       %{name} = %{version}-%{release}
130
131 %description tcl
132 Newt Tcl bindings.
133
134 %description tcl -l pl.UTF-8
135 Dodatki do Tcl z Newta.
136
137 %package -n python-snack
138 Summary:        Python 2 binding for Newt library
139 Summary(pl.UTF-8):      Wiązanie Pythona 2 do biblioteki Newt
140 Group:          Development/Languages/Python
141 Requires:       %{name} = %{version}-%{release}
142 Provides:       newt-python = %{version}-%{release}
143 Provides:       snack = %{version}-%{release}
144 Obsoletes:      newt-python
145
146 %description -n python-snack
147 Python 2 binding for Newt library.
148
149 %description -n python-snack -l pl.UTF-8
150 Wiązanie Pythona 2 do biblioteki Newt.
151
152 %package -n python3-snack
153 Summary:        Python 3 binding for Newt library
154 Summary(pl.UTF-8):      Wiązanie Pythona 3 do biblioteki Newt
155 Group:          Development/Languages/Python
156 Requires:       %{name} = %{version}-%{release}
157
158 %description -n python3-snack
159 Python 3 binding for Newt library.
160
161 %description -n python3-snack -l pl.UTF-8
162 Wiązanie Pythona 3 do biblioteki Newt.
163
164 %package -n whiptail
165 Summary:        A dialog compliant program to build tty dialog boxes
166 Summary(pl.UTF-8):      Program do tekstowych okienek dialogowych kompatybilny z dialog
167 Group:          Applications/Terminal
168
169 %description -n whiptail
170 Dialog compliant utility that allows you to build user interfaces in a
171 TTY (text mode only). You can call dialog from within a shell script
172 to ask the user questions or present with choices in a more user
173 friendly manner.
174
175 %description -n whiptail -l pl.UTF-8
176 Program umożliwiający budować interfejsy użytkownika na terminalu
177 tekstowym, kompatybilny z programem dialog. Pozwala wywołać dialog ze
178 skryptu shella, aby zdać pytania użytkownikowi w sposób bardziej
179 przyjazny.
180
181 %prep
182 %setup -q
183 %patch0 -p1
184 %patch1 -p1
185 %patch2 -p1
186 %patch3 -p1
187
188 %build
189 %{__autoconf}
190 CFLAGS="%{rpmcflags} -fPIC"
191 CPPFLAGS="%{rpmcppflags} -I/usr/include/slang"
192 %configure \
193         --with-gpm-support \
194         %{!?with_tcl:--without-tcl}
195
196 %{__make} \
197         PYTHONVERS="%{?with_python2:python%{py_ver}} %{?with_python3:python%{py3_ver}}" \
198         LIBTCL=-ltcl \
199         %{!?with_python:SNACKSO=}
200
201 %if %{with doc}
202 docbook2txt tutorial.sgml
203 %endif
204
205 %install
206 rm -rf $RPM_BUILD_ROOT
207
208 %{__make} install \
209         PYTHONVERS="%{?with_python2:python%{py_ver}} %{?with_python3:python%{py3_ver}}" \
210         %{!?with_tcl:WHIPTCLSO=} \
211         %{!?with_python:SNACKSO=} \
212         instroot=$RPM_BUILD_ROOT \
213         libdir=%{_libdir}
214
215 %if %{with python2}
216 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
217 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
218 %py_postclean
219 %endif
220 %if %{with python3}
221 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
222 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
223 %endif
224
225 # not supported
226 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/bal
227
228 %find_lang %{name}
229
230 %clean
231 rm -rf $RPM_BUILD_ROOT
232
233 %post   -p /sbin/ldconfig
234 %postun -p /sbin/ldconfig
235
236 %files -f %{name}.lang
237 %defattr(644,root,root,755)
238 %doc AUTHORS CHANGES README
239 %attr(755,root,root) %{_libdir}/libnewt.so.*.*.*
240 %attr(755,root,root) %ghost %{_libdir}/libnewt.so.0.52
241
242 %files devel
243 %defattr(644,root,root,755)
244 %{?with_doc:%doc tutorial.txt}
245 %attr(755,root,root) %{_libdir}/libnewt.so
246 %{_includedir}/newt.h
247 %{_pkgconfigdir}/libnewt.pc
248
249 %files static
250 %defattr(644,root,root,755)
251 %{_libdir}/libnewt.a
252
253 %if %{with tcl}
254 %files tcl
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_libdir}/whiptcl.so
257 %endif
258
259 %if %{with python2}
260 %files -n python-snack
261 %defattr(644,root,root,755)
262 %attr(755,root,root) %{py_sitedir}/_snack.so
263 %{py_sitedir}/snack.py[co]
264 %endif
265
266 %if %{with python3}
267 %files -n python3-snack
268 %defattr(644,root,root,755)
269 %attr(755,root,root) %{py3_sitedir}/_snack.so
270 %{py3_sitedir}/snack.py
271 %{py3_sitedir}/__pycache__/snack.cpython-*.py[co]
272 %endif
273
274 %files -n whiptail
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_bindir}/whiptail
277 %{_mandir}/man1/whiptail.1*
This page took 0.171825 seconds and 2 git commands to generate.