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
10 %undefine with_python2
11 %undefine with_python3
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
23 Source0: https://releases.pagure.org/newt/%{name}-%{version}.tar.gz
24 # Source0-md5: 808ce286f607243de6560bd72e095f53
25 Patch0: %{name}-0.51.6-if1close.patch
26 Patch1: %{name}-nopython.patch
27 Patch2: %{name}-make.patch
29 URL: https://pagure.io/newt
30 BuildRequires: autoconf >= 2.50
32 BuildRequires: docbook-dtd30-sgml
33 BuildRequires: docbook-utils
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)
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
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
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.
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.
77 %description -l tr.UTF-8
78 Newt ile karakter tabanlı ekranlarda renkli pencereler, kaydırma
79 çubukları, çeşitli tuşlar oluşturulabilir.
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}
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.
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.
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.
105 %description devel -l pl.UTF-8
106 Pliki nagłówkowe dla newt.
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
114 Summary: Newt static library
115 Summary(pl.UTF-8): Biblioteka statyczna newt
116 Group: Development/Libraries
117 Requires: %{name}-devel = %{version}-%{release}
122 %description static -l pl.UTF-8
123 Biblioteka statyczna newt.
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}
134 %description tcl -l pl.UTF-8
135 Dodatki do Tcl z Newta.
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
146 %description -n python-snack
147 Python 2 binding for Newt library.
149 %description -n python-snack -l pl.UTF-8
150 Wiązanie Pythona 2 do biblioteki Newt.
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}
158 %description -n python3-snack
159 Python 3 binding for Newt library.
161 %description -n python3-snack -l pl.UTF-8
162 Wiązanie Pythona 3 do biblioteki Newt.
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
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
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
190 CFLAGS="%{rpmcflags} -fPIC"
191 CPPFLAGS="%{rpmcppflags} -I/usr/include/slang"
194 %{!?with_tcl:--without-tcl}
197 PYTHONVERS="%{?with_python2:python%{py_ver}} %{?with_python3:python%{py3_ver}}" \
199 %{!?with_python:SNACKSO=}
202 docbook2txt tutorial.sgml
206 rm -rf $RPM_BUILD_ROOT
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 \
216 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
217 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
221 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
222 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
226 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/bal
231 rm -rf $RPM_BUILD_ROOT
233 %post -p /sbin/ldconfig
234 %postun -p /sbin/ldconfig
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
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
250 %defattr(644,root,root,755)
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_libdir}/whiptcl.so
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]
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]
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_bindir}/whiptail
277 %{_mandir}/man1/whiptail.1*