File gxditview.spec of Package gxditview.import4718

#
# spec file for package gxditview
#
# Copyright (c) 2011 SUSE LINUX Products 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/
#



Name:           gxditview
License:        MIT
Group:          Productivity/Publishing/Troff
AutoReqProv:    on
Version:        1.20.1
Release:        4.<RELEASE2>
Summary:        Ditroff Output Displayer for Groff
Url:            http://www.gnu.org/software/groff/groff.html
Source0:        ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.bz2
Patch0:         groff_1.20.1-10.debian.diff
Patch1:         groff-1.20.1-destbufferoverflow.patch
Patch2:         groff-1.20.1-nroff-empty-LANGUAGE.patch
Patch3:         groff-1.20.1-groffer-libexecdir.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc-c++
BuildRequires:  xorg-x11-devel
Requires:       groff
# bnc#668254
Supplements:    packageand(groff:xorg-x11-libX11)
Conflicts:      jgxdview
Provides:       gxdview = %{version}-%{release}
Obsoletes:      gxdview < %{version}

%description
This version of xditview is called gxditview and has some extensions
used by the groff command.  gxditview is used by groff if called with
the -X option.

%package -n groff-devx
License:        BSD3c(or similar) ; GPLv2+
Group:          Productivity/Publishing/Troff
Summary:        X output devices for groff
Requires:       groff
Supplements:    groff

%description -n groff-devx
The output devices X75, X75-12, devX100 and devX100-12 for groff. They are in
separate package because of bootstrapping issues.


Authors:
--------
    James Clark     <jjc@clark.com>

%prep
%setup -q -n groff-%{version} 
%patch0 -p1 -b .debian
%patch1 -p0 -b .destbufferoverflow
%patch2 -p1 -b .bnc540600
%patch3 -p1 -b .groffer-libexecdir

%build
# remove empty backups
rm -f ChangeLog.jp.debian README.jp.debian
#
PATH=$PWD/src/roff/troff:$PWD/src/preproc/pic:$PWD/src/preproc/eqn:$PWD/src/preproc/tbl:$PWDsrc/preproc/refer:$PWD/src/preproc/soelim:$PATH
PATH=$PWD/src/roff/grog:$PWD/src/roff/groff:$PWD/src/devices/grops:$PWD/src/devices/grotty:$PWD/src/devices/grodvi:$PWD/src/devices/grohtml:$PATH
GROFF_COMMAND_PREFIX=
GROFF_FONT_PATH=$PWD
GROFF_TMAC_PATH=$PWD/tmac:$PWD/src/roff/troff
export PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH
#
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" INSTALL_PROGRAM='${INSTALL}'
%{configure}
%{__make}

%install

make DESTDIR=%{?buildroot:%{buildroot}} do=do_install font/devX*

#remove unwanted stuff
rm -rf %{buildroot}/%{_bindir}
rm -rf %{buildroot}/%{_mandir}

%{__install} -d -m 0755 %{buildroot}%{_bindir}
%{__install} -d -m 0755 %{buildroot}%{_datadir}/X11/app-defaults
%{__install} -d -m 0755 %{buildroot}%{_mandir}/man1/

pushd src/devices/xditview/
%{__install} -m 0755 %{name} %{buildroot}%{_bindir}
%{__install} -m 0644 GXditview.ad %{buildroot}%{_datadir}/X11/app-defaults/GXditview
%{__install} -m 0644 %{name}.man %{buildroot}%{_mandir}/man1/%{name}.1
popd

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%doc src/devices/xditview/ChangeLog src/devices/xditview/README src/devices/xditview/TODO
%{_bindir}/%{name}
%doc %{_mandir}/man1/%{name}.1*
%config %{_datadir}/X11/app-defaults/GXditview

%files -n groff-devx
%defattr(-,root,root)
%{_datadir}/groff

%changelog