dialog/dialog.spec
Stefan Seyfried b81656a83f Accepting request 308342 from home:pluskalm:branches:Base:System
- Add gpg signature
- Update to 1-2-20150513
  + add configure option --with-install-prefix, like ncurses.
  + add --with-screen and related configure options from ncurses-examples
    to allow building with ncurses6 test-packages.
  + update configure macros for improved coding style from lynx changes.
  + updated ro.po from
          http://translationproject.org/latest/dialog/
  + update config.guess, config.sub
  > patches by Florent Rougon:
  + fix two bugs in the "--file" option.
    + When the number of arguments read from the included file is 0, the
      code used to just skip over '--file' and its argument instead of
      removing them from the argument list, causing "Error:  Unknown
      option --file" later on.
    + In the alternative case (at least one argument read from the file),
      the previous code used to do '--j;' in order to "force rescan" of
      the inserted arguments.  However, control then flowed to outer
      blocks where a '++j;' counteracted this measure, causing "Error:
      Unknown option --msgbox" (for instance) later on.
  + modify escaping in argv.c to be more uniform, whether or not the
    backslash is found within a parameter.

OBS-URL: https://build.opensuse.org/request/show/308342
OBS-URL: https://build.opensuse.org/package/show/Base:System/dialog?expand=0&rev=32
2015-05-30 13:42:28 +00:00

146 lines
4.2 KiB
RPMSpec

#
# spec file for package dialog
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define src_date 20150513
%define somajor 12
Name: dialog
Version: 1.2
Release: 0
Summary: Menus and Input Boxes for Shell Scripts
License: LGPL-2.1
Group: Development/Tools/Other
Url: http://invisible-island.net/dialog/
Source0: ftp://invisible-island.net/dialog/%{name}-%{version}-%{src_date}.tgz
Source1: ftp://invisible-island.net/dialog/%{name}-%{version}-%{src_date}.tgz.asc
Source2: %{name}.keyring
Source3: dialog.rc
Source4: dialog.ko.po.bz2
# PATCH-FIX-OPENSUSE : fix shadow during resizing terminal
Patch0: dialog-1.2-20121230.dif
Patch2: dialog-gcc-warnings.patch
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: pkg-config
Requires: terminfo-base
Suggests: terminfo
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This program lets you use menus and dialog boxes in shell scripts.
%package -n libdialog%{somajor}
Summary: Menus and Input Boxes for Shell Scripts
Group: System/Libraries
%description -n libdialog%{somajor}
This program lets you use menus and dialog boxes in shell scripts.
%package devel
Summary: Menus and Input Boxes for Shell Scripts
Group: Development/Libraries/Other
Requires: libdialog%{somajor} = %{version}
%description devel
This program lets you use menus and dialog boxes in shell scripts.
%package examples
Summary: Examples of using dialog tool
Group: Development/Libraries/Other
Requires: %{name} = %{version}
BuildArch: noarch
%description examples
Examples of using menus and dialog boxes in shell scripts.
%prep
%setup -q -n %{name}-%{version}-%{src_date}
bzcat %{SOURCE4} > po/ko.po
%patch0
%patch2 -p1
%build
CC=gcc
LIBS=""
CFLAGS="%{optflags} -pipe -Wall"
for ncurses_conf in ncursesw6-config ncurstesw5-config ; do
ncurses_conf=$(type -p $ncurses_conf 2> /dev/null) || continue
LIBS="${LIBS:+$LIBS }$($ncurses_conf --libs)"
CFLAGS="${CFLAGS:+$CFLAGS }$($ncurses_conf --cflags)"
NCURSES_CONFIG=$ncurses_conf
export NCURSES_CONFIG
break
done
export CC LIBS CFLAGS
%configure \
--enable-nls \
--enable-included-msgs \
--enable-widec \
--with-ncursesw \
--with-libtool \
--disable-rpath-hack \
--includedir=%{_includedir}/dialog
# libtool seems to be broken in shell function func_lalib_unsafe_p()
exec 0</dev/null
make %{?_smp_mflags}
%install
# libtool seems to be broken in shell function func_lalib_unsafe_p()
exec 0</dev/null
make DESTDIR=%{buildroot} install %{?_smp_mflags}
rm -rf %{buildroot}%{_libdir}/.libs
find %{buildroot}%{_libdir} -type f -name "*.la" -delete -print
find %{buildroot}%{_libdir} -name '*.a' -type f -delete -print
rm -rf %{buildroot}%{_datadir}/locale/mg/ # Malagasy (Malayalam??)
rm -rf %{buildroot}%{_datadir}/locale/rm/ # Rhaeto-Romance
mkdir %{buildroot}/etc
install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/dialogrc
%find_lang %{name}
%post -n libdialog%{somajor} -p /sbin/ldconfig
%postun -n libdialog%{somajor} -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(-,root,root)
%doc CHANGES README VERSION COPYING
%config(noreplace) %{_sysconfdir}/dialogrc
%{_bindir}/dialog
%{_mandir}/man1/dialog.1.gz
%files -n libdialog%{somajor}
%defattr(-,root,root)
%{_libdir}/libdialog.so.%{somajor}*
%files devel
%defattr(-,root,root)
%{_bindir}/dialog-config
%{_libdir}/libdialog.so
%{_includedir}/dialog/
%{_mandir}/man3/dialog.3.gz
%files examples
%defattr(-,root,root)
%doc samples/*
%changelog