File Xdialog.spec of Package Xdialog

#
# spec file for package Xdialog
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

# norootforbuild

Name:          Xdialog
Summary:       GTK-Based "dialog" Replacement
Version:       2.3.1
Release:       1
Url:           http://xdialog.dyns.net/
License:       GPL-2.0+
Group:         System/GUI/Other
AutoReqProv:   on
Vendor:        openSUSE-Education
BuildRequires: gtk2-devel 
BuildRequires: gettext-devel
BuildRequires: autoconf
BuildRequires: automake
Source0:       http://thgodef.nerim.net/xdialog/%name-%version.tar.bz2
Patch0:        Xdialog-2.3.1-remove-gtk1.patch
Patch1:        Xdialog-2.3.1-makefile_am-fix.patch
BuildRoot:     %{_tmppath}/%{name}-%{version}-build

%description
Xdialog is designed to be a drop-in replacement for the cdialog
program. It converts any terminal-based program into a program with an
X interface. The dialogs are easier to see and use and Xdialog adds
even more functionalities (help button+box, treeview, editbox, file
selector, range box, and much more).

%prep
%setup -q
%patch0
%patch1

%build
./autogen.sh
%configure --with-gtk2

make %{?jobs:-j%jobs}

%install
make DESTDIR=%{buildroot} docdir=%{_defaultdocdir}/%{name} install
%find_lang %{name}
# remove unsupported distribution languages
for lang in no_NO sv_SE; do
	test -f %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo && \
        rm -f %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo
	sed -i "s|.*$lang.*||g" %{name}.lang
done

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-, root, root)
/usr/bin/Xdialog
%_mandir/man1/Xdialog.1*
%defattr(0644, root, root,0755)
%doc %{_defaultdocdir}/%{name}

%changelog 
openSUSE Build Service is sponsored by