groff/gxditview.spec
Stephan Kulow 9d0858ce2f Accepting request 105915 from home:coolo:branches:openSUSE:Factory
- own app-defaults directory - requiring xorg-x11 for it is heavy (forwarded request 105881 from coolo)

OBS-URL: https://build.opensuse.org/request/show/105915
OBS-URL: https://build.opensuse.org/package/show/M17N/groff?expand=0&rev=30
2012-02-20 06:16:57 +00:00

123 lines
4.0 KiB
RPMSpec

#
# 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.21
Release: 1
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.gz
# for file in `cat series | grep -v '^#' | grep '^[a-z]' `; do
# cat $file >> groff_1.21-6.debian.diff
# done
Patch0: groff_1.21-6.debian.diff
Patch1: groff-1.20.1-destbufferoverflow.patch
Patch2: groff-1.20.1-nroff-empty-LANGUAGE.patch
Patch3: groff-1.21-groffer-libexecdir.patch
Patch4: groff-1.20.1-deunicode.patch
Patch5: groff-1.21-CVE-2009-5044.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: BSD-3-Clause ; GPL-2.0+
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.
%prep
%setup -q -n groff-%{version}
%patch0 -p1 -b .debian
%patch1 -p0 -b .destbufferoverflow
%patch2 -p1 -b .bnc540600
%patch3 -p1 -b .groffer-libexecdir
%patch4 -p1 -b .deunicode
%patch5 -p1 -b .CVE-2009-5044
%build
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
%doc src/devices/xditview/README
%doc src/devices/xditview/TODO
%doc
%{_bindir}/%{name}
%doc %{_mandir}/man1/%{name}.1*
%dir %{_datadir}/X11/app-defaults
%config %{_datadir}/X11/app-defaults/GXditview
%files -n groff-devx
%defattr(-,root,root)
%{_datadir}/groff
%changelog