2012-09-07 08:52:46 +02:00
|
|
|
#
|
|
|
|
# spec file for package devscripts
|
|
|
|
#
|
2024-01-17 11:13:46 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2012-09-07 08:52:46 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-03-13 07:41:52 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-09-07 08:52:46 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2024-01-17 11:13:46 +01:00
|
|
|
%define flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
|
2019-03-13 07:41:52 +01:00
|
|
|
%define _xsl_stylesheet %{_datadir}/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl
|
2012-09-07 08:52:46 +02:00
|
|
|
Name: devscripts
|
2022-07-12 22:25:26 +02:00
|
|
|
Version: 2.22.2
|
2012-09-07 08:52:46 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Scripts to make the life of a Debian Package maintainer easier
|
2022-07-12 21:20:50 +02:00
|
|
|
License: (Artistic-1.0 OR GPL-1.0-or-later) AND Artistic-2.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND GPL-3.0-only AND SUSE-Public-Domain AND ISC
|
2012-09-07 08:52:46 +02:00
|
|
|
Group: Development/Tools/Building
|
2019-03-13 07:41:52 +01:00
|
|
|
URL: https://salsa.debian.org/debian/devscripts
|
2019-03-28 09:54:22 +01:00
|
|
|
Source: https://salsa.debian.org/debian/devscripts/-/archive/v%{version}/devscripts-v%{version}.tar.bz2
|
2019-03-13 07:41:52 +01:00
|
|
|
# PATCH-FIX-OPENSUSE devscripts-fix-build.patch -- Fix docbook template directories path.
|
|
|
|
Patch0: devscripts-fix-build.patch
|
|
|
|
# PATCH-FIX-OPENSUSE devscripts-fix-python-install-layout.patch -- Remove Debian's --install-layout=deb from setup.py.
|
|
|
|
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
|
2024-01-17 11:13:46 +01:00
|
|
|
%if "%{flavor}" == ""
|
2019-03-13 07:41:52 +01:00
|
|
|
BuildRequires: docbook-xsl-stylesheets
|
|
|
|
BuildRequires: dpkg-devel >= 1.18.19
|
|
|
|
BuildRequires: help2man
|
|
|
|
BuildRequires: libxslt
|
2024-01-17 11:13:46 +01:00
|
|
|
%endif
|
2019-03-13 07:41:52 +01:00
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2024-01-17 11:13:46 +01:00
|
|
|
%if "%{flavor}" == ""
|
|
|
|
BuildRequires: po4a
|
2015-01-12 17:40:03 +01:00
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
2019-03-13 07:41:52 +01:00
|
|
|
BuildRequires: sgmltool
|
|
|
|
BuildRequires: texlive-latex
|
2012-09-07 08:52:46 +02:00
|
|
|
BuildRequires: zlib-devel
|
2024-01-17 11:13:46 +01:00
|
|
|
%endif
|
2013-02-12 18:11:00 +01:00
|
|
|
Requires: checkbashisms >= %{version}
|
2012-09-07 08:52:46 +02:00
|
|
|
Requires: dpkg
|
|
|
|
Requires: html2text
|
2022-07-12 21:20:50 +02:00
|
|
|
Requires: perl-File-HomeDir
|
|
|
|
Requires: perl-IPC-Run
|
|
|
|
Requires: perl-Moo
|
2019-09-03 16:33:15 +02:00
|
|
|
# provides same %_bindir/hardening-check binary
|
|
|
|
Conflicts: hardening-check
|
2012-09-07 08:52:46 +02:00
|
|
|
Provides: deb:%{_bindir}/debchange
|
2019-03-13 07:41:52 +01:00
|
|
|
%{?perl_requires}
|
2012-09-07 08:52:46 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Collection of scripts for working on Debian packages.
|
2019-03-13 07:41:52 +01:00
|
|
|
|
2012-09-07 08:52:46 +02:00
|
|
|
Examples:
|
2019-03-13 07:41:52 +01:00
|
|
|
- bts: A command-line tool for manipulating the Debian Bug
|
|
|
|
Tracking System.
|
|
|
|
- dcontrol: Remotely query package and source control files for
|
|
|
|
all Debian distributions.
|
|
|
|
- debchange/dch: Automagically add entries to debian/changelog
|
|
|
|
files.
|
|
|
|
- debsign, debrsign: Sign a .changes/.dsc pair without needing any
|
|
|
|
of the rest of the package to be present; can sign the pair
|
|
|
|
remotely or fetch the pair from a remote machine for signing.
|
|
|
|
- diff2patches: Extract patches from a .diff.gz file placing them
|
|
|
|
under debian/ or, if present, debian/patches.
|
|
|
|
- licensecheck: Attempt to determine the license of source files.
|
|
|
|
- uscan: Scan upstream sites for new releases of packages.
|
2012-09-07 08:52:46 +02:00
|
|
|
|
2024-01-17 11:13:46 +01:00
|
|
|
%if "%{flavor}" == "checkbashisms"
|
2013-02-12 18:11:00 +01:00
|
|
|
%package -n checkbashisms
|
2019-03-13 07:41:52 +01:00
|
|
|
Summary: Tool for checking /bin/sh scripts for possible bashisms
|
|
|
|
License: GPL-2.0-or-later
|
2013-02-12 18:11:00 +01:00
|
|
|
Group: Development/Tools/Building
|
2019-03-13 07:41:52 +01:00
|
|
|
Provides: deb:%{_bindir}/checkbashisms
|
|
|
|
Provides: devscripts:%{_bindir}/checkbashisms
|
2013-02-12 18:11:00 +01:00
|
|
|
BuildArch: noarch
|
2019-03-13 07:41:52 +01:00
|
|
|
%{?perl_requires}
|
2013-02-12 18:11:00 +01:00
|
|
|
|
|
|
|
%description -n checkbashisms
|
2019-03-13 07:41:52 +01:00
|
|
|
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
|
2024-01-17 11:13:46 +01:00
|
|
|
bashisms are detected.*
|
|
|
|
%endif
|
2013-02-12 18:11:00 +01:00
|
|
|
|
2012-09-07 08:52:46 +02:00
|
|
|
%prep
|
2019-03-28 09:54:22 +01:00
|
|
|
%setup -q -n devscripts-v%{version}
|
2012-09-07 08:52:46 +02:00
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
2019-03-13 07:41:52 +01:00
|
|
|
%patch2 -p1
|
2012-09-07 08:52:46 +02:00
|
|
|
|
2024-01-17 11:13:46 +01:00
|
|
|
%if "%{flavor}" == "foo"
|
|
|
|
echo %{version} > version
|
|
|
|
%endif
|
|
|
|
|
2012-09-07 08:52:46 +02:00
|
|
|
%build
|
2024-01-17 11:13:46 +01:00
|
|
|
%if "%{flavor}" == ""
|
2019-03-13 07:41:52 +01:00
|
|
|
make %{?_smp_mflags} V=1 \
|
|
|
|
XSL_STYLESHEET="%{_xsl_stylesheet}"
|
2024-01-17 11:13:46 +01:00
|
|
|
%endif
|
2012-09-07 08:52:46 +02:00
|
|
|
|
|
|
|
%install
|
2024-01-17 11:13:46 +01:00
|
|
|
%if "%{flavor}" == ""
|
2019-03-13 07:41:52 +01:00
|
|
|
%make_install \
|
|
|
|
XSL_STYLESHEET="%{_xsl_stylesheet}"
|
2024-01-17 11:13:46 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "checkbashisms"
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
sed -e "s/###VERSION###/%{version}/" scripts/checkbashisms.pl > %{buildroot}%{_bindir}/checkbashisms
|
|
|
|
install -D -m755 scripts/checkbashisms.bash_completion %{buildroot}%{_datadir}/bash-completion/completions/checkbashisms
|
|
|
|
%endif
|
2019-03-13 07:41:52 +01:00
|
|
|
|
2019-09-03 16:33:15 +02:00
|
|
|
# remove completion that was provided in older bash completion
|
|
|
|
%if 0%{?suse_version} <= 1500
|
|
|
|
rm %{buildroot}%{_datadir}/bash-completion/completions/bts
|
|
|
|
%endif
|
|
|
|
|
2019-03-13 07:41:52 +01:00
|
|
|
mkdir -p %{buildroot}%{_mandir}/man1/
|
2024-01-17 11:13:46 +01:00
|
|
|
%if "%{flavor}" == ""
|
2019-03-13 07:41:52 +01:00
|
|
|
install -Dpm 0644 scripts/*.1 -t %{buildroot}%{_mandir}/man1/
|
2024-01-17 11:13:46 +01:00
|
|
|
%endif
|
|
|
|
%if "%{flavor}" == "checkbashisms"
|
|
|
|
install -Dpm 0644 scripts/checkbashisms.1 -t %{buildroot}%{_mandir}/man1/
|
|
|
|
%endif
|
2012-09-07 08:52:46 +02:00
|
|
|
|
2024-01-17 11:13:46 +01:00
|
|
|
%if "%{flavor}" == ""
|
2012-09-07 08:52:46 +02:00
|
|
|
while read target link; do
|
2019-03-13 07:41:52 +01:00
|
|
|
if [ -d $(dirname "%{buildroot}$link") ]; then
|
|
|
|
ln -sf "$target" "%{buildroot}$link"
|
|
|
|
fi
|
|
|
|
done < debian/links
|
2024-01-17 11:13:46 +01:00
|
|
|
%endif
|
2019-03-13 07:41:52 +01:00
|
|
|
|
|
|
|
# Fix documentation.
|
2024-01-17 11:13:46 +01:00
|
|
|
%if "%{flavor}" == ""
|
2019-03-13 07:41:52 +01:00
|
|
|
mkdir -p %{buildroot}%{_docdir}/
|
|
|
|
if [ "%{_datadir}/doc" != "%{_docdir}" ]; then
|
|
|
|
mv %{buildroot}%{_datadir}/doc/devscripts %{buildroot}%{_docdir}/
|
2012-09-07 08:52:46 +02:00
|
|
|
fi
|
2019-03-13 07:41:52 +01:00
|
|
|
install -Dpm 0644 debian/changelog %{buildroot}%{_docdir}/devscripts/changelog
|
2024-01-17 11:13:46 +01:00
|
|
|
%endif
|
2012-09-07 08:52:46 +02:00
|
|
|
|
|
|
|
%files
|
2024-01-17 11:13:46 +01:00
|
|
|
%if "%{flavor}" == ""
|
2019-03-13 07:41:52 +01:00
|
|
|
%license debian/copyright COPYING
|
|
|
|
%doc %{_docdir}/devscripts/
|
2012-09-07 08:52:46 +02:00
|
|
|
%{_bindir}/*
|
2013-02-12 18:11:00 +01:00
|
|
|
%exclude %{_bindir}/checkbashisms
|
2019-03-13 07:41:52 +01:00
|
|
|
%{_datadir}/devscripts/
|
|
|
|
%{python3_sitelib}/devscripts/
|
|
|
|
%{python3_sitelib}/devscripts-*
|
|
|
|
%{perl_vendorlib}/Devscripts/
|
|
|
|
%{_datadir}/bash-completion/completions/*
|
|
|
|
%exclude %{_datadir}/bash-completion/completions/checkbashisms
|
|
|
|
%{_mandir}/man?/*.?%{?ext_man}
|
|
|
|
%exclude %{_mandir}/man1/checkbashisms.1%{?ext_man}
|
2024-01-17 11:13:46 +01:00
|
|
|
%endif
|
2013-02-12 18:11:00 +01:00
|
|
|
|
2024-01-17 11:13:46 +01:00
|
|
|
%if "%{flavor}" == "checkbashisms"
|
2013-02-12 18:11:00 +01:00
|
|
|
%files -n checkbashisms
|
2019-03-13 07:41:52 +01:00
|
|
|
%license debian/copyright COPYING
|
2013-02-12 18:11:00 +01:00
|
|
|
%{_bindir}/checkbashisms
|
2019-03-13 07:41:52 +01:00
|
|
|
%{_datadir}/bash-completion/completions/checkbashisms
|
|
|
|
%{_mandir}/man1/checkbashisms.1%{?ext_man}
|
2024-01-17 11:13:46 +01:00
|
|
|
%endif
|
2012-09-07 08:52:46 +02:00
|
|
|
|
|
|
|
%changelog
|