|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
|
#
|
|
|
|
|
# spec file for package devscripts
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2022 SUSE LLC
|
|
|
|
|
# Copyright (c) 2024 SUSE LLC
|
|
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
@@ -16,8 +16,13 @@
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%define flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
|
%if "%{flavor}" == "checkbashisms"
|
|
|
|
|
%define name_suffix -checkbashisms
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%define _xsl_stylesheet %{_datadir}/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl
|
|
|
|
|
Name: devscripts
|
|
|
|
|
Name: devscripts%{?name_suffix}
|
|
|
|
|
Version: 2.22.2
|
|
|
|
|
Release: 0
|
|
|
|
|
Summary: Scripts to make the life of a Debian Package maintainer easier
|
|
|
|
@@ -32,17 +37,22 @@ Patch1: devscripts-fix-python-install-layout.patch
|
|
|
|
|
# PATCH-FEATURE-OPENSUSE devscripts-debcommit-hg16.patch -- Mercurial cannot commit empty, fix it.
|
|
|
|
|
Patch2: devscripts-debcommit-hg16.patch
|
|
|
|
|
BuildRequires: bash-completion-devel
|
|
|
|
|
%if "%{flavor}" == ""
|
|
|
|
|
BuildRequires: docbook-xsl-stylesheets
|
|
|
|
|
BuildRequires: dpkg-devel >= 1.18.19
|
|
|
|
|
BuildRequires: help2man
|
|
|
|
|
BuildRequires: libxslt
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: perl
|
|
|
|
|
BuildRequires: perl-macros
|
|
|
|
|
%if "%{flavor}" == ""
|
|
|
|
|
BuildRequires: po4a
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: sgmltool
|
|
|
|
|
BuildRequires: texlive-latex
|
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
|
%endif
|
|
|
|
|
Requires: checkbashisms >= %{version}
|
|
|
|
|
Requires: dpkg
|
|
|
|
|
Requires: html2text
|
|
|
|
@@ -72,6 +82,7 @@ Examples:
|
|
|
|
|
- licensecheck: Attempt to determine the license of source files.
|
|
|
|
|
- uscan: Scan upstream sites for new releases of packages.
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "checkbashisms"
|
|
|
|
|
%package -n checkbashisms
|
|
|
|
|
Summary: Tool for checking /bin/sh scripts for possible bashisms
|
|
|
|
|
License: GPL-2.0-or-later
|
|
|
|
@@ -85,21 +96,35 @@ BuildArch: noarch
|
|
|
|
|
checkbashisms performs basic checks on /bin/sh shell scripts for
|
|
|
|
|
the possible presence of bashisms. It takes the names of the shell
|
|
|
|
|
scripts on the command line, and outputs warnings if possible
|
|
|
|
|
bashisms are detected.
|
|
|
|
|
bashisms are detected.*
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n devscripts-v%{version}
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
%autosetup -p1 -n devscripts-v%{version}
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "foo"
|
|
|
|
|
echo %{version} > version
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%if "%{flavor}" == ""
|
|
|
|
|
make %{?_smp_mflags} V=1 \
|
|
|
|
|
XSL_STYLESHEET="%{_xsl_stylesheet}"
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%if "%{flavor}" == ""
|
|
|
|
|
%make_install \
|
|
|
|
|
XSL_STYLESHEET="%{_xsl_stylesheet}"
|
|
|
|
|
%python3_fix_shebang
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "checkbashisms"
|
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
|
sed -e "s/###VERSION###/%{version}/" scripts/checkbashisms.pl > %{buildroot}%{_bindir}/checkbashisms
|
|
|
|
|
chmod a+x %{buildroot}%{_bindir}/checkbashisms
|
|
|
|
|
install -D -m755 scripts/checkbashisms.bash_completion %{buildroot}%{_datadir}/bash-completion/completions/checkbashisms
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# remove completion that was provided in older bash completion
|
|
|
|
|
%if 0%{?suse_version} <= 1500
|
|
|
|
@@ -107,21 +132,31 @@ rm %{buildroot}%{_datadir}/bash-completion/completions/bts
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/man1/
|
|
|
|
|
%if "%{flavor}" == ""
|
|
|
|
|
install -Dpm 0644 scripts/*.1 -t %{buildroot}%{_mandir}/man1/
|
|
|
|
|
%endif
|
|
|
|
|
%if "%{flavor}" == "checkbashisms"
|
|
|
|
|
install -Dpm 0644 scripts/checkbashisms.1 -t %{buildroot}%{_mandir}/man1/
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == ""
|
|
|
|
|
while read target link; do
|
|
|
|
|
if [ -d $(dirname "%{buildroot}$link") ]; then
|
|
|
|
|
ln -sf "$target" "%{buildroot}$link"
|
|
|
|
|
fi
|
|
|
|
|
done < debian/links
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Fix documentation.
|
|
|
|
|
%if "%{flavor}" == ""
|
|
|
|
|
mkdir -p %{buildroot}%{_docdir}/
|
|
|
|
|
if [ "%{_datadir}/doc" != "%{_docdir}" ]; then
|
|
|
|
|
mv %{buildroot}%{_datadir}/doc/devscripts %{buildroot}%{_docdir}/
|
|
|
|
|
fi
|
|
|
|
|
install -Dpm 0644 debian/changelog %{buildroot}%{_docdir}/devscripts/changelog
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == ""
|
|
|
|
|
%files
|
|
|
|
|
%license debian/copyright COPYING
|
|
|
|
|
%doc %{_docdir}/devscripts/
|
|
|
|
@@ -135,11 +170,14 @@ install -Dpm 0644 debian/changelog %{buildroot}%{_docdir}/devscripts/changelog
|
|
|
|
|
%exclude %{_datadir}/bash-completion/completions/checkbashisms
|
|
|
|
|
%{_mandir}/man?/*.?%{?ext_man}
|
|
|
|
|
%exclude %{_mandir}/man1/checkbashisms.1%{?ext_man}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "checkbashisms"
|
|
|
|
|
%files -n checkbashisms
|
|
|
|
|
%license debian/copyright COPYING
|
|
|
|
|
%{_bindir}/checkbashisms
|
|
|
|
|
%{_datadir}/bash-completion/completions/checkbashisms
|
|
|
|
|
%{_mandir}/man1/checkbashisms.1%{?ext_man}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|