- cleaned .spec file

This commit is contained in:
Peter Schiffer 2013-02-12 15:41:50 +01:00
parent 0de3911ebd
commit e9d343f9e9

View File

@ -6,23 +6,20 @@ Version: 1.22.2
Release: 1%{?dist} Release: 1%{?dist}
License: GPLv3+ and GFDL and BSD and MIT License: GPLv3+ and GFDL and BSD and MIT
Group: Applications/Publishing Group: Applications/Publishing
URL: http://groff.ffii.org URL: http://www.gnu.org/software/groff/
Source0: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz Source: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz
Patch1: 0001-missing-groff-x11-info-message-when-gxditview-not-fo.patch # resolves: #530788
Patch2: 0002-load-site-font-and-site-tmac-from-etc-groff.patch Patch0: 0001-missing-groff-x11-info-message-when-gxditview-not-fo.patch
Patch3: 0003-various-security-fixes.patch Patch1: 0002-load-site-font-and-site-tmac-from-etc-groff.patch
# resolves: #709413, #720058, #720057
Patch2: 0003-various-security-fixes.patch
Requires: coreutils Requires: coreutils, /sbin/install-info, groff-base = %{version}-%{release}
Requires: /sbin/install-info
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Provides: nroff-i18n = %{version}-%{release}
BuildRequires: git
BuildRequires: netpbm-progs psutils ghostscript
# when building from CVS add: BuildRequires: texinfo byacc
Requires: groff-base = %{version}-%{release}
Requires(post): info Requires(post): info
Requires(preun): info Requires(preun): info
BuildRequires: git, netpbm-progs, psutils, ghostscript
Provides: nroff-i18n = %{version}-%{release}
%description %description
Groff is a document formatting system. Groff takes standard text and Groff is a document formatting system. Groff takes standard text and
@ -63,8 +60,8 @@ roff2html roff2pdf roff2ps roff2text roff2x (roff code converters).
%package x11 %package x11
Summary: Parts of the groff formatting system that require X Windows System Summary: Parts of the groff formatting system that require X Windows System
Group: Applications/Publishing Group: Applications/Publishing
BuildRequires: libXaw-devel libXmu-devel
Requires: groff-base = %{version}-%{release} Requires: groff-base = %{version}-%{release}
BuildRequires: libXaw-devel, libXmu-devel
Provides: groff-gxditview = %{version}-%{release} Provides: groff-gxditview = %{version}-%{release}
Obsoletes: groff-gxditview < 1.20.1 Obsoletes: groff-gxditview < 1.20.1
@ -98,77 +95,60 @@ git commit -n -m "release %{version}"
git am %{patches} git am %{patches}
for file in NEWS src/devices/grolbp/grolbp.man doc/{groff.info*,webpage.ms} \ for file in NEWS src/devices/grolbp/grolbp.man doc/{groff.info*,webpage.ms} \
contrib/mm/*.man contrib/mom/examples/{README.txt,*.mom,mom.vim} ; do contrib/mm/*.man contrib/mom/examples/{README.txt,*.mom,mom.vim}; do
iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_" iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_"
mv "${file}_" "$file" mv "${file}_" "$file"
done done
%build %build
%configure \ %configure \
--docdir=%{_docdir}/%{name}-%{version} \ --docdir=%{_docdir}/%{name}-%{version} \
--with-appresdir=%{_datadir}/X11/app-defaults \ --with-appresdir=%{_datadir}/X11/app-defaults \
--with-grofferdir=%{_datadir}/%{name}/%{version}/groffer --with-grofferdir=%{_datadir}/%{name}/%{version}/groffer
make make %{?_smp_mflags}
%install %install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} make install DESTDIR=%{buildroot}
# some binaries need alias with 'g' or 'z' prefix # some binaries need alias with 'g' or 'z' prefix
for file in g{nroff,troff,tbl,pic,eqn,neqn,refer,lookbib,indxbib,soelim} zsoelim; do for file in g{nroff,troff,tbl,pic,eqn,neqn,refer,lookbib,indxbib,soelim} zsoelim; do
ln -s ${file#?} %{buildroot}%{_bindir}/${file} ln -s ${file#?} %{buildroot}%{_bindir}/${file}
ln -s ${file#?}.1.gz %{buildroot}%{_mandir}/man1/${file}.1.gz ln -s ${file#?}.1.gz %{buildroot}%{_mandir}/man1/${file}.1.gz
done done
# fix absolute symlink to relative symlink # fix absolute symlink to relative symlink
rm -f %{buildroot}%{_docdir}/%{name}-%{version}/pdf/mom-pdf.pdf rm -f %{buildroot}%{_docdir}/%{name}-%{version}/pdf/mom-pdf.pdf
ln -s ../examples/mom/mom-pdf.pdf %{buildroot}%{_docdir}/%{name}-%{version}/pdf/mom-pdf.pdf ln -s ../examples/mom/mom-pdf.pdf %{buildroot}%{_docdir}/%{name}-%{version}/pdf/mom-pdf.pdf
# another documentation files # rename groff downloadable postscript fonts to meet Fedora Font Packaging guidelines,
# as these files are more PS instructions, than general-purpose fonts (bz #477394)
cp BUG-REPORT COPYING FDL LICENSES MORE.STUFF NEWS PROBLEMS %{buildroot}%{_docdir}/%{name}-%{version}
# rename groff downloadable postscript fonts to meet Fedora Font Packaging guidelines, as these files
# are more PS instructions, than general-purpose fonts (bz #477394)
for file in $(find %{buildroot}%{_datadir}/%{name}/%{version}/font/devps -name "*.pfa"); do for file in $(find %{buildroot}%{_datadir}/%{name}/%{version}/font/devps -name "*.pfa"); do
mv ${file} ${file}_ mv ${file} ${file}_
done done
sed --in-place 's/\.pfa$/.pfa_/' %{buildroot}%{_datadir}/%{name}/%{version}/font/devps/download sed --in-place 's/\.pfa$/.pfa_/' %{buildroot}%{_datadir}/%{name}/%{version}/font/devps/download
# remove unnecessary files # remove unnecessary files
rm -f %{buildroot}%{_infodir}/dir rm -f %{buildroot}%{_infodir}/dir
# fix privileges # fix privileges
chmod 755 %{buildroot}%{_datadir}/groff/%{version}/groffer/version.sh chmod 755 %{buildroot}%{_datadir}/groff/%{version}/groffer/version.sh
chmod 755 %{buildroot}%{_datadir}/groff/%{version}/font/devlj4/generate/special.awk chmod 755 %{buildroot}%{_datadir}/groff/%{version}/font/devlj4/generate/special.awk
# remove CreationDate from documentation # remove CreationDate from documentation
pushd %{buildroot}%{_docdir}/%{name}-%{version} pushd %{buildroot}%{_docdir}/%{name}-%{version}
find -name "*.html" | xargs sed -i "/^<!-- CreationDate: /d" find -name "*.html" | xargs sed -i "/^<!-- CreationDate: /d"
find -name "*.ps" | xargs sed -i "/^%%%%CreationDate: /d" find -name "*.ps" | xargs sed -i "/^%%%%CreationDate: /d"
popd popd
%clean
rm -rf %{buildroot}
%post %post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
%preun %preun
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi fi
%files %files
%defattr(-,root,root,-)
# data # data
%{_datadir}/%{name}/%{version}/font/devdvi/ %{_datadir}/%{name}/%{version}/font/devdvi/
%{_datadir}/%{name}/%{version}/font/devhtml/ %{_datadir}/%{name}/%{version}/font/devhtml/
@ -255,15 +235,7 @@ fi
%{_infodir}/groff.info* %{_infodir}/groff.info*
%files base %files base
%defattr(-,root,root,-) %doc BUG-REPORT COPYING FDL LICENSES MORE.STUFF NEWS PROBLEMS
%dir %{_docdir}/%{name}-%{version}/
%doc %{_docdir}/%{name}-%{version}/BUG-REPORT
%doc %{_docdir}/%{name}-%{version}/COPYING
%doc %{_docdir}/%{name}-%{version}/FDL
%doc %{_docdir}/%{name}-%{version}/LICENSES
%doc %{_docdir}/%{name}-%{version}/MORE.STUFF
%doc %{_docdir}/%{name}-%{version}/NEWS
%doc %{_docdir}/%{name}-%{version}/PROBLEMS
# configuration # configuration
%dir %{_sysconfdir}/groff/ %dir %{_sysconfdir}/groff/
%config(noreplace) %{_sysconfdir}/groff/* %config(noreplace) %{_sysconfdir}/groff/*
@ -369,7 +341,6 @@ fi
%{_mandir}/man1/zsoelim.* %{_mandir}/man1/zsoelim.*
%files perl %files perl
%defattr(-,root,root,-)
# data # data
%{_datadir}/%{name}/%{version}/font/devpdf/ %{_datadir}/%{name}/%{version}/font/devpdf/
%{_datadir}/%{name}/%{version}/groffer/ %{_datadir}/%{name}/%{version}/groffer/
@ -404,7 +375,6 @@ fi
%if %{with_x} %if %{with_x}
%files x11 %files x11
%defattr(-,root,root,-)
# data # data
%{_datadir}/%{name}/%{version}/font/devX*/ %{_datadir}/%{name}/%{version}/font/devX*/
%{_datadir}/%{name}/%{version}/tmac/X.tmac %{_datadir}/%{name}/%{version}/tmac/X.tmac
@ -419,7 +389,6 @@ fi
%endif %endif
%files doc %files doc
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-%{version}/*.me %doc %{_docdir}/%{name}-%{version}/*.me
%doc %{_docdir}/%{name}-%{version}/*.ps %doc %{_docdir}/%{name}-%{version}/*.ps
%doc %{_docdir}/%{name}-%{version}/*.ms %doc %{_docdir}/%{name}-%{version}/*.ms
@ -431,6 +400,7 @@ fi
* Tue Feb 12 2013 Peter Schiffer <pschiffe@redhat.com> 1.22.2-1 * Tue Feb 12 2013 Peter Schiffer <pschiffe@redhat.com> 1.22.2-1
- resolves: #909154 - resolves: #909154
updated to 1.22.2 updated to 1.22.2
- cleaned .spec file
* Tue Jan 01 2013 Jan Vcelak <jvcelak@redhat.com> 1.22.1-1 * Tue Jan 01 2013 Jan Vcelak <jvcelak@redhat.com> 1.22.1-1
- new upstream release (#890973) - new upstream release (#890973)