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

185 lines
5.8 KiB
RPMSpec

#
# spec file for package quilt
#
# Copyright (c) 2015 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: quilt
Version: 0.63
Release: 0
Summary: A Tool for Working with Many Patches
License: GPL-2.0+
Group: Productivity/Text/Utilities
BuildRequires: diffstat
BuildRequires: ed
BuildRequires: emacs-nox
BuildRequires: procmail
Requires: coreutils
Requires: diffstat
Requires: diffutils
Requires: file
Requires: findutils
Requires: gzip
Requires: less
Requires: mktemp
Requires: patch
Requires: perl
Url: http://savannah.nongnu.org/projects/quilt
Source: %{name}-%{version}.tar.bz2
Source1: suse-start-quilt-mode.el
Patch1: expand.diff
Patch2: quilt-support-vimdiff.patch
Patch3: patch-wrapper-rpm.diff
Patch4: suse-workaround-pseudo-release.patch
Patch5: setup-skip-version-check.patch
Patch6: setup-check-for-rpmbuild.patch
Patch7: setup-fix-tar-with-long-options.patch
Patch8: quilt-format-options-pass-through.patch
Patch9: pop-add-auto-refresh.patch
Patch10: push-add-auto-refresh.patch
Patch11: inspect-skip-version-check.patch
Patch12: quilt-check-modified-series.patch
Patch13: quilt-check-modified-series-rearm.patch
Patch14: quilt-el-fix-tramp-support.patch
Patch15: quilt-el-fix-patch-select-completion.patch
Patch16: dont-substitute-release.patch
Patch61: hackweek-11-01-comment-update.patch
Patch62: hackweek-11-02-cleanups.patch
Patch63: hackweek-11-03-inspect-list-all-options.patch
Patch64: hackweek-11-04-pass-through.patch
Patch65: hackweek-11-05-no-explicit-rm.patch
Patch66: hackweek-11-06-exclude-from-md5sums.patch
Patch67: hackweek-11-07-normalize-path.patch
Patch68: hackweek-11-08-inspect-split-wrapper-script.patch
Patch69: hackweek-11-09-inspect-temporary-data-file.patch
Patch70: hackweek-11-10-setup-fix-path-to-extra-patches.patch
Patch71: hackweek-11-11-setup-trace-call-first.patch
Patch72: hackweek-11-12-setup-alternative-implementation-v2.patch
Patch73: hackweek-11-13-setup-let-normalize_path-deal-with-dot.patch
Patch74: hackweek-11-14-setup-fix-link-creation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%if 0%{?suse_version}
Recommends: procmail
Recommends: bzip2
Recommends: /usr/bin/rpmbuild
%endif
%if 0%{?suse_version} > 1120
Recommends: xz
%endif
%description
Quilt allows you to easily manage large numbers of patches by keeping
track of the changes each patch makes. Patches can be applied,
un-applied, refreshed, and more.
Quilt originally was based on Andrew Morton's patch scripts found at
http://www.zip.com.au/~akpm/linux/patches/.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%patch65 -p1
%patch66 -p1
%patch67 -p1
%patch68 -p1
%patch69 -p1
%patch70 -p1
%patch71 -p1
%patch72 -p1
%patch73 -p1
%patch74 -p1
%build
# --with-rpmbuild=/usr/lib/rpm/rpmb:
#
# SUSE Autobuild uses a version of /usr/bin/rpmbuild that sources
# /etc/profile to reset the PATH. We must not do that: the
# inspect script needs to pass an additional path component to
# rpmbuild for the tar and patch wrappers.
CFLAGS="%{optflags}" \
./configure --prefix=/usr \
--mandir=%{_mandir} \
--docdir=%{_docdir}/%{name}%{!?suse_version:-%{version}} \
--with-sendmail=/usr/sbin/sendmail \
--with-diffstat=/usr/bin/diffstat \
--with-patch-wrapper \
--with-patch=/usr/bin/patch \
--with-rpmbuild=/usr/lib/rpm/rpmb
make %{?_smp_mflags}
# Compile quilt.el for faster emacs startup (bnc#617673)
pushd lib
emacs -batch -q --no-site -f batch-byte-compile quilt.el
popd
%check
make check
%install
# /usr/share/quilt/compat/mta will be a stale symlink: we don't want to add
# sendmail to neededforbuild just because of this.
export NO_BRP_STALE_LINK_ERROR=yes
make install BUILD_ROOT=%{buildroot}
install -m 644 lib/quilt.elc \
%{buildroot}%{_datadir}/emacs/site-lisp/
mv %{buildroot}%{_sysconfdir}/bash_completion.d/quilt{,.sh}
# We only needed the /usr/bin/patch compatibility symlink for the
# test suite.
[ %{buildroot}%{_datadir}/quilt/compat/patch -ef /usr/bin/patch ] \
&& rm -f %{buildroot}%{_datadir}/quilt/compat/patch
[ %{buildroot}%{_datadir}/quilt/compat/awk -ef /usr/bin/awk ] \
&& rm -f %{buildroot}%{_datadir}/quilt/compat/awk
%{find_lang} %{name}
# Make "vi" an alias for the edit command
ln -s edit %{buildroot}%{_datadir}/quilt/vi
# Autoload quilt-mode in the SuSE emacs package
install -m 644 %_sourcedir/suse-start-quilt-mode.el \
%{buildroot}%{_datadir}/emacs/site-lisp/
%files -f %{name}.lang
%defattr(-, root, root)
%{_bindir}/guards
%{_bindir}/quilt
%{_datadir}/quilt/
%{_datadir}/emacs/
%config %{_sysconfdir}/quilt.quiltrc
%config %{_sysconfdir}/bash_completion.d/quilt.sh
%doc %{_mandir}/man1/guards.1.gz
%doc %{_mandir}/man1/quilt.1.gz
%doc doc/README
%doc doc/README.MAIL
%doc doc/quilt.pdf
%changelog