SHA256
1
0
forked from pool/indent
indent/indent.spec

86 lines
2.4 KiB
RPMSpec

#
# spec file for package indent
#
# Copyright (c) 2012 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: indent
BuildRequires: texinfo
Version: 2.2.10
Release: 0
Source: %{name}-%{version}.tar.bz2
Patch0: %{name}-%{version}-nothing_is_void.diff
Patch1: %{name}-%{version}-warnings.diff
Patch2: %{name}-%{version}-lcall.diff
Patch3: %{name}-%{version}-cdw.diff
Patch4: %{name}-%{version}-man.diff
Url: http://www.gnu.org/software/indent
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Indent Formats C Source Code
License: GPL-3.0+
Group: Development/Languages/C and C++
PreReq: %install_info_prereq
%description
indent can be used to make code easier to read. It can also convert
from one style of writing C code to another. indent understands a
substantial amount of C syntax, but it also tries to cope with
incomplete and malformed syntax.
%prep
%setup -q
%patch0 -p1
%patch1
%patch2
%patch3 -p1
%patch4
%build
%configure --with-pic
# Parallel make doesn't work
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
# indent.html is installed with %doc below
rm -f $RPM_BUILD_ROOT/usr/doc/indent/indent.html $RPM_BUILD_ROOT%{_bindir}/texinfo2man $RPM_BUILD_ROOT/%{_infodir}/dir
mv $RPM_BUILD_ROOT%{_datadir}/locale/zh_TW.Big5 $RPM_BUILD_ROOT%{_datadir}/locale/zh_TW
%find_lang %{name}
%check
echo =============== TEST BEGIN ===============
make -C regression
echo =============== TEST END ===============
%clean
rm -rf $RPM_BUILD_ROOT
%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%files -f %{name}.lang
%defattr(-, root, root)
%{_bindir}/*
%doc doc/indent.html
%{_infodir}/indent.info*.gz
%{_mandir}/man1/indent.1.gz
%changelog