diff --git a/debhelper.spec b/debhelper.spec new file mode 100644 index 0000000..3349640 --- /dev/null +++ b/debhelper.spec @@ -0,0 +1,172 @@ +%global __provides_exclude_from ^%{_docdir}/.*$ +%global __requires_exclude_from ^%{_docdir}/.*$ + +%bcond_without tests + +Name: debhelper +Version: 13.11.9 +Release: 1 +Summary: Helper programs for debian/rules + +License: GPL-2.0-or-later +URL: https://tracker.debian.org/pkg/debhelper +Source0: http://ftp.debian.org/debian/pool/main/d/%{name}/%{name}_%{version}.tar.xz +Patch2: no_layout_deb.patch +BuildArch: noarch + +BuildRequires: gcc +BuildRequires: bash +BuildRequires: coreutils +BuildRequires: man-db +BuildRequires: fakeroot +BuildRequires: dpkg-dev >= 1.18.0 +BuildRequires: findutils +BuildRequires: grep +BuildRequires: make +# https://lists.debian.org/debian-devel/2021/05/msg00141.html +BuildRequires: perl(:VERSION) >= 5.28 +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl-podlators +BuildRequires: perl(Config) +BuildRequires: perl(File::Find) +BuildRequires: perl(strict) +BuildRequires: po4a +BuildRequires: sed +# Run-time: +# PerlIO::gzip || gzip +BuildRequires: gzip +# Carp not used at tests +BuildRequires: perl(constant) +BuildRequires: perl(Cwd) +# Digest::SHA not used at tests +BuildRequires: perl(Dpkg::Arch) +# Dpkg::BuildProfiles not used at tests +# Dpkg::Changelog::Parse not used at tests +# Dpkg::Deps not used at tests +BuildRequires: perl(Errno) +BuildRequires: perl(Exporter) +BuildRequires: perl(feature) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Glob) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::stat) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(parent) +BuildRequires: perl(utf8) +BuildRequires: perl(warnings) +# Optional run-time: +BuildRequires: perl(Dpkg::BuildFlags) +BuildRequires: perl(Dpkg::Changelog::Debian) +# Tests: +BuildRequires: perl(autodie) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Temp) +BuildRequires: perl(IPC::Open2) +BuildRequires: perl(JSON::PP) +BuildRequires: perl(lib) +BuildRequires: perl(Test::Harness) +BuildRequires: perl(Test::More) +# Optional tests: +BuildRequires: perl(Test::Pod) + +Requires: binutils +Requires: dh-autoreconf >= 17 +Requires: dpkg >= 1.18.0 +Requires: dpkg-dev >= 1.18.2 +Requires: dpkg-perl >= 1.17.14 +# PerlIO::gzip || gzip +Requires: gzip +Requires: perl(Carp) +Requires: perl(Digest::SHA) +Requires: perl(Dpkg::Arch) +Requires: perl(Dpkg::BuildProfiles) +Suggests: perl(Dpkg::BuildFlags) +Suggests: perl(Dpkg::Changelog::Debian) +Requires: perl(Dpkg::Changelog::Parse) +Requires: perl(Dpkg::Deps) +Requires: perl(File::Copy) +Requires: perl(File::Path) +Requires: po-debconf +#Suggests: dh-make +#Provides: dh-sequence-dwz, +# dh-sequence-installinitramfs, +# dh-sequence-systemd, +#Provides: dh-systemd +#Depends: autotools-dev, +# dh-strip-nondeterminism (>= 0.028~), +# dwz, +# file (>= 3.23), +# man-db, +# ${misc:Depends}, +# ${perl:Depends} +# cmake (<< 3.9~), +# meson (<< 0.40.0~), + +%description +A collection of programs that can be used in a debian/rules file to +automate common tasks related to building Debian packages. Programs +are included to install various files into your package, compress +files, fix file permissions, integrate your package with the Debian +menu system, debconf, doc-base, etc. Most Debian packages use debhelper +as part of their build process. + +%prep +#debug +echo "debug:" +dpkg-architecture -qDEB_BUILD_GNU_TYPE +dpkg-architecture -qDEB_HOST_GNU_TYPE +dpkg --print-architecture +cc -dumpmachine + +#%%setup -q -n %%{name} +#%%setup -q -n work +%autosetup -n %{name} -p1 + +%build +%make_build build + +%install +%make_install + +# Use debhelper to install (man-pages of) debhelper... + +./run dh_installman -P %{buildroot} --verbose -p debhelper + +# Add man-pages to a .lang file: +# We cannot use "find_lang --with-man" because it only handle +# single man-page -- we have many + +rm -f debhelper-mans.lang +for lang in de es fr pt ja; do + for level in 1 7; do + # Append to .lang file + # Replace buildroot with the lang prefix, append '*' (for gzip, etc.) + find %{buildroot}%{_mandir}/$lang/man$level -type f -o -type l | sed " + s:^%{buildroot}:%%lang($lang) : + s:\$:*: + " >> debhelper-mans.lang + done +done + + +%if %{with tests} +%check +make test +%endif + + +%files -f debhelper-mans.lang +%doc examples/ doc/ +%{_mandir}/man1/* +%{_mandir}/man7/* +%{_bindir}/dh* +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/autoscripts +%{perl_vendorlib}/* + +%changelog +* Wed Jan 17 2024 Dongxing Wang - 13.11.9-1 +- Init debhelper diff --git a/debhelper_13.11.9.tar.xz b/debhelper_13.11.9.tar.xz new file mode 100644 index 0000000..e780607 Binary files /dev/null and b/debhelper_13.11.9.tar.xz differ diff --git a/no_layout_deb.patch b/no_layout_deb.patch new file mode 100644 index 0000000..956984a --- /dev/null +++ b/no_layout_deb.patch @@ -0,0 +1,12 @@ +Fedora setuptools don't have option --install-layout=deb +--- ./lib/Debian/Debhelper/Buildsystem/python_distutils.pm.orig 2017-12-02 08:46:03.000000000 +0000 ++++ ./lib/Debian/Debhelper/Buildsystem/python_distutils.pm 2018-01-07 23:43:53.492047778 +0000 +@@ -166,7 +166,7 @@ sub setup_py { + and $python_default =~ /^python2\.[2345]$/) + or $python =~ /^python2\.[2345](?:-dbg)?$/ )) { + $this->doit_in_sourcedir($python, "setup.py", +- $act, @_, "--install-layout=deb"); ++ $act, @_); + } + else { + $this->doit_in_sourcedir($python, "setup.py",