
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 1 |14cr|aquamarine-0.11.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 10
%define libname %mklibname %{name} %{major}
%define devname %mklibname -d %{name}

Name:		aquamarine
Version:	0.11.0
Release:	1
Summary:	A very light linux rendering backend library
License:	BSD-3-Clause
Group:		System/Libraries
URL:		https://github.com/hyprwm/aquamarine
Source0:	%{url}/archive/v%{version}/%{name}-%{version}.tar.gz

ExcludeArch:    %{ix86}

BuildRequires:	cmake
BuildRequires:	egl-devel

BuildRequires:	pkgconfig(gbm)
BuildRequires:	pkgconfig(hwdata)
BuildRequires:	pkgconfig(hyprutils)
BuildRequires:	pkgconfig(hyprwayland-scanner)
BuildRequires:	pkgconfig(libdisplay-info)
BuildRequires:	pkgconfig(libdrm)
BuildRequires:	pkgconfig(libglvnd)
BuildRequires:	pkgconfig(libinput)
BuildRequires:	pkgconfig(libseat)
BuildRequires:	pkgconfig(libudev)
BuildRequires:	pkgconfig(pixman-1)
BuildRequires:	pkgconfig(wayland-client)
BuildRequires:	pkgconfig(wayland-protocols)

%description
%{summary}.

%package        -n %{libname}
Summary:        Library files for %{name}

%description    -n %{libname}
Library files for %{name}.

%package        -n %{devname}
Summary:        Development files for %{name}
Requires:       %{libname} = %{EVRD}

%description    -n %{devname}
Development files for %{name}.

%prep
%autosetup -p1
sed -i 's!-Wpedantic!!g' CMakeLists.txt

%build
%cmake
%make_build

%install
%make_install -C build

%files -n %{libname}
%{_libdir}/lib%{name}.so.%{version}
%{_libdir}/lib%{name}.so.%{major}

%files -n %{devname}
%license LICENSE
%doc README.md
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 2 |14cr|aquamarine-0.15.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 14
%define libname %mklibname %{name} %{major}
%define devname %mklibname -d %{name}

Name:		aquamarine
Version:	0.15.1
Release:	2
Summary:	A very light linux rendering backend library
License:	BSD-3-Clause
Group:		System/Libraries
URL:		https://github.com/hyprwm/aquamarine
Source0:	%{url}/archive/v%{version}/%{name}-%{version}.tar.gz

ExcludeArch:    %{ix86}

BuildRequires:	cmake
BuildRequires:	egl-devel

BuildRequires:	pkgconfig(gbm)
BuildRequires:	pkgconfig(hwdata)
BuildRequires:	pkgconfig(hyprutils)
BuildRequires:	pkgconfig(hyprwayland-scanner)
BuildRequires:	pkgconfig(libdisplay-info)
BuildRequires:	pkgconfig(libdrm)
BuildRequires:	pkgconfig(libglvnd)
BuildRequires:	pkgconfig(libinput)
BuildRequires:	pkgconfig(libseat)
BuildRequires:	pkgconfig(libudev)
BuildRequires:	pkgconfig(pixman-1)
BuildRequires:	pkgconfig(wayland-client)
BuildRequires:	pkgconfig(wayland-protocols)

%description
%{summary}.

%package        -n %{libname}
Summary:        Library files for %{name}

%description    -n %{libname}
Library files for %{name}.

%package        -n %{devname}
Summary:        Development files for %{name}
Requires:       %{libname} = %{EVRD}

%description    -n %{devname}
Development files for %{name}.

%prep
%autosetup -p1
sed -i 's!-Wpedantic!!g' CMakeLists.txt

%build
%cmake
%make_build

%install
%make_install -C build

%files -n %{libname}
%{_libdir}/lib%{name}.so.%{version}
%{_libdir}/lib%{name}.so.%{major}

%files -n %{devname}
%license LICENSE
%doc README.md
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 3 |14cr|bfresh-0.9-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:    Running anaconda installer using a layered rootfs
Name:       bfresh
Version:    0.9
Release:    4
License:    GPLv2+
Group:      System/Base
Url:        https://abf.rosa.ru/barium/bfresh
Source0:    bfresh-install
Source1:    bfresh-install.ui
Source2:    ru.rosalinux.bfresh-install.policy
Source3:    bfresh-install.po
Source4:    %{name}.desktop
Source5:    ovlinst
Source6:    ks.cfg
Source7:    bfresh-oem-setup
Source8:    bfresh_install.svg
Source9:    installers-launcher
Source10:   installers-launcher.desktop
Source11:   installers-launcher.ui
Source12:   bfresh-ddpy

# MOSNTECH
Source20:   %{name}.desktop.mostech
Source21:   installers-launcher.desktop.mostech

# target
Source30:   bfresh.service
Source31:   bfresh.target
Source32:   bfresh_launcher.sh

BuildRequires:  /usr/bin/msgfmt

Requires:   anaconda-core
Requires:   /usr/sbin/sgdisk
Requires:   ddpy

# for gui
Requires:   rosa-update-system-common
Requires:   xdg-utils

%description
Bfresh - Barium Fresh, 
A method to use the Anaconda installer with an OS loaded using UIRD.

%files
%{_sbindir}/ovlinst
%{_sbindir}/bfresh-oem-setup
%{_sbindir}/bfresh-ddpy
%{_bindir}/bfresh-install
%{_bindir}/installers-launcher
%{_datadir}/polkit-1/actions/ru.rosalinux.bfresh-install.policy
%{_datadir}/bfresh/*.ui
%{_datadir}/applications/*.desktop
%{_datadir}/icons/%{name}_install.svg

%{_sysconfdir}/ovlinst/*
%{_localedir}/ru/LC_MESSAGES/bfresh-install.mo

%package mostech
Summary:  %{name} implementation for MOSTECH 
Requires: %{name} == %{EVRD}

%description mostech
Desktop files for MOSTECH.

%files mostech
%{_datadir}/mostech/applications/*.desktop 
%{_datadir}/mos/applications/*.desktop 

%package target
Summary:  Systemd unit and target for %{name} 
Requires: %{name} == %{EVRD}

%description target
Systemd unit and target for %{name},
to run standalone installers-launcher by
systemd.unit=bfresh.target kernel cmdline parameter.

%files target
%{_unitdir}/*
%{_libexecdir}/*.sh

%prep

%build

%install
mkdir -p  %{buildroot}%{_bindir}
mkdir -p  %{buildroot}%{_sbindir}
mkdir -p  %{buildroot}%{_datadir}/{bfresh,applications,icons}
mkdir -p  %{buildroot}%{_datadir}/polkit-1/actions
mkdir -p  %{buildroot}%{_sysconfdir}/ovlinst

install -m 755 %{SOURCE0} %{buildroot}/%{_bindir}/

install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/bfresh/
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/polkit-1/actions/
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/
install -m 755 %{SOURCE5} %{buildroot}%{_sbindir}/ovlinst
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/ovlinst/
install -m 755 %{SOURCE7} %{buildroot}%{_sbindir}/
install -m 644 %{SOURCE8} %{buildroot}%{_datadir}/icons/
install -m 755 %{SOURCE9} %{buildroot}%{_bindir}/
install -m 644 %{SOURCE10} %{buildroot}%{_datadir}/applications/
install -m 644 %{SOURCE11} %{buildroot}%{_datadir}/bfresh/
install -m 755 %{SOURCE12} %{buildroot}%{_sbindir}/

echo -e "#ks_dirs=\n#ks_modules=\n" > %{buildroot}%{_sysconfdir}/ovlinst/kickstart.conf

mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_localedir}/ru/LC_MESSAGES/
msgfmt -v %{SOURCE3} -o %{buildroot}%{_localedir}/ru/LC_MESSAGES/bfresh-install.mo

# MOSTECH
mkdir -p  %{buildroot}%{_datadir}/mostech/applications
mkdir -p  %{buildroot}%{_datadir}/mos/applications
install -m 644 %{SOURCE20} %{buildroot}%{_datadir}/mostech/applications/%{name}.desktop
install -m 644 %{SOURCE21} %{buildroot}%{_datadir}/mostech/applications/installers-launcher.desktop
ln -s %{_datadir}/mostech/applications/%{name}.desktop %{buildroot}%{_datadir}/mos/applications/%{name}.desktop
ln -s %{_datadir}/mostech/applications/installers-launcher.desktop %{buildroot}%{_datadir}/mos/applications/installers-launcher.desktop

# target
mkdir -p %{buildroot}/%{_unitdir}
mkdir -p %{buildroot}/%{_libexecdir}
install -m 644 %{SOURCE30} %{buildroot}%{_unitdir}/
install -m 644 %{SOURCE31} %{buildroot}%{_unitdir}/
install -m 755 %{SOURCE32} %{buildroot}%{_libexecdir}/


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 4 |14cr|budgie-backgrounds-4.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:		budgie-backgrounds
Version:	4.1
Release:	1
Summary:	Default set of background images for the Budgie Desktop
Group:		Graphical desktop/Other
License:	CC0-1.0
URL:		https://github.com/BuddiesOfBudgie/budgie-backgrounds
Source0:	%{url}/releases/download/v%{version}/%{name}-v%{version}.tar.xz

BuildArch:	noarch

BuildRequires:	imagemagick
BuildRequires:	gnupg2
#BuildRequires:	jhead
BuildRequires:	meson

%description
Default set of background images for the Budgie Desktop.

%prep
%autosetup -p1

%build
%meson
%meson_build

%install
%meson_install

%files
%doc README.md
%license LICENSE
%dir %{_datadir}/backgrounds/budgie
%dir %{_datadir}/gnome-background-properties
%{_datadir}/backgrounds/budgie/*.jxl
%{_datadir}/gnome-background-properties/%{name}.xml


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 5 |14cr|budgie-desktop-services-1.0.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           budgie-desktop-services
Version:        1.0.3
Release:        1
Summary:        Central hub and orchestrator for Budgie Desktop
License:        MPLv2.0
Group:          Graphical desktop/Other
URL:            https://forge.moderndesktop.dev/BuddiesOfBudgie/budgie-desktop-services
Source0:        %{url}/archive/%{version}.tar.gz?/%{name}-%{version}.tar.gz

BuildRequires:  qt6-cmake
BuildRequires:  extra-cmake-modules6
BuildRequires:  gcc-c++
BuildRequires:  ninja
BuildRequires:  pkgconfig(Qt6Core)
BuildRequires:  pkgconfig(Qt6DBus)
BuildRequires:  pkgconfig(Qt6WaylandClient)
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  qt6-qtbase-tools
BuildRequires:  lib64kf6wayland-devel
BuildRequires:  qt6-qtwayland-devel
BuildRequires:  toml11-devel

%description
Budgie Desktop Services is the central hub and orchestrator for Budgie
Desktop, with a primary focus on Budgie 11. At present, it provides
Wayland-native display configuration for Budgie 10.10, using
wlr-output-management-unstable-v1 to discover and configure outputs.
Features include an atomic display configuration batch system and
TOML-based profiles for persistent display groups. Over time, it will
coordinate broader desktop logic for Budgie 11.

%files
%doc README.md
%license COPYING
%{_bindir}/org.buddiesofbudgie.Services
%{_datadir}/dbus-1/system.d/org.buddiesofbudgie.Services.conf

#------------------------------------------------------------------

%prep
%autosetup -n %{name}

%build
%cmake -G Ninja
%ninja_build

%install
%ninja_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 6 |14cr|budgie-desktop-view-10.10.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define org org.buddiesofbudgie

Name:           budgie-desktop-view
Version:        10.10.3
Release:        1
Summary:        Official Budgie Desktop icons application
License:        Apache-2.0
Group:          Graphical desktop/Other
URL:            https://github.com/BuddiesOfBudgie/budgie-desktop-view
Source0:        https://github.com/BuddiesOfBudgie/budgie-desktop-view/releases/download/v%{version}/budgie-desktop-view-v%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  intltool
BuildRequires:  meson
BuildRequires:  pkgconfig
BuildRequires:  vala
BuildRequires:  pkgconfig(vapigen)
BuildRequires:  pkgconfig(gdk-3.0)
BuildRequires:  pkgconfig(gtk-layer-shell-0)
BuildRequires:  pkgconfig(libxfce4windowing-0)
BuildRequires:  pkgconfig(glib-2.0) >= 2.64.0

%description
Budgie Desktop View is the official Budgie desktop icons application / implementation

%files -f %{name}.lang
%license LICENSE.md
%{_bindir}/%{org}.budgie-desktop-view
%{_sysconfdir}/xdg/autostart/%{org}.budgie-desktop-view-autostart.desktop
%{_datadir}/applications/%{org}.budgie-desktop-view.desktop
%{_datadir}/glib-2.0/schemas/%{org}.budgie-desktop-view.gschema.xml

#--------------------------------------------------------------------------

%prep
%autosetup -p1

%build
%meson -Dxdg-appdir=%{_sysconfdir}/xdg/autostart -Dwerror=false
%meson_build

%install
%meson_install

%find_lang budgie-desktop-view --with-gnome

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 7 |14cr|budgie-display-configurator-0.0.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Graphical display configuration tool for Budgie Desktop
Name:		budgie-display-configurator
Version:	0.0.1
Release:	1
License:	MPLv2.0
Group:		Graphical desktop/Other
Url:		https://forge.moderndesktop.dev/BuddiesOfBudgie/budgie-display-configurator/
Source0:	%{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz

BuildRequires:	qt6-cmake
BuildRequires:	extra-cmake-modules6


# Основные компоненты Qt6
BuildRequires:	cmake(Qt6Core)
BuildRequires:	cmake(Qt6DBus)
BuildRequires:	cmake(Qt6Gui)
BuildRequires:	cmake(Qt6Quick)
BuildRequires:	cmake(Qt6QuickControls2)
BuildRequires:	cmake(Qt6Widgets)

# Компоненты KDE Frameworks 6
BuildRequires:	cmake(KF6ColorScheme)
BuildRequires:	cmake(KF6Config)
BuildRequires:	cmake(KF6CoreAddons)
BuildRequires:	cmake(KF6I18n)
BuildRequires:	cmake(KF6Kirigami)
BuildRequires:	cmake(KF6QQC2DesktopStyle)

# Runtime зависимости
Requires:	budgie-desktop-services
Requires:	kf6-kirigami

%description
Graphical display configuration tool for Budgie Desktop.

%files
%license LICENSE
%{_bindir}/org.buddiesofbudgie.DisplayConfig
%{_datadir}/applications/org.buddiesofbudgie.DisplayConfig.desktop

#------------------------------------------------------------------

%prep
%autosetup -n %{name}

%build
%cmake
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 8 |14cr|doublecmd-1.2.9-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# norootforbuild

%define debug_package %{nil}

Summary:	Twin-panel (commander-style) file manager (GTK2 and QT5)
Name:		doublecmd
Version:	1.2.9
Release:	1
License:	GPLv2+
Group:		File tools
Url:		https://doublecmd.sourceforge.io
Source0:	http://downloads.sourceforge.net/project/doublecmd/Double%20Commander%20Source/%{name}-%{version}-src.tar.gz
Source1:	%{name}-qt5.desktop
Source2:	%{name}-qt6.desktop
Source10:	%{name}.rpmlintrc
BuildRequires:	desktop-file-utils
BuildRequires:	fpc
BuildRequires:	fpc-src
BuildRequires:	lazbuild
BuildRequires:	util-linux
BuildRequires:	bzip2-devel
BuildRequires:	qt5pas-devel
BuildRequires:	qt5-qtbase-devel
BuildRequires:	qt6pas-devel
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(dbus-1)
BuildRequires:	pkgconfig(gdk-pixbuf-2.0)
BuildRequires:	pkgconfig(glib-2.0)
BuildRequires:	pkgconfig(gtk+-2.0)
BuildRequires:	pkgconfig(ncurses)
BuildRequires:	pkgconfig(pango)
BuildRequires:	pkgconfig(xtrans)
BuildRequires:	pkgconfig(wayland-client)
Requires:	hicolor-icon-theme
Obsoletes:	%{name} < 1.0.0
ExclusiveArch:	%{ix86} x86_64

%description
Double Commander is a cross platform open source file manager with two panels
side by side. It is inspired by Total Commander and features some new ideas.

#----------------------------------------------------------------------------

%package -n %{name}-gtk
Summary:	Twin-panel (commander-style) file manager (GTK2)
Group:		File tools
Requires:	%{name}-common = %{EVRD}
Provides:	%{name} = %{EVRD}

%description -n %{name}-gtk
Double Commander GTK version.

%files -n %{name}-gtk
%doc doc/*
%{_bindir}/%{name}
%{_libdir}/%{name}/%{name}
%{_libdir}/%{name}/%{name}.zdli
%{_datadir}/applications/%{name}.desktop

#----------------------------------------------------------------------------

%package -n %{name}-qt5
Summary:	Twin-panel (commander-style) file manager (Qt5)
Group:		File tools
Requires:	%{name}-common = %{EVRD}
Provides:	%{name} = %{EVRD}
Conflicts:	%{name}-qt < %{EVRD}
Obsoletes:	%{name}-qt < %{EVRD}

%description -n %{name}-qt5
Double Commander QT version.

%files -n %{name}-qt5
%doc doc/*
%{_bindir}/%{name}-qt5
%{_libdir}/%{name}/%{name}-qt5
%{_libdir}/%{name}/%{name}-qt5.zdli
%{_datadir}/applications/%{name}-qt5.desktop

#----------------------------------------------------------------------------

%package -n %{name}-qt6
Summary:	Twin-panel (commander-style) file manager (qt6)
Group:		File tools
Requires:	%{name}-common = %{EVRD}
Provides:	%{name} = %{EVRD}

%description -n %{name}-qt6
Double Commander QT version.

%files -n %{name}-qt6
%doc doc/*
%{_bindir}/%{name}-qt6
%{_libdir}/%{name}/%{name}-qt6
%{_libdir}/%{name}/%{name}-qt6.zdli
%{_datadir}/applications/%{name}-qt6.desktop

#----------------------------------------------------------------------------

%package -n %{name}-common
Summary:	Common files for Double Commander
Group:		File tools

%description -n %{name}-common
Common files for Double Commander

%files -n %{name}-common
%exclude %{_libdir}/%{name}/%{name}
%exclude %{_libdir}/%{name}/%{name}-qt5
%exclude %{_libdir}/%{name}/%{name}-qt6
%exclude %{_libdir}/%{name}/%{name}.zdli
%exclude %{_libdir}/%{name}/%{name}-qt5.zdli
%exclude %{_libdir}/%{name}/%{name}-qt6.zdli
%exclude %{_bindir}/%{name}
%exclude %{_bindir}/%{name}-qt5
%exclude %{_bindir}/%{name}-qt6
%{_libdir}/%{name}
%{_datadir}/%{name}
%{_mandir}/man1/%{name}.1.*
%{_datadir}/pixmaps/%{name}.*
%{_datadir}/icons/hicolor/scalable/apps/doublecmd.svg
%{_datadir}/polkit-1/actions/org.doublecmd.root.policy

#----------------------------------------------------------------------------

%prep
%setup -q

%build
# --------- qt5 ------------------
lcl=qt5 ./build.sh beta
mv ./%{name} ./%{name}-qt5 && mv ./%{name}.zdli ./%{name}-qt5.zdli
./clean.sh

# --------- qt6 ------------------
lcl=qt6 ./build.sh beta
mv ./%{name} ./%{name}-qt6 && mv ./%{name}.zdli ./%{name}-qt6.zdli
./clean.sh
# --------- qt6 ------------------
lcl=gtk2 ./build.sh beta

%install
install/linux/install.sh --install-prefix=%{buildroot}
install ./%{name}-qt5 %{buildroot}%{_libdir}/%{name}/%{name}-qt5
install ./%{name}-qt6 %{buildroot}%{_libdir}/%{name}/%{name}-qt6
install -m 0644 ./%{name}-qt5.zdli %{buildroot}%{_libdir}/%{name}/%{name}-qt5.zdli
install -m 0644 ./%{name}-qt6.zdli %{buildroot}%{_libdir}/%{name}/%{name}-qt6.zdli
ln -s ../%{_lib}/%{name}/%{name}-qt5 %{buildroot}%{_bindir}/%{name}-qt5
ln -s ../%{_lib}/%{name}/%{name}-qt6 %{buildroot}%{_bindir}/%{name}-qt6
install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}-qt5.desktop
install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/applications/%{name}-qt6.desktop

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 9 |14cr|gnumeric-1.12.62-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define _disable_ld_no_undefined 1
%define url_ver %(echo %{version}|cut -d. -f1,2)

%define goffice_ver 0.10
%define libname %mklibname spreadsheet %{version}
%define devname %mklibname -d spreadsheet

Summary:	A full-featured spreadsheet for GNOME
Name:		gnumeric
Version:	1.12.62
Release:	1
License:	GPLv2+
Group:		Office
Url:		https://www.gnumeric.org
Source0:	https://download.gnome.org/sources/gnumeric/%{url_ver}/%{name}-%{version}.tar.xz
Patch0:		gnumeric-c99.patch
# revert some part of https://github.com/GNOME/gnumeric/commit/e624094c0555ee0201c4f5c7712695fb31d8d418
Patch1:		gnumeric-revert-code.patch
BuildRequires:	bison
BuildRequires:	byacc
BuildRequires:	desktop-file-utils
BuildRequires:	gtk-doc
BuildRequires:	intltool
BuildRequires:	itstool
BuildRequires:	perl(ExtUtils::Embed)
BuildRequires:	perl-IO-Compress
BuildRequires:	rarian
BuildRequires:	perl-devel
BuildRequires:	psiconv-devel
BuildRequires:	pkgconfig(glib-2.0)
BuildRequires:	pkgconfig(gmodule-2.0)
BuildRequires:	pkgconfig(gobject-2.0)
BuildRequires:	pkgconfig(gthread-2.0)
BuildRequires:	pkgconfig(gtk+-3.0)
BuildRequires:	pkgconfig(libgda-6.0)
BuildRequires:	pkgconfig(libgda-ui-6.0)
BuildRequires:	pkgconfig(libgoffice-0.10)
BuildRequires:	pkgconfig(libgsf-1)
BuildRequires:	pkgconfig(libxml-2.0)
BuildRequires:	pkgconfig(pango)
BuildRequires:	pkgconfig(pangocairo)
BuildRequires:	pkgconfig(pxlib)
BuildRequires:	pkgconfig(pygobject-3.0)
BuildRequires:	pkgconfig(python3)
Requires:	goffice

%description
This is the Gnumeric, the GNOME spreadsheet program. If you are familiar with
Excel, you should be ready to use Gnumeric.  It tries to clone all of
the good features and stay as compatible as possible with Excel in terms of
usability. Hopefully the bugs have been left behind :).

%files -f %{name}.lang
%doc AUTHORS NEWS README
%license COPYING*
%{_bindir}/*
%{_appdatadir}/org.%{name}.%{name}.appdata.xml
%{_datadir}/applications/*
%{_datadir}/glib-2.0/schemas/org.gnome.%{name}*.xml
%{_datadir}/%{name}
%{_iconsdir}/hicolor/*/apps/org.%{name}*
%{_libdir}/%{name}
%{_libdir}/goffice/%{goffice_ver}/plugins/%{name}
%{_mandir}/man1/*

%preun
%preun_uninstall_gconf_schemas %{schemas}

#----------------------------------------------------------------------------

%package -n %{libname}
Summary:	Spreadsheet library from Gnumeric
Group:		System/Libraries

%description -n %{libname}
This is the Gnumeric, the GNOME spreadsheet program. If you are familiar with
Excel, you should be ready to use Gnumeric.  It tries to clone all of
the good features and stay as compatible as possible with Excel in terms of
usability. Hopefully the bugs have been left behind :).

%files -n %{libname}
%{_libdir}/libspreadsheet-%{version}.so

#----------------------------------------------------------------------------

%package -n %{devname}
Summary:	Spreadsheet library from Gnumeric - development files
Group:		Development/C
Requires:	%{libname} = %{EVRD}
Provides:	%{name}-devel = %{EVRD}

%description -n %{devname}
This is the Gnumeric, the GNOME spreadsheet program. If you are familiar with
Excel, you should be ready to use Gnumeric.  It tries to clone all of
the good features and stay as compatible as possible with Excel in terms of
usability. Hopefully the bugs have been left behind :).

%files -n %{devname}
%{_includedir}/libspreadsheet-*
%{_libdir}/libspreadsheet.so
%{_libdir}/pkgconfig/*.pc

#----------------------------------------------------------------------------

%prep
%autosetup -p1

%build
CFLAGS="%{optflags} -Wno-incompatible-pointer-types"
%configure --enable-gtk-doc
%make_build

%install
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 %make_install
rm -vf %{buildroot}%{_datadir}/%{name}/%{version}/perl/*/auto/Gnumeric/.packlist
rm -rf %{buildroot}/var
ln -s %{_datadir}/gnome %{buildroot}%{_datadir}/%{name}/%{version}

%find_lang %{name} --with-gnome --all-name

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 10 |14cr|goffice-0.10.62-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define url_ver %(echo %{version}|cut -d. -f1,2)

%define api	0.10
%define major	10
%define libname	%mklibname %{name} %{api} %{major}
%define devname	%mklibname %{name} %{api} -d
%define girname	%mklibname %{name}-gir %{api}

Summary:	Set of document centric objects and utilities for GLib/GTK
Name:		goffice
Version:	0.10.62
Release:	1
License:	GPLv2+
Group:		System/Libraries
Url:		https://github.com/GNOME/goffice
Source0:	https://download.gnome.org/sources/goffice/%{url_ver}/%{name}-%{version}.tar.xz
BuildRequires:	gtk-doc
BuildRequires:	intltool
BuildRequires:	perl-IO-Compress
BuildRequires:	pkgconfig(dbus-glib-1)
BuildRequires:	pkgconfig(gconf-2.0)
BuildRequires:	pkgconfig(gobject-introspection-1.0)
BuildRequires:	pkgconfig(gtk+-3.0)
BuildRequires:	pkgconfig(libglade-2.0)
BuildRequires:	pkgconfig(libgsf-1)
BuildRequires:	pkgconfig(libpcre)
BuildRequires:	pkgconfig(librsvg-2.0)
BuildRequires:	pkgconfig(libxslt)
Obsoletes:	goffice0 < 0.10

%description
There are common operations for document centric applications that are
conceptually simple, but complex to implement fully.
 - plugins
 - load/save documents
 - undo/redo

%files -f %{name}-%{version}.lang
%doc README NEWS AUTHORS BUGS MAINTAINERS
%{_libdir}/%{name}/%{version}
%dir %{_libdir}/%{name}
%{_datadir}/%{name}/%{version}/mmlitex

#----------------------------------------------------------------------------

%package -n %{libname}
Summary:	%{summary}
Group:		%{group}

%description -n %{libname}
Shared library implementing document centric objects and utilities for
GLib/GTK.

%files -n %{libname}
%{_libdir}/lib%{name}-%{api}.so.%{major}*

#----------------------------------------------------------------------------

%package -n %{girname}
Summary:	GObject Introspection interface description for %{name}
Group:		System/Libraries

%description -n %{girname}
GObject Introspection interface description for %{name}.

%files -n %{girname}
%{_libdir}/girepository-1.0/GOffice-%{api}.typelib

#----------------------------------------------------------------------------

%package -n %{devname}
Summary:	%{summary}
Group:		Development/C
Requires:	%{libname} = %{EVRD}
Requires:	%{girname} = %{EVRD}
Provides:	%{name}-devel = %{EVRD}

%description -n %{devname}
Development files of the Goffice library.

%files -n %{devname}
%{_includedir}/lib%{name}-%{api}
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gtk-doc/html/%{name}-%{api}
%{_datadir}/gir-1.0/*.gir

#----------------------------------------------------------------------------

%prep
%autosetup -p1

%build
%configure \
	--disable-static \
	--enable-introspection=yes
%make_build

%install
%make_install

%find_lang %{name}-%{version}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 11 |14cr|hyprcursor-0.1.13-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 0
%define libname %mklibname hyprcursor %{major}
%define devname %mklibname -d hyprcursor

Name:           hyprcursor
Version:	0.1.13
Release:	1
Summary:        The hyprland cursor format, library and utilities
Group:		System/Libraries
License:        BSD-3-Clause
URL:            https://github.com/hyprwm/hyprcursor
Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch:    %{ix86}

BuildRequires:  cmake
BuildRequires:  pkgconfig(tomlplusplus)
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(hyprlang)
BuildRequires:  pkgconfig(librsvg-2.0)
BuildRequires:  pkgconfig(libzip)

%description
%{summary}.

%package -n	%{libname}
Summary:	Library for Hyprland
Group:		System/Libraries

%description -n %{libname}
The official implementation library for the hypr config language

%package -n 	%{devname}
Summary:        Development files for %{name}
Requires:       %{libname} = %{version}-%{release}
%description -n %{devname}
Development files for %{name}.

%prep
%autosetup -p1

%build
# cleanup letfover
sed -i 's!0.1.7!%{version}!g' CMakeLists.txt
%cmake
%make_build

%install
%make_install -C build

%files
%{_bindir}/hyprcursor-util

%files -n %{libname}
%{_libdir}/lib%{name}.so.%{version}
%{_libdir}/lib%{name}.so.%{major}

%files -n %{devname}
%license LICENSE
%doc README.md
%{_includedir}/%{name}.hpp
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 12 |14cr|hyprgraphics-0.5.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 4
%define libname %mklibname %{name} %{major}
%define devname %mklibname -d %{name}

Name:           hyprgraphics
Version:        0.5.1
Release:        1
Summary:        Hyprland graphics / resource utilities
Group:          System/Libraries
License:        BSD-3-Clause
URL:            https://github.com/hyprwm/hyprgraphics
Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires:  cmake

BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(hyprutils)
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libjxl_cms)
BuildRequires:  pkgconfig(libjxl_threads)
BuildRequires:  pkgconfig(libjxl)
BuildRequires:  pkgconfig(libmagic)
BuildRequires:  pkgconfig(libwebp)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(pixman-1)
BuildRequires:  pkgconfig(spng)
BuildRequires:  pkgconfig(pangocairo)
BuildRequires:  pkgconfig(librsvg-2.0)

%description
%{summary}.

%package        -n %{libname}
Summary:        Library files for %{name}

%description    -n %{libname}
Library files for %{name}.

%package        -n %{devname}
Summary:        Development files for %{name}
Requires:       %{libname} = %{EVRD}

%description    -n %{devname}
Development files for %{name}.

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

%files -n %{libname}
%{_libdir}/lib%{name}.so.%{major}
%{_libdir}/lib%{name}.so.%{version}

%files -n %{devname}
%license LICENSE
%doc README.md
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 13 |14cr|hypridle-0.1.7-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:		hypridle
Group:		System/Base
Version:	0.1.7
Release:	4
Summary:	Hyprland's idle daemon
License:	BSD-3-Clause
URL:		https://github.com/hyprwm/hypridle
Source0:	%{url}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires:	cmake
BuildRequires:	gcc-c++

BuildRequires:	pkgconfig(hyprlang)
BuildRequires:	pkgconfig(hyprwayland-scanner)
BuildRequires:	pkgconfig(hyprland-protocols)
BuildRequires:	pkgconfig(wayland-client)
BuildRequires:	pkgconfig(wayland-protocols)
BuildRequires:	pkgconfig(sdbus-c++)
BuildRequires:	pkgconfig(libsystemd)
BuildRequires:	pkgconfig(systemd)

%description
%{summary}.


%prep
%autosetup -p1

%build
%cmake
%make_build


%install
%make_install -C build

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_userunitdir}/%{name}.service
%{_datadir}/hypr/hypridle.conf

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 14 |14cr|hypridle-0.1.8-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:		hypridle
Group:		System/Base
Version:	0.1.8
Release:	2
Summary:	Hyprland's idle daemon
License:	BSD-3-Clause
URL:		https://github.com/hyprwm/hypridle
Source0:	%{url}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires:	cmake
BuildRequires:	gcc-c++

BuildRequires:	pkgconfig(hyprlang)
BuildRequires:	pkgconfig(hyprwayland-scanner)
BuildRequires:	pkgconfig(hyprland-protocols)
BuildRequires:	pkgconfig(wayland-client)
BuildRequires:	pkgconfig(wayland-protocols)
BuildRequires:	pkgconfig(sdbus-c++)
BuildRequires:	pkgconfig(libsystemd)
BuildRequires:	pkgconfig(systemd)

%description
%{summary}.


%prep
%autosetup -p1

%build
%cmake
%make_build


%install
%make_install -C build

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_userunitdir}/%{name}.service
%{_datadir}/hypr/hypridle.conf

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 15 |14cr|hyprland-guiutils-0.2.1-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:		hyprland-guiutils
Version:	0.2.1
Release:	3
Source0:	https://github.com/hyprwm/hyprland-guiutils/archive/v%{version}/%{name}-%{version}.tar.gz
Summary:	Hyprland GUI utilities
Group:		System/Base
License:	BSD-3-Clause
URL:		https://github.com/hyprwm/hyprland-guiutils
BuildRequires:	cmake
BuildRequires:	pkgconfig(aquamarine) >= 0.9.5
BuildRequires:	pkgconfig(cairo)
BuildRequires:	pkgconfig(hyprgraphics) >= 0.2.0
BuildRequires:	pkgconfig(hyprlang) >= 0.6.0
BuildRequires:	pkgconfig(hyprutils) >= 0.2.4
BuildRequires:	pkgconfig(hyprtoolkit) >= 0.2.2
BuildRequires:	pkgconfig(pixman-1)
BuildRequires:	pkgconfig(libdrm)

Obsoletes:	hyprland-qtutils

%description
Hyprland GUI utilities (successor to hyprland-qtutils)

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

%files
%{_bindir}/hyprland-*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 16 |14cr|hyprland-plugins-0.55.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#global commit0 d7b67e8f4ba8ebeee4ce899348fcee6291512169
#global shortcommit0 %(c=%{commit0}; echo ${c:0:7})

%global __provides_exclude_from ^(%{_libdir}/hyprland/.*\\.so)$

%global _disable_ld_no_undefined %nil
%global plugins borders-plus-plus csgo-vulkan-fix hyprbars hyprfocus

Name:		hyprland-plugins
Version:	0.55.0
#Release:	0.git.%{shortcommit0}
Release:	1
Group:		System/Libraries
Summary:	Official plugins for Hyprland
License:	BSD-3-Clause
URL:		https://github.com/hyprwm/hyprland-plugins
#Source:		%{url}/archive/%{commit0}/%{name}-%{commit0}.tar.gz
Source:		https://github.com/hyprwm/hyprland-plugins/archive/refs/tags/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
BuildRequires:	lua-devel
BuildRequires:	meson
BuildRequires:	hyprland-devel
BuildRequires:	glslang-devel
BuildRequires:	pkgconfig(hyprutils)
BuildRequires:	pkgconfig(hyprgraphics)
BuildRequires:	pkgconfig(aquamarine)
BuildRequires:	pkgconfig(pixman-1)
BuildRequires:	pkgconfig(libdrm)
BuildRequires:	pkgconfig(egl)
BuildRequires:	pkgconfig(libinput)
BuildRequires:	pkgconfig(wayland-server)
BuildRequires:	pkgconfig(xkbcommon)
BuildRequires:	pkgconfig(xcb)
BuildRequires:	pkgconfig(xcb-icccm)
BuildRequires:	pkgconfig(hyprlang)
BuildRequires:	pkgconfig(cairo)
BuildRequires:	pkgconfig(pangocairo)
Requires:	hyprland

%description
%{summary}.

%prep
%autosetup -n hyprland-plugins-%{version} -p1

%build
export CXXFLAGS="%{optflags} -I%{_includedir}/hyprland/"
for plugin in %{plugins}
do
pushd $plugin
%meson --libdir=%{_libdir}/hyprland
%meson_build
popd
done


%install
for plugin in %{plugins}
do
pushd $plugin
%meson_install
popd
done


%files
%{_libdir}/hyprland/*.so

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 17 |14cr|hyprland-protocols-0.7.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           hyprland-protocols
Version:        0.7.0
Release:        1
Group:          System/Libraries
Summary:        Wayland protocol extensions for Hyprland
BuildArch:      noarch

License:        BSD-3-Clause
URL:            https://github.com/hyprwm/hyprland-protocols
Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires:  meson

%description
%{summary}.

%package        devel
Summary:        Wayland protocol extensions for Hyprland

%description    devel
%{summary}.


%prep
%autosetup -p1


%build
%meson
%meson_build


%install
%meson_install

%files devel
%license LICENSE
%doc README.md
%{_datadir}/pkgconfig/%{name}.pc
%{_datadir}/%{name}/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 18 |14cr|hyprland-qt-support-0.1.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           hyprland-qt-support
Version:        0.1.0
Release:        1
Group:          System/Base
Summary:        A Qt6 Qml style provider for hypr* apps
License:        BSD-3-Clause
URL:            https://github.com/hyprwm/hyprland-qt-support
Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch:          cmake.patch

ExcludeArch:    %{ix86}

BuildRequires:  cmake
BuildRequires:  qt6-cmake

BuildRequires:  cmake(Qt6Quick)
BuildRequires:  cmake(Qt6QuickControls2)
BuildRequires:  cmake(Qt6Qml)

BuildRequires:  pkgconfig(hyprlang)

%description
%{summary}.

%prep
%autosetup -p1

%build
%cmake -DINSTALL_QMLDIR=%{_qt6_qmldir}
%make_build

%install
%make_install -C build

%files
%license LICENSE
%doc README.md
%{_libdir}/libhyprland-quick-style-impl.so
%{_libdir}/libhyprland-quick-style.so
%{_qt6_qmldir}/org/hyprland/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 19 |14cr|hyprlang-0.6.8-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 2
%define libname %mklibname hyprlang %{major}
%define devname %mklibname -d hyprlang

Name:		hyprlang
Version:	0.6.8
Release:	2
Summary:        The official implementation library for the hypr config language
Group:		System/Libraries
License:        LGPL-3.0-only
URL:            https://github.com/hyprwm/hyprlang
Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch:    %{ix86}

BuildRequires:  cmake
BuildRequires:  pkgconfig(hyprutils)

%description
%{summary}.

%package -n %{libname}
Summary:	Library for Hyprland
Group:		System/Libraries

%description -n %{libname}
The official implementation library for the hypr config language

%package -n 	%{devname}
Summary:        Development files for %{name}
Requires:       %{libname} = %{version}-%{release}
%description -n %{devname}
Development files for %{name}.

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

%files -n %{libname}
%{_libdir}/libhyprlang.so.*

%files -n %{devname}
%license LICENSE
%doc README.md
%{_includedir}/hyprlang.hpp
%{_libdir}/libhyprlang.so
%{_libdir}/pkgconfig/hyprlang.pc

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 20 |14cr|hyprlauncher-0.1.6-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:		hyprlauncher
Version:	0.1.6
Release:	3
Summary:	A multipurpose and versatile launcher / picker for Hyprland
License:	BSD-3-Clause
URL:		https://github.com/hyprlauncher/hyprlauncher
Source0:	https://github.com/hyprwm/hyprlauncher/archive/v%{version}/%{name}-v%{version}.tar.gz
Group:		System/Base
BuildRequires:	cmake
BuildRequires:	pkgconfig(hyprtoolkit)
BuildRequires:	pkgconfig(pixman-1)
BuildRequires:	pkgconfig(libdrm)
BuildRequires:	pkgconfig(hyprutils)
BuildRequires:	pkgconfig(hyprwire)
BuildRequires:	pkgconfig(icu-uc)
BuildRequires:	pkgconfig(hyprlang)
BuildRequires:	pkgconfig(libqalculate)
BuildRequires:	hyprwire
BuildRequires:	pkgconfig(aquamarine)
BuildRequires:	pkgconfig(hyprgraphics)
BuildRequires:	pkgconfig(cairo)
BuildRequires:	pkgconfig(xkbcommon)

Requires:	wl-clipboard

%description
A multipurpose and versatile launcher / picker for Hyprland

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 21 |14cr|hyprlock-0.9.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:		hyprlock
Version:	0.9.5
Release:	1
Summary:	Hyprland's GPU-accelerated screen locking utility
License:	BSD-3-Clause
URL:		https://github.com/hyprwm/hyprlock
Source:		%{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Group:		System/Base

BuildRequires:  cmake
BuildRequires:  pam-devel
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(egl)
BuildRequires:  pkgconfig(gbm)
BuildRequires:  pkgconfig(hyprlang)
BuildRequires:  pkgconfig(hyprutils)
BuildRequires:  pkgconfig(hyprgraphics)
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(libwebp)
BuildRequires:  pkgconfig(opengl)
BuildRequires:  pkgconfig(pangocairo)
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-egl)
BuildRequires:  pkgconfig(wayland-protocols)
BuildRequires:  pkgconfig(hyprwayland-scanner)
BuildRequires:  pkgconfig(xkbcommon)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libmagic)
BuildRequires:  pkgconfig(sdbus-c++)

%description
%{summary}.

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_datadir}/hypr/hyprlock.conf
%config(noreplace) %{_sysconfdir}/pam.d/%{name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 22 |14cr|hyprpaper-0.8.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global debug_package %nil
%global ldflags %{ldflags} -lstdc++-gcc15
%global	optflags %{optflags} -nostdinc++ -I%{_includedir}/libstdc++-gcc15 -I%{_includedir}/libstdc++-gcc15/%{_host} -fexceptions -Wno-invalid-constexpr -Wno-extra-semi -Wno-error -s

Name:           hyprpaper
Version:        0.8.4
Release:        1
Summary:        Blazing fast wayland wallpaper utility with IPC controls
Group:          System/Base
License:        BSD-3-Clause AND HPND-sell-variant
URL:            https://github.com/hyprwm/hyprpaper
Source0:        https://github.com/hyprwm/hyprpaper/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:	stdc++-gcc15-devel
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(glesv2)
BuildRequires:  pkgconfig(hyprlang)
BuildRequires:  pkgconfig(hyprtoolkit)
BuildRequires:  pkgconfig(hyprgraphics)
BuildRequires:  pkgconfig(hyprwayland-scanner)
BuildRequires:  hyprwire
BuildRequires:  pkgconfig(hyprwire)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libmagic)
BuildRequires:  pkgconfig(libwebp)
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(pangocairo)
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-protocols)
BuildRequires:  pkgconfig(wayland-scanner)
# hyprland not avail on i686
ExcludeArch:    %{ix86}

%description
Hyprpaper is a blazing fast wallpaper utility for Hyprland with the ability
to dynamically change wallpapers through sockets. It will work on all
wlroots-based compositors, though.

%prep
%autosetup -p1

%build
make protocols
%cmake
%make_build

%install
%make_install -C build

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_userunitdir}/hyprpaper.service

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 23 |14cr|hyprpicker-0.4.7-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           hyprpicker
Version:        0.4.7
Release:        1
Summary:        A wlroots-compatible Wayland color picker
Group:          System/Base
License:        BSD-3-Clause AND HPND-sell-variant
URL:            https://github.com/hyprwm/hyprpicker
Source0:        https://github.com/hyprwm/hyprpicker/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(glesv2)
BuildRequires:  pkgconfig(hyprutils)
BuildRequires:  pkgconfig(hyprwayland-scanner)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(pangocairo)
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-protocols)
BuildRequires:  pkgconfig(xkbcommon)

Recommends:     wl-clipboard

%description
A wlroots-compatible Wayland color picker that does not suck.

%prep
%autosetup -p1

%build
%cmake \
        -DCMAKE_INSTALL_MANDIR=%{_mandir} \
        -DCMAKE_BUILD_TYPE:STRING=Release
%make_build

%install
%make_install -C build

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1.*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 24 |14cr|hyprpolkitagent-0.1.3-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           hyprpolkitagent
Version:        0.1.3
Release:        4
Summary:        A simple polkit authentication agent for Hyprland
License:        BSD-3-Clause
URL:            https://github.com/hyprwm/hyprpolkitagent
Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Group:          System/Base

BuildRequires:  cmake
BuildRequires:  qt6-cmake
BuildRequires:  desktop-file-utils
BuildRequires:  cmake(Qt6Quick)
BuildRequires:  cmake(Qt6QuickControls2)
BuildRequires:  cmake(Qt6Widgets)
BuildRequires:  pkgconfig(hyprutils)
BuildRequires:  pkgconfig(polkit-agent-1)
BuildRequires:  pkgconfig(polkit-qt6-1)

Requires:       kf6-qqc2-desktop-style

%description
A simple polkit authentication agent for Hyprland, written in QT/QML.

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

%post
%systemd_user_post %{name}.service

%preun
%systemd_user_preun %{name}.service

%files
%license LICENSE
%doc README.md
%{_datadir}/dbus-1/services/org.hyprland.hyprpolkitagent.service
%{_libexecdir}/%{name}
%{_userunitdir}/%{name}.service

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 25 |14cr|hyprpwcenter-0.1.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:		hyprpwcenter
Version:	0.1.2
Release:	1
Source0:	https://github.com/hyprwm/hyprpwcenter/archive/v%{version}/%{name}-v%{version}.tar.gz
Patch0:		gcc14-fix.patch
Summary:	A GUI Pipewire control center
URL:		https://github.com/hyprwm/hyprpwcenter
License:	BSD-3-Clause
Group:		System/Base

BuildRequires:	cmake
BuildRequires:	pkgconfig(libpipewire-0.3)
BuildRequires:	pkgconfig(hyprtoolkit)
BuildRequires:	pkgconfig(pixman-1)
BuildRequires:	pkgconfig(libdrm)
BuildRequires:	pkgconfig(hyprutils)
BuildRequires:	pkgconfig(aquamarine)
BuildRequires:	pkgconfig(hyprgraphics)
BuildRequires:	pkgconfig(cairo)

%description
A GUI Pipewire control center

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

%files
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 26 |14cr|hyprshot-1.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           hyprshot
Version:        1.3.0
Release:        1
Summary:        Hyprland screenshot utility
Group:          System/Base
License:        GPL-3.0-only
URL:            https://github.com/Gustash/Hyprshot
Source0:        https://github.com/Gustash/Hyprshot/archive/refs/tags/%{version}.tar.gz?/%{name}-%{version}.tar.gz
Source99:       hyprshot.rpmlintrc
Requires:       imagemagick
Requires:       grim
Requires:       hyprland
Requires:       jq
Requires:       libnotify
Requires:       slurp
Requires:       wl-clipboard
BuildArch:      noarch
ExcludeArch:    %{ix86}

%description
Hyprshot is a utility to take screenshot in Hyprland using the mouse.

It allows taking screenshots of windows, regions and monitors which
are saved to a folder of choice copied to the clipboard.

%prep
%autosetup -n Hyprshot-%{version}

#
# Fix shebang issues
#
sed -i -r 's,(/usr/bin/)env (bash),\1\2,' hyprshot

%build
# Just a placeholder

%install
install -d -m 0755 %{buildroot}%{_bindir}
install -m 0755 hyprshot  %{buildroot}%{_bindir}/hyprshot

%files
%license LICENSE
%doc README.md
%{_bindir}/hyprshot


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 27 |14cr|hyprtoolkit-0.5.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 5
%define libname %mklibname hyprtoolkit
%define devname %mklibname hyprtoolkit -d

%global ldflags %{ldflags} -lstdc++-gcc15
%global optflags %{optflags} -nostdinc++ -I%{_includedir}/libstdc++-gcc15 -I%{_includedir}/libstdc++-gcc15/%{_host} -fexceptions -Wno-invalid-constexpr -Wno-extra-semi -Wno-error

Name:		hyprtoolkit
Version:	0.5.4
Release:	1
Summary:	A modern C++ Wayland-native GUI toolkit
Group:		System/Libraries
License:	BSD-3-Clause
URL:		https://github.com/hyprwm/hyprtoolkit
Source0:	https://github.com/hyprwm/hyprtoolkit/archive/v%{version}/%{name}-v%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  pkgconfig(iniparser)
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-protocols)
BuildRequires:  pkgconfig(egl)
BuildRequires:  pkgconfig(hyprutils) >= 0.9.0
BuildRequires:  pkgconfig(hyprlang) >= 0.6.0
BuildRequires:  pkgconfig(hyprgraphics) >= 0.3.0
BuildRequires:  pkgconfig(pixman-1)
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(gbm)
BuildRequires:  pkgconfig(xkbcommon)
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(aquamarine) >= 0.9.5
BuildRequires:  pkgconfig(hyprwayland-scanner) >= 0.4.0
BuildRequires:  pkgconfig(pangocairo)
BuildRequires:  pkgconfig(gtest)
BuildRequires:	stdc++-gcc15-devel

%description
Hyprtoolkit is designed to be a small, simple, and modern C++ toolkit for making wayland GUI apps, with a few goals:

Simple C++ API for making a GUI app
Smooth animations
Easy usage
Simple system theming

%package -n %{libname}
Summary:	A modern C++ Wayland-native GUI toolkit
Group:		System/Libraries

%description -n %{libname}
Hyprtoolkit is designed to be a small, simple, and modern C++ toolkit for making wayland GUI apps, with a few goals:

Simple C++ API for making a GUI app
Smooth animations
Easy usage
Simple system theming

%package -n %{devname}
Summary:	Development files for %{name}
Group:		Development/C
Requires:	%{libname} = %{EVRD}

%description -n %{devname}
Development files (Headers etc.) for %{name}.

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

%files
%doc README.md
%license LICENSE

%files -n %{libname}
%{_libdir}/*.so.*%{major}*

%files -n %{devname}
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 28 |14cr|hyprutils-0.13.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 12
%define libname %mklibname %{name} %{major}
%define devname %mklibname -d %{name}

Name:		hyprutils
Version:	0.13.1
Release:	1
Summary:	Hyprland utilities library used across the ecosystem
Group:		System/Libraries
License:	BSD-3-Clause
URL:		https://github.com/hyprwm/hyprutils
Source0:	%{url}/archive/v%{version}/%{name}-%{version}.tar.gz

# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch:	%{ix86}

BuildRequires:	cmake
BuildRequires:	gtest-devel
BuildRequires:	pkgconfig(pixman-1)

%description
%{summary}.

%package -n %{libname}
Summary:	Libaries files for %{name}
Group:		System/Libraries

%description -n %{libname}
Development files for %{name}.

%package -n %{devname}
Summary:	Development files for %{name}
Requires:	%{libname} = %{EVRD}
Group:		Development/Other

%description -n %{devname}
Development files for %{name}.

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

%files -n %{libname}
%{_libdir}/lib%{name}.so.%{major}
%{_libdir}/lib%{name}.so.%{version}

%files -n %{devname}
%license LICENSE
%doc README.md
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 29 |14cr|hyprwayland-scanner-0.4.6-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:		hyprwayland-scanner
Version:	0.4.6
Release:	1
Summary:	A Hyprland implementation of wayland-scanner, in and for C++
Group:		System/Libraries
License:	BSD-3-Clause
URL:		https://github.com/hyprwm/hyprwayland-scanner
Source0:	%{url}/archive/v%{version}/%{name}-%{version}.tar.gz

# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch:	%{ix86}

BuildRequires:	cmake
BuildRequires:	cmake(pugixml)

%description
%{summary}.

%package        devel
Summary:	Development files for %{name}
Group:		Development/Other

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

%files devel
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/cmake/%{name}/*.cmake

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 30 |14cr|hyprwire-0.3.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 3
%define libname %mklibname hyprwire
%define devname %mklibname hyprwire -d
%global debug_package %nil

%global ldflags %{ldflags} -lstdc++-gcc15
%global	optflags %{optflags} -nostdinc++ -I%{_includedir}/libstdc++-gcc15 -I%{_includedir}/libstdc++-gcc15/%{_host} -fexceptions -Wno-invalid-constexpr -Wno-extra-semi -Wno-error -s

Name:		hyprwire
Version:	0.3.1
Release:	1
Summary:	A fast and consistent wire protocol for IPC
License:	BSD-3-Clause
URL:		https://github.com/hyprwm/hyprwire
Source0:	https://github.com/hyprwm/hyprwire/archive/v%{version}/%{name}-v%{version}.tar.gz
Group:		System/Libraries
BuildRequires:	cmake
BuildRequires:	clang
BuildRequires:	stdc++-gcc15-devel
BuildRequires:	pkgconfig(hyprutils) >= 0.9.0
BuildRequires:	pkgconfig(libffi)
BuildRequires:	pkgconfig(pugixml)

%description
Hyprwire is a fast and consistent wire protocol, and its implementation. This is essentially a "method" for processes to talk to each other.

%package -n %{libname}
Summary:	 A fast and consistent wire protocol for IPC
Group:		System/Libraries

%description -n %{libname}
Hyprwire is a fast and consistent wire protocol, and its implementation. This is essentially a "method" for processes to talk to each other.

%package -n %{devname}
Summary:	Development files for %{name}
Group:		Development/C
Requires:	%{libname} = %{EVRD}

%description -n %{devname}
Development files (Headers etc.) for %{name}.

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

%files
%doc README.md
%license LICENSE
%{_bindir}/*

%files -n %{libname}
%{_libdir}/*.so.*%{major}*

%files -n %{devname}
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_libdir}/cmake/*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 31 |14cr|kanboard-1.2.54-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define kanboard_root /var/www/kanboard
%define kanboard_sharedstatedir /var/lib/kanboard

Summary:	Simple kanban project management software with web interface
Name:		kanboard
Version:	1.2.54
Release:	2
License:	MIT
Group:		Office
Url:		https://kanboard.org
Source0:	https://github.com/kanboard/kanboard/archive/refs/tags/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
Source1:	kanboard.rpmlintrc
Patch0:		config.diff
Patch1:		0001-Default-to-Russian-format-of-dates.patch
Patch2:		0002-Add-link-to-ROSA-manual.patch
Patch3:		0003-Show-ROSA-RPM-version.patch
BuildRequires:	rsync
BuildArch:	noarch
# no sense in RPM generators
AutoProv:	no
Autoreq:	no

Requires:	user(apache)
Requires:	group(apache)
Requires:	apache
# https://docs.kanboard.org/v1/admin/requirements/
Requires:	apache-mod_php8
Requires:	apache-mod_version
# defaults to sqlite, but can also work with mysql, postgresql and mssql
Recommends:	php-pdo_sqlite
#Recommends:	php-pdo_mysql
#Recommends:	php-pdo_pgsql
Requires:	php8-gd
Requires:	php8-mbstring
Requires:	php8-openssl
Requires:	php8-json
Requires:	php8-ctype
Requires:	php8-session
Requires:	php8-filter
Requires:	php8-xml
Requires:	php8-dom
# for "cli" script
Requires:	php8-cli
Recommends:	php8-zip
Recommends:	php8-ldap
Recommends:	php8-curl

%description
Simple kanban project management software with web interface.
Install this package, start Apache HTTPD webserver (systemctl start httpd)
and goto http://localhost/kanboard

%files
%license LICENSE
#doc README.md ChangeLog
%doc config.default.php
%dir %attr(755,root,root) %{kanboard_root}
%{kanboard_root}/app
%dir %{kanboard_root}/assets
%{kanboard_root}/assets/css
%{kanboard_root}/assets/fonts
%dir %{kanboard_root}/assets/img
# e.g. favicon.png can be replaced, especially if using kanboard-theme-revision
%config(noreplace) %{kanboard_root}/assets/img/*
%{kanboard_root}/assets/js
%{kanboard_root}/libs
%{kanboard_root}/plugins
%{kanboard_root}/vendor
%config(noreplace) %{kanboard_root}/.htaccess
%{kanboard_root}/cli
%config(noreplace) %{kanboard_root}/config.php
%config(noreplace) %{kanboard_root}/favicon.ico
%{kanboard_root}/index.php
%{kanboard_root}/jsonrpc.php
# license text is displayed in http://localhost/kanboard/?controller=ConfigController&action=index
%{kanboard_root}/LICENSE
%config(noreplace) %{kanboard_root}/robots.txt
# writable, because sqlite DB is stored here,
# but outside of webserver to ensure that it cannot be accessed via http
%dir %attr(755,apache,apache) %{kanboard_sharedstatedir}
%config(noreplace) %attr(644,root,root) %{kanboard_sharedstatedir}/.htaccess
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
%config(noreplace) %{kanboard_root}/docker-compose.mysql.yml
%config(noreplace) %{kanboard_root}/docker-compose.postgres.yml
%config(noreplace) %{kanboard_root}/docker-compose.sqlite.yml
%config(noreplace) %{kanboard_root}/healthcheck.php

#------------------------------------------------------------------

%package rpm-macros
Summary:	RPM macros defining directories used by Kanboard
Group:		Development/PHP

%description rpm-macros
RPM macros defining directories used by Kanboard.
Useful for packaging Kanboard plugins.

%files rpm-macros
%{_rpmmacrodir}/macros.%{name}

#------------------------------------------------------------------

%prep
%autosetup -p1

# ensure correct permissions
find . -type f -exec chmod 644 '{}' ';'
find . -type d -exec chmod 755 '{}' ';'
chmod 755 cli
cp config.default.php config.php

# adapt a bit for regions where most users live
grep -Irl en_US app/Schema | xargs sed -i'' -e 's,en_US,ru_RU,g'
grep -Irl UTC app/Schema | xargs sed -i'' -e 's,UTC,Europe/Moscow,g'

sed -i app/Template/config/about.php -e 's,@RPM_PACKAGE@,%{name} %{EVRD} %{disttag},'

# ensure that there is no mismatch between macro and patch0
grep -q %{kanboard_sharedstatedir} config.default.php

%install
mkdir -p %{buildroot}%{kanboard_root}
rsync -av ./ %{buildroot}%{kanboard_root}
cd %{buildroot}%{kanboard_root}
# ISS (Windows) configs
find . -name web.config -print -delete
# insecure to make these files public
# (but most of them are export-ignore in .gitattributes)
rm -fvr .git* .dockerengine .devcontainer Dockerfile ChangeLog Makefile Vagrantfile composer* *.md
rm -fr tests
# saved as %%doc and renamed to config.php
unlink config.default.php
cd -

mkdir -p %{buildroot}/var/lib
mv -v %{buildroot}%{kanboard_root}/data %{buildroot}%{kanboard_sharedstatedir}

mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
cat > %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf << EOF
Alias /%{name} %{kanboard_root}
<Directory %{kanboard_root}>
	AllowOverride None
	Require all granted
</Directory>
EOF

cat > macros << 'EOF'
# For using when packaging kanboard plugins
%%kanboard_root %{kanboard_root}
%%kanboard_plugins_dir %{kanboard_root}/plugins
%%kanboard_sharedstatedir %{kanboard_sharedstatedir}
EOF
%install_macro %{name} macros

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 32 |14cr|kanboard-mcp-0-1.git9b164a.2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define commit 9b164a1d26f54a4bf5bbd449c070d8681cd8ca34
%define commit_short %(echo %{commit} | head -c6)

%define goipath github.com/bivex/kanboard-mcp

Summary:	Kanboard MCP server
Name:		kanboard-mcp
Version:	0
Release:	1.git%{commit_short}.2
License:	MIT
Group:		System/Printing
Url:		https://github.com/bivex/kanboard-mcp
Source0:	https://github.com/bivex/kanboard-mcp/archive/%{commit}/%{name}-%{commit}.tar.gz
Source1:	%{name}-mod-vendor-%{commit}.tar.xz
# https://github.com/bivex/kanboard-mcp/pull/6
Patch0001:	0001-fix-fix-closing-and-opening-tasks.patch
BuildRequires:	golang
BuildRequires:	go-rpm-macros
%gometa

%description
A powerful Go-based MCP server that enables seamless integration between
AI assistants (like Claude Desktop, Cursor) and Kanboard project
management system. Manage your Kanboard projects, tasks, users, and
workflows directly through natural language commands.

%files
%license LICENSE.md
%doc README.md *.gif
%{_bindir}/kanboard-mcp

#------------------------------------------------------------------

%prep
%goprep
%autopatch -p1
tar -xf %{SOURCE1}

%build
%gobuild -o %{gobuilddir}/bin/kanboard-mcp %{goipath}

%install
mkdir -p %{buildroot}%{_bindir}
install -m755 %{gobuilddir}/bin/kanboard-mcp %{buildroot}%{_bindir}/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 33 |14cr|notamock-3.9-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define builder_scripts	%{_datadir}/builder-c

%ifarch %{x86_64}
%bcond_without nim
%else
%bcond_with nim
%endif

Summary:	Scripts to build rpm in container
Name:		notamock
Version:	3.9
Release:	2
License:	GPLv3
Group:		System/Base
Url:		https://abf.io/betcher_/notamock.git
Source0:	%{name}
Source1:	%{name}s
Source2:	notamock.dnf
Source3:	справка.команда.нотэмок
Source4:	%{name}.completions
Source5:	%{name}s.completions
Source6:	dnf.conf
Source7:	lib%{name}
Source8:	%{name}d
Source9:	%{name}c
Source10:	%{name}.alias
Source11:	rosaclone

# scripts from docker builder
Source20:	%{name}a
Source21:	build-rpm.py
Source22:	check_error.py

# abf repos
Source30:	_abf-repos.conf
Source31:	abf-repos-dnf.conf

# log highlighting tool
Source40:	rpmbuild_paint.nim
Source41:	rpmbuild_paint.conf
Source42:	rpmbuild_paint.py

%if %{with nim}
BuildRequires:	nim
%else
BuildArch:	noarch
%endif

Requires:	rpm
Requires:	dnf
Requires:	bash
Requires:	createrepo_c
Requires:	coreutils
Requires:	python3
Recommends:	termhelper
Recommends:	tmux
Recommends:	rpmbuild_paint

%description
Scripts to build rpm like a mock, using shared rootfs
for all build processes

%files
%dir %{_datadir}/%{name}
%dir %{_sysconfdir}/%{name}.d
%{_bindir}/%{name}
%{_bindir}/%{name}s
%{_bindir}/%{name}d
%{_bindir}/%{name}c
%{_bindir}/rosaclone
%{_datadir}/termhelper/ru/*
%{_sysconfdir}/bash_completion.d/*
%config(noreplace) %{_sysconfdir}/%{name}.cfg
%config(noreplace) %{_sysconfdir}/%{name}.alias
%{_datadir}/%{name}/default.%{name}.cfg
%{_datadir}/%{name}/example.dnf.conf
%{_datadir}/%{name}/lib%{name}

#----------------------------------------------------------------------------------------------
%package abf
Summary: Scripts to use notamock instead mock by builder-c (abf builder)
Requires: %{name}
Requires: builder-c
Buildarch: noarch

%description abf
Scripts to use notamock instead mock by builder-c (abf builder)
It is not recommended to use outside the container

%files abf
%{builder_scripts}/*
%{_bindir}/%{name}a

#---------------------------------------------------------------------------------------------
%package abf-repos
Summary: Abf repositories for notamock
Requires: %{name}
Buildarch: noarch

%description abf-repos
DNF configuration file for notamock containing repositories
http://abf-downloads.rosa.ru

%files abf-repos
%config(noreplace) %{_sysconfdir}/%{name}.d/_abf-repos.conf
%{_datadir}/%{name}/abf-repos-dnf.conf

#--------------------------------------------------------------------------------------------
%package  -n rpmbuild-paint
Summary: log errors highlighter
%if %{without nim}
Requires: python3
Buildarch: noarch
%endif

%description -n rpmbuild-paint
Rpmbuild log highlighting utility.

%files -n rpmbuild-paint

%{_bindir}/rpmbuild_paint
%if %{with nim}
%config(noreplace) %{_sysconfdir}/rpmbuild_paint.conf
%endif

%prep
cp -f %{SOURCE40} ./

%build
%if %{with nim}
nim c -d:release --opt:speed --nimCache:none rpmbuild_paint.nim
%endif

%install
mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_sysconfdir}/bash_completion.d
mkdir -p %{buildroot}%{_datadir}/%{name}   %{buildroot}%{builder_scripts}/
mkdir -p %{buildroot}%{_datadir}/termhelper/ru
mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_sysconfdir}/%{name}.d

install -m  755 %{SOURCE0} %{buildroot}%{_bindir}/%{name}
install -m  755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}s
install -m  644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}.cfg
install -m  644 %{SOURCE2} %{buildroot}%{_datadir}/%{name}/default.%{name}.cfg
install -m  644 %{SOURCE3} %{buildroot}%{_datadir}/termhelper/ru
install -m  644 %{SOURCE4} %{buildroot}%{_sysconfdir}/bash_completion.d/%{name}
install -m  644 %{SOURCE5} %{buildroot}%{_sysconfdir}/bash_completion.d/%{name}s
install -m  644 %{SOURCE6} %{buildroot}%{_datadir}/%{name}/example.dnf.conf
install -m  644 %{SOURCE7} %{buildroot}%{_datadir}/%{name}/lib%{name}
install -m  755 %{SOURCE8} %{buildroot}%{_bindir}/%{name}d
install -m  755 %{SOURCE9} %{buildroot}%{_bindir}/%{name}c
install -m  644 %{SOURCE10} %{buildroot}%{_sysconfdir}/%{name}.alias
install -m  755 %{SOURCE11} %{buildroot}%{_bindir}/rosaclone

%if %{with nim}
install -m  755 %{_builddir}/rpmbuild_paint %{buildroot}%{_bindir}/rpmbuild_paint
install -m  644 %{SOURCE41} %{buildroot}%{_sysconfdir}/
%else
install -m  755 %{SOURCE42} %{buildroot}%{_bindir}/rpmbuild_paint
%endif

install -m  755 %{SOURCE20} %{buildroot}%{_bindir}/%{name}a
install -m  755 %{SOURCE21} %{buildroot}%{builder_scripts}/
install -m  755 %{SOURCE22} %{buildroot}%{builder_scripts}/

install -m  644 %{SOURCE30} %{buildroot}%{_sysconfdir}/%{name}.d/_abf-repos.conf
install -m  644 %{SOURCE31} %{buildroot}%{_datadir}/%{name}/abf-repos-dnf.conf
sed -i 's/#ARCH#/'%{_arch}'/g' %{buildroot}%{_datadir}/%{name}/abf-repos-dnf.conf

ln -s ./справка.команда.нотэмок %{buildroot}%{_datadir}/termhelper/ru/справка.команда.notamock


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 34 |14cr|outwiker-4.1.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Create notes and represent them as a tree of HTML pages
Name:		outwiker
Version:	4.1.0
Release:	2
License:	GPLv3
Group:		Office
URL:		http://jenyay.net/Soft/Outwiker
Source0:	https://github.com/Jenyay/outwiker/archive/refs/tags/%{version}-stable.tar.gz?/%{name}-%{version}.tar.gz
Requires:	python3
Requires:	python3-wxpython4
Requires:	python3-wxpython4-webview
Requires:	python3-cython-hunspell
Requires:	python3-pillow
Requires:	python3-rcssmin

BuildArch:      noarch

%description
OutWiker is a program to create and store notes, representing them in a tree
form. It supports rich text formatting, adding images, math formulae (using
latex notation), adding tags and represents the notes as HTML pages similar
to WIKI format.

%files
%doc copyright.txt README README.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}*
%{_mandir}/ru/man1/%{name}*
%{_datadir}/%{name}
%{_datadir}/pixmaps/%{name}*
%{_datadir}/applications/%{name}.desktop
%{_iconsdir}/hicolor/*/apps/%{name}*.*

#---------------------------------------------------------------------------
%prep
%autosetup -p1 -n %{name}-%{version}-stable

%build

%install
make DESTDIR=%{buildroot} install

# we compress man with rpmlint
cd %{buildroot}/usr/share/man/man1
gunzip *.gz
cd %{buildroot}/usr/share/man/ru/man1
gunzip *.gz


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 35 |14cr|plasma6-breeze-grub-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname breeze-grub

%define grub_name grub2

Summary:	Breeze theme for grub2
Name:		plasma6-breeze-grub
Version:	6.7.5
Release:	1
License:	GPLv3+
Group:		System/Kernel and hardware
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
Requires(pre):	grub2 >= 2.00-28
#Provides:	grub2-theme
BuildArch:	noarch

%description
This package provides Breeze theme for grub2.

%files
%dir /boot/%{grub_name}/themes/breeze
/boot/%{grub_name}/themes/breeze/*

%post
if [ $1 -eq 1 ] ; then
# Remove all previous theme from config
sed -i '/GRUB_THEME=*/d' %{_sysconfdir}/default/grub
sed -i '/GRUB_BACKGROUND=*/d' %{_sysconfdir}/default/grub
# Remove trailing blank lines from /etc/default/grub
sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' %{_sysconfdir}/default/grub
# Check that /etc/default/grub ends in a linefeed
[ "$(tail -n 1 %{_sysconfdir}/default/grub | wc --lines)" = "1" ] || echo >> %{_sysconfdir}/default/grub
# Add theme
echo "GRUB_THEME=\"/boot/grub2/themes/breeze/theme.txt\"" >> %{_sysconfdir}/default/grub
# Regenerate configure on install or update
%{_sbindir}/update-grub2
fi

%postun
exec > /var/log/%{grub_name}_theme_postun.log 2>&1
# Only if uninstalling theme
if [ $1 -eq 0 ]; then
# Remove theme from config
sed -i '/GRUB_THEME=\/boot\/grub2\/themes\/breeze\/theme.txt/d' %{_sysconfdir}/default/grub
fi

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{oname}-%{version}

%build

%install
mkdir -p %{buildroot}/boot/%{grub_name}/themes/breeze
cp -r breeze/* %{buildroot}/boot/%{grub_name}/themes/breeze/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 36 |14cr|plasma6-breeze-plymouth-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname breeze-plymouth

Summary:	Breeze Plymouth theme
Name:		plasma6-breeze-plymouth
Version:	6.7.5
Release:	1
License:	GPLv3+
Group:		System/Kernel and hardware
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	pkgconfig(ply-splash-core)
Provides:   breeze-plymouth = %{EVRD}
Requires:	plymouth
Requires(post,postun):	plymouth-scripts
Requires(post,postun):  plymouth-plugin-script

%description
This package contains Breeze Plymouth theme.

%files
%{_datadir}/plymouth/themes/breeze

%post
if [ -x %{_sbindir}/plymouth-set-default-theme ]; then
    export LIB=%{_lib}
    if [ $1 -eq 1 ]; then
        %{_sbindir}/plymouth-set-default-theme --rebuild-initrd breeze
    else
        THEME=$(%{_sbindir}/plymouth-set-default-theme)
        if [ "$THEME" == "text" -o "$THEME" == "breeze" ]; then
            %{_sbindir}/plymouth-set-default-theme --rebuild-initrd breeze
        fi
    fi
fi

%postun
export LIB=%{_lib}
if [ $1 -eq 0 -a -x %{_sbindir}/plymouth-set-default-theme ]; then
    if [ "$(%{_sbindir}/plymouth-set-default-theme)" == "breeze" ]; then
        %{_sbindir}/plymouth-set-default-theme --reset --rebuild-initrd
    fi
fi

#----------------------------------------------------------------------------

%package -n plasma6-plymouth-theme-breeze-text
Summary:	Text Breeze Plymouth theme
Group:		System/Kernel and hardware
Requires:	plymouth
Requires(post,postun):	plymouth-scripts

%description -n plasma6-plymouth-theme-breeze-text
This package contains text Breeze Plymouth theme.

%files -n plasma6-plymouth-theme-breeze-text
%{_datadir}/plymouth/themes/breeze-text
%{_libdir}/plymouth/breeze-text.so

%post -n plasma6-plymouth-theme-breeze-text
if [ -x %{_sbindir}/plymouth-set-default-theme ]; then
    export LIB=%{_lib}
    if [ $1 -eq 1 ]; then
        %{_sbindir}/plymouth-set-default-theme --rebuild-initrd breeze-text
    else
        THEME=$(%{_sbindir}/plymouth-set-default-theme)
        if [ "$THEME" == "text" -o "$THEME" == "breeze-text" ]; then
            %{_sbindir}/plymouth-set-default-theme --rebuild-initrd breeze-text
        fi
    fi
fi

%postun -n plasma6-plymouth-theme-breeze-text
export LIB=%{_lib}
if [ $1 -eq 0 -a -x %{_sbindir}/plymouth-set-default-theme ]; then
    if [ "$(%{_sbindir}/plymouth-set-default-theme)" == "breeze-text" ]; then
        %{_sbindir}/plymouth-set-default-theme --reset --rebuild-initrd
    fi
fi

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{oname}-%{version}

%build
%cmake_kde6
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 37 |14cr|plasma6-dialer-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname plasma-dialer

Summary:	Dialer for Plasma Mobile
Name:		plasma6-dialer
Version:	6.7.5
Release:	1
Group:		Graphical desktop/KDE
License:	GPLv3
Source0:	https://download.kde.org/stable/plasma-mobile/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	kf6coreaddons-devel
BuildRequires:	kf6config-devel
BuildRequires:	kf6contacts-devel
BuildRequires:	kf6dbusaddons-devel
BuildRequires:	kf6i18n-devel
BuildRequires:	kf6kio-devel
BuildRequires:	kf6modemmanagerqt-devel
BuildRequires:	kf6notifications-devel
BuildRequires:	kf6people-devel
BuildRequires:	kf6kirigami-addons-devel
BuildRequires:	kf6pulseaudioqt-devel
BuildRequires:	pkgconfig(libcallaudio-0.1)
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6Qml)
BuildRequires:	pkgconfig(Qt6Quick)
BuildRequires:	pkgconfig(Qt6Multimedia)
BuildRequires:	pkgconfig(Qt6Sql)
BuildRequires:	pkgconfig(Qt6Test)
BuildRequires:	pkgconfig(Qt6QuickControls2)
BuildRequires:	pkgconfig(ModemManager)
BuildRequires:	pkgconfig(protobuf) = 3.12.3
BuildRequires:	phonenumber-devel
BuildRequires:	plasma-wayland-protocols-devel
BuildRequires:	qt6-qtdeclarative-devel
Requires:  kf6-kirigami-addons

%description
Dialer for Plasma Mobile.

%files -f %{oname}.lang
%{_kde6_bindir}/plasma-dialer
%{_kde6_bindir}/plasma-dialer-fakeserver
%{_kde6_applicationsdir}/org.kde.plasma.dialer.desktop
%{_kde6_datadir}/icons/hicolor/scalable/apps/dialer.svg
%{_kde6_notificationsdir}/plasma-dialer.notifyrc
%{_appdatadir}/org.kde.plasma.dialer.appdata.xml
%{_sysconfdir}/xdg/autostart/org.kde.modem.daemon.desktop
%{_sysconfdir}/xdg/autostart/org.kde.telephony.daemon.desktop
%{_kde6_libexecdir}/kde-telephony-daemon
%{_kde6_libexecdir}/modem-daemon
%{_kde6_qmldir}/org/kde/telephony
%{_datadir}/dbus-1/interfaces/org.kde.telephony.*.xml
%{_datadir}/dbus-1/services/org.kde.modemdaemon.service
%{_datadir}/dbus-1/services/org.kde.telephony.service


%prep
%autosetup -p1 -n %{oname}-%{version}

%build
%cmake_kde6
%make_build

%install
%make_install -C build
%find_lang %{oname} --all-name

# Not currently used by anything, so no need for
# a -devel package so far
rm -rf %{buildroot}%{_includedir} %{buildroot}%{_libdir}/libktelephonymetatypes.a
rm -rf %{buildroot}%{_includedir} %{buildroot}%{_kde6_includedir}/KF6/kTelephonyMetaTypes/dialer-types.h

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 38 |14cr|plasma6-kwayland-integration-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname kwayland-integration

Summary:	Plasma Wayland integration plugins
Name:		plasma6-kwayland-integration
Version:	6.7.5
Release:	1
License:	LGPLv2.1+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	kf6guiaddons-devel
BuildRequires:	kf6idletime-devel
BuildRequires:	kf6wayland-devel
BuildRequires:	kf5wayland-devel
BuildRequires:	kf6windowsystem-devel
BuildRequires:	kf5windowsystem-devel
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6Test)
BuildRequires:	pkgconfig(Qt6WaylandClient)
BuildRequires:	pkgconfig(Qt6WaylandCompositor)
BuildRequires:	pkgconfig(Qt5Core)
BuildRequires:	pkgconfig(Qt5Gui)
BuildRequires:	pkgconfig(Qt5Test)
BuildRequires:	pkgconfig(Qt5WaylandClient)
BuildRequires:	pkgconfig(Qt5WaylandCompositor)
BuildRequires:	pkgconfig(Qt5Widgets)
BuildRequires:	pkgconfig(wayland-client)
BuildRequires:	pkgconfig(wayland-scanner)
BuildRequires:	pkgconfig(wayland-server)
BuildRequires:	wayland-protocols-devel
BuildRequires:	plasma-wayland-protocols-devel

%description
Plasma Wayland integration plugins for IdleTime and WindowSystem.

%files
%{_kde6_datadir}/qlogging-categories6/kwindowsystem.kwayland.categories
%{_qt6_plugindir}/kf5/kwindowsystem/KF5WindowSystemKWaylandPlugin.so

#----------------------------------------------------------------------------

%prep
%setup -qn %{oname}-%{version}

%build
%cmake_kde6 \
	-DBUILD_WITH_QT6:BOOL=ON \
	-DQT_MAJOR_VERSION=6
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 39 |14cr|plasma6-plymouth-kcm-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname plymouth-kcm

Summary:	Plasma 6 Plymouth configuration module
Name:		plasma6-plymouth-kcm
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
Patch0:		plymouth-kcm-dracut.patch
BuildRequires:	extra-cmake-modules6
BuildRequires:	kf6archive-devel
BuildRequires:	kf6auth-devel
BuildRequires:	kf6config-devel
BuildRequires:	kf6configwidgets-devel
BuildRequires:	kf6declarative-devel
BuildRequires:	kf6i18n-devel
BuildRequires:	kf6kcmutils-devel
BuildRequires:	kf6kio-devel
BuildRequires:	kf6newstuff-devel
BuildRequires:	pkgconfig(ply-splash-core)
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6Network)
BuildRequires:	pkgconfig(Qt6Qml)
BuildRequires:	pkgconfig(Qt6Quick)
BuildRequires:	pkgconfig(Qt6Test)
BuildRequires:	pkgconfig(Qt6Widgets)
BuildRequires:	qt6-qtdeclarative-devel
Requires:	plymouth-plugin-fade-throbber
Requires:	plymouth-plugin-label
Requires:	plymouth-plugin-script
Requires:	plymouth-plugin-space-flares
Requires:	plymouth-plugin-tribar
Requires:	plymouth-plugin-two-step

%description
Plasma 6 Plymouth configuration module.

%files -f kcm_plymouth.lang
%{_kde6_applicationsdir}/kcm_plymouth.desktop
%{_kde6_bindir}/kplymouththemeinstaller
%{_kde6_libexecdir}/kf6/kauth/plymouthhelper
%{_kde6_datadir}/knsrcfiles/plymouth.knsrc
%{_datadir}/dbus-1/system-services/org.kde.kcontrol.kcmplymouth.service
%{_datadir}/dbus-1/system.d/org.kde.kcontrol.kcmplymouth.conf
%{_datadir}/polkit-1/actions/org.kde.kcontrol.kcmplymouth.policy
%{_qt6_plugindir}/plasma/kcms/systemsettings/kcm_plymouth.so

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{oname}-%{version}

%build
%cmake_kde6
%make_build

%install
%make_install -C build

%find_lang kcm_plymouth

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 40 |14cr|qmmp-2.4.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	major		2
%define	libname		%mklibname %{name}-2_ %{major}
%define	devname		%mklibname %{name}-2 -d
%define	libnameui	%mklibname qmmpui %{major}
%define	devnameui	%mklibname qmmpui-2 -d

# Enable pipewire
%bcond_without pipewire

%define url_ver %(echo %{version}|cut -d. -f1,2)

Summary:	Qt-based Multimedia Player
Name:		qmmp
Version:	2.4.2
Release:	1
License:	GPLv2+
Group:		Sound
Url:		https://qmmp.ylsoftware.com
Source0:	https://qmmp.ylsoftware.com/files/qmmp/%{url_ver}/%{name}-%{version}.tar.bz2
BuildRequires:	cmake >= 3.5.0
BuildRequires:	gzip-utils
BuildRequires:	glibc-devel
BuildRequires:	qt6-cmake
BuildRequires:	qt6-linguist-tools
BuildRequires:	ffmpeg-devel
BuildRequires:	ladspa-devel
BuildRequires:	pkgconfig(alsa) >= 1.0.22
BuildRequires:	pkgconfig(enca) >= 1.9
BuildRequires:	pkgconfig(faad2)
BuildRequires:	pkgconfig(flac)
BuildRequires:	pkgconfig(jack) >= 1.9.8
BuildRequires:	pkgconfig(libarchive) >= 3.2.0
BuildRequires:	pkgconfig(libbs2b) >= 3.0.0
BuildRequires:	pkgconfig(libcddb)
BuildRequires:	pkgconfig(libcdio)
BuildRequires:	pkgconfig(libcurl) >= 7.19.4
BuildRequires:	pkgconfig(libgme)
BuildRequires:	pkgconfig(libmms) >= 0.4
BuildRequires:	pkgconfig(libmpg123) >= 1.13.0
%if %{with pipewire}
BuildRequires:	pkgconfig(libpipewire-0.3)
%endif
BuildRequires:	libprojectm-devel
BuildRequires:	pkgconfig(libpulse)
BuildRequires:	pkgconfig(libsidplayfp) >= 1.0.3
# Contrib
#BuildRequires:	pkgconfig(libxmp)
BuildRequires:	pkgconfig(mad)
BuildRequires:	pkgconfig(opus) >= 1.0.2
BuildRequires:	pkgconfig(opusfile) >= 0.2
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6DBus)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6Multimedia)
BuildRequires:	pkgconfig(Qt6Network)
BuildRequires:	pkgconfig(Qt6OpenGLWidgets)
BuildRequires:	pkgconfig(Qt6Sql)
BuildRequires:	pkgconfig(Qt6Widgets)
BuildRequires:	pkgconfig(samplerate) >= 0.1.8
# Do not remove sdl-headers needed by sid-ogg. Sflo
BuildRequires:	pkgconfig(sdl)
BuildRequires:	pkgconfig(shout)
BuildRequires:	pkgconfig(sndfile) >= 1.0.22
BuildRequires:	pkgconfig(soxr)
BuildRequires:	pkgconfig(taglib) >= 1.11
BuildRequires:	pkgconfig(udisks2)
BuildRequires:	pkgconfig(vorbis)
BuildRequires:	pkgconfig(wavpack)
BuildRequires:	pkgconfig(wildmidi)
BuildRequires:	pkgconfig(x11)
Requires:	%{libname} = %{EVRD}
Requires:	%{libnameui} = %{EVRD}
Requires:	%{name}-plugins = %{EVRD}
Requires:	unzip
Requires:	wildmidi
Recommends:	%{name}-aac = %{EVRD}
%if %{mdvver} >= 201210
Recommends:	%{name}-ffmpeg = %{EVRD}
%else
Recommends:	%{name}-ffmpeg-legacy = %{EVRD}
%endif
Recommends:	%{name}-jack = %{EVRD}
Recommends:	%{name}-opus = %{EVRD}
Recommends:	%{name}-oss = %{EVRD}
Recommends:	%{name}-simple-ui = %{EVRD}
Recommends:	%{name}-wavpack = %{EVRD}
Recommends:	%{name}-plugin-pack >= 2.3.0

%description
This program is an audio-player, written with help of Qt library. The user
interface is similar to winamp or xmms.
Main opportunities:
* Winamp and xmms skins support;
* plugins support;
* MPEG1 layer 1/2/3 support;
* Ogg Vorbis support;
* native FLAC support;
* Musepack support;
* WavePack support;
* WMA support;
* PCM WAVE support;
* AlSA sound output;
* JACK sound output;
* OSS sound output;
* Pipewire output;
* PulseAudio output;
* Last.fm scrobbler;
* D-Bus support;
* Spectrum Analyzer;
* sample rate conversion;
* streaming support (MP3, Vorbis via IceCast/ShoutCast).

%files
%doc AUTHORS ChangeLog
%{_bindir}/%{name}
%{_datadir}/applications/*.desktop
%{_iconsdir}/hicolor/*/apps/*
%{_datadir}/%{name}
%{_datadir}/metainfo/com.ylsoftware.qmmp.metainfo.xml
%{_datadir}/solid/actions/%{name}-opencda.desktop

#----------------------------------------------------------------------------

%package -n %{libname}
Summary:	Library for %{name}
Group:		System/Libraries

%description -n %{libname}
Qmmp is an audio-player, written with help of Qt library.
This package contains the library needed by %{name}.

%files -n %{libname}
%doc AUTHORS ChangeLog
%{_libdir}/libqmmp.so.%{major}*

#----------------------------------------------------------------------------

%package -n %{libnameui}
Summary:	Library for %{name}
Group:		System/Libraries

%description -n %{libnameui}
Qmmp is an audio-player, written with help of Qt library.
This package contains the library needed by %{name}.

%files -n %{libnameui}
%doc AUTHORS ChangeLog
%{_libdir}/libqmmpui.so.%{major}*

#----------------------------------------------------------------------------

%package -n %{devname}
Summary:	Development files for %{name}
Group:		Development/C
Requires:	%{libname} = %{EVRD}
Provides:	%{name}-devel = %{EVRD}

%description -n %{devname}
Qmmp is an audio-player, written with help of Qt library.
This package contains the files needed for developing applications
which use %{name}.

%files -n %{devname}
%doc AUTHORS ChangeLog
%{_includedir}/%{name}
%{_libdir}/libqmmp.so
%{_libdir}/pkgconfig/qmmp.pc

#----------------------------------------------------------------------------

%package -n %{devnameui}
Summary:	Development files for %{name}
Group:		Development/C
Requires:	%{libnameui} = %{EVRD}
Provides:	%{name}ui-devel = %{EVRD}
Conflicts:	%{_lib}qmmp-devel < 0.7.2

%description -n %{devnameui}
Qmmp is an audio-player, written with help of Qt library.
This package contains the files needed for developing applications
which use %{name}.

%files -n %{devnameui}
%doc AUTHORS ChangeLog
%{_includedir}/qmmpui
%{_libdir}/libqmmpui.so
%{_libdir}/pkgconfig/qmmpui.pc

#----------------------------------------------------------------------------

%package aac
Summary:	Qmmp AAC Input Plugin
Group:		Sound

%description aac
This is the AAC Input plug-in for Qmmp.

This package is in restricted repository because AAC codec is patent-protected.

%files aac
%doc AUTHORS ChangeLog
%{_libdir}/%{name}-%{url_ver}/Input/libaac.so

#----------------------------------------------------------------------------

#  ffmpeg-legacy in LTS
%if %{mdvver} >= 201210
%package ffmpeg
Summary:	Qmmp FFMPEG Input Plugin
Group:		Sound

%description ffmpeg
This is the FFMPEG Input Plugin for Qmmp.

%files ffmpeg
%doc AUTHORS ChangeLog
%{_libdir}/%{name}-%{url_ver}/Input/libffmpeg.so

%else

%package ffmpeg-legacy
Summary:	Qmmp FFMPEG Input Plugin
Group:		Sound

%description ffmpeg-legacy
This is the FFMPEG Input Plugin for Qmmp.

%files ffmpeg-legacy
%doc AUTHORS ChangeLog
%{_libdir}/%{name}-%{url_ver}/Input/libffmpeg_legacy.so
%endif

#----------------------------------------------------------------------------

%package jack
Summary:	Qmmp Jack Output Plugin
Group:		Sound

%description jack
This is the Jack Output Plugin for Qmmp.

%files jack
%doc AUTHORS ChangeLog
%{_libdir}/%{name}-%{url_ver}/Output/libjack.so

#----------------------------------------------------------------------------

%package opus
Summary:	Qmmp Opus Input Plugin
Group:		Sound

%description opus
This is the Opus Input Plugin for Qmmp.

%files opus
%doc AUTHORS ChangeLog
%{_libdir}/%{name}-%{url_ver}/Input/libopus.so

#----------------------------------------------------------------------------

%package oss
Summary:	Qmmp OSS Output Plugin
Group:		Sound

%description oss
This is the Jack OSS Plugin for Qmmp.

%files oss
%doc AUTHORS ChangeLog
%{_libdir}/%{name}-%{url_ver}/Output/liboss.so

#----------------------------------------------------------------------------

%package plugins
Summary:	Qmmp Plugins
Group:		Sound

%description plugins
Qmmp is an audio-player, written with help of Qt library.
This package contains the basic plug-in distribution.

%files plugins
%doc AUTHORS ChangeLog
%{_libdir}/%{name}-%{url_ver}/Input/libarchive.so
%{_libdir}/%{name}-%{url_ver}/Input/libcdaudio.so
%{_libdir}/%{name}-%{url_ver}/Input/libcue.so
%{_libdir}/%{name}-%{url_ver}/Input/libflac.so
%{_libdir}/%{name}-%{url_ver}/Input/libgme.so
#{_libdir}/%%{name}-%{url_ver}/Input/libmad.so
%{_libdir}/%{name}-%{url_ver}/Input/libmpeg.so
%{_libdir}/%{name}-%{url_ver}/Input/libsndfile.so
%{_libdir}/%{name}-%{url_ver}/Input/libvorbis.so
%{_libdir}/%{name}-%{url_ver}/Input/libwildmidi.so
#{_libdir}/%%{name}-%{url_ver}/Input/libxmp-so
%{_libdir}/%{name}-%{url_ver}/Output/libalsa.so
%{_libdir}/%{name}-%{url_ver}/Output/libnull.so
%if %{with pipewire}
%{_libdir}/%{name}-%{url_ver}/Output/libpipewire.so
%endif
%{_libdir}/%{name}-%{url_ver}/Output/libpulseaudio.so
%{_libdir}/%{name}-%{url_ver}/Output/libqtmultimedia.so
%{_libdir}/%{name}-%{url_ver}/Output/libshout.so
%{_libdir}/%{name}-%{url_ver}/General/libbatchtageditor.so
%{_libdir}/%{name}-%{url_ver}/General/libnotifier.so
%{_libdir}/%{name}-%{url_ver}/General/libconverter.so
%{_libdir}/%{name}-%{url_ver}/General/libcopypaste.so
%{_libdir}/%{name}-%{url_ver}/General/libcovermanager.so
%{_libdir}/%{name}-%{url_ver}/General/libfileops.so
%{_libdir}/%{name}-%{url_ver}/General/libgnomehotkey.so
%{_libdir}/%{name}-%{url_ver}/General/libhistory.so
%{_libdir}/%{name}-%{url_ver}/General/libhotkey.so
%{_libdir}/%{name}-%{url_ver}/General/libkdenotify.so
%{_libdir}/%{name}-%{url_ver}/General/liblyrics.so
%{_libdir}/%{name}-%{url_ver}/General/liblibrary.so
%{_libdir}/%{name}-%{url_ver}/General/liblistenbrainz.so
%{_libdir}/%{name}-%{url_ver}/General/libmpris.so
%{_libdir}/%{name}-%{url_ver}/General/librgscan.so
%{_libdir}/%{name}-%{url_ver}/General/libscrobbler.so
%{_libdir}/%{name}-%{url_ver}/General/libsleepinhibitor.so
%{_libdir}/%{name}-%{url_ver}/General/libstatusicon.so
%{_libdir}/%{name}-%{url_ver}/General/libstreambrowser.so
%{_libdir}/%{name}-%{url_ver}/General/libtrackchange.so
%{_libdir}/%{name}-%{url_ver}/General/libudisks.so
%{_libdir}/%{name}-%{url_ver}/CommandLineOptions/libincdecvolumeoption.so
%{_libdir}/%{name}-%{url_ver}/CommandLineOptions/libplaylistoption.so
%{_libdir}/%{name}-%{url_ver}/CommandLineOptions/libseekoption.so
%{_libdir}/%{name}-%{url_ver}/CommandLineOptions/libstatusoption.so
%{_libdir}/%{name}-%{url_ver}/Effect/libbs2b.so
%{_libdir}/%{name}-%{url_ver}/Effect/libcrossfade.so
%{_libdir}/%{name}-%{url_ver}/Effect/libfilewriter.so
%{_libdir}/%{name}-%{url_ver}/Effect/libladspa.so
%{_libdir}/%{name}-%{url_ver}/Effect/libmonotostereo.so
%{_libdir}/%{name}-%{url_ver}/Effect/libsoxr.so
%{_libdir}/%{name}-%{url_ver}/Effect/libstereo.so
%{_libdir}/%{name}-%{url_ver}/FileDialogs/libqmmpfiledialog.so
%{_libdir}/%{name}-%{url_ver}/FileDialogs/libtwopanelfiledialog.so
%{_libdir}/%{name}-%{url_ver}/PlayListFormats/*.so
%{_libdir}/%{name}-%{url_ver}/Transports/libhttp.so
%{_libdir}/%{name}-%{url_ver}/Visual/libanalyzer.so
%{_libdir}/%{name}-%{url_ver}/Visual/libprojectm.so
%{_libdir}/%{name}-%{url_ver}/Ui/libskinned.so

#----------------------------------------------------------------------------

%package sid
Summary:	Qmmp SID Input Plugin
Group:		Sound

%description sid
This is the SID Input Plugin for Qmmp.

%files sid
%doc AUTHORS ChangeLog
%{_libdir}/%{name}-%{url_ver}/Input/libsid.so

#----------------------------------------------------------------------------

%package simple-ui
Summary:	Qmmp Simple UI Plugin
Group:		Sound

%description simple-ui
This is the Simple UI Plugin for Qmmp (simple user interface based on standard
widgets set).

%files simple-ui
%doc AUTHORS ChangeLog
%{_libdir}/%{name}-%{url_ver}/Ui/libqsui.so

#----------------------------------------------------------------------------

%package wavpack
Summary:	Qmmp WavPack Input Plugin
Group:		Sound

%description wavpack
This is the WavPack Input Plugin for Qmmp.

%files wavpack
%doc AUTHORS ChangeLog
%{_libdir}/%{name}-%{url_ver}/Input/libwavpack.so

#----------------------------------------------------------------------------

%prep
%autosetup -p1

%build
#oss3 support is deprecated upstream for now I'll enable it ...
%cmake -DUSE_HAL:BOOL=FALSE \
    -DUSE_OSS:BOOL=TRUE \
    -DUSE_OSS4:BOOL=TRUE \
    -DUSE_OSS:UDISKS2=TRUE \
    -DUSE_RPATH=TRUE \
    -DUSE_FLAC=TRUE \
    -DUSE_VORBIS=TRUE \
    -DUSE_MPC=TRUE \
    -DUSE_ARCHIVE=TRUE \
    -DUSE_FFMPEG=TRUE \
    -DUSE_OPUS=TRUE \
    -DCMAKE_INSTALL_PREFIX=/usr

%make_build


%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 41 |14cr|suricata-7.0.17-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 2
%define libhtp %mklibname htp %{major}
%define devhtp %mklibname htp -d

Summary:	Intrusion Detection System
Name:		suricata
Version:	7.0.17
Release:	1
License:	GPLv2+
Group:		Security
Url:		http://suricata-ids.org/
Source0:	http://www.openinfosecfoundation.org/download/%{name}-%{version}.tar.gz
Source3:	suricata.sysconfig
Source4:	suricata.sysusers.conf
Source5:	suricata-tmpfiles.conf
# Irrelevant docs are getting installed, drop them
Patch0:		suricata-2.0.9-docs.patch
Patch1:		suricata-service.patch
Patch2:		suricata-rules.patch
BuildRequires:	cargo
BuildRequires:	rustc
BuildRequires:	python3-yaml
BuildRequires:	libnet-devel
BuildRequires:	magic-devel
BuildRequires:	pcap-devel
BuildRequires:	pkgconfig(geoip)
BuildRequires:	pkgconfig(jansson)
BuildRequires:	pkgconfig(libcap-ng)
BuildRequires:	pkgconfig(liblz4)
BuildRequires:	pkgconfig(libmaxminddb)
BuildRequires:	pkgconfig(libnetfilter_queue)
BuildRequires:	pkgconfig(libnfnetlink)
BuildRequires:	pkgconfig(libpcre2-8)
BuildRequires:	pkgconfig(lua)
BuildRequires:	pkgconfig(nspr)
BuildRequires:	pkgconfig(nss)
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(yaml-0.1)
BuildRequires:	pkgconfig(zlib)
%if %{mdvver} >= 202510
Requires(pre):	%{_bindir}/systemd-sysusers
%else
Requires(pre):	/bin/systemd-sysusers
%endif

%description
The Suricata Engine is an Open Source Next Generation Intrusion
Detection and Prevention Engine. This engine is not intended to
just replace or emulate the existing tools in the industry, but
will bring new ideas and technologies to the field. This new Engine
supports Multi-threading, Automatic Protocol Detection (IP, TCP,
UDP, ICMP, HTTP, TLS, FTP and SMB! ), Gzip Decompression, Fast IP
Matching and coming soon hardware acceleration on CUDA and OpenCL
GPU cards.

%files
%doc COPYING doc/INSTALL
%{_sbindir}/suricata
%{_sbindir}/suricatasc
%{_sbindir}/suricatactl
%{_sbindir}/suricata-update
%{_datadir}/suricata
%{_usr}/lib/suricata/python/suricata/*
%{_usr}/lib/suricata/python/suricatasc
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/rules
%{_sysusersdir}/%{name}.conf
%{_unitdir}/suricata.service
%attr(755,suricata,suricata) %dir %{_logdir}/suricata
%config(noreplace) %{_sysconfdir}/%{name}/suricata.yaml
%config(noreplace) %{_sysconfdir}/%{name}/*.config
%config(noreplace) %{_sysconfdir}/%{name}/rules/*.rules
%config(noreplace) %{_sysconfdir}/logrotate.d/suricata
%config(noreplace) %{_sysconfdir}/sysconfig/suricata
%config(noreplace) %{_tmpfilesdir}/%{name}.conf
%{_mandir}/man1/suricata.1*
%{_mandir}/man1/suricatactl-filestore.1*
%{_mandir}/man1/suricatactl.1*
%{_mandir}/man1/suricatasc.1*

%pre
# create users and groups
%sysusers_create_package suricata %{SOURCE4}

%post
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
%systemd_post suricata.service

%preun
%systemd_preun suricata.service

#----------------------------------------------------------------------------

%package -n %{libhtp}
Summary:	Security-aware parser for the HTTP protocol shared library
Group:		System/Libraries

%description  -n %{libhtp}
Security-aware parser for the HTTP protocol shared library.

%files -n %{libhtp}
%{_libdir}/libhtp.so.%{major}*

#----------------------------------------------------------------------------

%package -n %{devhtp}
Summary:	Security-aware parser for the HTTP protocol library development files
Group:		Development/C
Provides:	htp-devel = %{EVRD}

%description  -n %{devhtp}
Security-aware parser for the HTTP protocol library development files.

%files -n %{devhtp}
%{_includedir}/htp/
#{_includedir}/suricata-plugin.h
%{_libdir}/libhtp.so
%{_libdir}/pkgconfig/htp.pc

#----------------------------------------------------------------------------

%prep
%autosetup -p1

%build
%configure \
	--disable-static \
	--enable-af-packet \
	--disable-coccinelle \
	--disable-gccmarch-native \
	--enable-gccprotect \
	--enable-geoip \
	--enable-jansson \
	--enable-lua \
	--enable-nfqueue \
	--enable-pie \
	--enable-rust

%make_build

%install
%make_install bindir=%{_sbindir}


# Setup etc directory
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
install -m 644 suricata.yaml %{buildroot}%{_sysconfdir}/%{name}
install -m 644 *.config %{buildroot}%{_sysconfdir}/%{name}

install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/rules
install -m 644 rules/*.rules %{buildroot}%{_sysconfdir}/%{name}/rules

install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/suricata

install -D -m 644 etc/suricata.service %{buildroot}%{_unitdir}/suricata.service

install -D -m 644 etc/suricata.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/suricata

install -D -m 644 etc/classification.config %{buildroot}%{_sysconfdir}/%{name}/classification.config
install -D -m 644 etc/reference.config %{buildroot}%{_sysconfdir}/%{name}/reference.config

# Make logging directory
install -d -m 755 %{buildroot}%{_logdir}/%{name}

rm -fr %{buildroot}%{_docdir}/%{name}

# Setup tmpdirs
install -d -m 755 %{buildroot}%{_tmpfilesdir}
install -m 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf

#install sysuser config
install -d %{buildroot}%{_sysusersdir}/
install -m0644 %{SOURCE4} %{buildroot}%{_sysusersdir}/suricata.conf


%check
make check

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 42 |14cr|uwsm-0.26.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%undefine _debugsource_packages

Summary:	Universal Wayland Session Manager
Name:		uwsm
Version:	0.26.2
Release:	1
License:	MIT
Group:		System/Base
Url:		https://github.com/vladimir-csp/uwsm
Source0:	https://github.com/vladimir-csp/uwsm/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:	desktop-file-utils
BuildRequires:	meson
BuildRequires:	python3dist(dbus-python)
BuildRequires:	python3dist(pyxdg)
BuildRequires:	pkgconfig(scdoc)
Requires:	python3-pyxdg
Requires:	python3-dbus

%description
Universal Wayland Session Manager.

%files
%doc %{_docdir}/%{name}
%license LICENSE
%{_bindir}/fumon
%{_bindir}/%{name}
%{_bindir}/%{name}-app
%{_bindir}/%{name}-terminal
%{_bindir}/%{name}-terminal-scope
%{_bindir}/%{name}-terminal-service
%{_bindir}/uuctl
%dir %{_libexecdir}/uwsm
%{_libexecdir}/uwsm/prepare-env.sh
%{_libexecdir}/uwsm/signal-handler.sh
%{_datadir}/applications/uuctl.desktop
%{_datadir}/%{name}
%{_mandir}/man1/fumon.1.*
%{_mandir}/man1/%{name}.1.*
%{_mandir}/man1/uuctl.1.*
%{_mandir}/man1/uwsm-app.1.*
%{_mandir}/man3/%{name}-plugins.3.*
%{_userunitdir}/fumon.service
%{_prefix}/lib/systemd/user-preset/80-fumon.preset
%{_userunitdir}/app-graphical.slice
%{_userunitdir}/background-graphical.slice
%{_userunitdir}/session-graphical.slice
%{_userunitdir}/wayland-session-bindpid@.service
%{_userunitdir}/wayland-session-envelope@.target
%{_userunitdir}/wayland-session-pre@.target
%{_userunitdir}/wayland-session-shutdown.target
%{_userunitdir}/wayland-session-waitenv.service
%{_userunitdir}/wayland-session-xdg-autostart@.target
%{_userunitdir}/wayland-session@.target
%{_userunitdir}/wayland-wm-app-daemon.service
%{_userunitdir}/wayland-wm-env@.service
%{_userunitdir}/wayland-wm@.service

%post
%systemd_user_post fumon.service

%preun
%systemd_user_preun fumon.service

%postun
%systemd_user_postun fumon.service

#------------------------------------------------------------------

%prep
%autosetup -p1

%build
%meson	\
	-Dfumon=enabled	\
	-Duuctl=enabled	\
	-Duwsm-app=enabled

%install
%meson_install

%check
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 43 |14cr|xdg-desktop-portal-hyprland-1.3.12-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global portal_commit 663be9cad424b170b28b9fa8a61042d721007f3b
%global portal_shortcommit %(c=%{portal_commit}; echo ${c:0:7})

Name:		xdg-desktop-portal-hyprland
Version:	1.3.12
Release:	1
Epoch:		1
Summary:	xdg-desktop-portal backend for hyprland
Group:		System/Base

License:	BSD-3-Clause
URL:		https://github.com/hyprwm/%{name}
Source0:	https://github.com/hyprwm/xdg-desktop-portal-hyprland/archive/refs/tags/v%{version}.tar.gz?/%{name}-%{version}.tar.gz

BuildRequires:	cmake
BuildRequires:	qt6-cmake
BuildRequires:	hyprland-devel
BuildRequires:	pkgconfig(gbm)
BuildRequires:	pkgconfig(vulkan)
BuildRequires:	pkgconfig(hyprland-protocols)
BuildRequires:	pkgconfig(hyprwayland-scanner)
BuildRequires:	pkgconfig(libdrm)
BuildRequires:	pkgconfig(libpipewire-0.3)
BuildRequires:	pkgconfig(libsystemd)
BuildRequires:	pkgconfig(Qt6Widgets)
BuildRequires:	pkgconfig(sdbus-c++)
BuildRequires:	pkgconfig(systemd)
BuildRequires:	pkgconfig(wayland-client)
BuildRequires:	pkgconfig(wayland-protocols)
BuildRequires:	pkgconfig(wayland-scanner)
BuildRequires:	pkgconfig(hyprlang)

Requires:	dbus
# required for Screenshot portal implementation
Requires:	grim
Requires:	xdg-desktop-portal
# required for hyprland-share-picker
Requires:	slurp
Requires:	qt6-qtwayland
Recommends:	hyprpicker

%description
%{summary}.


%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build


%post
%systemd_user_post %{name}.service

%preun
%systemd_user_preun %{name}.service


%files
%license LICENSE
%doc README.md contrib/config.sample
%{_bindir}/hyprland-share-picker
%{_libexecdir}/%{name}
%{_datadir}/xdg-desktop-portal/portals/hyprland.portal
%{_datadir}/dbus-1/services/*.service
%{_userunitdir}/%{name}.service

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 44 |14mr|abseil-cpp-20240116.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major %(echo %{version} |cut -b3-6).0.0
%define devname %mklibname absl -d

Summary:	C++ Common Libraries
Name:		abseil-cpp
Version:	20240116.1
Release:	1
License:	ASL 2.0
Group:		Development/C++
Url:		https://abseil.io
Source0:	https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz
Source1:	abseil-cpp.rpmlintrc
Patch0:		abseil-cpp-gcc11.patch
BuildRequires:	cmake
BuildRequires:	patchelf

%description
Abseil is an open-source collection of C++ library code designed to augment
the C++ standard library. The Abseil library code is collected from
Google's own C++ code base, has been extensively tested and used in
production, and is the same code we depend on in our daily coding lives.

In some cases, Abseil provides pieces missing from the C++ standard; in
others, Abseil provides alternatives to the standard for special needs we've
found through usage in the Google code base. We denote those cases clearly
within the library code we provide you.

Abseil is not meant to be a competitor to the standard library; we've just
found that many of these utilities serve a purpose within our code base,
and we now want to provide those resources to the C++ community as a whole.

#---------------------------------------------------------------------------

%define local_lib_pkg() %{expand:\
%global requires_lib %{?requires_lib} %{mklibname absl_%1 %{major}} \
%package -n %{mklibname absl_%1 %{major}} \
Summary: %{summary} \
Group: System/Libraries \
Obsoletes:	%{mklibname absl_%{1} 0} < %{EVRD} \
%description -n %{mklibname absl_%1 %{major}} \
%{summary} \
Package with library libsbsl_%{1}.so.%{major}. \
%files -n %{mklibname absl_%1 %{major}} \
%{_libdir}/libabsl_%{1}.so.%{major}* \
}

%local_lib_pkg bad_any_cast_impl
%local_lib_pkg bad_optional_access
%local_lib_pkg bad_variant_access
%local_lib_pkg base
%local_lib_pkg city
%local_lib_pkg civil_time
%local_lib_pkg cord
%local_lib_pkg cord_internal
%local_lib_pkg cordz_functions
%local_lib_pkg cordz_handle
%local_lib_pkg cordz_info
%local_lib_pkg cordz_sample_token
%local_lib_pkg debugging_internal
%local_lib_pkg demangle_internal
%local_lib_pkg examine_stack
%local_lib_pkg exponential_biased
%local_lib_pkg failure_signal_handler
%local_lib_pkg flags_commandlineflag
%local_lib_pkg flags_commandlineflag_internal
%local_lib_pkg flags_config
%local_lib_pkg flags_internal
%local_lib_pkg flags_marshalling
%local_lib_pkg flags_parse
%local_lib_pkg flags_private_handle_accessor
%local_lib_pkg flags_program_name
%local_lib_pkg flags_reflection
%local_lib_pkg flags_usage
%local_lib_pkg flags_usage_internal
%local_lib_pkg graphcycles_internal
%local_lib_pkg hash
%local_lib_pkg hashtablez_sampler
%local_lib_pkg int128
%local_lib_pkg leak_check
%local_lib_pkg log_severity
%local_lib_pkg low_level_hash
%local_lib_pkg malloc_internal
%local_lib_pkg periodic_sampler
%local_lib_pkg random_distributions
%local_lib_pkg random_internal_distribution_test_util
%local_lib_pkg random_internal_platform
%local_lib_pkg random_internal_pool_urbg
%local_lib_pkg random_internal_randen
%local_lib_pkg random_internal_randen_hwaes
%local_lib_pkg random_internal_randen_hwaes_impl
%local_lib_pkg random_internal_randen_slow
%local_lib_pkg random_internal_seed_material
%local_lib_pkg random_seed_gen_exception
%local_lib_pkg random_seed_sequences
%local_lib_pkg raw_hash_set
%local_lib_pkg raw_logging_internal
%local_lib_pkg scoped_set_env
%local_lib_pkg spinlock_wait
%local_lib_pkg stacktrace
%local_lib_pkg status
%local_lib_pkg statusor
%local_lib_pkg strerror
%local_lib_pkg str_format_internal
%local_lib_pkg strings
%local_lib_pkg string_view
%local_lib_pkg strings_internal
%local_lib_pkg vlog_config_internal
%local_lib_pkg kernel_timeout_internal
%local_lib_pkg log_internal_fnmatch
%local_lib_pkg symbolize
%local_lib_pkg synchronization
%local_lib_pkg throw_delegate
%local_lib_pkg time
%local_lib_pkg time_zone
%local_lib_pkg log_sink
%local_lib_pkg crc32c
%local_lib_pkg crc_cord_state
%local_lib_pkg crc_cpu_detect
%local_lib_pkg crc_internal
%local_lib_pkg die_if_null
%local_lib_pkg log_entry
%local_lib_pkg log_flags
%local_lib_pkg log_globals
%local_lib_pkg log_initialize
%local_lib_pkg log_internal_check_op
%local_lib_pkg log_internal_conditions
%local_lib_pkg log_internal_format
%local_lib_pkg log_internal_globals
%local_lib_pkg log_internal_message
%local_lib_pkg log_internal_log_sink_set
%local_lib_pkg log_internal_proto
%local_lib_pkg log_internal_nullguard

#---------------------------------------------------------------------------

%package -n %{devname}
Summary:	Development files for %{name}
Group:		Development/Other
Requires:	%{?requires_lib}
Provides:	%{name}-devel = %{EVRD}

%description -n %{devname}
Development headers for %{name}

%files -n %{devname}
%{_includedir}/absl
%{_libdir}/pkgconfig/*.pc
%{_libdir}/cmake/absl
%{_libdir}/libabsl_*.so

#---------------------------------------------------------------------------

%prep
%autosetup -p1

%build
%global optflags %{optflags} -std=c++17
%global ldflags %{ldflags} -latomic
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_STANDARD=17
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 45 |14mr|asciidoc-10.2.1-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Tool to convert AsciiDoc text files to DocBook, HTML or Unix man pages
Name:		asciidoc
Version:	10.2.1
Release:	3
License:	GPLv2+
Group:		Publishing
Url:		http://asciidoc.org
Source0:	https://github.com/asciidoc-py/asciidoc-py/archive/%{version}/%{name}-py-%{version}.tar.gz
BuildRequires:	docbook-dtd42-xml
BuildRequires:	docbook-dtd43-xml
BuildRequires:	docbook-dtd44-xml
BuildRequires:	docbook-dtd45-xml
BuildRequires:	docbook-style-xsl
BuildRequires:	dos2unix
BuildRequires:	pcre
BuildRequires:	xsltproc
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(wheel)
BuildRequires:	python3dist(setuptools)
Requires:	python3
Requires:	docbook-style-xsl
BuildArch:	noarch

%description
AsciiDoc is a text document format for writing short documents, articles,
books and UNIX man pages.

%files
%doc BUGS.adoc CHANGELOG.adoc COPYRIGHT README.md
%doc %{_docdir}/%{name}/{doc,images}
%{_bindir}/asciidoc
%{_mandir}/man1/*.1*
%{python3_sitelib}/asciidoc-%{version}.dist-info/
%{python3_sitelib}/asciidoc/

#----------------------------------------------------------------------------

%package -n a2x
Summary:	Converts Asciidoc text files to other formats (PDF, EPUB, DVI, etc.)
Group:		Publishing
Requires:	asciidoc
Requires:	xsltproc
Conflicts:	%{name} < 9.1

%description -n a2x
A toolchain manager for AsciiDoc that converts Asciidoc text files to other
file formats.

%files -n a2x
%{_bindir}/a2x
%{_mandir}/man1/a2x.1*

#----------------------------------------------------------------------------

%prep
%setup -qn %{name}-py-%{version}
%autopatch -p1

# Convert dict files to utf-8
for file in doc/*.dict; do
    iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
    touch -r $file $file.new && \
    mv $file.new $file
done

for i in  doc/book-multi.txt doc/article.txt COPYRIGHT doc/faq.txt \
doc/asciidoc.1.txt doc/book.txt doc/latex-backend.txt;
do
    dos2unix < $i > $i.fixed ; mv -f $i.fixed $i ;
done

# Fix python shebang
grep -rl '#!/usr/bin/env python' | xargs -r \
    sed -i -e '1s@#!/usr/bin/env python3\?$@#!%{__python3}@'

%build
autoreconf -if
%configure
sed -ri 's/a2x.py -f/a2x.py -v -f/g' Makefile
%make_build

%install
%make_install docs PIP_NO_BUILD_ISOLATION=0

mkdir -p %{buildroot}%{_mandir}/man1
mv %{buildroot}/share/doc/doc/*.1 %{buildroot}%{_mandir}/man1/
mkdir -p %{buildroot}/%{_docdir}/%{name}/
mv %{buildroot}/share/doc/doc %{buildroot}/%{_docdir}/%{name}/
mkdir -p %{buildroot}/%{_docdir}/%{name}/images
mv %{buildroot}/share/doc/images %{buildroot}/%{_docdir}/%{name}/
rm -rf %{buildroot}/share/

# Make it easier to %exclude these with both rpm < and >= 4.7
for file in %{buildroot}{%{_bindir},%{_datadir}/asciidoc/filters/*}/*.py ; do
    rm -f ${file}{c,o}
done

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 46 |14mr|binutils-2.47-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Currently devel-rpm-generators could handle libbfd-%%{version}.so
# if libbfd.so was a symlink to it, but libbfd.so is a text file...
%global __requires_exclude ^devel\\(libbfd-.*\\)$
%global _disable_ld_no_undefined %nil

#% define _disable_lto 1

%define lib_major 2
%define lib_name_orig %mklibname binutils
%define lib_name %{lib_name_orig}%{lib_major}
%define dev_name %mklibname binutils -d

# riscv/loong64 only-BFD arches
%ifarch %{riscv} loongarch64
%global optflags %{optflags} -fuse-ld=bfd
%endif
%bcond_with default_lld

%bcond_without jansson

%ifarch %{riscv} %{ix86} loongarch64
%bcond_with gprofng
%else
%bcond_with gprofng
%endif
%global libpath %{_libdir}:%{_prefix}/lib:%{_prefix}/%{_target_platform}/lib/


Summary:	GNU Binary Utility Development Utilities
Name:		binutils
Version:	2.47
Release:	1
License:	GPLv3+
Group:		Development/Other
URL:		http://sources.redhat.com/binutils/
Source0:	https://ftp.gnu.org/gnu/binutils/binutils-%{version}%{?DATE:-%{DATE}}.tar.xz
#Source1:	http://ftp.kernel.org/pub/linux/devel/binutils/binutils-%{version}.tar.xz.sign
Source5:	binutils-2.19.50.0.1-output-format.sed
Source10:	binutils.rpmlintrc
#----------------------------------------------------------------------------

#----------------------------------------------------------------------------
 
# Purpose:  Use /lib64 and /usr/lib64 instead of /lib and /usr/lib in the
#           default library search path of 64-bit targets.
# Lifetime: Permanent, but it should not be.  This is a bug in the libtool
#           sources used in both binutils and gcc, (specifically the
#           libtool.m4 file).  These are based on a version released in 2009
#           (2.2.6?) rather than the latest version.  (Definitely fixed in
#           libtool version 2.4.6).
Patch01: binutils-libtool-lib64.patch
 
# Purpose:  Appends a RHEL or Fedora release string to the generic binutils
#           version string.
# Lifetime: Permanent.  This is a RHEL/Fedora specific patch.
Patch02: binutils-version.patch
 
# Purpose:  Exports the demangle.h header file (associated with the libiberty
#           sources) with the binutils-devel rpm.
# Lifetime: Permanent.  This is a RHEL/Fedora specific patch.
Patch03: binutils-export-demangle.h.patch
 
# Purpose:  Disables the check in the BFD library's bfd.h header file that
#           config.h has been included before the bfd.h header.  See BZ
#           #845084 for more details.
# Lifetime: Permanent - but it should not be.  The bfd.h header defines
#           various types that are dependent upon configuration options, so
#           the order of inclusion is important.
# FIXME:    It would be better if the packages using the bfd.h header were
#           fixed so that they do include the header files in the correct
#           order.
Patch04: binutils-no-config-h-check.patch
 
# Purpose:  Disable an x86/x86_64 optimization that moves functions from the
#           PLT into the GOTPLT for faster access.  This optimization is
#           problematic for tools that want to intercept PLT entries, such
#           as ltrace and LD_AUDIT.  See BZs 1452111 and 1333481.
# Lifetime: Permanent.  But it should not be.
# FIXME:    Replace with a configure time option.
Patch05: binutils-revert-PLT-elision.patch
 
# Purpose:  Do not create PLT entries for AARCH64 IFUNC symbols referenced in
#           debug sections.
# Lifetime: Permanent.
# FIXME:    Find related bug.  Decide on permanency.
Patch06: binutils-2.27-aarch64-ifunc.patch
 
# Purpose:  Stop the binutils from statically linking with libstdc++.
# Lifetime: Permanent.
Patch07: binutils-do-not-link-with-static-libstdc++.patch
 
# Purpose:  Allow the binutils to be configured with any (recent) version of
#            autoconf.
# Lifetime: Fixed in 2.46 (maybe ?)
Patch08: binutils-autoconf-version.patch
 
# Purpose:  Stop libtool from inserting useless runpaths into binaries.
# Lifetime: Who knows.
Patch09: binutils-libtool-no-rpath.patch
 
# Purpose:  Fix binutils testsuite failures.
# Lifetime: Permanent, but varies with each rebase.
Patch10: binutils-testsuite-fixes.patch
 
# Purpose:  Fix binutils testsuite failures for the RISCV-64 target.
# Lifetime: Permanent, but varies with each rebase.
Patch11: binutils-riscv-testsuite-fixes.patch
 
# Purpose:  Fix the ar test of non-deterministic archives.
# Lifetime: Fixed in 2.46
Patch12: binutils-fix-ar-test.patch
 
# Purpose:  Fix a seg fault in the AArch64 linker when building u-boot.
# Lifetime: Fixed in 2.46
Patch13: binutils-aarch64-small-plt0.patch

	
# Purpose:  Fix ld testsuite failures when enable_textrel is set.
# Lifetime: Permanent.
Patch21: binutils-ld-default-z-text.patch
 
#----------------------------------------------------------------------------
 
# Purpose:  Remove the Build protected-func-2 without PIE linker tests
#            as these are currently failing.
# Lifetime: TEMPORARY - should be fixed by the 2.46 release.
Patch98: binutils-remove-ld-protected-func-2-test.patch
 
# Purpose:  Suppress the x86 linker's p_align-1 tests due to kernel bug on CentOS-10.
# Lifetime: TEMPORARY
Patch99: binutils-suppress-ld-align-tests.patch

%rename %{lib_name}
BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:	bison
BuildRequires:	flex
BuildRequires:	gcc
BuildRequires:	gettext
BuildRequires:	texinfo
BuildRequires:	dejagnu
BuildRequires:	pkgconfig(zlib)
BuildRequires:	pkgconfig(libzstd)
# make check'ing requires libdl.a
BuildRequires:	glibc-static-devel >= 6:2.14.90-8
BuildRequires:	pkgconfig(isl)
%if %{with jansson}
BuildRequires:	pkgconfig(jansson)
%endif
BuildRequires:	gmp-devel
BuildRequires:	pkgconfig(mpfr)
BuildRequires:	libmpc-devel
%if %{with default_lld}
Requires:	lld
%endif

%description
Binutils is a collection of binary utilities, including:

   * ar: creating modifying and extracting from archives
   * nm: for listing symbols from object files
   * objcopy: for copying and translating object files
   * objdump: for displaying information from object files
   * ranlib: for generating an index for the contents of an archive
   * size: for listing the section sizes of an object or archive file
   * strings: for listing printable strings from files
   * strip: for discarding symbols (a filter for demangling encoded C++ symbols
   * addr2line: for converting addresses to file and line
   * nlmconv: for converting object code into an NLM

Install binutils if you need to perform any of these types of actions on
binary files.  Most programmers will want to install binutils.

%if %{with gprofng}
%package gprofng
Summary:    Next Generating code profiling tool
Group:		Development/Other
Provides:   gprofng = %{EVRD}
Requires:   binutils = %{EVRD}

%description gprofng
GprofNG is the GNU Next Generation Profiler for analyzing the performance
of Linux applications.

%files gprofng
%config(noreplace) %{_sysconfdir}/gprofng.rc
%{_bindir}/gprofng
%{_bindir}/gprofng-archive
%{_bindir}/gprofng-collect-app
# requires perl
%{_bindir}/gprofng-display-html
# end perl
%{_bindir}/gprofng-display-src
%{_bindir}/gprofng-display-text
%{_bindir}/gprofng-gmon
# legacy symlinks
%{_bindir}/gp-archive
%{_bindir}/gp-collect-app
%{_bindir}/gp-display-html
%{_bindir}/gp-display-src
%{_bindir}/gp-display-text
%{_bindir}/%{_target_platform}-gprofng
%{_libdir}/gprofng
%{_libdir}/libgprofng.so.*
%{_datadir}/doc/gprofng/examples.tar.gz
%endif # end gprof

%package -n %{dev_name}
Summary:	Main library for %{name}
Group:		Development/Other
Provides:	%{name}-devel = %{version}-%{release}
Provides:	%{lib_name}-devel = %{version}-%{release}
Obsoletes:	%{lib_name}-devel <= %{version}-%{release}
Requires:	pkgconfig(zlib)
%if %{with gprofng}
Requires:   gprofng = %{EVRD}
%endif
%if %{__isa_bits} == 64
Provides:	devel(libopcodes-%{version}-%{release}(64bit))
%else
Provides:	devel(libopcodes-%{version}-%{release})
%endif

%description -n %{dev_name}
This package contains BFD and opcodes static libraries and associated
header files.  Only *.a libraries are included, because BFD doesn't
have a stable ABI.  Developers starting new projects are strongly encouraged
to consider using libelf instead of BFD.

%prep
%autosetup -p1 -n binutils-%{version}%{?DATE:-%{DATE}}

# On ppc64 and aarch64, we might use 64KiB pages
sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*ppc.c
sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*aarch64.c

# LTP sucks
sed -i 's/i\[3-7\]86/i[34567]86/g' */config.* */configure*
# according to the patch
sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in}
sed -i -e '/^libopcodes_la_\(DEPENDENCIES\|LIBADD\)/s,$, ../bfd/libbfd.la,' opcodes/Makefile.{am,in}

# Build libbfd.so and libopcodes.so with -Bsymbolic-functions if possible.
if gcc %{optflags} -v --help 2>&1 | grep -q -- -Bsymbolic-functions; then
sed -i -e 's/^libbfd_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' bfd/Makefile.{am,in}
sed -i -e 's/^libopcodes_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' opcodes/Makefile.{am,in}
fi

# Undo the name change to run the testsuite.
for tool in binutils gas ld
do
  sed -i -e "2aDEJATOOL = $tool" $tool/Makefile.am
  sed -i -e "s/^DEJATOOL = .*/DEJATOOL = $tool/" $tool/Makefile.in
done

find -name \*.h -o -name \*.c -o -name \*.cc | xargs chmod 644

%build
LDFLAGS="${LDFLAGS:-%{build_ldflags}}"
mkdir build_%{_arch}
cd build_%{_arch}
CONFIGURE_TOP=.. %configure \
        --build=%{_target_platform} \
        --host=%{_target_platform} \
		--enable-64-bit-bfd \
		--enable-shared \
		--with-pic \
%if %{with jansson}
		--enable-jansson=yes \
%endif
		--with-bugurl=%{bugurl} \
		--enable-targets=x86_64-pep,bpf-unknown-none \
		--enable-cet \
                --with-lib-path="%{libpath}" \
		--enable-ld=default \
		--disable-gold \
		--enable-plugins \
		--enable-threads \
		--enable-default-hash-style=gnu \
%if %{with gprofng}
		--enable-gprofng=yes \
%else
		--enable-gprofng=no \
%endif
		--enable-lto \
		--enable-colored-disassembly \
		--enable-install-libiberty \
		--disable-werror \
		--enable-static \
		--enable-relro=yes \
		--with-separate-debug-dir=%{_prefix}/lib/debug \
		--enable-initfini-array \
		--enable-separate-code=yes \
		--disable-isl-version-check \
		--enable-generate-build-notes=no \
		--enable-compressed-debug-sections=none \
		--with-mpc=%{_libdir} \
		--with-mpfr=%{_libdir} \
		--with-gmp=%{_libdir} \
		--with-isl=%{_libdir} \
		--with-system-zlib

%make_build
cd -

%install
%make_install -C build_%{_arch}
rm -f %{buildroot}%{_mandir}/man1/*{dlltool,nlmconv,windres}*
rm -f %{buildroot}%{_infodir}/dir

# Sanity check --enable-64-bit-bfd really works.
grep '^#define BFD_ARCH_SIZE 64$' %{buildroot}%{_prefix}/include/bfd.h
# Fix multilib conflicts of generated values by __WORDSIZE-based expressions.
sed -i -e '/^#include "ansidecl.h"/{p;s~^.*$~#include <bits/wordsize.h>~;}' \
	-e 's/^#define BFD_DEFAULT_TARGET_SIZE \(32\|64\) *$/#define BFD_DEFAULT_TARGET_SIZE __WORDSIZE/' \
	-e 's/^#define BFD_HOST_64BIT_LONG [01] *$/#define BFD_HOST_64BIT_LONG (__WORDSIZE == 64)/' \
	-e 's/^#define BFD_HOST_64_BIT \(long \)\?long *$/#if __WORDSIZE == 32\
#define BFD_HOST_64_BIT long long\
#else\
#define BFD_HOST_64_BIT long\
#endif/' \
	-e 's/^#define BFD_HOST_U_64_BIT unsigned \(long \)\?long *$/#define BFD_HOST_U_64_BIT unsigned BFD_HOST_64_BIT/' \
	%{buildroot}%{_prefix}/include/bfd.h
touch -r bfd/bfd-in2.h %{buildroot}%{_prefix}/include/bfd.h

# Generate .so linker scripts for dependencies; imported from glibc/Makerules:
rm -f %{buildroot}%{_libdir}/libbfd.so %{buildroot}%{_libdir}/libopcodes.so
# This fragment of linker script gives the OUTPUT_FORMAT statement
# for the configuration we are building.
OUTPUT_FORMAT="\
/* Ensure this .so library will not be used by a link for a different format
   on a multi-architecture system.  */
$(gcc $CFLAGS $LDFLAGS -shared -x c /dev/null -o /dev/null -Wl,--verbose -v 2>&1 | sed -n -f "%{SOURCE5}")"

tee %{buildroot}%{_libdir}/libbfd.so <<EOH
/* GNU ld script */

$OUTPUT_FORMAT

/* The libz dependency is unexpected by legacy build scripts.  */
INPUT ( %{_libdir}/libbfd.a -lsframe -liberty -lz -lzstd )
EOH

tee %{buildroot}%{_libdir}/libopcodes.so <<EOH
/* GNU ld script */

$OUTPUT_FORMAT

INPUT ( %{_libdir}/libopcodes.a -lbfd -lz -lzstd )
EOH

cd %{buildroot}%{_bindir}
# Symlinks for native tools compatibility with crosscompilers
for i in *; do
	echo $i |grep -q -- - && continue
	[ -e %{_target_platform}-$i ] || ln -s $i %{_target_platform}-$i
done

# Default ld, if one is missing...
for i in *-ld.bfd; do
	[ -e ${i/.bfd/} ] || ln -s $i ${i/.bfd}
done
cd -

rm -f  %{buildroot}%{_prefix}/*/*/lib/*.la

%find_lang binutils --all-name

mkdir -p %{buildroot}%{_libdir}/bfd-plugins

%if %{with default_lld}
# For now, let's keep %{_bindir}/ld in here even if it points
# to lld...
# Least surprise for now, but ultimately %{_bindir}/ld should
# move to lld
rm -f %{buildroot}%{_bindir}/ld
ln -s ld.lld %{buildroot}%{_bindir}/ld
%endif

# try to remove it on 2.42+
find %{buildroot}/%{_bindir} -type f -executable -exec %{__strip} {} \;

%check
# All Tests must pass
echo ====================TESTING=========================
# workaround for not using colorgcc when building due to colorgcc
# messing up output redirection..
PATH=${PATH#%{_datadir}/colorgcc:}
%make_build -k -C BUILD-%{_target_platform} check CFLAGS="" CXXFLAGS="" LDFLAGS="" || :
echo ====================TESTING END=====================

logfile="%{name}-%{version}-%{release}.log"
rm -f $logfile; find . -name "*.sum" | xargs cat >> $logfile


%files -f binutils.lang
%{_bindir}/addr2line
%{_bindir}/ar
%{_bindir}/as
%{_bindir}/c++filt
%optional %{_bindir}/dwp
%{_bindir}/elfedit
# out of bcond_gprof
%{_bindir}/gprof
%{_bindir}/ld
%{_bindir}/ld.bfd
%{_bindir}/nm
%{_bindir}/objcopy
%{_bindir}/objdump
%{_bindir}/ranlib
%{_bindir}/readelf
%{_bindir}/size
%{_bindir}/strings
%{_bindir}/strip
%{_bindir}/%{_target_platform}-addr2line
%{_bindir}/%{_target_platform}-ar
%{_bindir}/%{_target_platform}-as
%{_bindir}/%{_target_platform}-c++filt
%optional %{_bindir}/%{_target_platform}-dwp
%{_bindir}/%{_target_platform}-elfedit
%{_bindir}/%{_target_platform}-gprof
%{_bindir}/%{_target_platform}-ld
%{_bindir}/%{_target_platform}-ld.bfd
%{_bindir}/%{_target_platform}-nm
%{_bindir}/%{_target_platform}-objcopy
%{_bindir}/%{_target_platform}-objdump
%{_bindir}/%{_target_platform}-ranlib
%{_bindir}/%{_target_platform}-readelf
%{_bindir}/%{_target_platform}-size
%{_bindir}/%{_target_platform}-strings
%{_bindir}/%{_target_platform}-strip
%{_libdir}/bfd-plugins
%{_mandir}/man1/*
%{_infodir}/*info*
%{_libdir}/libbfd-*.so
%{_libdir}/libctf.so.*
%{_libdir}/libctf-nobfd.so.*
%{_libdir}/libsframe.so.*
%{_libdir}/libopcodes-*.so
%{_prefix}/%{_target_platform}

%files -n %{dev_name}
#% doc html
%{_includedir}/*.h
%dir %{_includedir}/libiberty
%{_includedir}/libiberty/*.h
%{_libdir}/libbfd.a
%{_libdir}/libbfd.so
%{_libdir}/libctf.a
%{_libdir}/libctf.so
%{_libdir}/libctf-nobfd.a
%{_libdir}/libctf-nobfd.so
%{_libdir}/libopcodes.a
%{_libdir}/libopcodes.so
%{_libdir}/libiberty.a
%{_libdir}/libsframe.a
%{_libdir}/libsframe.so
%if %{with gprofng}
%{_libdir}/libgprofng.so
%{_libdir}/libgprofng.a
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 47 |14mr|boost-1.92.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%ifarch %{ix86} %{arm} %{e2k} %{riscv}
%bcond_with	numpy
%else
%bcond_without	numpy
%endif
# (tpg) save 50 MiB
%bcond_with docs

# --no-undefined breaks build of CMakeified Boost.{Chrono,Locale,Timer}.
# Without --no-undefined, corresponding libraries lose their dependency on Boost.System.
# This is totally wrong, but it's rather a CMake'ification bug.
%global _disable_ld_no_undefined 1
%global _disable_lto 1
%global _python_bytecompile_build 0

%define packver %(echo "%{version}" | sed -e "s/\\\./_/g")

%global	libname %mklibname %{name} %{version}
%global libnumpy3 %mklibname %{name}_numpy%{python3_version_nodots} %{version}
%global libpython3 %mklibname %{name}_python%{python3_version_nodots} %{version}
%global	devname %mklibname %{name} -d
%global devnumpy3 %mklibname -d %{name}_numpy%{python3_version_nodots}
%global devpython3 %mklibname -d %{name}_python%{python3_version_nodots}
%global	sdevname %mklibname %{name} -d -s

Summary:	Portable C++ libraries
Name:		boost
Version:	1.92.0
Release:	1
Source0:	https://boostorg.jfrog.io/artifactory/main/release/%{version}/source/boost_%{packver}.tar.bz2
License:	Boost
Group:		Development/C++
Url:		http://boost.org/
Source100:	%{name}.rpmlintrc
# Add a manual page for the sole executable, namely bjam, based on the
# on-line documentation:
# http://www.boost.org/boost-build2/doc/html/bbv2/overview.html
Patch5:		boost-1.48.0-add-bjam-man-page.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=756005
# https://svn.boost.org/trac/boost/ticket/6131
Patch7:		boost-1.50.0-foreach.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=783660
# https://svn.boost.org/trac/boost/ticket/6459 fixed
Patch10:	boost-1.50.0-long-double-1.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=784654
Patch12:	boost-1.50.0-polygon.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1190039
Patch19:	boost-1.83.0-build-optflags.patch
Patch20:	boost-phoenix-multiple-definitions.patch
# elbrus

BuildRequires:	doxygen
BuildRequires:	xsltproc
BuildRequires:	bzip2-devel
BuildRequires:	pkgconfig(expat)
BuildRequires:	pkgconfig(icu-uc) >= 60.1
BuildRequires:	pkgconfig(python3)
%if %{with numpy}
BuildRequires:	python3-numpy-devel
%endif
BuildRequires:	pkgconfig(zlib)
BuildRequires:	pkgconfig(libzstd)
BuildRequires:	pkgconfig(liblzma)
BuildRequires:	pkgconfig(bzip2)
%if !%{with docs}
Obsoletes:	%{devname}-doc <= %{EVRD}
%endif

%description
Boost is a collection of free peer-reviewed portable C++ source
libraries. The emphasis is on libraries which work well with the C++
Standard Library. This package contains only the shared libraries
needed for running programs using Boost.

#------------------------------------------------------------------

# build section Taken from the Fedora .src.rpm.
%package build
Summary: Cross platform build system for C++ projects
Group: Development/C++
# boost-jam used to be maintained separately. It's now part of boost-build.
# Last separately maintained (and versioned) boost-jam was 3.1.18-11
# (which outnumbers boost versioning, so let's kill any boost-jam without Epoch)
Obsoletes: boost-jam < 1:0.0.0-0

%description build
Boost.Build is an easy way to build C++ projects, everywhere. You name
your pieces of executable and libraries and list their sources. Boost.Build
takes care about compiling your sources with the right options,
creating static and shared libraries, making pieces of executable, and other
chores -- whether you're using GCC, MSVC, or a dozen more supported
C++ compilers -- on Windows, OSX, Linux and commercial UNIX systems.

%files build
%license LICENSE_1_0.txt
%{_bindir}/bjam
%{_bindir}/b2
%{_datadir}/b2
%{_datadir}/boost_predef
%{_mandir}/man1/bjam.1*

#------------------------------------------------------------------

%define boostbinlibs chrono context contract coroutine cobalt date_time fiber filesystem graph iostreams locale log math prg_exec_monitor process program_options random regex serialization thread timer type_erasure unit_test_framework wave wserialization atomic container stacktrace_addr2line stacktrace_basic stacktrace_noop stacktrace_dump stacktrace_from_exception nowide json url charconv

# (Anssi 01/2010) dashes are converted to underscores for macros ($lib2);
# The sed script adds _ when library name ends in number.
%{expand:%(for lib in %boostbinlibs; do lib2=${lib/-/_}; cat <<EOF
%%global libname$lib2 %%mklibname %{name}_$(echo $lib | sed 's,[0-9]$,&_,') %{version}
%%global old69name$lib2 %%mklibname %{name}_$(echo $lib | sed 's,[0-9]$,&_,') 1.69.0
%%global old70name$lib2 %%mklibname %{name}_$(echo $lib | sed 's,[0-9]$,&_,') 1.70.0
%%global old71name$lib2 %%mklibname %{name}_$(echo $lib | sed 's,[0-9]$,&_,') 1.71.0
%%global old72name$lib2 %%mklibname %{name}_$(echo $lib | sed 's,[0-9]$,&_,') 1.72.0
%%global old74name$lib2 %%mklibname %{name}_$(echo $lib | sed 's,[0-9]$,&_,') 1.74.0
%%package -n %%{libname$lib2}
Summary:	Boost $lib shared library
# no one should require this, but provided anyway for maximum compatibility:
Provides:	%{name} = %{EVRD}
# compat with Fedora/RH
Provides:	boost-filesystem = %{EVRD}
Group:		System/Libraries
Obsoletes:	%%{old69name$lib2} < %{EVRD}
Obsoletes:	%%{old70name$lib2} < %{EVRD}
Obsoletes:	%%{old71name$lib2} < %{EVRD}
Obsoletes:	%%{old72name$lib2} < %{EVRD}
Obsoletes:	%%{old74name$lib2} < %{EVRD}
Obsoletes:	%%{libname$lib2} < %{EVRD}
EOF
done)}
# (Anssi 01/2010) splitted expand contents due to rpm bug failing build,
# triggered by a too long expanded string.
%{expand:%(for lib in %boostbinlibs; do lib2=${lib/-/_}; cat <<EOF
%%description -n %%{libname$lib2}
Boost is a collection of free peer-reviewed portable C++ source
libraries. The emphasis is on libraries which work well with the C++
Standard Library. This package contains the shared library needed for
running programs dynamically linked against Boost $lib.
EOF
done)}
%{expand:%(for lib in %boostbinlibs; do lib2=${lib/-/_}; cat <<EOF
%%files -n %%{libname$lib2}
%%doc LICENSE_1_0.txt
%{_libdir}/lib%{name}_$lib*.so.%(echo %{version} |cut -d. -f1)*
EOF
done)}

#------------------------------------------------------------------

%package -n %{libpython3}
Summary:	Boost Python 3 shared library
Group:		System/Libraries
Provides:	%{name}-python = %{EVRD}
Provides:	%{name}-python3 = %{EVRD}
Obsoletes:	%{_lib}boost_python37_1.71.0 < %{EVRD}
Obsoletes:	%{_lib}boost_python38_1.74.0 < %{EVRD}

%description -n %{libpython3}
Boost Python 3 shared library

%files -n %{libpython3}
%{_libdir}/lib%{name}_python%{python3_version_nodots}.so.%(echo %{version} |cut -d. -f1)*

#------------------------------------------------------------------

%package -n %{devpython3}
Summary:	Development files for the Boost Python 3 library
Group:		Development/C++
Requires:	python >= 3.0
Provides:	%{name}-python%{python3_version_nodots}-devel = %{EVRD}
Provides:	%{name}-python3-devel = %{EVRD}
Provides:	%{name}-python-devel = %{EVRD}
Obsoletes:	%{_lib}boost_python37-devel < %{EVRD}
Obsoletes:	%{_lib}boost_python38-devel < %{EVRD}
Requires:	%{libpython3} = %{EVRD}

%description -n %{devpython3}
Development files for the Boost Python 3 library

%files -n %{devpython3}
%{_includedir}/%{name}/python
%{_includedir}/%{name}/python.hpp
%{_libdir}/lib%{name}_python3*.so
%{_libdir}/cmake/%{name}_python-%{version}

#------------------------------------------------------------------

%package -n %{libnumpy3}
Summary:	Boost NumPy 3 shared library
Group:		System/Libraries
Provides:	%{name}-numpy = %{EVRD}
Provides:	%{name}-numpy3 = %{EVRD}
Obsoletes:	%{_lib}boost_numpy37_1.71.0 < %{EVRD}
Obsoletes:	%{_lib}boost_numpy38_1.74.0 < %{EVRD}

%description -n %{libnumpy3}
Boost NumPy 3 shared library

%if %{with numpy}
%files -n %{libnumpy3}
%{_libdir}/lib%{name}_numpy%{python3_version_nodots}.so.%(echo %{version} |cut -d. -f1)*
%endif

#------------------------------------------------------------------

%package -n %{devnumpy3}
Summary:	Development files for the Boost NumPy 3 library
Group:		Development/C++
Requires:	python >= 3.0
Provides:	%{name}-numpy%{python3_version_nodots}-devel = %{EVRD}
Provides:	%{name}-numpy3-devel = %{EVRD}
Provides:	%{name}-numpy-devel = %{EVRD}
Obsoletes:	%{_lib}boost_numpy37-devel < %{EVRD}
Obsoletes:	%{_lib}boost_numpy38-devel < %{EVRD}

%description -n %{devnumpy3}
Development files for the Boost NumPy 3 library

%if %{with numpy}
%files -n %{devnumpy3}
%{_libdir}/lib%{name}_numpy3*.so
%{_libdir}/cmake/%{name}_numpy-%{version}
%endif

#------------------------------------------------------------------

%package -n %{devname}
Summary:	The libraries and headers needed for Boost development
Group:		Development/C++
Requires:	%{expand:%(for lib in %boostbinlibs; do echo -n "%%{libname${lib/-/_}} = %{EVRD} "; done)}
Requires:	%{devpython3} = %{EVRD}
%ifarch x86_64 %{ix86}
# for /usr/include/boost/multiprecision/cpp_bin_float.hpp:40:10
Requires:	quadmath-devel
%endif
Obsoletes:	%{_lib}%{name}1-devel < %{EVRD}
Provides:	%{name}-devel = %{EVRD}
Provides:	lib%{name}-devel = %{EVRD}

%description -n	%{devname}
Boost is a collection of free peer-reviewed portable C++ source
libraries. The emphasis is on libraries which work well with the C++
Standard Library. This package contains headers and shared library
symlinks needed for Boost development.

%files -n %{devname}
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%{_libdir}/*.so
%{_libdir}/cmake/*

#------------------------------------------------------------------

%package -n %{devname}-doc
Summary:	The libraries and headers needed for Boost development
Group:		Development/C++
Conflicts:	lib%{name}-devel < 1.41.0
Conflicts:	lib64%{name}-devel < 1.41.0
Obsoletes:	lib%{name}-devel-doc < 1.48.0-2
Obsoletes:	lib64%{name}-devel-doc < 1.48.0-2
BuildArch:	noarch

%description -n %{devname}-doc
Boost is a collection of free peer-reviewed portable C++ source
libraries. The emphasis is on libraries which work well with the C++
Standard Library. This package contains documentation needed for Boost
development.

%if %{with docs}
%files -n %{devname}-doc
%doc packagedoc/*
%endif

#------------------------------------------------------------------

%package -n %{sdevname}
Summary:	Static libraries for Boost development
Group:		Development/C++
Requires:	%{devname} = %{EVRD}
Obsoletes:	%{_lib}%{name}1-static-devel < %{EVRD}
Provides:	%{name}-static-devel = %{EVRD}

%description -n	%{sdevname}
Boost is a collection of free peer-reviewed portable C++ source
libraries. The emphasis is on libraries which work well with the C++
Standard Library. This package contains only the static libraries
needed for Boost development.

%files -n %{sdevname}
%{_libdir}/lib%{name}_*.a

#------------------------------------------------------------------

%package examples
Summary:	The examples for the Boost libraries
Group:		Development/C++

%description examples
Boost is a collection of free peer-reviewed portable C++ source
libraries. The emphasis is on libraries which work well with the C++
Standard Library. This package contains examples, installed in the
same place as the documentation.

%files examples
%doc examples/*

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{name}_%{packver}
# Examples etc. get copied -- so drop patch backup files
find . -name "*~" -delete
%if !%{with numpy}
# Boost.Build does not allow for disabling of numpy
# extensions, thereby leading to automagic numpy
# https://github.com/boostorg/python/issues/111#issuecomment-280447482
sed -e 's/\[ unless \[ python\.numpy \] : <build>no \]/<build>no/g' -i libs/python/build/Jamfile
%endif

# Preparing the docs
mkdir packagedoc
find -type f -not -path '*packagedoc*' \( -name '*.html' -o -name '*.htm' -o -name '*.css' -o -name '*.gif' -o -name '*.jpg' -o -name '*.png' -o -name '*README*' \) -exec cp --parents {} packagedoc/ \;
find packagedoc -type d -exec chmod +rx {} \;

# Preparing the examples: All .hpp or .cpp files that are not in
# directories called test, src, or tools, as well as all files of any
# type in directories called example or examples.
mkdir examples
find libs -type f \( -name "*.?pp" ! -path "*test*" ! -path "*src*" ! -path "*tools*" -o -path "*example*" \) -exec cp --parents {} examples/ \;
find examples -type d -exec chmod +rx {} \;
# http://www.linuxfromscratch.org/blfs/view/svn/general/boost.html
# http://osdir.com/ml/blfs-dev/2014-11/msg00142.html
# this fixed needed for kdepim4 and qt-gstreamer
sed -e '1 i#ifndef Q_MOC_RUN' -e '$ a#endif' -i %{name}/type_traits/detail/has_binary_operator.hpp
#sed -i 's!-m64!!g' tools/build/src/tools/gcc.jam

%ifarch %{e2k}
cat >> boost/config/user.hpp << EOF

#if defined(__e2k__) && !defined(BOOST_USE_UCONTEXT)
#define BOOST_USE_UCONTEXT
#endif
EOF
sed -i 's/BOOST_GCC >= 70000/0/' boost/assert/source_location.hpp
# "expression not folded to a constant due to excessive constexpr function call complexity"
sed -i 's/static constexpr/static const/' libs/url/src/detail/replacement_field_rule.cpp
sed -i '/large_power_of_5\[\] =/s/\[\]/[5]/' \
	boost/json/detail/charconv/detail/fast_float/bigint.hpp
sed -i '/inv_sizes32\[\] =/s/\[\]/[29]/' boost/unordered/detail/prime_fmod.hpp
%endif

%build

cat > ./tools/build/src/user-config.jam << EOF
%ifarch %{armx} %{ix86} x86_64
using gcc : : : <compileflags>"%{optflags} -fno-strict-aliasing" <cxxflags>"%{build_cflags}" <linkflags>"%{build_ldflags}" ;
%endif
using python : %{python3_version} : %{__python3} : %{_includedir}/python%{python3_version} : %{_libdir} : : : ;
EOF

./bootstrap.sh --with-toolset=gcc --with-icu --prefix=%{_prefix} --libdir=%{_libdir} --with-python=%{__python3}

# And python 3...
./b2 -d+2 -q %{?_smp_mflags} --without-mpi \
	--prefix=%{_prefix} --libdir=%{_libdir} --layout=system \
	-sHAVE_ICU=1 \
	linkflags="%{ldflags} -lstdc++ -lm" \
%ifarch %ix86
	instruction-set=i686 \
%endif
	threading=multi debug-symbols=on pch=off variant=release python=%{python3_version}


# Taken from the Fedora .src.rpm.
echo ============================= build Boost.Build ==================
(cd tools/build/
 ./bootstrap.sh --with-toolset=gcc)

%install
./b2 -d+2 -q %{?_smp_mflags} --without-mpi \
	--prefix=%{buildroot}%{_prefix} --libdir=%{buildroot}%{_libdir} \
	debug-symbols=on pch=off python=%{python3_version} \
	install

echo ============================= install Boost.Build ==================
(cd tools/build/
 ./b2 --prefix=%{buildroot}%{_prefix} --bindir=%{buildroot}%{_bindir} install
 # Fix some permissions
 chmod +x %{buildroot}%{_datadir}/b2/src/tools/doxproc.py
 mkdir -p %{buildroot}%{_mandir}/man1
 cp -a v2/doc/bjam.1 %{buildroot}%{_mandir}/man1
 # Not a real file
 rm -f %{buildroot}%{_datadir}/b2/src/build/project.ann.py
 # Empty file
 rm -f %{buildroot}%{_datadir}/b2/src/tools/doxygen/windows-paths-check.hpp
 # Let's symlink instead of shipping 2 copies of the same file
 ln -sf b2 %{buildroot}%{_bindir}/bjam
)

%if !%{with numpy}
rm -rf %{buildroot}/%{_libdir}/cmake/%{name}_numpy-%{version}
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 48 |14mr|cargo-rpm-macros-28.5-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_without check

Name:           cargo-rpm-macros
Version:        28.5
Release:        2
Summary:        RPM macros and generators for building Rust packages with cargo
License:        MIT

URL:            https://codeberg.org/rust2rpm/cargo-rpm-macros
Source:         %{url}/archive/v%{version}.tar.gz

# temporary patch for compatibility with RHEL / ELN:
# The %%cargo_prep macro in RHEL / ELN accepts a -V flag. Using the same spec
# file for both Fedora and ELN would cause spec file parsing errors because
# the -V flag is not known in Fedora.
Patch:          0001-Temporarily-accept-cargo_prep-V-flag-for-spec-compat.patch
# add loongarch64
Patch:		add-loongarch64.patch

BuildArch:      noarch

# obsolete + provide rust-packaging (removed in Fedora 38)
Obsoletes:      rust-packaging < 24
Provides:       rust-packaging = %{version}-%{release}

Requires:       cargo2rpm >= 0.3.4

Requires:       cargo
Requires:       gawk
Requires:       grep
Requires:       rust-srpm-macros = %{version}-%{release}

%description
%{summary}.

%package -n rust-srpm-macros
Summary:        RPM macros for building Rust projects

%description -n rust-srpm-macros
RPM macros for building source packages for Rust projects.

%prep
%autosetup -n cargo-rpm-macros -p1

%build
# nothing to do

%install
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.cargo
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.cargo-buildsys
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.rust
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.aaa-cargo-srpm
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.rust-srpm
install -D -p -m 0644 -t %{buildroot}/%{_fileattrsdir} fileattrs/cargo.attr
install -D -p -m 0644 -t %{buildroot}/%{_fileattrsdir} fileattrs/cargo_vendor.attr

%files
%license LICENSE
%{_rpmmacrodir}/macros.cargo
%{_rpmmacrodir}/macros.cargo-buildsys
%if 0%{?rhel}
%{_rpmmacrodir}/macros.rust
%endif
%{_fileattrsdir}/cargo.attr
%{_fileattrsdir}/cargo_vendor.attr

%files -n rust-srpm-macros
%license LICENSE
%{_rpmmacrodir}/macros.aaa-cargo-srpm
%{_rpmmacrodir}/macros.rust
%{_rpmmacrodir}/macros.rust-srpm

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 49 |14mr|debugedit-5.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Tool for editing debug info in ELF binaries
Name:		debugedit
Version:	5.3
Release:	1
Group:		Development/Other
License:	GPLv3+, parts GPLv2, LGPLv2.1
Source0:	https://sourceware.org/pub/debugedit/%{version}/%{name}-%{version}.tar.xz
Patch0:		rpm-4.15.0-find-debuginfo__mga-cfg.diff
# Look at *.so* files regardless of their permissions - some projects
# follow Debian-ish policies of not making libraries executable, and
# the debuginfo generator runs before the permission fixup
# (it has to, because the same set of scripts that invokes permission
# fixup also invokes further stripping).
Patch1:		debugedit-5.0-look-at-so-files.patch

BuildRequires:	autoconf
BuildRequires:	make
BuildRequires:	pkgconfig(libelf)
BuildRequires:	pkgconfig(libdw)
BuildRequires:	pkgconfig(libxxhash)

# The find-debuginfo.sh script has a couple of tools it needs at runtime.
# For strip_to_debug, eu-strip
Requires:	elfutils
# For add_minidebug, readelf, awk, nm, sort, comm, objcopy, xz
Requires:	binutils, gawk, coreutils, xz
# For find and xargs
Requires:	findutils
# For do_file, gdb_add_index
Requires:	/usr/bin/gdb-add-index
# For run_job, sed
Requires:	sed
# For dwz
Requires:	dwz
# For append_uniq, grep
Requires:	grep

%description
Tool for editing debug info in ELF binaries.

%prep
%autosetup -p1

%build
autoreconf -f -v -i
%configure
%make_build \
	HELP2MAN=%{_bindir}/true

%install
%make_install \
	HELP2MAN=%{_bindir}/true

%files
%license COPYING COPYING3 COPYING.LIB
%{_bindir}/debugedit
%{_bindir}/debugedit-classify-ar
%{_bindir}/find-debuginfo
%{_bindir}/sepdebugcrcfix
%doc %{_mandir}/man1/debugedit.1*
%doc %{_mandir}/man1/debugedit-classify-ar.1*
%doc %{_mandir}/man1/find-debuginfo.1*
%doc %{_mandir}/man1/sepdebugcrcfix.1*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 50 |14mr|dnf5-5.4.5.0-6
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global project_version_prime 5
%global project_version_major 4
%global project_version_minor 5
%global project_version_micro 0

%bcond_without default_system_dnf

%global version %{project_version_prime}.%{project_version_major}.%{project_version_minor}.%{project_version_micro}
%global Werror_cflags %{nil}
%global optflags %(echo %{optflags} | sed -e "s|-Werror=strict-aliasing||g") -Wno-strict-aliasing -Wno-error=maybe-uninitialized

# Library naming per ROSA policy: soname of libdnf5.so and libdnf5-cli.so is 2
%define major 2
%define major_cli 3
%define libname %mklibname dnf5 %{major}
%define clilibname %mklibname dnf5-cli %{major_cli}
%define devname %mklibname dnf5 -d
%define clidevname %mklibname dnf5-cli -d

Name:		dnf5
Version:	%{version}
Release:	6
Summary(ru_RU.UTF-8): Менеджер пакетов с интерфейсом командной строки
Summary:	Command-line package manager
License:	GPL-2.0-or-later
Group:		System/Configuration/Packaging
URL:		https://github.com/rpm-software-management/dnf5
Source0:	%{url}/archive/%{version}/dnf5-%{version}.tar.gz
Requires:	%{libname} = %{EVRD}
Requires:	%{clilibname} = %{EVRD}
Recommends:	bash-completion

%if %{with dnf5_plugins}
Recommends:	dnf5-plugins
%endif

%if %{with default_system_dnf}
Provides:	microdnf = %{EVRD}
Obsoletes:	microdnf < 5.2.11.0-4
Provides:	dnf = %{EVRD}
Obsoletes:	dnf < 5.2.11.0-4
Provides:	yum = %{EVRD}
Obsoletes:	yum < 5.2.11.0-4
%endif

Provides:	dnf5-command(advisory)
Provides:	dnf5-command(autoremove)
Provides:	dnf5-command(check)
Provides:	dnf5-command(check-upgrade)
Provides:	dnf5-command(clean)
Provides:	dnf5-command(debuginfo-install)
Provides:	dnf5-command(distro-sync)
Provides:	dnf5-command(downgrade)
Provides:	dnf5-command(download)
Provides:	dnf5-command(environment)
Provides:	dnf5-command(group)
Provides:	dnf5-command(history)
Provides:	dnf5-command(info)
Provides:	dnf5-command(install)
Provides:	dnf5-command(leaves)
Provides:	dnf5-command(list)
Provides:	dnf5-command(makecache)
Provides:	dnf5-command(mark)
Provides:	dnf5-command(module)
Provides:	dnf5-command(offline)
Provides:	dnf5-command(provides)
Provides:	dnf5-command(reinstall)
Provides:	dnf5-command(replay)
Provides:	dnf5-command(remove)
Provides:	dnf5-command(repo)
Provides:	dnf5-command(repoquery)
Provides:	dnf5-command(search)
Provides:	dnf5-command(swap)
Provides:	dnf5-command(system-upgrade)
Provides:	dnf5-command(upgrade)
Provides:	dnf5-command(versionlock)

# ========== build options ==========

%bcond_without dnf5daemon_client
%bcond_without dnf5daemon_server
%bcond_without libdnf_cli
%bcond_without dnf5
%bcond_without dnf5_plugins
%bcond_without plugin_actions
%bcond_with    plugin_rhsm
%bcond_without python_plugins_loader
%bcond_without plugin_appstream
%bcond_without plugin_expired_pgp_keys
%bcond_without plugin_local
%bcond_without plugin_manifest

%bcond_without comps
%bcond_without modulemd
%bcond_without zchunk
%bcond_without systemd

%if %{with systemd}
%bcond_without plugin_systemd_inhibit
%else
%bcond_with    plugin_systemd_inhibit
%endif

%bcond_with    html
%bcond_without man

# TODO Go bindings fail to build, disable for now
%bcond_with    go
%bcond_with perl5
%bcond_without python3
%bcond_with ruby

%bcond_with    clang
%bcond_with    sanitizers
%bcond_with    tests
%bcond_with    performance_tests
%bcond_with    dnf5daemon_tests

%if %{with clang}
    %global toolchain clang
%endif

# ========== versions of dependencies ==========

%global libmodulemd_version 2.5.0
%global librepo_version 1.15.0
%global libsolv_version 0.7.25
%global sqlite_version 3.35.0
%global zchunk_version 0.9.11

# ========== build requires ==========

BuildRequires:  bash-completion-devel
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  gettext
BuildRequires:  pkgconfig(check)
BuildRequires:	pkgconfig(libpkgmanifest)
BuildRequires:  pkgconfig(fmt)
BuildRequires:  pkgconfig(json-c)
BuildRequires:  pkgconfig(libcrypto)
BuildRequires:  pkgconfig(librepo) >= %{librepo_version}
BuildRequires:  pkgconfig(libsolv) >= %{libsolv_version}
BuildRequires:  pkgconfig(libsolvext) >= %{libsolv_version}
BuildRequires:  pkgconfig(rpm) >= 4.17.0
BuildRequires:  pkgconfig(sqlite3) >= %{sqlite_version}
BuildRequires:  toml11-static

%if %{with clang}
BuildRequires:  clang
%else
BuildRequires:  gcc-c++ >= 10.1
%endif

%if %{with tests}
BuildRequires:  createrepo_c
BuildRequires:  pkgconfig(cppunit)
BuildRequires:  rpm-build
%endif

%if %{with comps}
BuildRequires:  pkgconfig(libcomps)
%endif

%if %{with modulemd}
BuildRequires:  pkgconfig(modulemd-2.0) >= %{libmodulemd_version}
%endif

%if %{with zchunk}
BuildRequires:  pkgconfig(zck) >= %{zchunk_version}
%endif

%if %{with systemd}
BuildRequires:  pkgconfig(sdbus-c++) >= 0.8.1
BuildRequires:  pkgconfig(systemd)

 # We need to get the SYSTEMD_SYSTEM_UNIT_DIR from
 # /usr/share/pkgconfig/systemd.pc
BuildRequires:  systemd
%endif

%if %{with html} || %{with man}
BuildRequires:  python3dist(breathe)
BuildRequires:  python3dist(sphinx) >= 4.1.2
BuildRequires:  python3dist(sphinx-rtd-theme)
%endif

%if %{with sanitizers}
# compiler-rt is required by sanitizers in clang
BuildRequires:  compiler-rt
BuildRequires:  libasan
BuildRequires:  liblsan
BuildRequires:  libubsan
%endif

%if %{with libdnf_cli}
# required for libdnf5-cli
BuildRequires:  pkgconfig(smartcols)
%endif

%if %{with dnf5_plugins}
BuildRequires:  pkgconfig(libcurl) >= 7.62.0
%endif

%if %{with dnf5daemon_server}
# required for dnf5daemon-server
BuildRequires:  pkgconfig(sdbus-c++) >= 0.9.0
%if %{with dnf5daemon_tests}
BuildRequires:  dbus-daemon
BuildRequires:  polkit
BuildRequires:  python3-devel
BuildRequires:  python3dist(dbus-python)
%endif
%endif

%if %{with plugin_rhsm}
BuildRequires:  pkgconfig(librhsm) >= 0.0.3
BuildRequires:  pkgconfig(glib-2.0) >= 2.44.0
%endif

# ========== language bindings section ==========

BuildRequires:  swig

%if %{with perl5}
# required for perl-libdnf5 and perl-libdnf5-cli
BuildRequires:  perl-devel
BuildRequires:  perl-generators
%if %{with tests}
BuildRequires:  perl(strict)
BuildRequires:  perl(Test::More)
BuildRequires:  perl(Test::Exception)
BuildRequires:  perl(warnings)
%endif
%endif

%if %{with ruby}
# required for ruby-libdnf5 and ruby-libdnf5-cli
BuildRequires:  pkgconfig(ruby)
%if %{with tests}
BuildRequires:  rubygem-test-unit
%endif
%endif

%if %{with python3}
# required for python3-libdnf5 and python3-libdnf5-cli
BuildRequires:  python3-devel
%endif

%description
DNF5 is a command-line package manager that automates the process of installing,
upgrading, configuring, and removing computer programs in a consistent manner.
It supports RPM packages, modulemd modules, and comps groups & environments.

%description -l ru_RU.UTF-8
DNF5 — менеджер пакетов с интерфейсом командной строки, автоматизирующий
установку, обновление, настройку и удаление программ единообразным образом.
Поддерживает пакеты RPM, модули modulemd, а также группы и окружения comps.

%files -f dnf5.lang
%license COPYING.md
%license gpl-2.0.txt
%{_bindir}/dnf5
%if %{with default_system_dnf}
%{_bindir}/dnf
%{_bindir}/yum
%{_bindir}/microdnf
%endif
%dir %{_sysconfdir}/dnf/dnf5-aliases.d
%doc %{_sysconfdir}/dnf/dnf5-aliases.d/README
%dir %{_datadir}/dnf5
%dir %{_datadir}/dnf5/aliases.d
%{_datadir}/dnf5/aliases.d/compatibility.conf
%dir %{_libdir}/dnf5
%dir %{_libdir}/dnf5/plugins
%dir %{_datadir}/dnf5/dnf5-plugins
%dir %{_sysconfdir}/dnf/dnf5-plugins
%doc %{_libdir}/dnf5/plugins/README
%dir %{_libdir}/libdnf5/plugins
%dir %{_datadir}/bash-completion/
%dir %{_datadir}/bash-completion/completions/
%{_datadir}/bash-completion/completions/dnf5
%{_datadir}/zsh/site-functions/_dnf5
%dir %{_prefix}/lib/sysimage/dnf
%verify(not md5 size mtime) %ghost %{_prefix}/lib/sysimage/dnf/*
%{_mandir}/man8/dnf5.8.*
%{_mandir}/man8/dnf5-advisory.8.*
%{_mandir}/man8/dnf5-autoremove.8.*
%{_mandir}/man8/dnf5-check.8.*
%{_mandir}/man8/dnf*-check-upgrade.8.*
%{_mandir}/man8/dnf5-clean.8.*
%{_mandir}/man8/dnf5-debuginfo-install.8.*
%{_mandir}/man8/dnf5-distro-sync.8.*
%{_mandir}/man8/dnf5-do.8.*
%{_mandir}/man8/dnf5-downgrade.8.*
%{_mandir}/man8/dnf5-download.8.*
%{_mandir}/man8/dnf5-environment.8.*
%{_mandir}/man8/dnf5-group.8.*
# TODO(jkolarik): history is not ready yet
%{_mandir}/man8/dnf5-history.8.*
%{_mandir}/man8/dnf*-info.8.*
%{_mandir}/man8/dnf5-install.8.*
%{_mandir}/man8/dnf5-leaves.8.*
%{_mandir}/man8/dnf5-makecache.8.*
%{_mandir}/man8/dnf5-mark.8.*
%{_mandir}/man8/dnf*-list.8.*
%{_mandir}/man8/dnf*-module.8.*
%{_mandir}/man8/dnf*-offline.8.*
# TODO(jkolarik): module is not ready yet
# %%{_mandir}/man8/dnf5-module.8.*
%{_mandir}/man8/dnf5-provides.8.*
%{_mandir}/man8/dnf5-reinstall.8.*
%{_mandir}/man8/dnf5-remove.8.*
%{_mandir}/man8/dnf*-replay.8.*
%{_mandir}/man8/dnf5-repo.8.*
%{_mandir}/man8/dnf5-repoquery.8.*
%{_mandir}/man8/dnf5-search.8.*
%{_mandir}/man8/dnf5-status.8.*
%{_mandir}/man8/dnf5-swap.8.*
%{_mandir}/man8/dnf5-upgrade.8.*
%{_mandir}/man7/dnf5-aliases.7.*
%{_mandir}/man7/dnf5-caching.7.*
%{_mandir}/man7/dnf5-changes-from-dnf4.7.*
%{_mandir}/man7/dnf5-comps.7.*
%{_mandir}/man8/dnf*-system-upgrade.8.*
%{_mandir}/man8/dnf*-versionlock.8.*
# TODO(jkolarik): filtering is not ready yet
# %%{_mandir}/man7/dnf5-filtering.7.*
%{_mandir}/man7/dnf5-forcearch.7.*
%{_mandir}/man7/dnf5-installroot.7.*
# TODO(jkolarik): modularity is not ready yet
%{_mandir}/man7/dnf5-modularity.7.*
%{_mandir}/man7/dnf*-filtering.7.*
%{_mandir}/man7/dnf5-specs.7.*
%{_mandir}/man7/dnf*-system-state.7.*
%{_mandir}/man5/dnf5.conf.5.*
%{_mandir}/man5/dnf5.conf-vendorpolicy*.5.*
%{_mandir}/man5/dnf5.conf-todo.5.*
%{_mandir}/man5/dnf5.conf-deprecated.5.*

%if %{with systemd}
%{_unitdir}/dnf5-offline-transaction.service
%{_unitdir}/dnf5-offline-transaction-cleanup.service
%{_unitdir}/dnf5-makecache.service
%{_unitdir}/dnf5-makecache.timer
%{_unitdir}/system-update.target.wants/dnf5-offline-transaction.service
%endif

# ========== libdnf5 ==========
%package -n %{libname}
Summary(ru_RU.UTF-8): Библиотека управления пакетами
Summary:	Package management library
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
# Backward-compatible names before the major was added per ROSA library policy
Provides:	libdnf5 = %{EVRD}
Obsoletes:	libdnf5 < 5.2.11.0-4
%if %{with default_system_dnf}
# dnf5 ships /etc/dnf/dnf.conf itself; take over the dnf4 config package
Provides:	dnf-conf = %{EVRD}
Obsoletes:	dnf-conf < 5
%endif

#Requires:		libmodulemd{?_isa} >= {libmodulemd_version}
Requires:	%{_lib}solv1 >= %{libsolv_version}
Requires:	%{_lib}repo0 >= %{librepo_version}
Requires:	%{_lib}sqlite3_0 >= %{sqlite_version}

%description -n %{libname}
Package management library.

%description -n %{libname} -l ru_RU.UTF-8
Библиотека управления пакетами.

%files -n %{libname} -f libdnf5.lang
%license lgpl-2.1.txt
%if %{with default_system_dnf}
%config(noreplace) %{_sysconfdir}/dnf/dnf.conf
%dir %{_sysconfdir}/dnf/vars
%dir %{_sysconfdir}/dnf/protected.d
%else
%exclude %{_sysconfdir}/dnf/dnf.conf
%endif
%dir %{_datadir}/dnf5/libdnf.conf.d
%dir %{_sysconfdir}/dnf/libdnf5.conf.d
%dir %{_datadir}/dnf5/repos.override.d
%dir %{_sysconfdir}/dnf/repos.override.d
%dir %{_sysconfdir}/dnf/libdnf5-plugins
%dir %{_datadir}/dnf5/repos.d
%dir %{_datadir}/dnf5/vars.d
%dir %{_libdir}/libdnf5
%{_libdir}/libdnf5.so.%{major}*
%{_tmpfilesdir}/libdnf5.conf
%ghost %attr(0755, root, root) %dir %{_var}/cache/libdnf5

# ========== libdnf5-cli ==========

%if %{with libdnf_cli}
%package -n %{clilibname}
Summary(ru_RU.UTF-8): Библиотека для работы с терминалом в менеджере пакетов командной строки
Summary:	Library for working with a terminal in a command-line package manager
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
# Backward-compatible names before the major was added per ROSA library policy
Provides:	libdnf5-cli = %{EVRD}
Obsoletes:	libdnf5-cli < 5.2.11.0-4
Requires:	%{libname} = %{EVRD}

%description -n %{clilibname}
Library for working with a terminal in a command-line package manager.

%description -n %{clilibname} -l ru_RU.UTF-8
Библиотека для работы с терминалом в менеджере пакетов командной строки.

%files -n %{clilibname} -f libdnf5-cli.lang
%license COPYING.md
%license lgpl-2.1.txt
%{_libdir}/libdnf5-cli.so.%{major_cli}*
%endif

# ========== dnf5-devel ==========

%package -n dnf5-devel
Summary(ru_RU.UTF-8): Файлы разработки для dnf5
Summary:	Development files for dnf5
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	dnf5 = %{EVRD}
Requires:	%{devname} = %{EVRD}
Requires:	%{clidevname} = %{EVRD}

%description -n dnf5-devel
Development files for dnf5.

%description -n dnf5-devel -l ru_RU.UTF-8
Файлы разработки для dnf5.

%files -n dnf5-devel
%license COPYING.md
%license lgpl-2.1.txt
%{_includedir}/dnf5/


# ========== libdnf5-devel ==========

%package -n %{devname}
Summary(ru_RU.UTF-8): Файлы разработки для libdnf
Summary:	Development files for libdnf
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Provides:	libdnf5-devel = %{EVRD}
Obsoletes:	libdnf5-devel < 5.2.11.0-4
Requires:	%{libname} = %{EVRD}
Requires:	%{_lib}solv-devel >= %{libsolv_version}

%description -n %{devname}
Development files for libdnf.

%description -n %{devname} -l ru_RU.UTF-8
Файлы разработки для libdnf.

%files -n %{devname}
%license COPYING.md
%license lgpl-2.1.txt
%{_includedir}/libdnf5/
%dir %{_libdir}/libdnf5
%{_libdir}/libdnf5.so
%{_libdir}/pkgconfig/libdnf5.pc


# ========== libdnf5-cli-devel ==========

%package -n %{clidevname}
Summary(ru_RU.UTF-8): Файлы разработки для libdnf5-cli
Summary:	Development files for libdnf5-cli
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Provides:	libdnf5-cli-devel = %{EVRD}
Obsoletes:	libdnf5-cli-devel < 5.2.11.0-4
Requires:	%{clilibname} = %{EVRD}

%description -n %{clidevname}
Development files for libdnf5-cli.

%description -n %{clidevname} -l ru_RU.UTF-8
Файлы разработки для libdnf5-cli.

%files -n %{clidevname}
%license COPYING.md
%license lgpl-2.1.txt
%{_includedir}/libdnf5-cli/
%{_libdir}/libdnf5-cli.so
%{_libdir}/pkgconfig/libdnf5-cli.pc


# ========== perl-libdnf5 ==========

%if %{with perl5}
%package -n perl-libdnf5
Summary(ru_RU.UTF-8): Привязки Perl 5 к библиотеке libdnf
Summary:	Perl 5 bindings for the libdnf library
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	%{libname} = %{EVRD}

%description -n perl-libdnf5
Perl 5 bindings for the libdnf library.

%description -n perl-libdnf5 -l ru_RU.UTF-8
Привязки Perl 5 к библиотеке libdnf.

%files -n perl-libdnf5
%license COPYING.md
%license lgpl-2.1.txt
%{perl_vendorarch}/libdnf5
%{perl_vendorarch}/auto/libdnf5
%endif


# ========== perl-libdnf5-cli ==========

%if %{with perl5} && %{with libdnf_cli}
%package -n perl-libdnf5-cli
Summary(ru_RU.UTF-8): Привязки Perl 5 к библиотеке libdnf5-cli
Summary:	Perl 5 bindings for the libdnf5-cli library
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	%{clilibname} = %{EVRD}

%description -n perl-libdnf5-cli
Perl 5 bindings for the libdnf5-cli library.

%description -n perl-libdnf5-cli -l ru_RU.UTF-8
Привязки Perl 5 к библиотеке libdnf5-cli.

%files -n perl-libdnf5-cli
%license COPYING.md
%license lgpl-2.1.txt
%{perl_vendorarch}/libdnf5_cli
%{perl_vendorarch}/auto/libdnf5_cli
%endif


# ========== python3-libdnf5 ==========

%if %{with python3}
%package -n python3-libdnf5
%{?python_provide:%python_provide python3-libdnf}
Summary(ru_RU.UTF-8): Привязки Python 3 к библиотеке libdnf
Summary:	Python 3 bindings for the libdnf library
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	%{libname} = %{EVRD}

%description -n python3-libdnf5
Python 3 bindings for the libdnf library.

%description -n python3-libdnf5 -l ru_RU.UTF-8
Привязки Python 3 к библиотеке libdnf.

%files -n python3-libdnf5
%license COPYING.md
%license lgpl-2.1.txt
%{python3_sitearch}/libdnf5
%{python3_sitearch}/libdnf5-*.dist-info
%endif


# ========== python3-libdnf5-cli ==========

%if %{with python3} && %{with libdnf_cli}
%package -n python3-libdnf5-cli
%{?python_provide:%python_provide python3-libdnf5-cli}
Summary(ru_RU.UTF-8): Привязки Python 3 к библиотеке libdnf5-cli
Summary:	Python 3 bindings for the libdnf5-cli library
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	%{clilibname} = %{EVRD}

%description -n python3-libdnf5-cli
Python 3 bindings for the libdnf5-cli library.

%description -n python3-libdnf5-cli -l ru_RU.UTF-8
Привязки Python 3 к библиотеке libdnf5-cli.

%files -n python3-libdnf5-cli
%license COPYING.md
%license lgpl-2.1.txt
%{python3_sitearch}/libdnf5_cli
%{python3_sitearch}/libdnf5_cli-*.dist-info
%endif


# ========== ruby-libdnf5 ==========

%if %{with ruby}
%package -n ruby-libdnf5
Summary(ru_RU.UTF-8): Привязки Ruby к библиотеке libdnf
Summary:	Ruby bindings for the libdnf library
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Provides:	ruby(libdnf) = %{EVRD}
Requires:	%{libname} = %{EVRD}
Requires:	ruby(release)

%description -n ruby-libdnf5
Ruby bindings for the libdnf library.

%description -n ruby-libdnf5 -l ru_RU.UTF-8
Привязки Ruby к библиотеке libdnf.

%files -n ruby-libdnf5
%license COPYING.md
%license lgpl-2.1.txt
%{ruby_vendorarchdir}/libdnf5
%endif


# ========== ruby-libdnf5-cli ==========

%if %{with ruby} && %{with libdnf_cli}
%package -n ruby-libdnf5-cli
Summary(ru_RU.UTF-8): Привязки Ruby к библиотеке libdnf5-cli
Summary:	Ruby bindings for the libdnf5-cli library
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Provides:	ruby(libdnf_cli) = %{EVRD}
Requires:	%{clilibname} = %{EVRD}
Requires:	ruby(release)

%description -n ruby-libdnf5-cli
Ruby bindings for the libdnf5-cli library.

%description -n ruby-libdnf5-cli -l ru_RU.UTF-8
Привязки Ruby к библиотеке libdnf5-cli.

%files -n ruby-libdnf5-cli
%license COPYING.md
%license lgpl-2.1.txt
%{ruby_vendorarchdir}/libdnf5_cli
%endif


# ========== libdnf5-plugin-actions ==========

%if %{with plugin_actions}
%package -n libdnf5-plugin-actions
Summary(ru_RU.UTF-8): Плагин libdnf5, позволяющий выполнять действия (внешние исполняемые файлы) на перехватах
Summary:	Libdnf5 plugin that allows to run actions (external executables) on hooks
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	%{libname} = %{EVRD}

%description -n libdnf5-plugin-actions
Libdnf5 plugin that allows to run actions (external executables) on hooks.

%description -n libdnf5-plugin-actions -l ru_RU.UTF-8
Плагин libdnf5, позволяющий выполнять действия (внешние исполняемые файлы)
на перехватах.

%files -n libdnf5-plugin-actions -f libdnf5-plugin-actions.lang
%{_libdir}/libdnf5/plugins/actions.*
%config %{_sysconfdir}/dnf/libdnf5-plugins/actions.conf
%dir %{_sysconfdir}/dnf/libdnf5-plugins/actions.d
%{_mandir}/man8/libdnf5-actions.8.*
%endif


# ========== libdnf5-plugin-plugin_rhsm ==========

%if %{with plugin_rhsm}
%package -n libdnf5-plugin-rhsm
Summary(ru_RU.UTF-8): Плагин libdnf5 для rhsm (Red Hat Subscription Manager)
Summary:	Libdnf5 rhsm (Red Hat Subscription Manager) plugin
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	%{libname} = %{EVRD}

%description -n libdnf5-plugin-rhsm
Libdnf5 plugin with basic support for Red Hat subscriptions.
Synchronizes the the enrollment with the vendor system. This can change
the contents of the repositories configuration files according
to the subscription levels.

%description -n libdnf5-plugin-rhsm -l ru_RU.UTF-8
Плагин libdnf5 с базовой поддержкой подписок Red Hat.
Синхронизирует регистрацию в системе производителя; это может изменять
содержимое файлов конфигурации репозиториев в соответствии с уровнями подписки.

%files -n libdnf5-plugin-rhsm -f libdnf5-plugin-rhsm.lang
%{_libdir}/libdnf5/plugins/rhsm.*
%config %{_sysconfdir}/dnf/libdnf5-plugins/rhsm.conf
%endif


# ========== python3-libdnf5-plugins-loader ==========

%if %{with python_plugins_loader}
%package -n python3-libdnf5-python-plugins-loader
Summary(ru_RU.UTF-8): Плагин libdnf5, позволяющий загружать плагины на Python
Summary:	Libdnf5 plugin that allows loading Python plugins
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	%{libname} = %{EVRD}
Requires:	python3-libdnf5 = %{EVRD}

%description -n python3-libdnf5-python-plugins-loader
Libdnf5 plugin that allows loading Python plugins.

%description -n python3-libdnf5-python-plugins-loader -l ru_RU.UTF-8
Плагин libdnf5, позволяющий загружать плагины на Python.

%files -n python3-libdnf5-python-plugins-loader
%{_libdir}/libdnf5/plugins/python_plugins_loader.*
%config %{_sysconfdir}/dnf/libdnf5-plugins/python_plugins_loader.conf
%dir %{_sysconfdir}/dnf/libdnf5-plugins/python_plugins_loader.d
%dir %{python3_sitelib}/libdnf_plugins/
%doc %{python3_sitelib}/libdnf_plugins/README
%endif


# ========== dnf5daemon-client ==========

%if %{with dnf5daemon_client}
%package -n dnf5daemon-client
Summary(ru_RU.UTF-8): Интерфейс командной строки для dnf5daemon-server
Summary:	Command-line interface for dnf5daemon-server
License:	GPL-2.0-or-later
Group:		System/Configuration/Packaging
Requires:	%{libname} = %{EVRD}
Requires:	%{clilibname} = %{EVRD}
Requires:	dnf5daemon-server

%description -n dnf5daemon-client
Command-line interface for dnf5daemon-server.

%description -n dnf5daemon-client -l ru_RU.UTF-8
Интерфейс командной строки для dnf5daemon-server.

%files -n dnf5daemon-client -f dnf5daemon-client.lang
%license COPYING.md
%license gpl-2.0.txt
%{_bindir}/dnf5daemon-client
%{_mandir}/man8/dnf5daemon-client.8.*
%endif


# ========== dnf5daemon-server ==========

%if %{with dnf5daemon_server}
%package -n dnf5daemon-server
Summary(ru_RU.UTF-8): Служба управления пакетами с интерфейсом DBus
Summary:	Package management service with a DBus interface
License:	GPL-2.0-or-later
Group:		System/Configuration/Packaging
Requires:	%{libname} = %{EVRD}
Requires:	%{clilibname} = %{EVRD}
Requires:	dbus
Requires:	polkit

%description -n dnf5daemon-server
Package management service with a DBus interface.

%description -n dnf5daemon-server -l ru_RU.UTF-8
Служба управления пакетами с интерфейсом DBus.

%files -n dnf5daemon-server -f dnf5daemon-server.lang
%license COPYING.md
%license gpl-2.0.txt
%config %{_sysconfdir}/dnf/dnf5daemon-server.conf
%{_sbindir}/dnf5daemon-server
%{_unitdir}/dnf5daemon-server.service
%{_datadir}/dbus-1/system.d/org.rpm.dnf.v0.conf
%{_datadir}/dbus-1/system-services/org.rpm.dnf.v0.service
%{_datadir}/dbus-1/interfaces/org.rpm.dnf.v0.*.xml
%{_datadir}/polkit-1/actions/org.rpm.dnf.v0.policy
%{_mandir}/man8/dnf5daemon-server.8.*
%{_mandir}/man8/dnf5daemon-dbus-api.8.*

%post -n dnf5daemon-server
%systemd_post dnf5daemon-server.service

%preun -n dnf5daemon-server
%systemd_preun dnf5daemon-server.service

%postun -n dnf5daemon-server
%systemd_postun_with_restart dnf5daemon-server.service


# ========== dnf5daemon-server-polkit ==========

%package -n dnf5daemon-server-polkit
Summary(ru_RU.UTF-8): Правило polkit, позволяющее членам группы wheel устанавливать доверенные пакеты
Summary:	Polkit rule to allow wheel group members install trusted packages
License:	GPL-2.0-or-later
Group:		System/Configuration/Packaging
Requires:	polkit
Requires:	dnf5daemon-server = %{EVRD}
BuildArch:	noarch

%description -n dnf5daemon-server-polkit
Polkit rule to allow active local wheel group members install packages from
trusted repositories using dnf5daemon-server.

%description -n dnf5daemon-server-polkit -l ru_RU.UTF-8
Правило polkit, позволяющее активным локальным членам группы wheel
устанавливать пакеты из доверенных репозиториев через dnf5daemon-server.

%files -n dnf5daemon-server-polkit
%{_datadir}/polkit-1/rules.d/org.rpm.dnf.v0.rules
%endif


# ========== dnf5-plugins ==========
%if %{with dnf5_plugins}

%package -n dnf5-plugins
Summary(ru_RU.UTF-8): Плагины для dnf5
Summary:	Plugins for dnf5
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	dnf5 = %{EVRD}
Requires:	%{_lib}curl4 >= 7.62.0
Requires:	%{clilibname} = %{EVRD}
%if %{with default_system_dnf}
# dnf5-plugins replaces the dnf4 plugins stack; the Provides keeps
# requirements like mock's "dnf-plugins-core" satisfiable
Provides:	dnf-plugins-core = %{EVRD}
Obsoletes:	dnf-plugins-core < 5
Obsoletes:	python3-dnf < 5
Obsoletes:	python3-dnf-plugins-core < 5
%endif
Provides:	dnf5-command(builddep)
Provides:	dnf5-command(changelog)
Provides:	dnf5-command(config-manager)
Provides:	dnf5-command(copr)
Provides:	dnf5-command(needs-restarting)
Provides:	dnf5-command(repoclosure)
Provides:	dnf5-command(repomanage)
Provides:	dnf5-command(reposync)

%description -n dnf5-plugins
Core DNF5 plugins that enhance dnf5 with builddep, changelog,
config-manager, copr, repoclosure, repomanage, and reposync commands.

%description -n dnf5-plugins -l ru_RU.UTF-8
Базовые плагины DNF5, расширяющие dnf5 командами builddep, changelog,
config-manager, copr, repoclosure, repomanage и reposync.

%files -n dnf5-plugins -f dnf5-plugin-builddep.lang -f dnf5-plugin-changelog.lang -f dnf5-plugin-config-manager.lang -f dnf5-plugin-copr.lang -f dnf5-plugin-needs-restarting.lang -f dnf5-plugin-repoclosure.lang -f dnf5-plugin-reposync.lang
%{_libdir}/dnf5/plugins/builddep_cmd_plugin.so
%{_libdir}/dnf5/plugins/changelog_cmd_plugin.so
%{_libdir}/dnf5/plugins/config-manager_cmd_plugin.so
%{_libdir}/dnf5/plugins/copr_cmd_plugin.so
%{_libdir}/dnf5/plugins/needs_restarting_cmd_plugin.so
%{_libdir}/dnf5/plugins/repoclosure_cmd_plugin.so
%{_libdir}/dnf5/plugins/repomanage_cmd_plugin.so
%{_libdir}/dnf5/plugins/reposync_cmd_plugin.so

%{_mandir}/man8/dnf*-builddep.8.*
%{_mandir}/man8/dnf*-changelog.8.*
%{_mandir}/man8/dnf*-config-manager.8.*
%{_mandir}/man8/dnf*-copr.8.*
%{_mandir}/man8/dnf*-needs-restarting.8.*
%{_mandir}/man8/dnf*-repoclosure.8.*
%{_mandir}/man8/dnf*-repomanage.8.*
%{_mandir}/man8/dnf*-reposync.8.*
%{_datadir}/dnf5/aliases.d/compatibility-plugins.conf
%{_datadir}/dnf5/aliases.d/compatibility-reposync.conf

# ========== libdnf5-plugin-appstream ==========

%if %{with plugin_appstream}
%package -n libdnf5-plugin-appstream
Summary(ru_RU.UTF-8): Плагин libdnf5 для установки данных Appstream репозитория
Summary:	Libdnf5 plugin to install repo Appstream data
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	dnf5 = %{EVRD}
BuildRequires:	pkgconfig(appstream) >= 0.16

%description -n libdnf5-plugin-appstream
Libdnf5 plugin that installs repository's Appstream data, for repositories which provide them.

%description -n libdnf5-plugin-appstream -l ru_RU.UTF-8
Плагин libdnf5, устанавливающий данные Appstream репозиториев, в которых они имеются.

%files -n libdnf5-plugin-appstream
%{_libdir}/libdnf5/plugins/appstream.so
%config %{_sysconfdir}/dnf/libdnf5-plugins/appstream.conf
%endif

# ========== libdnf5-plugin-expired-pgp-keys ==========
%if %{with plugin_expired_pgp_keys}
%package -n libdnf5-plugin-expired-pgp-keys
Summary(ru_RU.UTF-8): Плагин libdnf5 для обнаружения и удаления истёкших PGP-ключей
Summary:	Libdnf5 plugin for detecting and removing expired PGP keys
Group:		System/Configuration/Packaging
License:	LGPL-2.1-or-later
Requires:	dnf5 = %{EVRD}

%description -n libdnf5-plugin-expired-pgp-keys
Libdnf5 plugin for detecting and removing expired PGP keys.

%description -n libdnf5-plugin-expired-pgp-keys -l ru_RU.UTF-8
Плагин libdnf5 для обнаружения и удаления истёкших PGP-ключей.

%files -n libdnf5-plugin-expired-pgp-keys -f libdnf5-plugin-expired-pgp-keys.lang
%{_libdir}/libdnf5/plugins/expired-pgp-keys.*
%config %{_sysconfdir}/dnf/libdnf5-plugins/expired-pgp-keys.conf
%{_mandir}/man8/libdnf5-expired-pgp-keys.8.*
%endif

# ========== libdnf5-plugin-local ==========

%if %{with plugin_local}
%package -n libdnf5-plugin-local
Summary(ru_RU.UTF-8): Плагин libdnf5, копирующий все загруженные пакеты в локальный репозиторий
Summary:	Libdnf5 plugin that copies all downloaded packages to a local repository
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	%{libname} = %{EVRD}
Requires:	createrepo_c

%description -n libdnf5-plugin-local
Libdnf5 plugin that automatically copies all downloaded packages to
a repository on the local filesystem and generates repo metadata.

%description -n libdnf5-plugin-local -l ru_RU.UTF-8
Плагин libdnf5, автоматически копирующий все загруженные пакеты
в репозиторий в локальной файловой системе и генерирующий метаданные
репозитория.

%files -n libdnf5-plugin-local
%{_libdir}/libdnf5/plugins/local.*
%config %{_sysconfdir}/dnf/libdnf5-plugins/local.conf
%{_mandir}/man8/libdnf5-local.8.*
%endif

# ========== libdnf5-plugin-systemd-inhibit ==========

%if %{with plugin_systemd_inhibit}
%package -n libdnf5-plugin-systemd-inhibit
Summary(ru_RU.UTF-8): Плагин libdnf5, предотвращающий выключение системы во время транзакции с пакетами
Summary:	Libdnf5 plugin that prevents system shutdown during a package transaction
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	%{libname} = %{EVRD}

%description -n libdnf5-plugin-systemd-inhibit
Libdnf5 plugin that acquires a systemd inhibitor lock during a package
transaction to prevent system shutdown or reboot while packages are being
installed, removed, or updated.

%description -n libdnf5-plugin-systemd-inhibit -l ru_RU.UTF-8
Плагин libdnf5, получающий блокировку systemd во время транзакции
с пакетами, чтобы предотвратить выключение или перезагрузку системы
во время установки, удаления или обновления пакетов.

%files -n libdnf5-plugin-systemd-inhibit
%{_libdir}/libdnf5/plugins/systemd-inhibit.*
%config %{_sysconfdir}/dnf/libdnf5-plugins/00-systemd-inhibit.conf
%endif

# ========== dnf5-automatic plugin ==========

%package plugin-automatic
Summary(ru_RU.UTF-8): Менеджер пакетов — автоматические обновления
Summary:	Package manager - automated upgrades
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	dnf5 = %{EVRD}
Requires:	%{_lib}curl4
Provides:	dnf5-command(automatic)
%if %{with default_system_dnf}
Provides:	dnf-automatic = %{EVRD}
Obsoletes:	dnf-automatic < 5.2.11.0-4
%else
Conflicts:	dnf-automatic < 5.2.11.0-4
%endif

%description plugin-automatic
Alternative command-line interface "dnf upgrade" suitable to be executed
automatically and regularly from systemd timers, cron jobs or similar.

%description plugin-automatic -l ru_RU.UTF-8
Альтернативный интерфейс командной строки «dnf upgrade», предназначенный
для автоматического и регулярного запуска из таймеров systemd, cron и подобных систем.

%files plugin-automatic -f dnf5-plugin-automatic.lang
%ghost %{_sysconfdir}/motd.d/dnf5-automatic
%{_libdir}/dnf5/plugins/automatic_cmd_plugin.so
%{_unitdir}/dnf5-automatic.service
%{_unitdir}/dnf5-automatic.timer
%{_unitdir}/dnf-automatic.service
%{_unitdir}/dnf-automatic.timer
%{_datadir}/dnf5/dnf5-plugins/automatic.conf
%{_datadir}/dbus-1/system.d/org.rpm.dnf.v0.Automatic.conf
%{_mandir}/man8/dnf*-automatic.8.*
%if %{with default_system_dnf}
%{_bindir}/dnf-automatic
%else
%exclude %{_bindir}/dnf-automatic
%endif

# ========== dnf5-manifest plugin ==========

%if %{with plugin_manifest}
%package plugin-manifest
Summary(ru_RU.UTF-8): Плагин DNF5 для работы с файлами манифестов пакетов RPM
Summary:	DNF5 plugin for working with RPM package manifest files
License:	LGPL-2.1-or-later
Group:		System/Configuration/Packaging
Requires:	dnf5 = %{EVRD}
Requires:	%{libname} = %{EVRD}
Requires:	%{clilibname} = %{EVRD}
Provides:	dnf5-command(manifest)

%description plugin-manifest
DNF5 plugin for working with RPM package manifest files.

%description plugin-manifest -l ru_RU.UTF-8
Плагин DNF5 для работы с файлами манифестов пакетов RPM.

%files plugin-manifest
%{_libdir}/dnf5/plugins/manifest_cmd_plugin.so
%{_mandir}/man8/dnf5-manifest.8.*
%endif
%endif

#--------------------------------------------------------------------------------

%prep
%autosetup -p1 -n dnf5-%{version}


%build
%cmake \
    -DPACKAGE_VERSION=%{version} \
    -DPERL_INSTALLDIRS=vendor \
    \
    -DWITH_DNF5DAEMON_CLIENT=%{?with_dnf5daemon_client:ON}%{!?with_dnf5daemon_client:OFF} \
    -DWITH_DNF5DAEMON_SERVER=%{?with_dnf5daemon_server:ON}%{!?with_dnf5daemon_server:OFF} \
    -DWITH_LIBDNF5_CLI=%{?with_libdnf_cli:ON}%{!?with_libdnf_cli:OFF} \
    -DWITH_DNF5=%{?with_dnf5:ON}%{!?with_dnf5:OFF} \
    -DWITH_PLUGIN_ACTIONS=%{?with_plugin_actions:ON}%{!?with_plugin_actions:OFF} \
    -DWITH_PLUGIN_RHSM=%{?with_plugin_rhsm:ON}%{!?with_plugin_rhsm:OFF} \
    -DWITH_PYTHON_PLUGINS_LOADER=%{?with_python_plugins_loader:ON}%{!?with_python_plugins_loader:OFF} \
    -DWITH_PLUGIN_APPSTREAM=%{?with_plugin_appstream:ON}%{!?with_plugin_appstream:OFF} \
    -DWITH_PLUGIN_EXPIRED_PGP_KEYS=%{?with_plugin_expired_pgp_keys:ON}%{!?with_plugin_expired_pgp_keys:OFF} \
    -DWITH_PLUGIN_LOCAL=%{?with_plugin_local:ON}%{!?with_plugin_local:OFF} \
    -DWITH_PLUGIN_MANIFEST=%{?with_plugin_manifest:ON}%{!?with_plugin_manifest:OFF} \
    -DWITH_PLUGIN_SYSTEMD_INHIBIT=%{?with_plugin_systemd_inhibit:ON}%{!?with_plugin_systemd_inhibit:OFF} \
    \
    -DWITH_COMPS=%{?with_comps:ON}%{!?with_comps:OFF} \
    -DWITH_MODULEMD=%{?with_modulemd:ON}%{!?with_modulemd:OFF} \
    -DWITH_ZCHUNK=%{?with_zchunk:ON}%{!?with_zchunk:OFF} \
    -DWITH_SYSTEMD=%{?with_systemd:ON}%{!?with_systemd:OFF} \
    \
    -DWITH_HTML=%{?with_html:ON}%{!?with_html:OFF} \
    -DWITH_MAN=%{?with_man:ON}%{!?with_man:OFF} \
    \
    -DWITH_GO=%{?with_go:ON}%{!?with_go:OFF} \
    -DWITH_PERL5=%{?with_perl5:ON}%{!?with_perl5:OFF} \
    -DWITH_PYTHON3=%{?with_python3:ON}%{!?with_python3:OFF} \
    -DWITH_RUBY=%{?with_ruby:ON}%{!?with_ruby:OFF} \
    -DRUBY_VENDORARCH_DIR=%{ruby_vendorarchdir} \
    -DRuby_VENDORARCH_DIR=%{ruby_vendorarchdir} \
    \
    -DWITH_SANITIZERS=%{?with_sanitizers:ON}%{!?with_sanitizers:OFF} \
    -DWITH_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
    -DWITH_PERFORMANCE_TESTS=%{?with_performance_tests:ON}%{!?with_performance_tests:OFF} \
    -DWITH_DNF5DAEMON_TESTS=%{?with_dnf5daemon_tests:ON}%{!?with_dnf5daemon_tests:OFF} \
    \
    -DVERSION_PRIME=%{project_version_prime} \
    -DVERSION_MAJOR=%{project_version_major} \
    -DVERSION_MINOR=%{project_version_minor} \
    -DVERSION_MICRO=%{project_version_micro}
%make_build
%if %{with man}
    %make_build doc-man
%endif
%if %{with tests}
%make_build -C test
%endif

%check
%if %{with tests}
%global lib_path %{buildroot}%{_libdir}
%global ruby_path %{buildroot}%{ruby_vendorarchdir}/libdnf5:%{buildroot}%{ruby_vendorarchdir}/libdnf5_cli
%global lib_path_all %{lib_path}%{?with_ruby::%{ruby_path}}

LD_LIBRARY_PATH="%{lib_path_all}" \
    ctest \
    --test-dir ${PWD}/build \
    --output-on-failure \
    --force-new-ctest-process \
    --progress || true
%endif

%install
%make_install -C build

%if %{with default_system_dnf}
ln -sr %{buildroot}%{_bindir}/dnf5 %{buildroot}%{_bindir}/dnf
ln -sr %{buildroot}%{_bindir}/dnf5 %{buildroot}%{_bindir}/yum
# Remove if condition when Fedora 37 is EOL
ln -sr %{buildroot}%{_bindir}/dnf5 %{buildroot}%{_bindir}/microdnf
%endif

# own dirs and files that dnf5 creates on runtime
mkdir -p %{buildroot}%{_prefix}/lib/sysimage/dnf
for files in \
    groups.toml modules.toml nevras.toml packages.toml \
    system.toml transaction_history.sqlite \
    transaction_history.sqlite-shm \
    transaction_history.sqlite-wal userinstalled.toml
do
    touch %{buildroot}%{_prefix}/lib/sysimage/dnf/$files
done


%if %{with systemd}
mkdir -p %{buildroot}%{_unitdir}/system-update.target.wants/
pushd %{buildroot}%{_unitdir}/system-update.target.wants/
  ln -sr ../dnf5-offline-transaction.service
popd
%endif

%find_lang dnf5
%find_lang dnf5-plugin-automatic
%find_lang dnf5-plugin-builddep
%find_lang dnf5-plugin-changelog
%find_lang dnf5-plugin-config-manager
%find_lang dnf5-plugin-copr
%find_lang dnf5-plugin-needs-restarting
%find_lang dnf5-plugin-repoclosure
%find_lang dnf5-plugin-reposync
%find_lang dnf5daemon-client
%find_lang dnf5daemon-server
%find_lang libdnf5
%find_lang libdnf5-cli
%find_lang libdnf5-plugin-actions
%find_lang libdnf5-plugin-expired-pgp-keys
%if %{with plugin_rhsm}
%find_lang libdnf5-plugin-rhsm
%endif




@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 51 |14mr|dracut-106-0.git57efb3.11
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define commit 57efb314c5446bd95462b14f307f6a5bab9fb58f
%define commit_short %(echo %{commit} | head -c 6)

%define dracutlibdir %{_prefix}/lib/dracut

Summary:	Next generation initrd image generator
Name:		dracut
Version:	106
Release:	0.git%{commit_short}.11
License:	GPLv2+
Group:		System/Base
Url:		https://github.com/dracut-ng/dracut-ng
Source0:	https://github.com/dracut-ng/dracut-ng/archive/%{commit}.tar.gz?/%{name}-%{commit}.tar.gz
Source1:	01-rosa.conf
Source2:	module-setup.sh

Patch0001:	0001-Always-use-noatime-option-for-live-rw.patch
Patch0002:	0002-dev-sdXn-dev-sdX-for-the-system-images.patch
Patch0003:	0003-ROSA-plymouth-theme.patch
Patch0004:	0004-Do-not-strip-kernel-modules-by-default.patch
Patch0005:	0005-Drop-explicit-9-compression-level.patch
Patch0006:	0006-Revert-Use-eurlatgr-as-default-console-font.patch
# https://github.com/dracutdevs/dracut/pull/1396
Patch0007:	0007-Understand-dbus-daemon.service.patch
Patch0008:	0008-Add-kostylen-for-networkroot.patch
# https://github.com/dracutdevs/dracut/pull/2312
Patch0025:	0025-fix-url-lib-remove-junk-before-path-to-ca-bundle.patch
# Revert https://github.com/dracut-ng/dracut-ng/pull/515
# TODO: we will probably also have to switch to NetworkManager...
Patch0026:	0026-Revert-chore-drop-support-for-ifcfg.patch
# cherry-pick of ff6a30c8, for Baikal
Patch0027:	0027-fix-kernel-modules-add-Cadence-USB-driver-to-base.patch
#UIRD
Patch0028:	0028-Hide-udevadm-warning-message.patch
Patch0029:	0029-UIRD-fix-for-shutdown-using-plymouth.patch
# backports for kernel-6.18 etc.
Patch0030:	0030-fix-dracut-functions.sh-check-for-modules-in-kmoddir.patch
Patch0031:	0031-fix-dracut-functions.sh-check_kernel_module-go-one-d.patch
# kb#639, for kernels 6.12+
Patch0032:	0032-fix-90kernel-modules-explicitly-include-xhci-pci-ren.patch
# backports of some security fixes
Patch0033:	0033-fix-dracut-init-do-not-set-DRACUT_KERNEL_MODALIASES-.patch
Patch0034:	0034-fix-dracut-properly-detect-kernel-version-with-sysro.patch
Patch0035:	0035-fix-network-legacy-add-input-validation-to-RFC-3442-.patch
# CVE-2026-6893
Patch0036:	0036-fix-network-legacy-sanitize-DHCP-values-in-dhclient-.patch
Patch0037:	0037-feat-base-add-escape-function-implementing-printf-q.patch
Patch0038:	0038-fix-dracut-lib-sanitize-variable-assignments-using-e.patch
Patch0039:	0039-fix-systemd-networkd-escape-values-from-DHCP-options.patch
Patch0040:	0040-fix-kernel-modules-include-xhci-pci-prom21-for-early.patch
Patch0041:	0041-fix-dracut-install-check-return-value-in-modalias-re.patch
Patch0042:	0042-fix-iscsi-normalize-initiator-and-target-names.patch
Patch0043:	0043-fix-net-lib-validate-iSCSI-LUN-parameters.patch

# per upstream name
Provides:	dracut-ng = %{EVRD}
Provides:	dracut-ng%{_isa} = %{EVRD}

BuildRequires:	docbook-dtd45-xml
BuildRequires:	docbook-style-xsl
BuildRequires:	xsltproc
BuildRequires:	bash
BuildRequires:	git-core
BuildRequires:	asciidoc
BuildRequires:	systemd-units
BuildRequires:	bash-completion
BuildRequires:	pkgconfig(libkmod)
BuildRequires:	pkgconfig(bash-completion)

%ifarch %{ix86} x86_64
Requires:	v86d
%endif
Requires(pre):	filesystem
Requires(pre):	coreutils
Requires:	udev
Requires:	util-linux-ng
Requires:	kmod
Requires:	e2fsprogs
Requires:	cpio
Requires:	findutils
Requires:	binutils
Requires:	grep
Requires:	mktemp
Requires:	bash
Requires:	kbd
Requires:	tar
Requires:	gzip
Requires:	pigz
Requires:	bzip2
Requires:	xz
Requires:	zstd
Requires:	file
Requires:	bridge-utils
#Requires:	bootloader-utils
# dhcp-client, for module network-legacy
# TODO: maybe we can work without network-legacy?
Requires:	/usr/sbin/dhclient
# to regenerate initrds
Requires:	rosa-kernel-tools

# Dependencies of module 90multipath
# https://github.com/dracutdevs/dracut/blob/cf31fcf804/modules.d/90multipath/module-setup.sh#L92-L98
Requires:	(dmsetup if multipath-tools)
Requires:	(kpartx if multipath-tools)
Requires:	(procps-ng if multipath-tools)
# pidof, https://github.com/dracutdevs/dracut/issues/2027
Requires:	(sysvinit-tools if multipath-tools)
# TODO: add similar boolean deps for other modules

# dracut module url-lib requires curl; that module is used rarely,
# so let't avoid requiring curl explicitly, but, if curl is being
# installed in one transaction with dracut, make sure that curl
# is installed before dracut to ensure that initrds will be generatable;
# bellow are dependencies of livenet, url-lib, nfs and some other modules.
# TODO: add a Provides generator to RPM to generate "Provides: binary(xxx)"
# and then generate all needed dependencies by grep'ping "require_binaries"
OrderWithRequires: coreutils
OrderWithRequires: curl
OrderWithRequires: nfs-utils
OrderWithRequires: /usr/bin/tar
OrderWithRequires: /usr/bin/gzip
# network-legacy fails without it
OrderWithRequires: /usr/sbin/dhclient

%description
Dracut contains tools to create a bootable initramfs for 2.6 Linux kernels.
Unlike existing implementations, dracut does hard-code as little as possible
into the initramfs. Dracut contains various modules which are driven by the
event-based udev. Having root on MD, DM, LVM2, LUKS is supported as well as
NFS, iSCSI, NBD, FCoE with the dracut-network package.

%prep
%autosetup -S git_am -n dracut-ng-%{commit}

# We don't want to strip dracut-install, that's debuginfo's job
sed -i -e 's,\$(strip),,g' src/install/Makefile
# historical
grep -Irl '/boot/initramfs' | xargs sed -i -e 's,/boot/initramfs,/boot/initrd,g'
# inspect changes made by sed
git diff

%build
%global optflags %{optflags} -Os

# The build system sets CFLAGS overriding the default value dracut's Makefile
# uses. However, that default set of options also sets the path to libkmod
# headers. Add it here then.
export CFLAGS="%{optflags} $(pkg-config --cflags libkmod)"

%configure \
	--systemdsystemunitdir=%{_unitdir} \
	--bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) \
	--libdir=%{_prefix}/lib

%make_build CC=%{__cc}

%install
%make_install enable_test=no

mkdir -p %{buildroot}%{_datadir}/doc/%{name}/dracut.conf.d-examples
mv -v %{buildroot}%{dracutlibdir}/dracut.conf.d/* %{buildroot}%{_datadir}/doc/%{name}/dracut.conf.d-examples

# We place the distro-specific config in /usr/lib/dracut/dracut-conf.d/
# to make it overridable (the file with the same name in /etc/dracut.conf.d/
# has a higher priority).
install -m 644 %{SOURCE1} %{buildroot}%{dracutlibdir}/dracut.conf.d/01-rosa.conf
mkdir -p %{buildroot}%{dracutlibdir}/modules.d/99rosa/
install -m 644 %{SOURCE2} %{buildroot}%{dracutlibdir}/modules.d/99rosa/
# until the e2k kernel supports xz compressed initrd
%ifarch %{e2k} loongarch64
    sed -i 's/compress=.*/compress="gzip"/' %{buildroot}%{dracutlibdir}/dracut.conf.d/01-rosa.conf
%endif

echo "DRACUT_VERSION=%{version}-%{release}" > %{buildroot}%{dracutlibdir}/dracut-version.sh

# fix permission of module files
chmod +x %{buildroot}%{dracutlibdir}/modules.d/*/*.sh

mkdir -p %{buildroot}/boot/dracut
mkdir -p %{buildroot}%{_var}/lib/dracut/overlay
install -m 755 -d %{buildroot}%{_datadir}/dracut

mkdir -p %{buildroot}%{_sbindir}
mv %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/

ln -s %{_sbindir}/dracut %{buildroot}%{_bindir}/dracut
ln -s %{dracutlibdir}/dracut-install %{buildroot}%{_sbindir}/dracut-install

mkdir -p %{buildroot}%{_localstatedir}/log
touch %{buildroot}%{_localstatedir}/log/dracut.log

# regenerate initrds with rosa-kernel-tools when installing or updating dracut
mkdir -p %{buildroot}/var/spool/initramfs-regen
touch %{buildroot}/var/spool/initramfs-regen/dracut

# Replace some /sbin with /usr/sbin
sed -i -e "s,=-/sbin/modprobe,=-/usr/sbin/modprobe," -e "s,=/sbin/multipathd,=/usr/sbin/multipathd," %{buildroot}%{_prefix}/lib/%{name}/modules.d/90multipath/multipathd.service
# Replace some /bin with /usr/bin
sed -i "s,=/bin/true,=/usr/bin/true," %{buildroot}%{_unitdir}/%{name}-shutdown.service

%files
%doc AUTHORS
%dir /boot/dracut
%dir %{_datadir}/dracut
%dir %{_var}/lib/dracut
%dir %{_var}/lib/dracut/overlay
%dir %{dracutlibdir}/modules.d
%dir %{dracutlibdir}/dracut.conf.d
%dir %{_sysconfdir}/dracut.conf.d
%config %{_sysconfdir}/dracut.conf
%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
%{dracutlibdir}/dracut.conf.d/01-rosa.conf
%{_sbindir}/dracut
%{_bindir}/dracut
%{_sbindir}/dracut-catimages
%{_sbindir}/dracut-install
%{_sbindir}/lsinitrd
%{_unitdir}/*.service
%{_unitdir}/*/*.service
%{_prefix}/lib/kernel/install.d/5*-dracut*.install
%{dracutlibdir}/skipcpio
%{dracutlibdir}/dracut-install
%{dracutlibdir}/dracut-version.sh
%{dracutlibdir}/dracut-functions.sh
%{dracutlibdir}/dracut-functions
%{dracutlibdir}/modules.d/*
%{dracutlibdir}/dracut-initramfs-restore
%{dracutlibdir}/dracut-logger.sh
%{dracutlibdir}/dracut-init.sh
%{dracutlibdir}/dracut-util
%{_datadir}/bash-completion/completions/dracut
%{_datadir}/bash-completion/completions/lsinitrd
%{_mandir}/man1/lsinitrd.1.*
%{_mandir}/man5/dracut.conf.5*
%{_mandir}/man7/dracut.bootup.7*
%{_mandir}/man7/dracut.kernel.7*
%{_mandir}/man7/dracut.cmdline.7*
%{_mandir}/man7/dracut.modules.7*
%{_mandir}/man8/dracut*.8*
%{_datadir}/pkgconfig/dracut.pc
%{_datadir}/doc/%{name}/dracut.conf.d-examples
/var/spool/initramfs-regen/dracut

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 52 |14mr|extra-cmake-modules-6.30.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define fw_version %(echo %{version} | cut -d. -f1,2)

Summary:	KDE Frameworks CMake extra modules
Name:		extra-cmake-modules
Version:	6.30.0
Release:	1
License:	MIT
Group:		Development/KDE and Qt
Url:		http://www.kde.org/
Source0:	https://download.kde.org/stable/frameworks/%{fw_version}/%{name}-%{version}.tar.xz
BuildRequires:	cmake
BuildRequires:	python3egg(setuptools)
BuildRequires:	python3egg(sphinx)
BuildRequires:	pkgconfig(Qt5Core)
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	qt6-cmake
BuildArch:	noarch

%description
KDE Frameworks CMake extra modules.

%files
%doc %{_datadir}/doc/ECM/html/
%dir %{_datadir}/ECM
%{_datadir}/ECM/*
%{_mandir}/man7/ecm*.7*

#--------------------------------------------------------------------

%package -n extra-cmake-modules5
Summary:	KDE Frameworks 5 CMake extra modules
Group:		Development/KDE and Qt
Requires:	extra-cmake-modules = %{version}
Requires:	kde5-macros
Requires:	qmake5
Requires:	qt5-linguist-tools
Requires:	pkgconfig(Qt5Core)
Requires:	pkgconfig(Qt5Quick)

%description -n extra-cmake-modules5
KDE Frameworks 5 CMake extra modules.

%files -n extra-cmake-modules5

#----------------------------------------------------------------------------

%package -n extra-cmake-modules6
Summary:	KDE Frameworks 6 CMake extra modules
Group:		Development/KDE and Qt
Requires:	extra-cmake-modules = %{version}
Requires:	kde6-macros
Requires:	pkgconfig(Qt6Core)
Requires:	pkgconfig(Qt6Quick)
Requires:	qt6-cmake
Requires:	qt6-linguist-tools
Requires:	qt6-qttools-devel

%description -n extra-cmake-modules6
KDE Frameworks 6 CMake extra modules.

%files -n extra-cmake-modules6

#----------------------------------------------------------------------------

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 53 |14mr|gcc-16.2.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# functions with printf format attribute but with special parser and also
# receiving non constant format strings
%define		Werror_cflags			%{nil}

# avoid failures when testing if compiler used to build gcc can generate
# shared objects (regardless of unresolved symbols)
%define		_disable_ld_no_undefined	1

# avoid build failure due to configure built with different autoconf version
%define		_disable_libtoolize		1
# -flto in compiler flags breaks things, but --with-build-config=bootstrap-lto
# does the right thing
%define		_disable_lto			1

%global optflags %{optflags} -O3
#-----------------------------------------------------------------------
%define nof_arches		noarch
%define biarches		x86_64 mips64 mips64el mips mipsel

%define	system_gcc		1
%define majorver %(echo %{version} |cut -d. -f1)

%if %{system_gcc}
%define package_suffix		%{nil}
%define program_prefix		%{nil}
%define program_suffix		%{nil}
%define	program_long_suffix	-%{version}
%else
%define package_suffix		%{branch}
%define program_prefix		%{nil}
%define program_suffix		%{branch}
%define program_long_suffix	%{branch}
%endif

# Define GCC target platform, and arch we built for
%define arch			%(echo %{_target_cpu}|sed -e "s/\\(i.86\\|athlon\\)/i386/" -e "s/amd64/x86_64/")
%define	target_cpu		%{arch}
%define gcc_target_platform	%{_target_platform}
%define target_prefix		%{_prefix}
%define target_libdir		%{_libdir}
%define target_slibdir		%{_libdir}
%define target_slibdir32	%{target_prefix}/lib
%define isarch()		%(case " %* " in (*" %{arch} "*) echo 1;; (*) echo 0;; esac)

%if %isarch x86_64
%define multilib_32_arch	i686
%endif
%if %isarch %{biarches}
%define gcc32_target_platform	%{multilib_32_arch}-%{_target_vendor}-%{_target_os}%{?_gnu}
%endif

%define		default_compiler	1
%define		majorver		%(echo %{version} |cut -d. -f1)
%define		branch			16.2
%define		ver			%{branch}.0
%define		prerelease		%{nil}
%define		gcclibexecdirparent	%{_libexecdir}/gcc/%{gcc_target_platform}/
%define		gcclibexecdir		%{gcclibexecdirparent}/%{ver}
%define		gccdirparent		%{_libdir}/gcc/%{gcc_target_platform}/
%define		gccdir			%{gccdirparent}/%{ver}
%define		multigccdir		%{_libdir}/gcc/%{gcc_target_platform}/%{ver}/32
%define		multigccdirn32		%{_libdir}/gcc/%{gcc_target_platform}/%{ver}/n32
%define		multigccdir64		%{_libdir}/gcc/%{gcc_target_platform}/%{ver}/64
%define		multilibdir		%{target_prefix}/lib
%define		multirootlibdir		%{target_prefix}/lib

#-----------------------------------------------------------------------
%define		gcc_major		1
%define		libgcc			%mklibname gcc %{gcc_major}
%define		multilibgcc		libgcc%{gcc_major}
%define		libgcc_devel		%mklibname gcc -d
%define		libgcc_static_devel	%mklibname gcc -d -s
%define		stdcxx_major		6
%define		libstdcxx		%mklibname stdc++ %{stdcxx_major}
%define		libstdcxx_devel		%mklibname stdc++ -d
%define		libstdcxx_static_devel	%mklibname stdc++ -d -s
%define		multilibstdcxx		libstdc++%{stdcxx_major}
%define		d_major			2
%define		libgdruntime		%mklibname gdruntime %{d_major}
%define		libgdruntime_devel	%mklibname gdruntime -d
%define		libgdruntime_static_devel	%mklibname gdruntime -d -s
%define		multilibgdruntime	libgdruntime%{d_major}
%define		gfortran_major		5
%define		libgfortran		%mklibname gfortran %{gfortran_major}
%define		libgfortran_devel	%mklibname gfortran -d
%define		libgfortran_static_devel %mklibname gfortran -d -s
%define		multilibgfortran	libgfortran%{gfortran_major}
%define		ffi_major		4
%define		libffi			%mklibname ffi %{ffi_major}
%define		libffi_devel		%mklibname ffi -d
%define		libffi_static_devel	%mklibname ffi -d -s
%define		multilibffi		libffi%{ffi_major}
%define		gnat_major		1
%define		libgnat			%mklibname gnat %{gnat_major}
%define		libgnat_devel		%mklibname gnat -d
%define		libgnat_static_devel	%mklibname gnat -d -s
%define		multilibgnat		libgnat%{gnat_major}
%define		go_major		25
%define		libgo			%mklibname go %{go_major}
%define		libgo_devel		%mklibname go -d
%define		libgo_static_devel	%mklibname go -d -s
%define		multilibgo		libgo%{go_major}
%define		cc1_major		0
%define		libcc1			%mklibname cc1 %{cc1_major}
%define		libcc1_devel		%mklibname cc1 -d
%define		libcc1_static_devel	%mklibname cc1 -d -s
%define		gomp_major		1
%define		libgomp			%mklibname gomp %{gomp_major}
%define		libgomp_devel		%mklibname gomp -d
%define		libgomp_static_devel	%mklibname gomp -d -s
%define		multilibgomp		libgomp%{gomp_major}
%define		objc_major		4
%define		libobjc			%mklibname objc %{objc_major}
%define		libobjc_devel		%mklibname objc -d
%define		libobjc_static_devel	%mklibname objc -d -s
%define		multilibobjc		libobjc%{objc_major}
%define		quadmath_major		0
%define		libquadmath		%mklibname quadmath %{quadmath_major}
%define		libquadmath_devel	%mklibname quadmath -d
%define		libquadmath_static_devel %mklibname quadmath -d -s
%define		multilibquadmath	libquadmath%{quadmath_major}
%define		ssp_major		0
%define		libssp			%mklibname ssp %{ssp_major}
%define		libssp_devel		%mklibname ssp -d
%define		libssp_static_devel	%mklibname ssp -d -s
%define		multilibssp		libssp%{ssp_major}
%define		itm_major		1
%define		libitm			%mklibname itm %{itm_major}
%define		libitm_devel		%mklibname itm -d
%define		libitm_static_devel	%mklibname itm -d -s
%define		multilibitm		libitm%{itm_major}
%define		asan_major		8
%define		libasan			%mklibname asan %{asan_major}
%define		libasan_devel		%mklibname asan -d
%define		libasan_static_devel	%mklibname asan -d -s
%define		multilibasan		libasan%{asan_major}
%define		tsan_major		2
%define		libtsan			%mklibname tsan %{tsan_major}
%define		libtsan_devel		%mklibname tsan -d
%define		libtsan_static_devel	%mklibname tsan -d -s
%define		atomic_major		1
%define		libatomic		%mklibname atomic %{atomic_major}
%define		libatomic_devel		%mklibname atomic -d
%define		libatomic_static_devel	%mklibname atomic -d -s
%define		multilibatomic		libatomic%{atomic_major}
%define		ubsan_major		1
%define		libubsan		%mklibname ubsan %{ubsan_major}
%define		libubsan_devel		%mklibname ubsan -d
%define		libubsan_static_devel	%mklibname ubsan -d -s
%define		multilibubsan		libubsan%{ubsan_major}
%define		vtv_major		0
%define		libvtv			%mklibname vtv %{vtv_major}
%define		libvtv_devel		%mklibname vtv -d
%define		libvtv_static_devel	%mklibname vtv -d -s
%define		multilibvtv		libvtv%{vtv_major}
%define		lsan_major		0
%define		liblsan			%mklibname lsan %{lsan_major}
%define		liblsan_devel		%mklibname lsan -d
%define		liblsan_static_devel	%mklibname lsan -d -s
%define		hwasan_major		0
%define		libhwasan			%mklibname hwasan %{hwasan_major}
%define		libhwasan_devel		%mklibname hwasan -d
%define		libhwasan_static_devel	%mklibname hwasan -d -s

#-----------------------------------------------------------------------
%define		build_ada		0
%define		build_asan		0
%define		build_check		0
%define		build_multilib		0
%define		build_go		0
%define		build_d			0
%define		build_lto		1
%define		build_atomic		1
%define		build_objc		0
%define		build_objcxx		0
%define		build_quadmath		0
%define		build_ssp		0
%define		build_ubsan		%{system_gcc}
%define		build_itm		1
%define		build_cloog             %{system_gcc}
%define		build_cxx		%{system_gcc}
%define		build_doc		0
%define		build_ffi		%{system_gcc}
%define		build_fortran		%{system_gcc}
%define		build_gomp		%{system_gcc}
# need to build if major does not conflict with current system_gcc
%define		build_libgcc		%{system_gcc}
%define		build_pdf		%{build_doc}
%define		build_plugin		%{system_gcc}
%if %isarch x86_64 %{armx} %{riscv} loongarch64
  %define	build_tsan		%{system_gcc}
  %define	build_lsan		%{system_gcc}

%if %isarch x86_64
  %define	build_multilib		%{system_gcc}
%endif
%endif
%if %isarch %{ix86} x86_64
  %define	build_quadmath		%{system_gcc}
  %define	build_vtv		%{system_gcc}
%endif
%if %isarch %{ix86} x86_64
  %define	build_ada		%{system_gcc}
%endif
%if %isarch %{ix86} x86_64 %{armx} %{riscv}
  %define	build_go		%{system_gcc}
%endif
%if %isarch %{ix86} x86_64 %{armx} %{riscv} loongarch64
  %define	build_objc		%{system_gcc}
  %define	build_objcxx		%{system_gcc}
%if %isarch %{ix86} x86_64 %{armx} %{riscv} loongarch64
  %define	build_asan		%{system_gcc}
%else
  %define	build_asan		0
%endif
%endif

%define		build_pdf		0

%define		package_ffi		0

# Some versions of gcc build shared libgnat/libgnarl, some don't...
%define		shared_libgnat		1

# Define C library to use
%define		libc			glibc
%define		libc_shared		1

%define		build_minimal		0

%if %{build_minimal}
%define		build_ada		0
%define		build_asan		0
%define		build_atomic		0
%define		build_check		0
%define		build_go		0
%define		build_d			0
%define		build_lto		0
%define		build_lsan		0
%define		build_objc		0
%define		build_objcxx		0
%define		build_quadmath		0
%define		build_ssp		0
%define		build_tsan		0
%define		build_ubsan		0
%define		build_vtv		0
%define		build_itm		0
%define		build_cloog             0
%define		build_cxx		0
%define		build_doc		0
%define		build_ffi		0
%define		build_fortran		0
%define		build_gomp		0
%define		build_libgcc		0
%define		build_pdf		0
%define		build_plugin		0
%define		package_ffi		0
%define		shared_libgnat		0
%endif

#-----------------------------------------------------------------------

Summary:	GNU Compiler Collection
%if %{system_gcc}
Name:		gcc
%else
Name:		gcc%{package_suffix}
%endif
License:	GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
Group:		Development/C
Url:		http://gcc.gnu.org/
%define		major %(echo %{ver} |cut -d. -f1)
%if "%{prerelease}" != ""
Version:	%{ver}
Release:	0.%(echo %{prerelease} |sed -e 's,-,_,g').3
%global major %(echo %{ver} |cut -d. -f1)
%define srcname gcc-%{major}-%{prerelease}
Source0:	http://mirror.koddos.net/gcc/snapshots/%{major}-%{prerelease}/%{srcname}.tar.xz
Source1:	http://mirror.koddos.net/gcc/snapshots/%{major}-%{prerelease}/sha512.sum
%else
Version:	%{ver}
Release:	1
# http://www.gnu.org/prep/ftp.html ...
Source0:	http://mirror.koddos.net/gcc/releases/gcc-%{version}/gcc-%{version}.tar.xz
Source1:	http://mirror.koddos.net/gcc/releases/gcc-%{version}/sha512.sum
%define srcname gcc-%{version}
%endif
Source4:	c89
Source5:	c99

# environment variables for enabling/disabling colorized gcc output
Source10:	gcc.sysconfig
Source11:	gcc.sh
Source12:	gcc.csh

Source100:	gcc.rpmlintrc

Patch0:		gcc-4.7.1-uclibc-ldso-path.patch
Patch1:		gcc-4.8-aarch64-ld-path.patch
Patch3:		gcc-4.7.1-linker-plugin-detect.patch
# Seems to be still required on armv7hnl
Patch4:		gcc-4.8-non-fatal-compare-failure.patch
# Fix libstdc++ for use with clang
Patch5:		gcc-9-libstdc++-locale-clang.patch
# Provide functions from compiler-rt in libgcc
Patch6:		gcc-6.3-libgcc-__muloti4.patch

# slibdir is either /lib or /lib64
Patch1001:	gcc33-pass-slibdir.patch
# pass libdir around
Patch1002:	gcc-4.6.2-multi-do-libdir.patch
Patch1003:	gcc-12-fix-stage1-ada-linkage.patch
Patch1004:	tune_branch_prediction_cost.patch

BuildRequires:	binutils >= 2.20.51.0.2
BuildRequires:	elfutils-devel >= 0.147
BuildRequires:	bison
BuildRequires:	flex
BuildRequires:	gdb
BuildRequires:	gettext
BuildRequires:	diffutils
BuildRequires:	texinfo
BuildRequires:	pkgconfig(libtirpc)
# For py_puresitedir
%if ! %{build_minimal}
BuildRequires:	python3 >= 3.4
%endif
%if %{build_doc}
BuildRequires:	texi2html
%endif
%if %{build_pdf}
BuildRequires:	texlive
%endif
BuildRequires:	gmp-devel
BuildRequires:	mpfr-devel
BuildRequires:	libmpc-devel
BuildRequires:	pkgconfig(zlib)
%if %{build_cloog}
BuildRequires:  ppl-devel >= 0.11
BuildRequires:  ppl_c-devel >= 0.11
BuildRequires:  pkgconfig(cloog-isl)
BuildRequires:  pkgconfig(isl)
%endif

%if %{system_gcc}
Requires:	%{name}-cpp >= %{EVRD}
Requires:	%{libgcc} >= %{EVRD}
Requires:	%{libgcc_devel} >= %{EVRD}
Requires:	%{libgomp} >= %{EVRD}
%if %{build_atomic}
Requires:	%{libatomic} >= %{EVRD}
%endif
Requires:	%{libcc1} >= %{EVRD}
# as gcc now has it's own output color support, let's obsolete the old
# colorgcc with it's perl wrapper script which is slightly buggy with it's
# it's output redirection anyways...
Obsoletes:	colorgcc <= 1.3.2-17
%endif
Requires:	binutils >= 2.20.51.0.2

Obsoletes:	%{_lib}mudflap0 < 4.9.1_2014.05
Obsoletes:	%{_lib}mudflap-devel < 4.9.1_2014.05
Obsoletes:	%{_lib}mudflap-static-devel < 4.9.1_2014.05

%description
The gcc package contains the GNU Compiler Collection version %{branch}.

%if %{system_gcc}
%files -f gcc.lang
%else
%files
%endif
%{_bindir}/%{gcc_target_platform}-gcc
%{_bindir}/%{gcc_target_platform}-gcc-ar
%{_bindir}/%{gcc_target_platform}-gcc-nm
%{_bindir}/%{gcc_target_platform}-gcc-ranlib
%{_bindir}/lto-dump
%(
	if [ -n "$(echo %{gcc_target_platform} |cut -d- -f4-)" ]; then
		shortplatform="$(echo %{gcc_target_platform} |cut -d- -f1)-$(echo %{gcc_target_platform} |cut -d- -f3-)"
		echo "%%optional %{_bindir}/${shortplatform}-gcc"
		echo "%%optional %{_bindir}/${shortplatform}-gcc-%{ver}"
		echo "%%optional %{_bindir}/${shortplatform}-gcc-ar"
		echo "%%optional %{_bindir}/${shortplatform}-gcc-nm"
		echo "%%optional %{_bindir}/${shortplatform}-gcc-ranlib"
	fi
)
%config(noreplace) %{_sysconfdir}/sysconfig/gcc
%{_sysconfdir}/profile.d/90gcc.sh
%{_sysconfdir}/profile.d/90gcc.csh
%if %{default_compiler}
%{_bindir}/c89
%{_bindir}/c99
%{_bindir}/cc
%endif

%{_bindir}/gcc
%{_bindir}/gcc-ar
%{_bindir}/gcc-nm
%{_bindir}/gcc-ranlib
%{_bindir}/gcov
%{_bindir}/gcov-dump
%{_bindir}/gcov-tool
%{_mandir}/man1/gcc.1*
%{_mandir}/man1/gcov.1*
%{_mandir}/man1/gcov-dump.1*
%{_mandir}/man1/gcov-tool.1*
%{_mandir}/man1/lto-dump.1*
%{_mandir}/man7/*
%{_infodir}/gcc.info*
%{_infodir}/gccint.info*
%{_infodir}/gccinstall.info*
# Marked optional because of weird failure on armv7hnl
%optional %{_infodir}/libquadmath.info*
%{_bindir}/gcc-%{ver}
%{_bindir}/%{gcc_target_platform}-gcc-%{ver}
%dir %{gccdirparent}
%dir %{gccdir}
%dir %{gcclibexecdirparent}
%dir %{gcclibexecdir}
%{gcclibexecdir}/cc1
%{gcclibexecdir}/collect2
%{gccdir}/libgcov.a
%if %{build_atomic}
# Resolving -latomic_asneeded (added by the driver to every link since
# GCC 16) must not require libatomic-devel to be installed
%{gccdir}/libatomic.so
%{gccdir}/libatomic_asneeded.so
%endif
%{gcclibexecdir}/lto*
%if %{build_lto}
%{gcclibexecdir}/liblto*
%{_libdir}/bfd-plugins/liblto_plugin.so
%endif
%dir %{gccdir}/include
%{gccdir}/include/*.h
%{gcclibexecdir}/install-tools
%if "%{gcclibexecdir}" != "%{gccdir}"
%{gccdir}/install-tools
%endif
%if %{build_quadmath}
%exclude %{gccdir}/include/quadmath*.h
%endif
%if %{build_gomp}
%exclude %{gccdir}/include/omp*.h
%endif
%if %{build_multilib}
%if %isarch mips mipsel
%dir %{multigccdirn32}
%{multigccdirn32}/libgcov.a
%dir %{multigccdir64}
%{multigccdir64}/libgcov.a
%else
%dir %{multigccdir}
%{multigccdir}/libgcov.a
%if %{build_atomic}
%{multigccdir}/libatomic.so
%{multigccdir}/libatomic_asneeded.so
%endif
%endif
%endif
%if %{build_doc}
%doc %{_docdir}/gcc
%endif
%if %{build_check}
%doc %{_docdir}/gcc/test_summary.log
%endif


########################################################################
%if %{build_libgcc}
#-----------------------------------------------------------------------

%package -n %{libgcc}
Summary:	GNU C library
Group:		System/Libraries
%if "%{libgcc}" != "libgcc"
Provides:	libgcc = %{EVRD}
%endif

%description -n %{libgcc}
The %{libgcc} package contains GCC shared libraries for gcc %{branch}

%files -n %{libgcc}
%{_libdir}/libgcc_s.so.%{gcc_major}

#-----------------------------------------------------------------------

%package -n %{libgcc_devel}
Summary:	Development files for libgcc
Group:		System/Libraries
Requires:	%{libgcc} = %{EVRD}

%description -n %{libgcc_devel}
The %{libgcc} package contains header files and object files needed to
build applications with libgcc.

%files -n %{libgcc_devel}
%{target_libdir}/libgcc_s.so
%{gccdir}/libgcc_s_asneeded.so
%if %{build_multilib}
%{multilibdir}/libgcc_s.so
%{multigccdir}/libgcc_s_asneeded.so
%endif
%optional %{_prefix}/lib/libgcc_s.a
%if %isarch mips mipsel
%{target_libdir}32/libgcc_s.so
%{target_libdir}64/libgcc_s.so
%endif
%{gccdir}/*.o
%{gccdir}/libgcc*.a
%if %{build_multilib}
%ifarch mips mipsel
%dir %{multigccdirn32}
%{multigccdirn32}/*.o
%{multigccdirn32}/libgcc*.a
%dir %{multigccdir64}
%{multigccdir64}/*.o
%{multigccdir64}/libgcc*.a
%else
%dir %{multigccdir}
%{multigccdir}/*.o
%{multigccdir}/libgcc*.a
%endif
%endif

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibgcc}
Summary:	GNU C library
Group:		System/Libraries
Conflicts:	%{libgcc} < 4.6.2-11

%description -n %{multilibgcc}
The %{multilibgcc} package contains GCC shared libraries for gcc %{branch}

%files -n %{multilibgcc}
%{multirootlibdir}/libgcc_s.so.%{gcc_major}
%endif

#-----------------------------------------------------------------------
# build libgcc
%endif

########################################################################
%if %{build_plugin}
#-----------------------------------------------------------------------

%package plugin-devel
Summary:	Headers to build gcc plugins
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	gmp-devel
Requires:	mpfr-devel
Requires:	libmpc-devel

%description plugin-devel
This package contains header files and other support files
for compiling GCC plugins. The GCC plugin ABI is currently
not stable, so plugins must be rebuilt any time GCC is updated.

%files plugin-devel
%{gccdir}/plugin
%if "%{gccdir}" != "%{gcclibexecdir}"
%{gcclibexecdir}/plugin
%endif

#-----------------------------------------------------------------------
# build_plugin
%endif

########################################################################
%if %{system_gcc}
#-----------------------------------------------------------------------

%package cpp
Summary:	The C Preprocessor
Group:		Development/C
Requires:	%{name} = %{EVRD}

%description cpp
Cpp is the GNU C-Compatible Compiler Preprocessor.
Cpp is a macro processor which is used automatically
by the C compiler to transform your program before actual
compilation. It is called a macro processor because it allows
you to define macros, abbreviations for longer
constructs.

The C preprocessor provides four separate functionalities:

* Inclusion of header files. These are files of declarations that can be
  substituted into your program.
* Macro expansion. You can define 'macros,' which are abbreviations for
  arbitrary fragments of C code, and then the C preprocessor will replace
  the macros with their definitions throughout the program.
* Conditional compilation. Using special preprocessing directives,
  you can include or exclude parts of the program according to various
  conditions.
* Line control. If you use a program to combine or rearrange source files
  into an intermediate file which is then compiled, you can use line
  control to inform the compiler about where each source line originated.

%if %{system_gcc}
%files cpp -f cpplib.lang
%else
%files cpp
%endif
%{_bindir}/cpp
%if %{system_gcc}
%{_prefix}/lib/cpp
%{_mandir}/man1/cpp.1*
%{_infodir}/cpp*
%if %{build_doc}
%doc %{_docdir}/gcc-cpp
%endif
%endif

#-----------------------------------------------------------------------
# system_gcc
%endif

########################################################################
%if %{build_cxx}
#-----------------------------------------------------------------------

%package c++
Summary:	C++ support for gcc
Group:		Development/C++
Requires:	%{name} = %{EVRD}
%if %{system_gcc}
Requires:	%{libstdcxx_devel} = %{version}
%endif

%description c++
This package adds C++ support to the GNU Compiler Collection.
It includes support for most of the current C++ specification,
including templates and exception handling.

%files c++
%if %{system_gcc}
%{_bindir}/g++
%{_mandir}/man1/g++.1*
%endif
%if %{system_gcc}
%{_bindir}/%{gcc_target_platform}-c++
%{_bindir}/%{gcc_target_platform}-g++
%endif
%{_bindir}/c++-%{ver}
%{_bindir}/g++-%{ver}
%{_bindir}/%{gcc_target_platform}-g++-%{ver}
%if %{default_compiler}
%{_bindir}/c++
%endif
%(
	if [ -n "$(echo %{gcc_target_platform} |cut -d- -f4-)" ]; then
		shortplatform="$(echo %{gcc_target_platform} |cut -d- -f1)-$(echo %{gcc_target_platform} |cut -d- -f3-)"
		echo "%%optional %{_bindir}/${shortplatform}-c++"
		echo "%%optional %{_bindir}/${shortplatform}-g++"
		echo "%%optional %{_bindir}/${shortplatform}-g++-%{ver}"
	fi
)
%{gcclibexecdir}/cc1plus
%{gcclibexecdir}/g++-mapper-server

#-----------------------------------------------------------------------

%package -n %{libstdcxx}
Summary:	GNU Standard C++ library
Group:		System/Libraries
%if "%{libstdcxx}" != "libstdc++"
Provides:	libstdc++ = %{EVRD}
%endif
%if %{build_doc}
BuildRequires:	doxygen
BuildRequires:	graphviz
%endif

%description -n %{libstdcxx}
The libstdc++ package contains a rewritten standard compliant
GCC Standard C++ Library.

%if %{system_gcc}
%files -n %{libstdcxx} -f libstdc++.lang
%else
%files -n %{libstdcxx}
%endif
%{target_slibdir}/libstdc++.so.%{stdcxx_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibstdcxx}
Summary:	GNU Standard C++ library
Group:		System/Libraries
Conflicts:	%{libstdcxx} < 4.6.2-11

%description -n %{multilibstdcxx}
The libstdc++ package contains a rewritten standard compliant
GCC Standard C++ Library.

%files -n %{multilibstdcxx}
%{multirootlibdir}/libstdc++.so.%{stdcxx_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libstdcxx_devel}
Summary:	Header files and libraries for C++ development
Group:		Development/C++
Requires:	%{libstdcxx} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibstdcxx} = %{EVRD}
%endif
%if "%{libstdcxx_devel}" != "libstdc++-devel"
Provides:	libstdc++-devel = %{EVRD}
%endif
Provides:	stdc++-devel = %{EVRD}
%if "%{ver}" != "%{version}"
# 4.7.2_2010.10 should provide 4.7.2 so clang can pick up the dep
%if "%{libstdcxx_devel}" != "libstdc++-devel"
Provides:	%{libstdcxx_devel} = %{ver}-%{release}
%endif
Provides:	libstdc++-devel = %{ver}-%{release}
Provides:	stdc++-devel = %{ver}-%{release}
%endif
# We don't want to pull in an entire Python environment just because of
# libstdc++'s python based gdb plugin...
%define __requires_exclude_from ^(%{python3_sitelib}|%{_datadir}/gdb/).*$

%description -n %{libstdcxx_devel}
This is the GNU implementation of the standard C++ libraries.  This
package includes the header files and libraries needed for C++
development. This includes rewritten implementation of STL.

%files -n %{libstdcxx_devel}
%{_includedir}/c++/%{ver}
%{target_libdir}/libstdc++.so
%{target_libdir}/libstdc++.modules.json
%{_datadir}/gdb/auto-load%{_libdir}/libstdc++.*.py
%optional %{_datadir}/gdb/auto-load%{_libdir}/__pycache__/libstdc++*.pyc
%if %{build_multilib}
%{multilibdir}/libstdc++.so
%{multilibdir}/libstdc++.modules.json
%{_datadir}/gdb/auto-load%{multilibdir}/libstdc++.*.py
%optional %{_datadir}/gdb/auto-load%{multilibdir}/__pycache__/libstdc++*.pyc
%endif
%{python3_sitelib}/libstdcxx
%if %{build_doc}
%doc %{_docdir}/libstdc++
%endif

#-----------------------------------------------------------------------

%package -n %{libstdcxx_static_devel}
Summary:	Static libraries for the GNU standard C++ library
Group:		Development/C++
Requires:	%{libstdcxx_devel} = %{EVRD}
%if "%{libstdcxx_static_devel}" != "libstdc++-static-devel"
Provides:	libstdc++-static-devel = %{EVRD}
%endif
Provides:	stdc++-static-devel = %{EVRD}

%description -n %{libstdcxx_static_devel}
Static libraries for the GNU standard C++ library.

%files -n %{libstdcxx_static_devel}
%{target_libdir}/libstdc++.*a
%{target_libdir}/libstdc++fs.*a
%{target_libdir}/libsupc++.*a
%{target_libdir}/libstdc++exp.*a
%if %{build_multilib}
%{multilibdir}/libstdc++.*a
%{multilibdir}/libstdc++fs.*a
%{multilibdir}/libsupc++.*a
%{multilibdir}/libstdc++exp.*a
%endif

#-----------------------------------------------------------------------
# build_cxx
%endif

########################################################################
%if %{build_d}
#-----------------------------------------------------------------------

%package d
Summary:	D support for gcc
Group:		Development/C++
Requires:	%{name} = %{EVRD}
BuildRequires:	gcc-d
BuildRequires:	%{libgdruntime_devel}
%if %{system_gcc}
Requires:	%{libgdruntime_devel} = %{version}
%endif
Obsoletes:	gcc-d < %{EVRD}

%description d
This package adds D support to the GNU Compiler Collection.

%files d
%if %{system_gcc}
%{_bindir}/gdc
%{_mandir}/man1/gdc.1*
%{_infodir}/gdc.info*
%endif
%if %{system_gcc}
%{_bindir}/%{gcc_target_platform}-gdc
%endif
%(
	if [ -n "$(echo %{gcc_target_platform} |cut -d- -f4-)" ]; then
		shortplatform="$(echo %{gcc_target_platform} |cut -d- -f1)-$(echo %{gcc_target_platform} |cut -d- -f3-)"
		echo "%%optional %{_bindir}/${shortplatform}-gdc"
	fi
)
%{gcclibexecdir}/d21

#-----------------------------------------------------------------------

%package -n %{libgdruntime}
Summary:	D standard library
Group:		System/Libraries
%if "%{libgdruntime}" != "libgdruntime"
Provides:	libgdruntime = %{EVRD}
%endif

%description -n %{libgdruntime}
The libphobos package contains a version of the
D Standard Library.

%files -n %{libgdruntime}
%{target_libdir}/libgdruntime.so.%{d_major}*
%{target_libdir}/libgphobos.so.%{d_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibgdruntime}
Summary:	D Standard library
Group:		System/Libraries

%description -n %{multilibgdruntime}
The libphobos package contains a version of the
D Standard Library.

%files -n %{multilibgdruntime}
%{multilibdir}/libgdruntime.so.%{d_major}*
%{multilibdir}/libgphobos.so.%{d_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libgdruntime_devel}
Summary:	Header files and libraries for D development
Group:		Development/Other
Requires:	%{libgdruntime} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibgdruntime} = %{EVRD}
%endif
%if "%{libgdruntime_devel}" != "libgdruntime-devel"
Provides:	libgdruntime-devel = %{EVRD}
%endif

%description -n %{libgdruntime_devel}
This is the GNU implementation of the D standard libraries.  This
package includes the header files and libraries needed for D
development.

%files -n %{libgdruntime_devel}
%{target_libdir}/libgdruntime.so
%{target_libdir}/libgphobos.so
%{target_libdir}/libgphobos.spec
%{gccdir}/include/d
%if %{build_multilib}
%{multilibdir}/libgdruntime.so
%{multilibdir}/libgphobos.so
%{multilibdir}/libgphobos.spec
%endif

#-----------------------------------------------------------------------

%package -n %{libgdruntime_static_devel}
Summary:	Static libraries for the D standard library
Group:		Development/Other
Requires:	%{libgdruntime_devel} = %{EVRD}
%if "%{libgdruntime_static_devel}" != "libgdruntime-static-devel"
Provides:	libgdruntime-static-devel = %{EVRD}
%endif
Provides:	gdruntime-static-devel = %{EVRD}

%description -n %{libgdruntime_static_devel}
Static libraries for the GNU standard D library.

%files -n %{libgdruntime_static_devel}
%{target_libdir}/libgdruntime.*a
%{target_libdir}/libgphobos.*a
%if %{build_multilib}
%{multilibdir}/libgdruntime.*a
%{multilibdir}/libgphobos.*a
%endif

#-----------------------------------------------------------------------
# build_d
%endif

########################################################################
%if %{build_ada}
#-----------------------------------------------------------------------

%package gnat
Summary:	Ada support for gcc
Group:		Development/Other
Requires:	%{name} = %{EVRD}
Requires:	%{libgnat_devel} = %{EVRD}
# no bootstrap support
BuildRequires:	gcc-gnat >= 3.1, libgnat >= 3.1

%description gnat
GNAT is a GNU Ada front-end to GCC. This package includes development
tools, the documents and Ada compiler.

%files gnat
%{_bindir}/gnat*
%{gcclibexecdir}/gnat1
%{_infodir}/gnat*
%if %{build_doc}
%doc %{_docdir}/gcc-gnat
%endif

# libgnat and libgnarl are static-only these days
%if %{shared_libgnat}
#-----------------------------------------------------------------------

%package -n %{libgnat}
Summary:	GNU Ada runtime libraries
Group:		System/Libraries
Provides:	libgnat = %{EVRD}
Obsoletes:	gnat-runtime < %{EVRD}

%description -n %{libgnat}
GNAT is a GNU Ada front-end to GCC. This package includes shared
libraries, which are required to run programs compiled with the GNAT.

%files -n %{libgnat}
%{target_libdir}/libgnat-%{majorver}.so.%{gnat_major}
%{target_libdir}/libgnarl-%{majorver}.so.%{gnat_major}

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibgnat}
Summary:	GNU Ada runtime libraries
Group:		System/Libraries
Conflicts:	%{libgnat} < 4.6.2-11

%description -n %{multilibgnat}
GNAT is a GNU Ada front-end to GCC. This package includes shared
libraries, which are required to run programs compiled with the GNAT.

%files -n %{multilibgnat}
%{multilibdir}/libgnat-%{majorver}.so.%{gnat_major}
%{multilibdir}/libgnarl-%{majorver}.so.%{gnat_major}
%endif
%endif

#-----------------------------------------------------------------------

%package -n %{libgnat_devel}
Summary:	GNU Ada libraries
Group:		Development/Other
%if %{shared_libgnat}
Requires:	%{libgnat} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibgnat} = %{EVRD}
%endif
%else
Obsoletes:	%{libgnat} < %{EVRD}
Obsoletes:	%{multilibgnat} < %{EVRD}
Requires:	%{libgnat_static_devel} = %{EVRD}
%endif
Provides:	libgnat-devel = %{EVRD}
Provides:	gnat-devel = %{EVRD}

%description -n %{libgnat_devel}
GNAT is a GNU Ada front-end to GCC. This package includes shared
libraries, which are required to compile with the GNAT.

%files -n %{libgnat_devel}
%if %{shared_libgnat}
%{target_libdir}/libgnat*.so
%{_libdir}/libgnarl*.so
%endif
%{gccdir}/adalib
%{gccdir}/adainclude
%exclude %{gccdir}/adalib/lib*.a
%{_libdir}/gcc/*/*/ada_target_properties
%if %{build_multilib}
%{_libdir}/gcc/*/*/32/ada_target_properties
%if %{shared_libgnat}
%{multilibdir}/libgnat*.so
%{multilibdir}/libgnarl*.so
%endif
%{multigccdir}/adalib
%{multigccdir}/adainclude
%exclude %{multigccdir}/adalib/lib*.a
%endif

#-----------------------------------------------------------------------

%package -n %{libgnat_static_devel}
Summary:	GNU Ada static libraries
Group:		Development/Other
Requires:	%{libgnat_devel} = %{EVRD}
Provides:	libgnat-static-devel = %{EVRD}
Provides:	gnat-static-devel = %{EVRD}

%description -n %{libgnat_static_devel}
GNAT is a GNU Ada front-end to GCC. This package includes static
libraries.

%files -n %{libgnat_static_devel}
%{gccdir}/adalib/lib*.a
%if %{build_multilib}
%{multigccdir}/adalib/lib*.a
%endif
#-----------------------------------------------------------------------
# build ada
%endif

########################################################################
%if %{build_fortran}
#-----------------------------------------------------------------------

%package gfortran
Summary:	Fortran 95 support for gcc
Group:		Development/Other
Requires:	%{name} = %{EVRD}
Requires:	%{libgfortran_devel} = %{EVRD}

%description gfortran
The gcc-gfortran package provides support for compiling Fortran
programs with the GNU Compiler Collection.

%files gfortran
%{_bindir}/gfortran
%{_bindir}/gfortran-%{ver}
%{_bindir}/%{_target_platform}-gfortran
%{_bindir}/%{_target_platform}-gfortran-%{ver}
%(
	if [ -n "$(echo %{gcc_target_platform} |cut -d- -f4-)" ]; then
		shortplatform="$(echo %{gcc_target_platform} |cut -d- -f1)-$(echo %{gcc_target_platform} |cut -d- -f3-)"
		echo "%%optional %{_bindir}/${shortplatform}-gfortran"
		echo "%%optional %{_bindir}/${shortplatform}-gfortran-%{ver}"
	fi
)
%{_infodir}/gfortran.info*
%{_mandir}/man1/gfortran.1*
%{gcclibexecdir}/f951
%{gccdir}/finclude
%{gccdir}/libcaf_single.a
%{gccdir}/libcaf_shmem.a
%if %{build_multilib}
%{multigccdir}/libcaf_single.a
%{multigccdir}/libcaf_shmem.a
%{multigccdir}/finclude
%endif
%if %{build_doc}
%doc %{_docdir}/gcc-gfortran
%endif

#-----------------------------------------------------------------------

%package -n %{libgfortran}
Summary:	Fortran 95 runtime libraries
Group:		System/Libraries
%if %{build_quadmath}
Requires:	%{libquadmath} = %{EVRD}
%endif
%if "%{libgfortran}" != "libgfortran"
Provides:	libgfortran = %{EVRD}
%endif
%if %{build_multilib}
Provides:	%{multilibgfortran} = %{EVRD}
%endif

%description -n %{libgfortran}
This package contains Fortran 95 shared library which is needed to run
Fortran 95 dynamically linked programs.

%files -n %{libgfortran}
%{target_libdir}/libgfortran.so.%{gfortran_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibgfortran}
Summary:	Fortran 95 runtime libraries
Group:		System/Libraries
%if %{build_quadmath}
Requires:	%{multilibquadmath} = %{EVRD}
%endif
Conflicts:	%{libgfortran} < 4.6.2-11

%description -n %{multilibgfortran}
This package contains Fortran 95 shared library which is needed to run
Fortran 95 dynamically linked programs.

%files -n %{multilibgfortran}
%{multilibdir}/libgfortran.so.%{gfortran_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libgfortran_devel}
Summary:	Fortran 95 libraries
Group:		System/Libraries
Requires:	%{libgfortran} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibgfortran} = %{EVRD}
%endif
%if %{build_quadmath}
Requires:	%{libquadmath_devel} = %{EVRD}
%endif
Provides:	gfortran-devel = %{EVRD}

%description -n %{libgfortran_devel}
This package contains Fortran 95 shared library which is needed to
compile Fortran 95 programs.

%files -n %{libgfortran_devel}
%{target_libdir}/libgfortran.so
%{target_libdir}/libgfortran.spec
%if %{build_multilib}
%{multilibdir}/libgfortran.so
%{multilibdir}/libgfortran.spec
%endif

#-----------------------------------------------------------------------

%package -n %{libgfortran_static_devel}
Summary:	Fortran 95 static libraries
Group:		System/Libraries
Requires:	%{libgfortran_devel} = %{EVRD}
Provides:	gfortran-static-devel = %{EVRD}

%description -n %{libgfortran_static_devel}
This package contains Fortran 95 static library which is needed to
compile Fortran 95 programs.

%files -n %{libgfortran_static_devel}
%{target_libdir}/libgfortran.*a
%if %{build_multilib}
%{multilibdir}/libgfortran.*a
%endif
#-----------------------------------------------------------------------
# build fortran
%endif

########################################################################
%if %{build_go}
#-----------------------------------------------------------------------

%package go
Summary:	Go support for gcc
Group:		Development/Other
Requires:	%{name} = %{EVRD}
Requires:	%{libgo_devel} = %{EVRD}
BuildRequires:	(gcc-go or golang-bin)

%description go
The gcc-go package provides support for compiling Go programs
with the GNU Compiler Collection.

%files go
%{_bindir}/go
%{_bindir}/gofmt
%{_bindir}/gccgo
%{_bindir}/%{gcc_target_platform}-gccgo
%(
	if [ -n "$(echo %{gcc_target_platform} |cut -d- -f4-)" ]; then
		shortplatform="$(echo %{gcc_target_platform} |cut -d- -f1)-$(echo %{gcc_target_platform} |cut -d- -f3-)"
		echo "%%optional %{_bindir}/${shortplatform}-gccgo"
		echo "%%optional %{_bindir}/${shortplatform}-gccgo-%{ver}"
	fi
)
%{_libexecdir}/gcc/*/*/cgo
%{_libdir}/%{name}/bin/%{name}
%dir %{_libdir}/go
%if %{build_multilib}
%dir %{multilibdir}/go
%endif
%{_infodir}/gccgo.info*
%{_mandir}/man1/gccgo.1*
%{_bindir}/gccgo-%{ver}
%{_bindir}/%{gcc_target_platform}-gccgo-%{ver}
%{gcclibexecdir}/go1
%{gcclibexecdir}/buildid
%{gcclibexecdir}/test2json
%{gcclibexecdir}/vet
%{_libdir}/go/%{ver}
%{_libdir}/libgobegin.a
%{_libdir}/libgolibbegin.a
%if %{build_multilib}
%{multilibdir}/go/%{ver}
%{multilibdir}/libgobegin.a
%{multilibdir}/libgolibbegin.a
%endif
%if %{build_doc}
%doc %{_docdir}/gcc-go
%endif
%{_mandir}/man1/go.1*
%{_mandir}/man1/gofmt.1*

#-----------------------------------------------------------------------

%package -n %{libgo}
Summary:	Go runtime libraries
Group:		System/Libraries
Provides:	libgo = %{EVRD}

%description -n %{libgo}
This package contains Go shared library which is needed to run
Go dynamically linked programs.

%files -n %{libgo}
%{target_libdir}/libgo.so.%{go_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibgo}
Summary:	Go runtime libraries
Group:		System/Libraries
Conflicts:	%{libgo} < 4.6.2-11

%description -n %{multilibgo}
This package contains Go shared library which is needed to run
Go dynamically linked programs.

%files -n %{multilibgo}
%{multilibdir}/libgo.so.%{go_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libgo_devel}
Summary:	Go development libraries
Group:		Development/Other
Requires:	%{libgo} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibgo} = %{EVRD}
%endif
Provides:	libgo-devel = %{EVRD}
Provides:	go-devel = %{EVRD}

%description -n %{libgo_devel}
This package includes libraries and support files for compiling
Go programs.

%files -n %{libgo_devel}
%{target_libdir}/libgo.so
%if %{build_multilib}
%{multilibdir}/libgo.so
%endif

#-----------------------------------------------------------------------

%package -n %{libgo_static_devel}
Summary:	Static Go libraries
Group:		Development/Other
Requires:	%{libgo_devel} = %{EVRD}
Provides:	libgo-static-devel = %{EVRD}
Provides:	go-static-devel = %{EVRD}

%description -n %{libgo_static_devel}
This package contains static Go libraries.

%files -n %{libgo_static_devel}
%{target_libdir}/libgo.*a
%if %{build_multilib}
%{multilibdir}/libgo.*a
%endif

#-----------------------------------------------------------------------
# build go
%endif

########################################################################
%if %{build_objc}
#-----------------------------------------------------------------------

%package objc
Summary:	Objective-C support for GCC
Group:		Development/Other
Requires:	%{name} = %{EVRD}
Requires:	%{libobjc_devel} = %{EVRD}

%description objc
gcc-objc provides Objective-C support for the GCC.
Mainly used on systems running NeXTSTEP, Objective-C is an
object-oriented derivative of the C language.

%files objc
%{gcclibexecdir}/cc1obj

#-----------------------------------------------------------------------

%package -n %{libobjc}
Summary:	Objective-C runtime
Group:		System/Libraries
Provides:	libobjc = %{EVRD}

%description -n %{libobjc}
This package contains Objective-C shared library which is needed to run
Objective-C dynamically linked programs.

%files -n %{libobjc}
%{target_libdir}/libobjc.so.%{objc_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibobjc}
Summary:	Objective-C runtime
Group:		System/Libraries
Provides:	libobjc = %{EVRD}
Conflicts:	%{libobjc} < 4.6.2-11

%description -n %{multilibobjc}
This package contains Objective-C shared library which is needed to run
Objective-C dynamically linked programs.

%files -n %{multilibobjc}
%{multilibdir}/libobjc.so.%{objc_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libobjc_devel}
Summary:	Objective-C development libraries
Group:		Development/Other
Requires:	%{libobjc} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibobjc} = %{EVRD}
%endif
Provides:	libobjc-devel = %{EVRD}
Provides:	objc-devel = %{EVRD}

%description -n %{libobjc_devel}
This package includes libraries and support files for compiling
Objective-C programs.

%files -n %{libobjc_devel}
%{target_libdir}/libobjc.so
%{gccdir}/include/objc
%if %{build_multilib}
%{multilibdir}/libobjc.so
%endif

#-----------------------------------------------------------------------

%package -n %{libobjc_static_devel}
Summary:	Static Objective-C libraries
Group:		Development/Other
Requires:	%{libobjc_devel} = %{EVRD}
Provides:	libobjc-static-devel = %{EVRD}
Provides:	objc-static-devel = %{EVRD}

%description -n %{libobjc_static_devel}
This package contains static Objective-C libraries.

%files -n %{libobjc_static_devel}
%{target_libdir}/libobjc.*a
%if %{build_multilib}
%{multilibdir}/libobjc.*a
%endif
#-----------------------------------------------------------------------
# build objc
%endif

########################################################################
%if %{build_objcxx}
#-----------------------------------------------------------------------

%package objc++
Summary:	Objective-C++ support for GCC
Group:		Development/Other
Requires:	gcc-objc = %{EVRD}

%description objc++
gcc++-objc provides Objective-C++ support for the GCC.

%files objc++
%{gcclibexecdir}/cc1objplus
#-----------------------------------------------------------------------
# build objcxx
%endif

########################################################################
%if %{package_ffi}
#-----------------------------------------------------------------------

%package -n %{libffi}
Summary:	GCC support library for FFI
Group:		System/Libraries
Provides:	libffi = %{EVRD}

%description -n %{libffi}
This package contains GCC shared support library which is needed
for FFI support.

%files -n %{libffi}
%{target_libdir}/libffi.so.%{ffi_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibffi}
Summary:	GCC support library for FFI
Group:		System/Libraries
Conflicts:	%{libffi} < 4.6.2-11

%description -n %{multilibffi}
This package contains GCC shared support library which is needed
for FFI support.

%files -n %{multilibffi}
%{multirootlibdir}/libffi.so.%{ffi_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libffi_devel}
Summary:	GCC development for FFI
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	%{libffi} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibffi} = %{EVRD}
%endif
Provides:	libffi-devel = %{EVRD}
Provides:	ffi-devel = %{EVRD}

%description -n %{libffi_devel}
This package contains GCC development which is needed
to compile FFI support.

%files -n %{libffi_devel}
%{target_libdir}/libffi.so
%if %{build_multilib}
%{multilibdir}/libffi.so
%endif

#-----------------------------------------------------------------------

%package -n %{libffi_static_devel}
Summary:	GCC FFI static library
Group:		Development/C
Requires:	%{libffi_devel} = %{EVRD}
Provides:	libffi-static-devel = %{EVRD}
Provides:	ffi-static-devel = %{EVRD}

%description -n %{libffi_static_devel}
This package contains GCC static libraries which are needed
to compile FFI support.

%files -n %{libffi_static_devel}
%{target_libdir}/libffi.*a
%if %{build_multilib}
%{multilibdir}/libffi.*a
%endif

#-----------------------------------------------------------------------
# package ffi
%endif

########################################################################
%if %{build_quadmath}
#-----------------------------------------------------------------------

%package -n %{libquadmath}
Summary:	GCC __float128 shared support library
Group:		System/Libraries
Provides:	libquadmath = %{EVRD}

%description -n %{libquadmath}
This package contains GCC shared support library which is needed
for __float128 math support and for Fortran REAL*16 support.

%files -n %{libquadmath}
%{target_libdir}/libquadmath.so.%{quadmath_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibquadmath}
Summary:	GCC __float128 shared support library
Group:		System/Libraries
Conflicts:	%{libquadmath} < 4.6.2-11

%description -n %{multilibquadmath}
This package contains GCC shared support library which is needed
for __float128 math support and for Fortran REAL*16 support.

%files -n %{multilibquadmath}
%{multilibdir}/libquadmath.so.%{quadmath_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libquadmath_devel}
Summary:	GCC __float128 support
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	%{libquadmath} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibquadmath} = %{EVRD}
%endif
Provides:	libquadmath-devel = %{EVRD}
Provides:	quadmath-devel = %{EVRD}

%description -n %{libquadmath_devel}
This package contains support for building Fortran programs using
REAL*16 and programs using __float128 math.

%files -n %{libquadmath_devel}
%{target_libdir}/libquadmath.so
%if %{build_multilib}
%{multilibdir}/libquadmath.so
%endif
%{gccdir}/include/quadmath*.h
%if %{build_pdf}
%doc %{_docdir}/libquadmath
%endif

#-----------------------------------------------------------------------

%package -n %{libquadmath_static_devel}
Summary:	Static libraries for __float128 support
Group:		Development/C
Requires:	%{libquadmath_devel} = %{EVRD}
Provides:	libquadmath-static-devel = %{EVRD}
Provides:	quadmath-static-devel = %{EVRD}

%description -n %{libquadmath_static_devel}
This package contains static libraries for building Fortran programs
using REAL*16 and programs using __float128 math.

%files -n %{libquadmath_static_devel}
%{target_libdir}/libquadmath.*a
%if %{build_multilib}
%{multilibdir}/libquadmath.*a
%endif

#-----------------------------------------------------------------------
# build quadmath
%endif

########################################################################
#-----------------------------------------------------------------------

%if ! %{build_minimal}
%package -n %{libcc1}
Summary:	GCC parsing shared library
Group:		System/Libraries

%description -n %{libcc1}
This package contains the gcc parsing library

%files -n %{libcc1}
%{_libdir}/libcc1.so.%{cc1_major}*

#-----------------------------------------------------------------------

%package -n %{libcc1_devel}
Summary:	GCC parser library development support
Group:		Development/C
Requires:	%{libcc1} = %{EVRD}

%description -n %{libcc1_devel}
Development files for gcc's parser library

%files -n %{libcc1_devel}
%{_libdir}/libcc1.so

#-----------------------------------------------------------------------

%package -n %{libcc1_static_devel}
Summary:	Static library containing the gcc parser
Group:		Development/C
Requires:	%{libcc1_devel} = %{EVRD}
Provides:	libcc1-static-devel = %{EVRD}

%description -n %{libcc1_static_devel}
Static library containing the gcc parser

%files -n %{libcc1_static_devel}
%{_libdir}/libcc1.a
%endif

#-----------------------------------------------------------------------
########################################################################
%if %{build_gomp}
#-----------------------------------------------------------------------

%package -n %{libgomp}
Summary:	GCC OpenMP v3.0 shared support library
Group:		System/Libraries
Provides:	libgomp = %{EVRD}

%description -n %{libgomp}
This package contains GCC shared library which is needed
for OpenMP v3.0 support.

%files -n %{libgomp}
%{_libdir}/libgomp.so.%{gomp_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibgomp}
Summary:	GCC OpenMP v3.0 shared support library
Group:		System/Libraries
Provides:	libgomp = %{EVRD}
Conflicts:	%{libgomp} < 4.6.2-11

%description -n %{multilibgomp}
This package contains GCC shared library which is needed
for OpenMP v3.0 support.

%files -n %{multilibgomp}
%{multirootlibdir}/libgomp.so.%{gomp_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libgomp_devel}
Summary:	GCC OpenMP v3.0 development support
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	%{libgomp} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibgomp} = %{EVRD}
%endif
Provides:	libgomp-devel = %{EVRD}
Provides:	gomp-devel = %{EVRD}

%description -n %{libgomp_devel}
This package contains GCC development which is needed
to compile OpenMP v3.0 support.

%files -n %{libgomp_devel}
%{target_libdir}/libgomp.so
%{target_libdir}/libgomp.spec
%if %{build_multilib}
%{multilibdir}/libgomp.so
%{multilibdir}/libgomp.spec
%endif
%{_infodir}/libgomp.info*
%{gccdir}/include/omp*.h
%if %{build_pdf}
%doc %{_docdir}/libgomp
%endif

#-----------------------------------------------------------------------

%package -n %{libgomp_static_devel}
Summary:	GCC OpenMP v3.0 static library
Group:		Development/C
Requires:	%{libgomp_devel} = %{EVRD}
Provides:	libgomp-static-devel = %{EVRD}
Provides:	gomp-static-devel = %{EVRD}

%description -n %{libgomp_static_devel}
This package contains GCC static libraries which are needed
to compile OpenMP v3.0 support.

%files -n %{libgomp_static_devel}
%{target_libdir}/libgomp.*a
%if %{build_multilib}
%{multilibdir}/libgomp.*a
%endif

#-----------------------------------------------------------------------
# build gomp
%endif

########################################################################
%if %{build_ssp}
#-----------------------------------------------------------------------

%package -n %{libssp}
Summary:	GCC SSP shared support library
Group:		System/Libraries
Provides:	libssp = %{EVRD}

%description -n %{libssp}
This package contains GCC shared support library which is needed
for SSP support.

%files -n %{libssp}
%{target_libdir}/libssp.so.%{ssp_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibssp}
Summary:	GCC SSP shared support library
Group:		System/Libraries
Provides:	libssp = %{EVRD}
Conflicts:	%{libssp} < 4.6.2-11

%description -n %{multilibssp}
This package contains GCC shared support library which is needed
for SSP support.

%files -n %{multilibssp}
%{multilibdir}/libssp.so.%{ssp_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libssp_devel}
Summary:	GCC SSP development support
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	%{libssp} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibssp} = %{EVRD}
%endif
Provides:	libssp-devel = %{EVRD}
Provides:	ssp-devel = %{EVRD}

%description -n %{libssp_devel}
This package contains GCC libraries which are needed
to compile SSP support.

%files -n %{libssp_devel}
%{target_libdir}/libssp.so
%if %{build_multilib}
%{multilibdir}/libssp.so
%endif
%{gccdir}/include/ssp

#-----------------------------------------------------------------------

%package -n %{libssp_static_devel}
Summary:	GCC SSP static libraries
Group:		Development/C
Requires:	%{libssp_devel} = %{EVRD}
Provides:	libssp-static-devel = %{EVRD}
Provides:	ssp-static-devel = %{EVRD}

%description -n %{libssp_static_devel}
This package contains GCC static libraries which are needed
to compile SSP support.

%files -n %{libssp_static_devel}
%{target_libdir}/libssp.*.*a
%if %{build_multilib}
%{multilibdir}/libssp.*.*a
%endif

#-----------------------------------------------------------------------
# build ssp
%endif

########################################################################
%if %{build_itm}
#-----------------------------------------------------------------------

%package -n %{libitm}
Summary:	GCC Transactional Memory support library
Group:		System/Libraries
Provides:	libitm = %{EVRD}

%description -n %{libitm}
This package contains GCC's Transactional Memory support library.

%files -n %{libitm}
%{target_libdir}/libitm.so.%{itm_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibitm}
Summary:	GCC Transactional Memory support library
Group:		System/Libraries
Provides:	libitm = %{EVRD}

%description -n %{multilibitm}
This package contains GCC's Transactional Memory support library.

%files -n %{multilibitm}
%{multilibdir}/libitm.so.%{itm_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libitm_devel}
Summary:	GCC Transactional Memory development support
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	%{libitm} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibitm} = %{EVRD}
%endif
Provides:	libitm-devel = %{EVRD}
Provides:	itm-devel = %{EVRD}

%description -n %{libitm_devel}
This package contains GCC libraries which are needed
to use Transactional Memory features.

%files -n %{libitm_devel}
%{target_libdir}/libitm.so
%{target_libdir}/libitm.spec
%if %{build_multilib}
%{multilibdir}/libitm.so
%{multilibdir}/libitm.spec
%endif
%if %{system_gcc}
%{_infodir}/libitm.info*
%endif

#-----------------------------------------------------------------------

%package -n %{libitm_static_devel}
Summary:	GCC Transactional Memory static libraries
Group:		Development/C
Requires:	%{libitm_devel} = %{EVRD}
Provides:	libitm-static-devel = %{EVRD}
Provides:	itm-static-devel = %{EVRD}

%description -n %{libitm_static_devel}
This package contains GCC static libraries which are needed
to compile Transactional Memory support.

%files -n %{libitm_static_devel}
%{target_libdir}/libitm.a
%if %{build_multilib}
%{multilibdir}/libitm.a
%endif

#-----------------------------------------------------------------------
# build itm
%endif

%if %{build_asan}
#-----------------------------------------------------------------------
# Address Sanitizer
#-----------------------------------------------------------------------
%package -n %{libasan}
Summary:	GCC Address Sanitizer library
Group:		Development/C

%description -n %{libasan}
GCC Address Sanitizer Library.

%files -n %{libasan}
%{target_libdir}/libasan.so.%{asan_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibasan}
Summary:	GCC Address Sanitizer library
Group:		Development/C

%description -n %{multilibasan}
GCC Address Sanitizer Library.

%files -n %{multilibasan}
%{multilibdir}/libasan.so.%{asan_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libasan_devel}
Summary:	GCC Address Sanitizer development support
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	%{libasan} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibasan} = %{EVRD}
%endif
Provides:	libasan-devel = %{EVRD}
Provides:	asan-devel = %{EVRD}

%description -n %{libasan_devel}
This package contains GCC libraries which are needed
to use Address Sanitizer features.

%files -n %{libasan_devel}
%{target_libdir}/libasan.so
%{target_libdir}/libasan_preinit.o
%if %{build_multilib}
%{multilibdir}/libasan.so
%{multilibdir}/libasan_preinit.o
%endif

#-----------------------------------------------------------------------

%package -n %{libasan_static_devel}
Summary:	Static libasan
Group:		Development/C
Requires:	%{libasan_devel} = %{EVRD}

%description -n %{libasan_static_devel}
Static libasan.

%files -n %{libasan_static_devel}
%{target_libdir}/libasan.a
%if %{build_multilib}
%{multilibdir}/libasan.a
%endif
%endif

#-----------------------------------------------------------------------
# Thread Sanitizer
#-----------------------------------------------------------------------
%if %isarch x86_64 aarch64 %{riscv} loongarch64
%if %{build_tsan}
%package -n %{libtsan}
Summary:	GCC Thread Sanitizer library
Group:		Development/C

%description -n %{libtsan}
GCC Address Sanitizer Library.

%files -n %{libtsan}
%{target_libdir}/libtsan.so.%{tsan_major}*

#-----------------------------------------------------------------------

%package -n %{libtsan_devel}
Summary:	GCC Thread Sanitizer development support
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	%{libtsan} = %{EVRD}
Provides:	libtsan-devel = %{EVRD}
Provides:	tsan-devel = %{EVRD}

%description -n %{libtsan_devel}
This package contains GCC libraries which are needed
to use Thread Sanitizer features.

%files -n %{libtsan_devel}
%{target_libdir}/libtsan.so
%{target_libdir}/libtsan_preinit.o

#-----------------------------------------------------------------------

%package -n %{libtsan_static_devel}
Summary:	Static libtsan
Group:		Development/C
Requires:	%{libtsan_devel} = %{EVRD}

%description -n %{libtsan_static_devel}
Static libtsan.

%files -n %{libtsan_static_devel}
%{target_libdir}/libtsan.a
%endif
%endif

#-----------------------------------------------------------------------
# Atomic operations
#-----------------------------------------------------------------------
%if %{build_atomic}
%package -n %{libatomic}
Summary:	GCC Atomic operations library
Group:		Development/C
# compat with Fedora/RH
Provides:	libatomic = %{EVRD}

%description -n %{libatomic}
GCC Atomic operations Library.

%files -n %{libatomic}
%{target_libdir}/libatomic.so.%{atomic_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibatomic}
Summary:	GCC Atomic optimizer library
Group:		Development/C

%description -n %{multilibatomic}
GCC Atomic optimizer Library.

%files -n %{multilibatomic}
%{multilibdir}/libatomic.so.%{atomic_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libatomic_devel}
Summary:	GCC Atomic optimizer development support
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	%{libatomic} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibatomic} = %{EVRD}
%endif
Provides:	libatomic-devel = %{EVRD}
Provides:	atomic-devel = %{EVRD}

%description -n %{libatomic_devel}
This package contains GCC libraries which are needed
to use Atomic optimizer features.

%files -n %{libatomic_devel}
%{target_libdir}/libatomic.so
%if %{build_multilib}
%{multilibdir}/libatomic.so
%endif

#-----------------------------------------------------------------------

%package -n %{libatomic_static_devel}
Summary:	Static libatomic
Group:		Development/C
Requires:	%{libatomic_devel} = %{EVRD}

%description -n %{libatomic_static_devel}
Static libatomic.

%files -n %{libatomic_static_devel}
%{target_libdir}/libatomic.a
%{gccdir}/libatomic_asneeded.a
%if %{build_multilib}
%{multilibdir}/libatomic.a
%{multigccdir}/libatomic_asneeded.a
%endif
%endif

########################################################################
# VTV (VTable Verification)
########################################################################
%if 0
%if %{build_vtv}
%package -n %{libvtv}
Summary:	VTable Verification library
Group:		Development/C

%description -n %{libvtv}
VTable Verification library.

%files -n %{libvtv}
%{target_libdir}/libvtv.so.%{vtv_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibvtv}
Summary:	VTable Verification library
Group:		Development/C

%description -n %{multilibvtv}
VTable Verification library.

%files -n %{multilibvtv}
%{multilibdir}/libvtv.so.%{vtv_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libvtv_devel}
Summary:	GCC VTable Verification development support
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	%{libvtv} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibvtv} = %{EVRD}
%endif
Provides:	libvtv-devel = %{EVRD}
Provides:	vtv-devel = %{EVRD}

%description -n %{libvtv_devel}
This package contains GCC libraries which are needed
to use VTable Verification features.

%files -n %{libvtv_devel}
%{target_libdir}/libvtv.so
%if %{build_multilib}
%{multilibdir}/libvtv.so
%endif

#-----------------------------------------------------------------------

%package -n %{libvtv_static_devel}
Summary:	Static libvtv
Group:		Development/C
Requires:	%{libvtv_devel} = %{EVRD}

%description -n %{libvtv_static_devel}
Static libvtv

%files -n %{libvtv_static_devel}
%{target_libdir}/libvtv.a
%if %{build_multilib}
%{multilibdir}/libvtv.a
%endif
%endif
%endif

########################################################################
# UBSan (Undefined Behavior Sanitizer)
########################################################################
%if %{build_ubsan}
%package -n %{libubsan}
Summary:	Undefined Behavior Sanitizer library
Group:		Development/C

%description -n %{libubsan}
Undefined Behavior Sanitizer library.

%files -n %{libubsan}
%{target_libdir}/libubsan.so.%{ubsan_major}*

#-----------------------------------------------------------------------

%if %{build_multilib}
%package -n %{multilibubsan}
Summary:	Undefined Behavior Sanitizer library
Group:		Development/C

%description -n %{multilibubsan}
Undefined Behavior Sanitizer library.

%files -n %{multilibubsan}
%{multilibdir}/libubsan.so.%{ubsan_major}*
%endif

#-----------------------------------------------------------------------

%package -n %{libubsan_devel}
Summary:	GCC Undefined Behavior Sanitizer development support
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	%{libubsan} = %{EVRD}
%if %{build_multilib}
Requires:	%{multilibubsan} = %{EVRD}
%endif
Provides:	libubsan-devel = %{EVRD}
Provides:	ubsan-devel = %{EVRD}

%description -n %{libubsan_devel}
This package contains GCC libraries which are needed
to use Undefined Behavior Sanitizer features.

%files -n %{libubsan_devel}
%{target_libdir}/libubsan.so
%{target_libdir}/libsanitizer.spec
%if %{build_multilib}
%{multilibdir}/libubsan.so
%{multilibdir}/libsanitizer.spec
%endif
%optional %{gccdir}/include/sanitizer

#-----------------------------------------------------------------------

%package -n %{libubsan_static_devel}
Summary:	Static libubsan
Group:		Development/C
Provides:	ubsan-static-devel = %{EVRD}
Requires:	%{libubsan_devel} = %{EVRD}

%description -n %{libubsan_static_devel}
Static libubsan.

%files -n %{libubsan_static_devel}
%{target_libdir}/libubsan.a
%if %{build_multilib}
%{multilibdir}/libubsan.a
%endif
%endif

########################################################################
# LSan (Leak Sanitizer)
########################################################################
%if %isarch x86_64 aarch64 %{riscv} loongarch64
%if %{build_lsan}
%package -n %{liblsan}
Summary:	Leak Sanitizer library
Group:		Development/C

%description -n %{liblsan}
Leak Sanitizer library.

%files -n %{liblsan}
%{target_libdir}/liblsan.so.%{lsan_major}*

#-----------------------------------------------------------------------

%package -n %{liblsan_devel}
Summary:	GCC Leak Sanitizer development support
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	%{liblsan} = %{EVRD}
Provides:	liblsan-devel = %{EVRD}
Provides:	lsan-devel = %{EVRD}

%description -n %{liblsan_devel}
This package contains GCC libraries which are needed
to use Leak Sanitizer features.

%files -n %{liblsan_devel}
%{target_libdir}/liblsan.so
%{_libdir}/liblsan_preinit.o

#-----------------------------------------------------------------------

%package -n %{liblsan_static_devel}
Summary:	Static liblsan
Group:		Development/C
Requires:	%{liblsan_devel} = %{EVRD}

%description -n %{liblsan_static_devel}
Static liblsan.

%files -n %{liblsan_static_devel}
%{target_libdir}/liblsan.a
%endif
%endif
########################################################################
%if %isarch x86_64 aarch64
%package -n %{libhwasan}
Summary:	Sanitizer library
Group:		Development/C

%description -n %{libhwasan}
Sanitizer library.

%files -n %{libhwasan}
%{target_libdir}/libhwasan.so.%{hwasan_major}*

#-----------------------------------------------------------------------

%package -n %{libhwasan_devel}
Summary:	GCC Sanitizer development support
Group:		Development/C
Requires:	%{name} = %{EVRD}
Requires:	%{libhwasan} = %{EVRD}
Provides:	libhwasan-devel = %{EVRD}
Provides:	hwasan-devel = %{EVRD}

%description -n %{libhwasan_devel}
This package contains GCC libraries which are needed
to use Sanitizer features.

%files -n %{libhwasan_devel}
%{target_libdir}/libhwasan.so
%optional %{target_libdir}/libhwasan_preinit.o

#-----------------------------------------------------------------------

%package -n %{libhwasan_static_devel}
Summary:	Static libhwasan
Group:		Development/C
Requires:	%{libhwasan_devel} = %{EVRD}

%description -n %{libhwasan_static_devel}
Static libhwasan.

%files -n %{libhwasan_static_devel}
%{target_libdir}/libhwasan.a
%endif

########################################################################

%prep
%setup -q -n %{srcname}
%autopatch -p1
# Allow building with current autoconf
find . -name "*.m4" |xargs sed -i -e 's,2\.69,2.72,g'

aclocal -I config
autoconf

echo %{vendor} > gcc/DEV-PHASE
%if "%{snapshot}" != ""
echo %{version} > gcc/BASE-VER
%endif

# Let's get our flags right...
LANGUAGES=c
%if %{build_ada}
    LANGUAGES="$LANGUAGES,ada"
%endif
%if %{build_cxx}
    LANGUAGES="$LANGUAGES,c++"
%endif
%if %{build_d}
    LANGUAGES="$LANGUAGES,d"
%endif
%if %{build_fortran}
    LANGUAGES="$LANGUAGES,fortran"
%endif
%if %{build_go}
    LANGUAGES="$LANGUAGES,go"
%endif
%if %{build_lto}
    LANGUAGES="$LANGUAGES,lto"
%endif
%if %{build_objc}
    LANGUAGES="$LANGUAGES,objc"
%endif
%if %{build_objcxx}
    LANGUAGES="$LANGUAGES,obj-c++"
%endif
PROGRAM_SUFFIX=""
%if "%{program_suffix}" != ""
PROGRAM_SUFFIX="--program-suffix=%{program_suffix}"
%endif
PROGRAM_PREFIX=""
%if "%{program_prefix}" != ""
PROGRAM_PREFIX="--program-prefix=%{program_prefix}"
%endif
case %{libc} in
glibc|musl)	LIBC_FLAGS="--enable-threads=posix";;
newlib)		LIBC_FLAGS="--with-newlib --with-headers --disable-threads";;
*)		echo "ERROR: unsupported %{libc} C library"; exit 1;;
esac
%if %{libc_shared}
LIBC_FLAGS="$LIBC_FLAGS --enable-shared --enable-static"
%else
LIBC_FLAGS="$LIBC_FLAGS --disable-shared --enable-static"
%endif
# target specific flags
case %{target_cpu} in
x86_64)		TARGET_FLAGS="--with-cpu=generic --with-arch_32=i686 --with-multilib-list=m64,m32";;
i?86|athlon)	TARGET_FLAGS="--with-arch=i686 --with-cpu=generic";;
esac

EXTRA_FLAGS=""
%ifarch ppc64le
# https://sourceware.org/bugzilla/show_bug.cgi?id=26360
# glibc on ppc64le assumes 128-bit long doubles, while gcc (when built
# without glibc headers already present) assumes 64-bit long doubles.
# Let's force glibc's view of the world to make it match.
EXTRA_FLAGS="$EXTRA_FLAGS --with-long-double-128"
%endif
%if "%{libc}" == "glibc"
# glibc target -- when bootstrapping, make sure we set defaults
# for the right version anyway
EXTRA_FLAGS="$EXTRA_FLAGS --with-glibc-version=2.32"
%endif

mkdir -p obj-%{gcc_target_platform}
cd obj-%{gcc_target_platform}

# We can't currently compile gcc with clang, even
# though that would be great for bootstrapping
# --with-build-config=bootstrap-lto would be nice to
# add, but currently errors out on "make install" in
# fixincludes
		CC=gcc \
		CXX=g++ \
		CFLAGS="$OPT_FLAGS" \
		CXXFLAGS="$OPT_FLAGS" \
		TCFLAGS="$OPT_FLAGS" \
		XCFLAGS="$OPT_FLAGS" \
		ORIGINAL_NM_FOR_TARGET="%{_bindir}/nm" \
		NM_FOR_TARGET="%{_bindir}/nm" \
		../configure \
			--prefix=%{_prefix} \
			--libexecdir=%{_libexecdir} \
			--libdir=%{_libdir} \
			--with-slibdir=%{target_slibdir} \
			--mandir=%{_mandir} \
			--infodir=%{_infodir} \
			--disable-isl-version-check \
%if !%{build_cloog}
            --without-cloog \
            --without-ppl \
%else
            --with-cloog \
            --with-ppl \
            --disable-libmpx \
            --enable-cloog-backend=isl \
            --disable-cloog-version-check \
            --disable-isl-version-check \
%endif
%if !%{build_ffi}
			--disable-libffi \
%endif
%if !%{build_gomp}
			--disable-libgomp \
%endif
%if !%{build_quadmath}
			--disable-libquadmath \
%if %{build_fortran}
			--disable-libquadmath-support \
%endif
%endif
%if !%{build_ssp}
			--disable-libssp \
%endif
			--disable-werror \
			--enable-__cxa_atexit \
			--enable-libstdcxx-backtrace \
			--disable-libunwind-exceptions \
			--with-plugin-ld=%{_bindir}/%{gcc_target_platform}-ld \
%if %{system_gcc}
			--enable-bootstrap \
%endif
			--enable-checking=release \
			--enable-gnu-unique-object \
%ifarch riscv64
			--with-arch=rv64gc \
			--with-abi=lp64d \
%endif
			--enable-gnu-indirect-function \
			--with-linker-hash-style=gnu \
			--enable-languages="$LANGUAGES" \
			$PROGRAM_PREFIX \
			--enable-linker-build-id \
%ifarch %{ix86} x86_64
			--enable-cet \
			--with-tune=generic \
%endif
%if !%{build_plugin}
			--disable-plugin \
%else
			--enable-plugin \
			--enable-initfini-array \
			--enable-shared \
			--enable-libcc1 \
%ifarch riscv64
			--enable-lto \
%else
			--with-build-config=bootstrap-lto-lean \
%endif
			--enable-link-serialization=1 \
%endif
%if !%{build_lto}
			--disable-lto \
%endif
%if %{build_atomic}
			--enable-libatomic \
%else
			--disable-libatomic \
%endif
			$LIBC_FLAGS \
			--with-system-zlib \
			--with-bugurl=%{bugurl} \
%if !%{build_multilib}
			--disable-multilib \
%endif
			--host=%{_target_platform} \
			--build=%{_target_platform} \
			$TARGET_FLAGS \
			$EXTRA_FLAGS
cd ..

#-----------------------------------------------------------------------
%build
# FIXME: extra tools needed
export PATH=$PATH:$PWD/bin
export sysroot=%{target_prefix}

# The -gdwarf-4 removal is a workaround for gcc bug #52420
OPT_FLAGS=`echo %{optflags} -fno-strict-aliasing | \
    sed -e 's/-Wall//g' -e 's/-all//g' \
    -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g' \
    -e 's/-m\(31\|32\|64\)//g' \
    -e 's/-mx32//g' \
    -e 's/-fstack-protector-strong//g' \
    -e 's/-fstack-protector//g' \
    -e 's/--param=ssp-buffer-size=4//' \
    -e 's/-gdwarf-4/-g/' \
    -e 's/-pipe//g'`
OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e 's/[[:blank:]]\+/ /g'`

# don't build crt files with -fasynchronous-unwind-tables
case " $OPT_FLAGS " in
*" -fasynchronous-unwind-tables "*)
  sed -e 's/-fno-exceptions /-fno-exceptions -fno-asynchronous-unwind-tables /' -i gcc/Makefile.in
  ;;
esac
echo "Using OPT_FLAGS $OPT_FLAGS"

%ifarch %{ix86} x86_64 loongarch64 aarch64
# it is PGO 3-rounds build
# takes from 3 to 6 hours
    BOOTSTRAP=profiledbootstrap
%endif
# profiled bootstrap over qemu
# takes more than 48+ hours
# but it WORKS
%ifarch %power64 riscv64
    BOOTSTRAP=bootstrap
%endif

# FIXME debugedit
[ ! -z "$TMP" ] && export TMP=`echo $TMP | sed -e 's|/$||'`
[ ! -z "x$TMPDIR" ] && export TMPDIR=`echo $TMPDIR | sed -e 's|/$||'`

cd obj-%{gcc_target_platform}
# Native host compiler gets special treatment...
%make_build BOOT_CFLAGS="$OPT_FLAGS" $BOOTSTRAP

%if %{build_pdf}
%make_build pdf || :
%endif

%if %{build_doc}
pushd gcc
%make_build html || :
%if %{build_pdf}
%make_build pdf || :
%endif
popd
%endif
cd ..

#-----------------------------------------------------------------------

%if %{build_check}
%check
echo ====================TESTING=========================
%{_bindir}/time %make_build -k check || true
echo "XXX check time above XXX"
contrib/test_summary > test_summary.log
echo ====================TESTING END=====================
install -D -m644 test_summary.log %{buildroot}%{_docdir}/gcc/test_summary.log
%endif

#-----------------------------------------------------------------------

%install
# Native compiler
%make_install -C obj-%{gcc_target_platform}

%if %{build_lto}
# Put the LTO plugin where ld can see it...
mkdir -p %{buildroot}%{_libdir}/bfd-plugins
ln -s ../../libexec/gcc/%{gcc_target_platform}/%{ver}/liblto_plugin.so %{buildroot}%{_libdir}/bfd-plugins/liblto_plugin.so
%endif

# configure python dir option does not cover libstdc++
mkdir -p %{buildroot}%{python3_sitelib}
    if [ -d %{buildroot}%{_datadir}/gcc-%{ver}/python ]; then
        mv -f %{buildroot}%{_datadir}/gcc-%{ver}/python/* \
            %{buildroot}%{python3_sitelib}
        rm -fr %{buildroot}%{_datadir}/gcc-%{ver}
    fi

pushd %{buildroot}%{_bindir}
%if %{system_gcc}
    mkdir -p %{buildroot}/%{_prefix}/lib
    ln -sf %{_bindir}/cpp %{buildroot}/%{_prefix}/lib/cpp
    install -m 0755 %{SOURCE4} %{SOURCE5} %{buildroot}%{_bindir}
    ln -sf %{gcc_target_platform}-gcc-%{ver} cc
%else
    rm %{buildroot}%{_bindir}/cpp
%endif
    PROGRAMS="gcc"
    %if %{build_cxx}
        PROGRAMS="$PROGRAMS g++"
    %endif
    %if %{build_go}
        PROGRAMS="$PROGRAMS gccgo"
    %endif
    %if %{build_fortran}
        PROGRAMS="$PROGRAMS gfortran"
    %endif
    for prog in $PROGRAMS; do
        if [ -f %{gcc_target_platform}-$prog ]; then
            rm -f %{gcc_target_platform}-$prog-%{ver}
            mv -f %{gcc_target_platform}-$prog{,-%{ver}}
        fi
        rm -f $prog
        ln -sf %{gcc_target_platform}-$prog-%{ver} $prog-%{ver}
        %if %{system_gcc}
            ln -sf %{gcc_target_platform}-$prog-%{ver} $prog
            ln -sf %{gcc_target_platform}-$prog-%{ver} %{gcc_target_platform}-$prog
        %endif
    done
%if %{build_cxx}
    rm -f c++ %{gcc_target_platform}-c++{,-%{ver}}
    ln -sf %{gcc_target_platform}-g++-%{ver} c++-%{ver}
    %if %{system_gcc}
        ln -sf %{gcc_target_platform}-g++-%{ver} c++
    %endif
    %if %{system_gcc}
        ln -sf %{gcc_target_platform}-g++-%{ver} %{gcc_target_platform}-c++
    %endif

    mkdir -p %{buildroot}%{_datadir}/gdb/auto-load%{_libdir}
    mv -f %{buildroot}%{_libdir}/libstdc++.so.*.py \
        %{buildroot}%{_datadir}/gdb/auto-load%{_libdir}
    sed -i 's|%{_datadir}/gcc-%{ver}/python|%{python3_sitelib}|' \
        %{buildroot}%{_datadir}/gdb/auto-load%{_libdir}/libstdc++.*.py

    %if %{build_multilib}
        mkdir -p %{buildroot}%{_datadir}/gdb/auto-load%{multilibdir}
        mv -f %{buildroot}%{multilibdir}/libstdc++.so.*.py \
        %{buildroot}%{_datadir}/gdb/auto-load%{multilibdir}
        sed -i 's|%{_datadir}/gcc-%{ver}/python|%{python3_sitelib}|' \
            %{buildroot}%{_datadir}/gdb/auto-load%{multilibdir}/libstdc++.*.py
    %endif
%endif
popd

%if %{shared_libgnat}
    %if %{build_ada}
        for lib in libgnarl libgnat; do
            rm -f %{buildroot}%{target_libdir}/$lib.so
            rm -f %{buildroot}%{gccdir}/adalib/$lib.so
            mv -f %{buildroot}%{gccdir}/adalib/$lib-%{majorver}.so \
                    %{buildroot}%{target_libdir}/$lib-%{majorver}.so.%{gnat_major}
            ln -sf $lib-%{majorver}.so.%{gnat_major} %{buildroot}%{target_libdir}/$lib-%{majorver}.so
            ln -sf $lib-%{majorver}.so.%{gnat_major} %{buildroot}%{target_libdir}/$lib.so
            %if %{build_multilib}
                rm -f %{buildroot}%{multilibdir}/$lib.so
                rm -f %{buildroot}%{multigccdir}/adalib/$lib.so
                mv -f %{buildroot}%{multigccdir}/adalib/$lib-%{majorver}.so \
                        %{buildroot}%{multilibdir}/$lib-%{majorver}.so.%{gnat_major}
                ln -sf $lib-%{majorver}.so.%{gnat_major} %{buildroot}%{multilibdir}/$lib-%{majorver}.so
                ln -sf $lib-%{majorver}.so.%{gnat_major} %{buildroot}%{multilibdir}/$lib.so
            %endif
        done
    %endif
%endif

rm -fr %{buildroot}%{gccdir}/include-fixed
rm -fr %{buildroot}%{gccdir}/install-tools/include

%if !%{system_gcc}
    rm -fr %{buildroot}%{_infodir}
    rm -fr %{buildroot}%{_mandir}
    rm -fr %{buildroot}%{_localedir}
    rm -f %{buildroot}%{_bindir}/gcov
    rm -f %{buildroot}%{_libdir}/libgcc_s.so
    %if %{build_multilib}
        rm -f %{buildroot}%{multilibdir}/libgcc_s.so
    %endif
    %if !%{build_libgcc}
         rm -f %{buildroot}%{target_libdir}/libgcc_s.so.*
         %if %{build_multilib}
             rm -f %{buildroot}%{multilibdir}/libgcc_s.so.*
         %endif
     %endif
%endif
rm -f %{buildroot}%{_libdir}/libiberty.a
rm -f %{buildroot}%{multilibdir}/libiberty.a

# Since GCC 16 the driver adds -latomic_asneeded and -lgcc_s_asneeded to
# every link (see LINK_LIBATOMIC_SPEC and libgcc_s_asneeded in gcc.cc).
# Upstream "make install" drops the AS_NEEDED linker scripts and the
# libatomic_asneeded.a symlinks into the system libdirs.  Like Fedora,
# remove them there and regenerate in the private compiler dir (%{gccdir},
# %{multigccdir} for -m32) instead, so that plain gcc can link even when
# libatomic-devel is not installed and the global library path stays clean.
%if %{build_atomic}
rm -f %{buildroot}%{target_libdir}/libatomic_asneeded.so \
	%{buildroot}%{target_libdir}/libatomic_asneeded.a
%if %{build_multilib}
rm -f %{buildroot}%{multilibdir}/libatomic_asneeded.so \
	%{buildroot}%{multilibdir}/libatomic_asneeded.a
%endif
%endif
%if %{build_libgcc}
rm -f %{buildroot}%{target_libdir}/libgcc_s_asneeded.so
%if %{build_multilib}
rm -f %{buildroot}%{multilibdir}/libgcc_s_asneeded.so
%endif
%endif

%if %{build_libgcc}
echo '/* GNU ld script
   Add DT_NEEDED entry for libgcc_s.so only if needed.  */
OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`')
INPUT ( AS_NEEDED ( -lgcc_s ) )' > %{buildroot}%{gccdir}/libgcc_s_asneeded.so
%endif
%if %{build_atomic}
echo '/* GNU ld script
   Add DT_NEEDED entry for -latomic only if needed.  */
OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`')
INPUT ( AS_NEEDED ( -latomic ) )' > %{buildroot}%{gccdir}/libatomic_asneeded.so
# Make -latomic resolvable without libatomic-devel
ln -sf ../../../libatomic.so.1 %{buildroot}%{gccdir}/libatomic.so
# Only used for -static links; the real libatomic.a stays in
# the static-devel package
ln -sf ../../../libatomic.a %{buildroot}%{gccdir}/libatomic_asneeded.a
%endif
%if %{build_multilib}
%if %{build_libgcc}
echo '/* GNU ld script
   Add DT_NEEDED entry for libgcc_s.so only if needed.  */
OUTPUT_FORMAT('`gcc -m32 -Wl,--print-output-format -nostdlib -r -o /dev/null`')
INPUT ( AS_NEEDED ( -lgcc_s ) )' > %{buildroot}%{multigccdir}/libgcc_s_asneeded.so
%endif
%if %{build_atomic}
echo '/* GNU ld script
   Add DT_NEEDED entry for -latomic only if needed.  */
OUTPUT_FORMAT('`gcc -m32 -Wl,--print-output-format -nostdlib -r -o /dev/null`')
INPUT ( AS_NEEDED ( -latomic ) )' > %{buildroot}%{multigccdir}/libatomic_asneeded.so
ln -sf ../../../../../lib/libatomic.so.1 %{buildroot}%{multigccdir}/libatomic.so
ln -sf ../../../../../lib/libatomic.a %{buildroot}%{multigccdir}/libatomic_asneeded.a
%endif
%endif

%if !%{build_ubsan}
    rm -f %{buildroot}%{target_libdir}/libubsan*
    %if %{build_multilib}
        rm -f %{buildroot}%{multilibdir}/libubsan*
    %endif
    rm -f %{buildroot}%{target_libdir}/libsanitizer.spec
%endif

%if !%{build_asan}
    rm -f %{buildroot}%{target_libdir}/libasan*
    %if %{build_multilib}
        rm -f %{buildroot}%{multilibdir}/libasan*
    %endif
%endif

%if !%{build_itm}
    rm -f %{buildroot}%{target_libdir}/libitm* %{buildroot}%{_infodir}/libitm.info*
    %if %{build_multilib}
        rm -f %{buildroot}%{multilibdir}/libitm*
    %endif
%else
    %if !%{system_gcc}
        rm -f %{buildroot}%{_infodir}/libitm.info*
    %endif
%endif

%if !%{package_ffi}
    rm -f %{buildroot}%{target_libdir}/libffi.*
    rm -f %{buildroot}%{multilibdir}/libffi.*
    rm -f %{buildroot}%{_mandir}/man3/ffi*
%endif

pushd obj-%{gcc_target_platform}

%if %{build_doc}
    %if %{build_cxx}
    mkdir -p %{buildroot}%{_docdir}/libstdc++
    cp -far libstdc++-v3/doc/html %{buildroot}%{_docdir}/libstdc++
    %endif
    pushd host-%{gcc_target_platform}/gcc/HTML/gcc-%{ver}
        mkdir -p %{buildroot}%{_docdir}/gcc/html
        for doc in gcc gccinstall gccint; do
            cp -far $doc %{buildroot}%{_docdir}/gcc/html
        done
        %if %{system_gcc}
            mkdir -p %{buildroot}%{_docdir}/gcc-cpp/html
            for doc in cpp cppinternals; do
                cp -far $doc %{buildroot}%{_docdir}/gcc-cpp/html
            done
        %endif
        %if %{build_fortran}
            mkdir -p %{buildroot}%{_docdir}/gcc-gfortran/html
            cp -far gfortran %{buildroot}%{_docdir}/gcc-gfortran/html
        %endif
        %if %{build_go}
            mkdir -p %{buildroot}%{_docdir}/gcc-go/html
            cp -far go %{buildroot}%{_docdir}/gcc-go/html
        %endif
    popd
    %if %{build_pdf}
    pushd host-%{gcc_target_platform}/gcc/doc
        for doc in gcc.pdf gccinstall.pdf gccint.pdf; do
            install -m 0644 $doc %{buildroot}%{_docdir}/gcc/$doc
        done
        %if %{system_gcc}
            for doc in cpp.pdf cppinternals.pdf; do
                install -m 0644 $doc %{buildroot}%{_docdir}/gcc-cpp/$doc
            done
        %endif
        %if %{build_ada}
            mkdir -p %{buildroot}%{_docdir}/gcc-gnat
            for doc in gnat_ugn.pdf gnat_rm.pdf gnat-style.pdf; do
                install -m 0644 $doc %{buildroot}%{_docdir}/gcc-gnat/$doc
            done
        %endif
        %if %{build_fortran}
            for doc in gfc-internals.pdf gfortran.pdf; do
                install -m 0644 $doc %{buildroot}%{_docdir}/gcc-gfortran/$doc
            done
        %endif
        %if %{build_go}
            install -m 0644 -D gccgo.pdf %{buildroot}%{_docdir}/gcc-go/gccgo.pdf
        %endif
    popd
    pushd %{gcc_target_platform}
        %if %{build_gomp}
            install -m 0644 -D libgomp/libgomp.pdf %{buildroot}%{_docdir}/libgomp/libgomp.pdf
        %endif
        %if %{build_quadmath}
            install -m 0644 -D libquadmath/libquadmath.pdf %{buildroot}%{_docdir}/libquadmath/libquadmath.pdf
        %endif
    popd
    %endif
%endif

cd ..

%if ! %{default_compiler}
# Leave the cc, c89, c++, ... symlinks to clang
# or whatever other compiler is the default
rm -f \
	%{buildroot}%{_bindir}/cc \
	%{buildroot}%{_bindir}/c89 \
	%{buildroot}%{_bindir}/c99 \
	%{buildroot}%{_bindir}/c++
%endif

%if %{system_gcc}
install -m644 %{SOURCE10} -D %{buildroot}%{_sysconfdir}/sysconfig/gcc
install -m644 %{SOURCE11} -D %{buildroot}%{_sysconfdir}/profile.d/90gcc.sh
install -m644 %{SOURCE12} -D %{buildroot}%{_sysconfdir}/profile.d/90gcc.csh
%endif
%if %{build_go}
mkdir -p %{buildroot}/%{_libdir}/%{name}/bin/
ln -s %{_bindir}/%{name} %{buildroot}/%{_libdir}/%{name}/bin/%{name}
%endif

%if %{system_gcc}
%find_lang cpplib
%find_lang gcc
%if %{build_cxx}
%find_lang libstdc++
%endif
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 54 |14mr|gdb-18.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# rpmbuild parameters:
# --with testsuite: Run the testsuite (biarch if possible).  Default is without.
# --with asan: gcc -fsanitize=address
# --with debug: Build without optimizations and without splitting the debuginfo.
# --without python: No python support.
# --with profile: gcc -fprofile-generate / -fprofile-use: Before better
#                 workload gets run it decreases the general performance now.
# --without rpm: Don't build rpm support (for aarch64 bootstrap)
%bcond_without rpm
%bcond_with testsuite
%global debug_package %nil

%define distro_version	%(. /etc/os-release 2>/dev/null; echo "${PRETTY_NAME:-${NAME} ${VERSION_ID}}")
%define Werror_cflags %nil
# Libtool die die die!
%define __libtoolize /bin/true
# use python3
%define __python %{__python3}

Summary:	A GNU source-level debugger for C, C++, Fortran, Go and other languages
Name:		gdb
Version:	18.1
Release:	1
License:	GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
Group:		Development/Other
Url:		http://gnu.org/software/gdb/
Source0:    https://ftp.gnu.org/gnu/gdb/gdb-%{version}.tar.xz
Source1:	gdb.rpmlintrc

# For our convenience
%define gdb_build build-%{_target_platform}
%define gdb_docdir %{_docdir}/%{name}-doc

# Cleanup any leftover testsuite processes as it may stuck mock(1) builds.
#=push
Source2: gdb-orphanripper.c

# /etc/gdbinit (from Debian but with Fedora compliant location).
#=fedora
Source4: gdbinit

# simple bash script from Fedora (https://src.fedoraproject.org/rpms/gdb)
Source5:	gstack.sh
Source6:	gstack.man

BuildRequires:	gcc
BuildRequires:	gcc-c++
BuildRequires:	make
BuildRequires:	bison
BuildRequires:	flex
BuildRequires:	texinfo
BuildRequires:	readline-devel
BuildRequires:	pkgconfig(expat)
BuildRequires:	pkgconfig(gmp)
BuildRequires:	pkgconfig(liblzma)
BuildRequires:	pkgconfig(ncurses)
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(rpm)
BuildRequires:	pkgconfig(zlib)
BuildRequires:	pkgconfig(mpfr)
%if %{with testsuite}
BuildRequires:	dejagnu
%endif

# For users who are using gdb rather than buildsystem
Recommends:	dnf-command(debuginfo-install)
ExcludeArch:	%{e2k}

%description
GDB, the GNU debugger, allows you to debug programs written in C, C++,
Java, and other languages, by executing them in a controlled fashion
and printing their data.

%files
%doc README NEWS
%license COPYING3 COPYING COPYING.LIB
%{_bindir}/gcore
%{_bindir}/gdb
%{_bindir}/gstack
%{_bindir}/pstack
%{_bindir}/run-*
%{_bindir}/sis
%config(noreplace) %{_sysconfdir}/gdbinit
%{_sysconfdir}/gdbinit.d
%{_mandir}/*/gdbinit.5*
%{_mandir}/*/gdb.1*
%{_mandir}/*/gstack.1*
%{_mandir}/*/pstack.1*
%{_mandir}/*/gcore.1*
%{_mandir}/*/gdb-add-index.1*
%optional %{_bindir}/run
%optional %{_libdir}/lib*-*-linux-gnu*-sim.a
%optional %{_mandir}/man1/run.1*
%{_bindir}/gdb-add-index
%{_datadir}/gdb
# don't include the files in include, they are part of binutils
%{_bindir}/gdbserver
%{_mandir}/*/gdbserver.1*
%ifnarch %{riscv} loongarch64
%{_libdir}/libinproctrace.so
%endif
%{_infodir}/annotate.info*
%{_infodir}/gdb.info*
%{_datadir}/doc/erc32/README.erc32
%{_datadir}/doc/erc32/README.gdb
%{_datadir}/doc/erc32/README.sis
%{_datadir}/doc/frv/README
%{_datadir}/doc/or1k/README
%{_datadir}/doc/ppc/BUGS
%{_datadir}/doc/ppc/INSTALL
%{_datadir}/doc/ppc/README
%{_datadir}/doc/ppc/RUN
%{_datadir}/doc/rx/README.txt

#----------------------------------------------------------------------------

%prep
# This allows the tarball name to be different from our
# version-release name.

%setup -q

# Files have `# <number> <file>' statements breaking VPATH / find-debuginfo.sh .
(cd gdb;rm -fv $(perl -pe 's/\\\n/ /' <Makefile.in|sed -n 's/^YYFILES = //p'))

# *.info* is needlessly split in the distro tar; also it would not get used as
# we build in %{gdb_build}, just to be sure.
find -name "*.info*"|xargs rm -f

find -name "*.orig" | xargs rm -f
! find -name "*.rej" # Should not happen.

cat > gdb/version.in << EOF
%{version}-%{release} (%{distro_version})
EOF


# Remove the info and other generated files added by the FSF release
# process.
rm -f libdecnumber/gstdint.h
rm -f bfd/doc/*.info
rm -f bfd/doc/*.info-*
rm -f gdb/doc/*.info
rm -f gdb/doc/*.info-*

# RL_STATE_FEDORA_GDB would not be found for:
# Patch642: gdb-readline62-ask-more-rh.patch
# --with-system-readline
mv -f readline/readline/doc readline-doc
rm -rf readline/readline/*
mv -f readline-doc readline/readline/doc
rm -rf zlib texinfo

%build
CONFIGURE_TOP=$PWD
# Identify the build directory with the version of gdb as well as the
# architecture, to allow for mutliple versions to be installed and
# built.
# Initially we're in the gdb-%{version} directory.

for fprofile in %{?_with_profile:-fprofile} ""
do

mkdir %{gdb_build}$fprofile
cd %{gdb_build}$fprofile

export CFLAGS="$RPM_OPT_FLAGS -DDNF_DEBUGINFO_INSTALL"
CC=gcc CXX=g++ %configure	\
	--htmldir=%{gdb_docdir}					\
	--pdfdir=%{gdb_docdir}					\
	--with-system-gdbinit=%{_sysconfdir}/gdbinit		\
	--with-gdb-datadir=%{_datadir}/gdb			\
	--enable-gdb-build-warnings=,-Wno-unused		\
	--with-separate-debug-dir=/usr/lib/debug		\
	--disable-werror					\
	--disable-rpath						\
	--with-system-readline					\
	--with-lzma						\
	--with-system-zlib					\
	--with-expat						\
$(: ppc64 host build crashes on ppc variant of libexpat.so )	\
	--without-libexpat-prefix				\
	--disable-tui						\
%if 0%{!?_without_python:1}
	--with-python=%{__python}				\
%else
	--without-python					\
%endif
%if %{with rpm}
	--with-rpm						\
%else
	--without-rpm						\
%endif
	--without-libunwind					\
	--enable-64-bit-bfd					\
	--enable-targets=all \
	%{_target_platform}

if [ -z "%{!?_with_profile:no}" ]
then
  # Run all the configure tests being incompatible with $FPROFILE_CFLAGS.
  %make_build configure-host configure-target
  %make_build clean

  # Workaround -fprofile-use:
  # linux-x86-low.c:2225: Error: symbol `start_i386_goto' is already defined
  %make_build -C gdb/gdbserver linux-x86-low.o
fi

# Global CFLAGS would fail on:
# conftest.c:1:1: error: coverage mismatch for function 'main' while reading counter 'arcs'
if [ "$fprofile" = "-fprofile" ]
then
  FPROFILE_CFLAGS='-fprofile-generate'
elif [ -z "%{!?_with_profile:no}" ]
then
  FPROFILE_CFLAGS='-fprofile-use'
  # We cannot use -fprofile-dir as the bare filenames clash.
  (cd ../%{gdb_build}-fprofile;
   # It was 333 on x86_64.
   test $(find -name "*.gcda"|wc -l) -gt 300
   find -name "*.gcda" | while read -r i
   do
     ln $i ../%{gdb_build}/$i
   done
  )
else
  FPROFILE_CFLAGS=""
fi

%make_build CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$FPROFILE_CFLAGS"

if [ "$fprofile" = "-fprofile" ]
then
  cd gdb
  cp -p gdb gdb-withindex
  PATH="$PWD:$PATH" sh ../../gdb/gdb-add-index $PWD/gdb-withindex
  ./gdb -nx -ex q ./gdb-withindex
  ./gdb -nx -readnow -ex q ./gdb-withindex
  cd ..
fi

cd ..

done	# fprofile

cd %{gdb_build}

%make_build info
#make_build -C gdb/doc {gdb,annotate}{.info,/index.html,.pdf} MAKEHTMLFLAGS=--no-split MAKEINFOFLAGS=--no-split

# Copy the <sourcetree>/gdb/NEWS file to the directory above it.
cp $RPM_BUILD_DIR/gdb-%{version}/gdb/NEWS $RPM_BUILD_DIR/gdb-%{version}

%check
# Initially we're in the gdb-%{version} directory.
cd %{gdb_build}

%if %{without testsuite}
echo ====================TESTSUITE DISABLED=========================
%else
echo ====================TESTING=========================
cd gdb
gcc -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2
# Need to use a single --ignore option, second use overrides first.
# No `%{?_smp_mflags}' here as it may race.
# WARNING: can't generate a core file - core tests suppressed - check ulimit
# "readline-overflow.exp" - Testcase is broken, functionality is OK.
(
  # ULIMIT required for `gdb.base/auxv.exp'.
  ulimit -H -c
  ulimit -c unlimited || :

  # Setup $CHECK as `check//unix/' or `check//unix/-m64' for explicit bitsize.
  # Never use two different bitsizes as it fails on ppc64.
  echo 'int main (void) { return 0; }' >biarch.c
  CHECK=""
  for BI in -m64 -m32 -m31 ""
  do
    # Do not use size-less options if any of the sizes works.
    # On ia64 there is no -m64 flag while we must not leave a bare `check' here
    # as it would switch over some testing scripts to the backward compatibility
    # mode: when `make check' was executed from inside the testsuite/ directory.
    if [ -z "$BI" -a -n "$CHECK" ];then
      continue
    fi
    # Do not use $RPM_OPT_FLAGS as the other non-size options will not be used
    # in the real run of the testsuite.
    if ! gcc $BI -o biarch biarch.c
    then
      continue
    fi
    CHECK="$CHECK check//unix/$BI"
  done
  # Do not try -m64 inferiors for -m32 GDB as it cannot handle inferiors larger
  # than itself.
  # s390 -m31 still uses the standard ELF32 binary format.
  gcc $RPM_OPT_FLAGS -o biarch biarch.c
  RPM_SIZE="$(file ./biarch|sed -n 's/^.*: ELF \(32\|64\)-bit .*$/\1/p')"
  if [ "$RPM_SIZE" != "64" ]
  then
    CHECK="$(echo " $CHECK "|sed 's# check//unix/-m64 # #')"
  fi

  # Disable some problematic testcases.
  # RUNTESTFLAGS='--ignore ...' is not used below as it gets separated by the
  # `check//...' target spawn and too much escaping there would be dense.
  for test in				\
    gdb.base/readline-overflow.exp	\
    gdb.base/bigcore.exp		\
  ; do
    mv -f ../../gdb/testsuite/$test ../gdb/testsuite/$test-DISABLED || :
  done

  # Run all the scheduled testsuite runs also in the PIE mode.
  # Upstream GDB would lock up the testsuite run for too long on its failures.
  CHECK="$(echo $CHECK|sed 's#check//unix/[^ ]*#& &/-fPIE/-pie#g')"

  ./orphanripper %make_build -k $CHECK \
$(: Serialize the output to keep the order for regression checks. ) \
%if 0%{?el5:1}
    RUNTESTFLAGS="--tool gdb" \
%endif
    || :
)
for t in sum log
do
  for file in testsuite*/gdb.$t
  do
    suffix="${file#testsuite.unix.}"
    suffix="${suffix%/gdb.$t}"
    ln $file gdb-%{_target_platform}$suffix.$t || :
  done
done
# `tar | bzip2 | uuencode' may have some piping problems in Brew.
tar cjf gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}*.{sum,log}
uuencode gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}.tar.bz2
cd ../..
echo ====================TESTING END=====================
%endif

%install
# Initially we're in the gdb-%{version} directory.
cd %{gdb_build}

%make_install

mkdir -p %{buildroot}%{_sysconfdir}/gdbinit.d
sed 's#%%{_sysconfdir}#%{_sysconfdir}#g' <%{SOURCE4} >%{buildroot}%{_sysconfdir}/gdbinit

# Remove the files that are part of a gdb build but that are owned and
# provided by other packages.
# These are part of binutils

rm -rf %{buildroot}%{_datadir}/locale/
rm -f %{buildroot}%{_infodir}/bfd*
rm -f %{buildroot}%{_infodir}/standard*
rm -f %{buildroot}%{_infodir}/mmalloc*
rm -f %{buildroot}%{_infodir}/configure*
rm -f %{buildroot}%{_infodir}/gdbint*
rm -f %{buildroot}%{_infodir}/stabs*
rm -f %{buildroot}%{_infodir}/ctf-spec.info*
rm -f %{buildroot}%{_infodir}/sframe-spec.info*
rm -rf %{buildroot}%{_includedir}
rm -rf %{buildroot}/%{_libdir}/lib{bfd*,opcodes*,iberty*,mmalloc*}

# Delete this too because the dir file will be updated at rpm install time.
# We don't want a gdb specific one overwriting the system wide one.

rm -f %{buildroot}%{_infodir}/dir

#remove static
rm -rf %{buildroot}%{_libdir}/*.a

install -m755 %{SOURCE5} %{buildroot}%{_bindir}/gstack
ln -s gstack %{buildroot}%{_bindir}/pstack
install -m644 %{SOURCE6} %{buildroot}%{_mandir}/man1/gstack.1
ln -s gstack.1 %{buildroot}%{_mandir}/man1/pstack.1

# Packaged GDB is not a cross-target one.
(cd %{buildroot}%{_datadir}/gdb/syscalls
 rm -f mips*.xml
 rm -f sparc*.xml
%ifnarch x86_64
 rm -f amd64-linux.xml
%endif
%ifnarch %{ix86} x86_64
 rm -f i386-linux.xml
%endif
%ifnarch ppc ppc64
 rm -f ppc{,64}-linux.xml
%endif
)


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 55 |14mr|git-2.56.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define devname %mklibname git -d
%define profile_branch 93git-branch.sh
%define profile_env 93git-env.sh
# it's a hack remove it after perl upgrade
%define perl_vendorlib /usr/share/perl5/vendor_perl

Summary:	Global Information Tracker
Name:		git
Version:	2.56.0
Release:	1
Epoch:		1
License:	GPLv2+
Group:		Development/Tools
Url:		http://git-scm.com/
Source0:	https://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.xz
Source2:	gitweb.conf
Source3:	%{profile_branch}
# Do we really need it? It's not used anyway
Source4:	%{profile_env}
BuildRequires:	asciidoc
BuildRequires:	cargo
BuildRequires:	docbook-dtd45-xml
BuildRequires:	xmlto
BuildRequires:	perl-CGI
BuildRequires:	perl-devel
BuildRequires:	pkgconfig(expat)
BuildRequires:	pkgconfig(libcurl)
BuildRequires:	pkgconfig(openssl)
BuildRequires:	pkgconfig(zlib)
Requires:	git-core = %{EVRD}
Requires:	git-email = %{EVRD}
Recommends:	git-svn = %{EVRD}
Recommends:	gitk = %{EVRD}
Recommends:	git-scalar = %{EVRD}
Recommends:	git-arch = %{EVRD}
Recommends:	git-core-oldies = %{EVRD}
Recommends:	git-cvs = %{EVRD}

%description
This is a stupid (but extremely fast) directory content manager.  It
doesn't do a whole lot, but what it _does_ do is track directory
contents efficiently. It is intended to be the base of an efficient,
distributed source code management system. This package includes
rudimentary tools that can be used as a SCM, but you should look
elsewhere for tools for ordinary humans layered on top of this.

This is a dummy package which brings in all subpackages.

%files
# no file in the main package

#----------------------------------------------------------------------------

%package -n git-core
Summary:	Global Information Tracker
Group:		Development/Other
Requires:	diffutils
Recommends:	git-prompt
Requires:	less
Requires:	openssh-clients
Requires:	rsync
%rename	gitcompletion

%description -n git-core
This is a stupid (but extremely fast) directory content manager.  It
doesn't do a whole lot, but what it _does_ do is track directory
contents efficiently. It is intended to be the base of an efficient,
distributed source code management system. This package includes
rudimentary tools that can be used as a SCM, but you should look
elsewhere for tools for ordinary humans layered on top of this.

This are the core tools with minimal dependencies.

You may want to install subversion, cpsps and/or tla to import
repositories from other VCS.

%files -n git-core -f %{name}.lang
%doc Documentation/*.html Documentation/howto Documentation/technical Documentation/RelNotes.txt.gz
%{_datadir}/bash-completion/completions/*
%{_bindir}/git
%{_bindir}/git-*
%{_libdir}/git-core
%exclude %{_libdir}/git-core/*svn*
%exclude %{_libdir}/git-core/*cvs*
%exclude %{_libdir}/git-core/git-archimport
%exclude %{_libdir}/git-core/*email*
%{_datadir}/git-core
%{_datadir}/git-gui
%{_mandir}/man7/git*.7.*
%{_mandir}/man1/git*.1.*
%{_mandir}/man5/git*.5.*
%exclude %{_mandir}/man1/*svn*.1*
%exclude %{_mandir}/man1/*cvs*.1*
%exclude %{_mandir}/man7/*cvs*.7*
%exclude %{_mandir}/man1/*email*.1*
%exclude %{_mandir}/man1/git-archimport.1*

#----------------------------------------------------------------------------

%package scalar
Summary:	Tools for git scalability
Group:		Development/Tools
Requires:	git-core = %{EVRD}

%description scalar
Scalar is a tool that helps Git scale to some of the largest Git repositories.
It achieves this by enabling some advanced Git features, such as:

* Partial clone: reduces time to get a working repository by not downloading
  all Git objects right away.

* Background prefetch: downloads Git object data from all remotes every
  hour, reducing the amount of time for foreground git fetch calls.

* Sparse-checkout: limits the size of your working directory.

* File system monitor: tracks the recently modified files and eliminates
  the need for Git to scan the entire worktree.

* Commit-graph: accelerates commit walks and reachability calculations,
  speeding up commands like git log.

* Multi-pack-index: enables fast object lookups across many pack-files.

* Incremental repack: Repacks the packed Git data into fewer pack-file
  without disrupting concurrent commands by using the multi-pack-index.

%files scalar
%{_bindir}/scalar
%{_mandir}/man1/scalar.1*

#----------------------------------------------------------------------------

%package -n gitk
Summary:	Git revision tree visualiser
Group:		Development/Other
Requires:	git-core = %{EVRD}
Requires:	tcl >= 8.4
Requires:	tk >= 8.4

%description -n gitk
Git revision tree visualiser.

%files -n gitk
%{_bindir}/gitk
%{_mandir}/*/gitk*
%{_datadir}/gitk

#----------------------------------------------------------------------------

%package -n %{devname}
Summary:	Git development files
Group:		Development/Other
Provides:	git-devel = %{EVRD}

%description -n %{devname}
Development files for git.

%files -n %{devname}
%{_includedir}/git
%{_libdir}/libgit.a

#----------------------------------------------------------------------------

%package -n git-svn
Summary:	Git tools for importing Subversion repositories
Group:		Development/Other
Requires:	git-core = %{EVRD}
Requires:	perl-Git
Requires:	perl-SVN
Requires:	perl-Git-SVN
Requires:	subversion

%description -n git-svn
Git tools for importing Subversion repositories.

%files -n git-svn
%{_libdir}/git-core/*svn*
%{_mandir}/man1/*svn*.1*

#----------------------------------------------------------------------------

%package -n git-cvs
Summary:	Git tools for importing CVS repositories
Group:		Development/Other
Requires:	git-core = %{EVRD}
Recommends:	cvs
Recommends:	cvsps

%description -n git-cvs
Git tools for importing CVS repositories.

%files -n git-cvs
%{_libdir}/git-core/*cvs*
%{_mandir}/man1/*cvs*.1*
%{_mandir}/man7/*cvs*.7*

#----------------------------------------------------------------------------

%package -n git-arch
Summary:	Git tools for importing Arch repositories
Group:		Development/Other
Requires:	git-core = %{EVRD}
Recommends:	tla

%description -n git-arch
Git tools for importing Arch repositories.

%files -n git-arch
%{_libdir}/git-core/git-archimport
%{_mandir}/man1/git-archimport.1*

#----------------------------------------------------------------------------

%package -n git-email
Summary:	Git tools for sending email
Group:		Development/Other
Requires:	git-core = %{EVRD}
Recommends:	perl-Authen-SASL
Recommends:	perl-MIME-Base64

%description -n git-email
Git tools for sending email.

%files -n git-email
%{_libdir}/git-core/*email*
%{_mandir}/man1/*email*.1*
%{_mandir}/man5/gitmailmap.5.*

#----------------------------------------------------------------------------

%package -n perl-Git
Summary:	Perl interface to Git
Group:		Development/Perl
Requires:	git-core = %{EVRD}

%description -n perl-Git
Perl interface to Git

%files -n perl-Git
%{perl_vendorlib}/Git.pm
%dir %{perl_vendorlib}/Git
%{perl_vendorlib}/Git/I18N.pm
%{perl_vendorlib}/Git/IndexInfo.pm
%{perl_vendorlib}/Git/Packet.pm
%{perl_vendorlib}/FromCPAN
%{perl_vendorlib}/Git/LoadCPAN.pm
%{perl_vendorlib}/Git/LoadCPAN
%{_mandir}/man3/Git.3pm*

#----------------------------------------------------------------------------

%package -n perl-Git-SVN
Summary:	Perl interface to Git SVN
Group:		Development/Perl
Requires:	perl-Git = %{EVRD}

%description -n perl-Git-SVN
Perl interface to Git SVN.

%files -n perl-Git-SVN
%{perl_vendorlib}/Git/SVN
%{perl_vendorlib}/Git/SVN.pm

#----------------------------------------------------------------------------

%package -n git-core-oldies
Summary:	Git obsolete commands, bound to extinction
Group:		Development/Other
Requires:	git-core = %{EVRD}

%description -n git-core-oldies
Git obsolete commands, bound to extinction

%files -n git-core-oldies

#----------------------------------------------------------------------------

%package -n gitweb
Summary:	cgi-bin script for browse a git repository with web browser
Group:		System/Servers
Requires:	git-core = %{EVRD}
Requires:	apache-mod_perl

%description -n gitweb
cgi-bin script for browse a git repository with web browser.

%files -n gitweb
%doc gitweb/README
%config(noreplace) %{_sysconfdir}/gitweb.conf
%config(noreplace) %{_webappconfdir}/gitweb.conf
%{_datadir}/gitweb
%{_mandir}/man1/gitweb.1*
%{_mandir}/man5/gitweb.conf.5*

#----------------------------------------------------------------------------

%package -n git-prompt
Summary:	Shows the current git branch in your bash prompt
Group:		Shells
Requires:	git-core = %{EVRD}
Requires:	bash-completion

%description -n git-prompt
Shows the current git branch in your bash prompt.

%files -n git-prompt
%{_sysconfdir}/profile.d/%{profile_branch}

#----------------------------------------------------------------------------

%prep
%autosetup -p1

# remove borring file
rm -f Documentation/.gitignore
# prefix gitweb css/png files with /gitweb
sed -i -e 's!^\(GITWEB_CSS\|GITWEB_LOGO\|GITWEB_FAVICON\) = !\1 = /gitweb/!' Makefile

%build
%global optflags %{optflags} -fno-strict-aliasing
# same flags and prefix must be passed for make test too
# Rust parts are enabled by default since git 2.56, but there is no cargo in the build env
%define git_make_params prefix=%{_prefix} CC=%{__cc} gitexecdir=%{_libdir}/git-core CFLAGS="%{optflags}" GITWEB_CONFIG=%{_sysconfdir}/gitweb.conf DOCBOOK_XSL_172=0 INSTALLDIRS=vendor perllibdir=%{perl_vendorlib}
%make_build %{git_make_params} all doc gitweb

# Produce RelNotes.txt.gz
# sed trick changes "-x.y.z.txt" to "-x.y.z.0.txt" for ordering, then undoes it
# use awk to print a newline before each RelNotes header
cd Documentation/RelNotes \
&& relnotesls="`find . -name '*.txt' | sed 's/\([0-9]\.[0-9]\.[0-9]\)\.txt/\1.0.txt/' | sort -nr | sed 's/\([0-9]\.[0-9]\.[0-9]\)\.0\.txt/\1.txt/'`" \
&& awk 'FNR == 1 { print "" } { print }' $relnotesls | gzip -9c >../RelNotes.txt.gz

%install
mkdir -p %{buildroot}%{_bindir}
%make_install %{?with_docs:install-doc} CC=%{__cc} AR=%{__ar} prefix=%{_prefix} gitexecdir=%{_libdir}/git-core CFLAGS="%{optflags}" INSTALLDIRS=vendor perllibdir=%{perl_vendorlib}
make install-doc prefix=%{_prefix} gitexecdir=%{_libdir}/git-core   DESTDIR=%{buildroot}

mkdir -p %{buildroot}%{_includedir}/git
cp *.h %{buildroot}%{_includedir}/git

mkdir -p %{buildroot}%{_libdir}
install -m 644 libgit.a %{buildroot}%{_libdir}/libgit.a
mkdir -p %{buildroot}/%{perl_vendorlib}
rm -f %{buildroot}%{_mandir}/man3/private-Error.3pm*

mkdir -p %{buildroot}%{_datadir}/gitweb/static
install -m 755 gitweb/gitweb.cgi %{buildroot}%{_datadir}/gitweb
install -m 644 gitweb/static/*.css gitweb/static/*.png %{buildroot}%{_datadir}/gitweb/static/

mkdir -p %{buildroot}%{_sysconfdir}
install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/gitweb.conf
# apache configuration
mkdir -p %{buildroot}%{_webappconfdir}
cat > %{buildroot}%{_webappconfdir}/gitweb.conf <<EOF
# gitweb configuration
Alias /gitweb %{_datadir}/gitweb

<Directory %{_datadir}/gitweb>
	Require all granted
	Options ExecCgi
	DirectoryIndex gitweb.cgi
	AddHandler cgi-script .cgi
</Directory>
EOF

# fix .sp in man files
find %{buildroot}/%{_mandir} -type f | xargs -r sed -i -e 's/\.sp$/\n.sp/g'

# install bash-completion file
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/
install -m644 contrib/completion/git-completion.bash \
	%{buildroot}%{_datadir}/bash-completion/completions/git
install -m644 contrib/completion/git-prompt.sh \
	%{buildroot}%{_datadir}/bash-completion/completions/git-prompt

# And the prompt manipulation file
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d/%{profile_branch}

%find_lang %{name}

%check
# t9502 t9501 t9500 gitweb test need internet connection
# t1517.6 'imap-send outside repository'
GIT_SKIP_TESTS="t9001 t9902 t9500 t9501 t9502 t1517.6"
%ifarch aarch64 %{arm} %{power64}
# Skip tests which fail on aarch64, arm, and ppc
#
# The following 2 tests use run_with_limited_cmdline, which calls ulimit -s 128
# to limit the maximum stack size.
# t5541.35 'push 2000 tags over http'
# t5551.25 'clone the 2,000 tag repo to check OS command line overflow'
GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5541.35 t5551.25"
%endif

export GIT_SKIP_TESTS
# Set LANG so various UTF-8 tests are run
export LANG=en_US.UTF-8

# Run the tests
%__make test %{git_make_params}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 56 |14mr|gobject-introspection-1.86.0-5
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define typelibnames DBus-1.0 DBusGLib-1.0 GIRepository-2.0 GL-1.0 cairo-1.0 fontconfig-2.0 freetype2-2.0 libxml2-2.0 xfixes-4.0 xft-2.0 xlib-2.0 xrandr-1.3

%define url_ver %(echo %{version} |cut -d. -f1,2)

%bcond_with bootstrap

%define api 1.0
%define major 1
%define libname %mklibname girepository %{api} %{major}
%define devname %mklibname girepository -d

Summary:	GObject Introspection
Name:		gobject-introspection
Version:	1.86.0
Release:	5
License:	GPLv2+, LGPLv2.1+, MIT
Group:		Development/C
Url:		https://download.gnome.org/sources/gobject-introspection
Source0:	https://download.gnome.org/sources/gobject-introspection/%{url_ver}/%{name}-%{version}.tar.xz
# gi-find-deps.sh is a rpm helper for Provides and Requires. Script creates typelib()-style Provides/Requires.
Source1:	gi-find-deps.sh
Source2:	typelib.attr
Source3:	gobject-introspection-typelib.template
BuildRequires:	meson
BuildRequires:	bison
BuildRequires:	flex
BuildRequires:	libtool
BuildRequires:	python3dist(mako)
BuildRequires:	pkgconfig(cairo)
BuildRequires:	pkgconfig(cairo-gobject)
BuildRequires:	pkgconfig(gio-2.0)
BuildRequires:	pkgconfig(gio-unix-2.0)
BuildRequires:	pkgconfig(glib-2.0)
BuildRequires:	pkgconfig(gmodule-2.0)
BuildRequires:	pkgconfig(gobject-2.0)
BuildRequires:	pkgconfig(gthread-2.0)
BuildRequires:	pkgconfig(libffi)
BuildRequires:	pkgconfig(python3)
# these are needed by the g-ir-dep-tool
%if %{without bootstrap}
BuildRequires:	gobject-introspection >= 1.32.0-2
BuildRequires:	pkgconfig(gobject-introspection-1.0) >= 1.32.0
%endif
Requires:	%{libname} = %{EVRD}
Conflicts:	%mklibname girepository 1.0 0 < 0.6.10-5
%rename		gir-repository

# Provide typelib() symbols based on gobject-introspection-typelib.template
# The template is checked during install if it matches the installed *.typelib files.
%if %{with bootstrap}
%(cat %{SOURCE3} | awk '{ print "Provides: " $0}')
%endif

%description
The goal of the project is to describe the APIs and  collect them in
a uniform, machine readable format.

%files
%doc NEWS README.rst
%license COPYING*
%dir %{_libdir}/girepository-%{api}
%{_libdir}/girepository-%{api}/*.typelib

#----------------------------------------------------------------------------

%package -n %{libname}
Summary:	GObject Introspection shared library
Group:		System/Libraries
Conflicts:	%{name} < 0.6.8-2

%description -n %{libname}
The goal of the project is to describe the APIs and  collect them in
a uniform, machine readable format.

%files -n %{libname}
%{_libdir}/libgirepository-%{api}.so.%{major}*

#----------------------------------------------------------------------------

%package -n %{devname}
Summary:	GObject Introspection development libraries
Group:		Development/C
# these two pkgs are needed for typelib requires generation
Requires:	%{name} = %{EVRD}
Requires:	%{libname} = %{EVRD}
#gw /usr/bin/libtool is called in giscanner
Requires:	libtool
Requires:	python3-mako
Requires:	pcre
# gi-find-deps.sh
Requires:	bash
Provides:	libgirepository-devel = %{EVRD}
Provides:	girepository-devel = %{EVRD}
Provides:	%{name}-devel = %{EVRD}

%description -n %{devname}
The goal of the project is to describe the APIs and  collect them in
a uniform, machine readable format.

%files -n %{devname}
%doc NEWS README.rst
%license COPYING*
%{_bindir}/g-ir-annotation-tool
%{_bindir}/g-ir-compiler
%{_bindir}/g-ir-dep-tool
%{_bindir}/g-ir-generate
%{_bindir}/g-ir-inspect
%{_bindir}/g-ir-scanner
%{_datadir}/aclocal/*.m4
%{_datadir}/gir-%{api}/*.gir
%{_datadir}/gir-%{api}/gir-1.2.rnc
%{_datadir}/%{name}-%{api}
%dir %{_datadir}/gir-%{api}
%{_fileattrsdir}/typelib.attr
%{_includedir}/%{name}-%{api}
%{_libdir}/libgirepository-%{api}.so
%{_libdir}/%{name}
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man1/*
%{_rpmconfigdir}/gi-find-deps.sh
%{_rpmmacrodir}/*typelib*

#----------------------------------------------------------------------------

%prep
%autosetup -p1

grep -lr "file=sys.stderr" . | xargs sed -i -e "s/file=sys.stderr/sys.stderr/g"

%build
export LDFLAGS="-L%{_libdir}"
%meson
%meson_build

%install
%meson_install

install -D %{SOURCE1} %{buildroot}%{_rpmconfigdir}/gi-find-deps.sh
install -D -m 0664 %{SOURCE2} %{buildroot}%{_fileattrsdir}/typelib.attr
%install_macro typelib %{SOURCE2}

# tool was renamed
ln -s g-ir-inspect %{buildroot}%{_bindir}/g-ir-dep-tool

# comparing, if we provide all the symbols expected.
%if %{with bootstrap}
ls %{buildroot}%{_libdir}/girepository-1.0/*.typelib | sh %{SOURCE1} -P > gobject-introspection-typelib.installed
diff -s %{SOURCE3} gobject-introspection-typelib.installed
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 57 |14mr|help2man-1.49.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Create simple man pages from --help output
Name:		help2man
Version:	1.49.3
Release:	1
License:	GPLv3+
Group:		Development/Other
Url:		http://www.gnu.org/software/help2man/
Source0:	ftp://ftp.gnu.org:21/gnu/help2man/%{name}-%{version}.tar.xz
BuildRequires:	perl-Locale-gettext

%description
help2man is a script to create simple man pages from the --help and
--version output of programs.

Since most GNU documentation is now in info format, this provides a way
to generate a placeholder man page pointing to that resource while still
providing some useful information.

%files -f %{name}.lang
%doc debian/changelog COPYING INSTALL README NEWS THANKS
%{_bindir}/%{name}
%{_libdir}/%{name}/bindtextdomain.so
%{_infodir}/%{name}*.info*
%{_mandir}/man1/%{name}.1*
%{_mandir}/*/man1/%{name}.1*

#----------------------------------------------------------------------------

%prep
%setup -q

%build
%configure \
	--enable-nls
%make_build

%install
%make_install
%find_lang %{name}


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 58 |14mr|imagemagick-7.1.1.47-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Enable this when is abi-dumper processing is needed
%undefine _find_debuginfo_dwz_opts

%global	_disable_ld_no_undefined 1
# ImageMagick actually uses libtool to load its modules
%global	dont_remove_libtool_files 1
#gw the format-string patch is incomplete:
%global Werror_cflags %{nil}


%bcond_with build_test
%bcond_with bootstrap

%define	oname ImageMagick

# Some other funny version

# (aw) from the docs: Versions with Q8 in the name are 8 bits-per-pixel
# component (e.g. 8-bit red, 8-bit green, etc.), whereas, Q16 in the
# filename are 16 bits-per-pixel component. A Q16 version permits you
# to read or write 16-bit images without losing precision but requires
# twice as much resources as the Q8 version.
%define	qlev Q16HDRI
# their "official" version
#define	rversion 7.0.4
# their "minor" version
#define	minor_rev 6
# the full file version
# Their "official" version
%define	rversion %(echo %{version} |cut -d. -f1-3)
# Their "minor" version
%define	minor_rev %(echo %{version} |cut -d. -f4)
# Full file version
%define	dversion %{rversion}-%{minor_rev}

%define	api 7
%define	major 1
%define	coremajor 10
%define	cppmajor 5
%define	wandmajor 10
%define	libMagickpp %mklibname Magick++ %{api}.%{qlev} %{cppmajor}
%define	libMagickCore %mklibname MagickCore %{api}.%{qlev} %{coremajor}
%define	libMagickWand %mklibname MagickWand %{api}.%{qlev} %{wandmajor}
%define	devname %mklibname magick -d

Summary:	An X application for displaying and manipulating images
Name:		imagemagick
Version:	7.1.1.47
Release:	2
License:	BSD-like
Group:		Graphics
Url:		https://www.imagemagick.org/
Source0:	https://github.com/ImageMagick/ImageMagick/archive/%{dversion}/ImageMagick-%{dversion}.tar.gz
Source3:	ImageMagick.pdf.bz2
# Re-scaled from ftp://ftp.imagemagick.org/pub/ImageMagick/images/magick-icon.png
Source10:	magick-icon_16x16.png
Source11:	magick-icon_32x32.png
Source12:	magick-icon_48x48.png
Source13:	magick-icon_64x64.png
Source100:	%{name}.rpmlintrc
Patch0:		imagemagick-urw.diff
Patch1:		imagemagick-fpx.diff
Patch2:		ImageMagick-libpath.diff
# CVE-2014-9825 fixed in 7.1.1-43
# CVE-2016-7538 fixed in 7.0.1
# CVE-2017-5506 fixed in 7.0.4
# CVE-2023-5341 fixed in 7.1.1-19
# CVE-2025-55160 fixed in 7.1.1-43
Patch10:	CVE-2025-53014.patch
Patch11:	CVE-2025-53015_1.patch
Patch12:	CVE-2025-53015_2.patch
Patch13:	CVE-2025-53019.patch
Patch14:	CVE-2025-53101.patch
Patch15:	CVE-2025-55004.patch
Patch16:	CVE-2025-55005.patch
Patch17:	CVE-2025-55154.patch
Patch18:	CVE-2025-55212_1.patch
Patch19:	CVE-2025-55212_2.patch
Patch20:	CVE-2025-55298-pre1.patch
Patch21:	CVE-2025-55298-pre2.patch
Patch22:	CVE-2025-55298-pre3.patch
Patch23:	CVE-2025-55298-1.patch
Patch24:	CVE-2025-55298-2.patch
Patch25:	CVE-2025-57803.patch
Patch26:	CVE-2025-57807.patch
Patch27:	CVE-2025-62171.patch
Patch28:	CVE-2025-62594.patch
Patch29:	CVE-2025-65955.patch
Patch30:	CVE-2025-66628.patch
Patch31:	CVE-2025-68618.patch
Patch32:	CVE-2025-68950.patch
Patch33:	CVE-2025-69204.patch
Patch34:	CVE-2026-22770.patch
Patch35:	CVE-2026-23874.patch
Patch36:	CVE-2026-23876.patch
Patch37:	CVE-2026-23952.patch
BuildRequires:	chrpath
BuildRequires:	ghostscript
BuildRequires:	subversion
BuildRequires:	bzip2-devel
# Contrib
#BuildRequires:	flif-devel
BuildRequires:	jbig-devel
BuildRequires:	libtool-devel
BuildRequires:	perl-devel
BuildRequires:	pkgconfig(cairo)
%if %{without bootstrap}
BuildRequires:	pkgconfig(ddjvuapi) >= 3.5.0
%endif
BuildRequires:	pkgconfig(fontconfig) >= 2.1.0
BuildRequires:	pkgconfig(freetype2)
BuildRequires:	pkgconfig(jasper)
BuildRequires:	pkgconfig(lcms2)
BuildRequires:	pkgconfig(libgvc) >= 2.9.0
BuildRequires:	pkgconfig(libjpeg)
BuildRequires:	pkgconfig(libjxl)
BuildRequires:	pkgconfig(libheif)
BuildRequires:	pkgconfig(liblzma) >= 2.9.0
BuildRequires:	pkgconfig(libopenjp2)
BuildRequires:	pkgconfig(libpng)
BuildRequires:	pkgconfig(libraw_r)
%ifnarch %{e2k}
BuildRequires:	pkgconfig(librsvg-2.0)
%endif
BuildRequires:	pkgconfig(libtiff-4)
BuildRequires:	pkgconfig(libzstd)
BuildRequires:	pkgconfig(libwebp)
BuildRequires:	pkgconfig(libwmf)
BuildRequires:	pkgconfig(libxml-2.0)
BuildRequires:	pkgconfig(lqr-1) >= 0.1.0
BuildRequires:	pkgconfig(OpenEXR)
BuildRequires:	pkgconfig(pangocairo) >= 1.2.8.1
BuildRequires:	pkgconfig(x11)
BuildRequires:	pkgconfig(xext)
BuildRequires:	pkgconfig(zlib)

%description
ImageMagick is a powerful image display, conversion and manipulation tool. It
runs in an X session. With this tool, you can view, edit and display a variety
of image formats.
It can make use of the following delegate programs, available as packages in
Rosa Linux Fresh: curl, enscript, ffmpeg, ghostscript, ghostscript-X, gimp,
gnuplot, graphviz, html2ps, mplayer, ncompress, netpbm, sane-backends,
tetex-dvips, transfig, ufraw, xdg-utils zip, autotrace, povray.

%files
%doc README.md
%doc %{_docdir}/%{oname}-%{api}
%{_sysconfdir}/%{oname}-%{api}
%{_bindir}/animate
%{_bindir}/compare
%{_bindir}/composite
%{_bindir}/convert
%{_bindir}/conjure
%{_bindir}/display
%{_bindir}/identify
%{_bindir}/import
%{_bindir}/magick
%{_bindir}/magick-script
%{_bindir}/mogrify
%{_bindir}/montage
%{_bindir}/stream
%dir %{_libdir}/%{oname}-%{rversion}
%dir %{_libdir}/%{oname}-%{rversion}/modules-%{qlev}
%dir %{_libdir}/%{oname}-%{rversion}/modules-%{qlev}/coders
%{_libdir}/%{oname}-%{rversion}/modules-%{qlev}/coders/*
%dir %{_libdir}/%{oname}-%{rversion}/modules-%{qlev}/filters
%{_libdir}/%{oname}-%{rversion}/modules-%{qlev}/filters/*
%{_libdir}/%{oname}-%{rversion}/config-%{qlev}
%{_datadir}/%{oname}-%{api}
%{_mandir}/man1/*
%{_mandir}/man3/*
%exclude %{_mandir}/man3/*::*.3pm*

#----------------------------------------------------------------------------

%package desktop
Summary:	ImageMagick menus
Group:		Graphics
Requires:	xterm

%description desktop
This package contains the menu and .desktop entries to run the "display"
command from the menu.

%files desktop
%doc LICENSE
%{_datadir}/applications/%{name}.desktop
%{_iconsdir}/%{name}.png
%{_iconsdir}/hicolor/64x64/apps/%{name}.png
%{_liconsdir}/%{name}.png
%{_miconsdir}/%{name}.png

#----------------------------------------------------------------------------

%package -n %{libMagickpp}
Summary:	ImageMagick libraries
Group:		System/Libraries
Obsoletes:	%{_lib}magick6 < 6.8.5.6-1

%description -n %{libMagickpp}
This package contains a library for %{name}.

%files -n %{libMagickpp}
%doc LICENSE
%{_libdir}/libMagick++-%{api}.%{qlev}.so.%{cppmajor}*

#----------------------------------------------------------------------------

%package -n %{libMagickCore}
Summary:	ImageMagick libraries
Group:		System/Libraries
Conflicts:	%{_lib}magick6 < 6.8.5.6-1

%description -n %{libMagickCore}
This package contains a library for %{name}.

%files -n %{libMagickCore}
%doc LICENSE
%{_libdir}/libMagickCore-%{api}.%{qlev}.so.%{coremajor}*

#----------------------------------------------------------------------------

%package -n %{libMagickWand}
Summary:	ImageMagick libraries
Group:		System/Libraries
Conflicts:	%{_lib}magick6 < 6.8.5.6-1

%description -n %{libMagickWand}
This package contains a library for %{name}.

%files -n %{libMagickWand}
%doc LICENSE
%{_libdir}/libMagickWand-%{api}.%{qlev}.so.%{wandmajor}*

#----------------------------------------------------------------------------

%package -n %{devname}
Summary:	Development libraries and header files for ImageMagick app development
Group:		Development/C
Requires:	%{libMagickpp} = %{EVRD}
Requires:	%{libMagickCore} = %{EVRD}
Requires:	%{libMagickWand} = %{EVRD}
Provides:	%{name}-devel = %{EVRD}

%description -n %{devname}
If you want to create applications that will use ImageMagick code or APIs,
you'll need to install these packages as well as ImageMagick. These additional
packages aren't necessary if you simply want to use ImageMagick, however.
This package is an addition to ImageMagick which includes development
libraries and header files necessary to develop applications.

%files -n %{devname}
%doc LICENSE
%{_includedir}/%{oname}-%{api}
%{_bindir}/Magick++-config
%{_bindir}/MagickCore-config
%{_bindir}/MagickWand-config
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

#----------------------------------------------------------------------------

%package -n perl-Image-Magick
Summary:	Libraries and modules for access to ImageMagick from perl
Group:		Development/Perl
Requires:	%{name} = %{EVRD}
Requires:	graphviz
Requires:	libwmf

%description -n perl-Image-Magick
This is the ImageMagick perl support package. It includes perl modules and
support files for access to ImageMagick library from perl.

%files -n perl-Image-Magick
%doc LICENSE
%{perl_vendorarch}/Image
%{perl_vendorarch}/auto/Image
%{_mandir}/man3*/*::*.3pm*

#----------------------------------------------------------------------------

%package doc
Summary:	%{oname} Documentation
Group:		Books/Other
BuildArch:	noarch

%description doc
This package contains HTML/PDF documentation of %{name}.

%files doc
%doc ImageMagick.pdf LICENSE NOTICE
%doc installed_docs/*

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{oname}-%{rversion}-%{minor_rev}

bzcat %{SOURCE3} > %{oname}.pdf
install -m 644 %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} .
libtoolize --copy --force; aclocal -I m4; autoconf; automake -a


%build
export CFLAGS="%{optflags} -fno-strict-aliasing -fPIC"
export CXXFLAGS="%{optflags} -fno-strict-aliasing -fPIC"

# Don't use icecream
export PATH=/bin:/usr/bin

%configure \
	--disable-static \
	--docdir=%{_defaultdocdir}/%{name} \
	--with-pic \
	--enable-shared \
	--enable-fast-install \
	--with-magick_plus_plus \
	--with-gslib \
	--with-wmf \
	--with-lcms \
%ifarch %{e2k}
	--disable-openmp \
%else
	--with-rsvg \
	--with-threads \
%endif
	--with-xml \
	--without-dps \
	--without-windows-font-dir \
	--with-modules \
	--with-perl \
	--with-perl-options="INSTALLDIRS=vendor CC='%{__cc} -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \
	--with-gvc \
	--with-lqr

# Disable rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

%make_build


%install
# (Abel) set LD_RUN_PATH to null, to avoid adding rpath to perlmagick module
%make_install LD_RUN_PATH="" pkgdocdir=/installed_docs

# Fix docs inclusion (fix an unknown new rpm bug)
rm -rf installed_docs; mv %{buildroot}/installed_docs .

# Remove unpackaged files
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/libltdl*

# Ccreate compatible symlinks
ln -s libMagick++-%{api}.%{qlev}.so %{buildroot}%{_libdir}/libMagick++.so
ln -s libMagickCore-%{api}.%{qlev}.so %{buildroot}%{_libdir}/libMagickCore.so
ln -s libMagickWand-%{api}.%{qlev}.so %{buildroot}%{_libdir}/libMagickWand.so

# Nuke rpath
# chrpath -d %%{buildroot}%%{perl_vendorarch}/auto/Image/Magick/Magick.so

# Install icons
install -m 755 -d \
	%{buildroot}%{_liconsdir} \
	%{buildroot}%{_iconsdir} \
	%{buildroot}%{_iconsdir}/hicolor/64x64/apps \
	%{buildroot}%{_miconsdir}

install -m 644 magick-icon_16x16.png %{buildroot}%{_miconsdir}/%{name}.png
install -m 644 magick-icon_32x32.png %{buildroot}%{_iconsdir}/%{name}.png
install -m 644 magick-icon_48x48.png %{buildroot}%{_liconsdir}/%{name}.png
install -m 644 magick-icon_64x64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/%{name}.png

# Provde .desktop file
install -m 755 -d %{buildroot}%{_datadir}/applications/
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
[Desktop Entry]
Name=ImageMagick
Name[ru]=ImageMagick
Comment=Views Graphics files
Comment[ru]=Просмотр графических файлов
Exec=xterm -geometry 40x15 -title ImageMagick +sb -iconic -e %{_bindir}/display
Icon=%{name}
Terminal=false
Type=Application
Categories=Graphics;Viewer;
EOF

# Drop useless empty file
rm -f %{buildroot}%{_docdir}/imagemagick-doc/www/magick-cache.html


%if %{with build_test}
%check
#  These tests require X
if [ -f PerlMagick/t/x11/read.t ]; then
	mv PerlMagick/t/x11/read.t PerlMagick/t/x11/read.t.disabled
fi
if [ -f PerlMagick/t/x11/write.t ]; then
	mv PerlMagick/t/x11/write.t PerlMagick/t/x11/write.t.disabled
fi
#dlname=`grep "^dlname" Magick++/lib/.libs/libMagick++.la | cut -d\' -f2`
#LD_PRELOAD="$PWD/Magick++/lib/.libs/$dlname" VERBOSE="1" make check
make check
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 59 |14mr|jsoncpp-1.9.5-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 25
%define libname %mklibname %{name} %{major}
%define devname %mklibname %{name} -d

# prevent circular dependencies with cmake
%global __requires_exclude ^cmake-filesystem.*$

Summary:	C++ JSON Library
Name:		jsoncpp
Version:	1.9.5
Release:	2
License:	Public Domain
Group:		System/Libraries
Url:		http://jsoncpp.sourceforge.net/
Source0:	https://github.com/open-source-parsers/jsoncpp/archive/%{version}.tar.gz?/%{name}-%{version}.tar.gz
BuildRequires:	ninja
BuildRequires:	cmake
BuildRequires:	python3-devel

%description
JsonCpp is a simple API to manipulate JSON value, handle serialization
and unserialization to string.

It can also preserve existing comment in unserialization/serialization steps,
making it a convenient format to store user input files.

Unserialization parsing is user friendly and provides precise error reports.

#----------------------------------------------------------------------------

%package -n %{libname}
Summary:	JsonCpp library
Group:		System/Libraries

%description -n %{libname}
JsonCpp is a simple API to manipulate JSON value, handle serialization
and unserialization to string.

It can also preserve existing comment in unserialization/serialization steps,
making it a convenient format to store user input files.

Unserialization parsing is user friendly and provides precise error reports.

%files -n %{libname}
%{_libdir}/lib%{name}.so.%{major}
%{_libdir}/lib%{name}.so.%{version}

#----------------------------------------------------------------------------

%package -n %{devname}
Summary:	Development files for %{name}
Group:		System/Libraries
Requires:	%{libname} = %{EVRD}
Provides:	%{name}-devel = %{EVRD}

%description -n %{devname}
Files for building applications with %{name} support.

%files -n %{devname}
%{_libdir}/lib%{name}.so
%dir %{_includedir}/json
%{_includedir}/json/*.h
%{_libdir}/pkgconfig/jsoncpp.pc
%{_libdir}/cmake/jsoncpp/*.cmake

#----------------------------------------------------------------------------

%prep
%autosetup -p1

%build
%cmake                                         \
  -DBUILD_STATIC_LIBS:BOOL=OFF                 \
  -DBUILD_OBJECT_LIBS:BOOL=OFF                 \
  -DJSONCPP_WITH_CMAKE_PACKAGE:BOOL=ON         \
  -DJSONCPP_WITH_EXAMPLE:BOOL=OFF              \
  -DJSONCPP_WITH_PKGCONFIG_SUPPORT:BOOL=ON     \
  -DJSONCPP_WITH_POST_BUILD_UNITTEST:BOOL=OFF  \
  -DJSONCPP_WITH_STRICT_ISO:BOOL=ON            \
  -DJSONCPP_WITH_TESTS:BOOL=OFF                \
  -DJSONCPP_WITH_WARNING_AS_ERROR:BOOL=OFF     \
  -DPYTHON_EXECUTABLE:STRING="%{__python3}"    \
  -G Ninja
%ninja_build

%install
%ninja_install -C build

#fix include path in .pc file
sed -i 's|/include|/include/json|' %{buildroot}%{_libdir}/pkgconfig/jsoncpp.pc
sed -i 's|Version: |Version: %{version}|' %{buildroot}%{_libdir}/pkgconfig/jsoncpp.pc


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 60 |14mr|kernel-7.2-generic-7.2.8-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# _get_email() in %%build contains bashisms for regexping
%define	_buildshell /bin/bash

# brp-python-bytecompile uses /usr/bin/python,
# but it is a different python version in different ROSA
# releases; there is no good way to tell brp-python-bytecompile
# which iterpreter to use; so just disable it to avoid problems
%define	_python_bytecompile_build 0

# Probably dwz bug, on i686 only file is not packaged:
# /usr/lib/debug/usr/bin/trace-5.4.40-3.i386.debug.#dwz#.b5xuKG
# dwz compresses only debuginfo from perf, cpupower, uml,
# not the kernel itself (because it is stripped not by RPM),
# so we do not loose much by disabling it.
%global	_find_debuginfo_dwz_opts %{nil}

# Put everything into one non-standard debuginfo subpackage
# TODO: make multiple debuginfo packages coinstallable as installonlypkg,
# to achive this, there must be no conflicting files.
# Probably signing and compressing of kernel modules
# has to be moved to %%_spec_install_post.
%global	_debuginfo_subpackages %{nil}
%global	_debuginfo_template %{nil}
%undefine	_debugsource_packages

# Avoid rediffing patches like AUFS when possible
%define _default_patch_fuzz 10

# Hack: flavour and major version are variable, make %%_build_pkgcheck_* always detect and use this config
%global	_build_pkgcheck_set %{nil}
%global	_build_pkgcheck_srpm %{nil}

%define kernelversion 7
%define patchlevel 2
%define sublevel 8

# Release number. Increase this before a rebuild.
%define rpmrel 1
%define fullrpmrel %{rpmrel}

%define rpmtag %{disttag}

# Version defines
%define kversion %{kernelversion}.%{patchlevel}.%{sublevel}
%define kverrel %{kversion}-%{fullrpmrel}
%define tar_ver %{kernelversion}.%{patchlevel}

%ifarch %{ix86}
%define	arch_suffix	i686
%endif
%ifarch %{x86_64}
%define	arch_suffix	x86_64
%endif
%ifarch aarch64
%define	arch_suffix	arm64
%endif
%ifarch riscv64
%define	arch_suffix	riscv64
%endif
%ifarch loongarch64
%define	arch_suffix	loongarch
%endif

%define	buildrpmrel	%{fullrpmrel}%{rpmtag}-%{arch_suffix}
%define	buildrel	%{kversion}-%{buildrpmrel}

# Add not only the build time generated key to the trusted keyring,
# but also add public keys of private ROSA's keys
%bcond_without	additional_keys

# Fail the build after "make oldconfig" to edit kernel configs
%bcond_with	fail

# User Mode Linux, https://habr.com/ru/company/itsumma/blog/459558/
# Not buildable on aarch64, rarely needed in general
%bcond_with	uml

# "Nickel" is a special brand for certified distros
%if %{mdvver} == 201905
%bcond_without	nickel
# Require kernel modules to be signed
%bcond_without	oblig_signed_modules
%else
%bcond_with nickel
%bcond_with oblig_signed_modules
%endif

# Build binary out-of-tree kernel modules
%bcond_with binary_extra_modules
# Sign kernel modules with GOST key
%bcond_without gost_sign

%bcond_with ccache
%bcond_without flow_abi
%bcond_with aufs

# 1. VirtualBox is for x86_32 and x86_64 only
# 2. I do not know how to solve the problem that userspace part of VirtualBox
# will be updated ahead of these binary modules. So just off building them.
%bcond_with binary_virtualbox_host

# Shredder-kernel works only on x86_64, makes manipulations with syscalls tables,
# loading/unloading of the module failed sometimes on kernel 5.4
# and it has not been adapted for kernel 5.10 (is not buildable)
%bcond_with binary_shredder

# Compress modules with zstd (zstd is good compression and fast decompression)
%bcond_without compress_modules

# enable bpftune
%bcond_without bpftool
# Spend more resources on compression, but make resulting size less;
# decompression speed will not be affected, but more memory will be required
# which should not a problem here (performance penalty from allocating more
# memory should not be big, I think, but I did not benchmark).
%define	zstd_cmd zstd -q --format=zstd --ultra -22

# Kernel flavour
%if %{with nickel}
%define	flavour	nickel
%else
%define	flavour	generic
%endif

# The full kernel version
%define	kver_full	%{kversion}-%{flavour}-%{buildrpmrel}

############################################################################

%define	top_dir_name	kernel-%{_arch}
%define	build_dir	${RPM_BUILD_DIR}/%{top_dir_name}
%define	src_dir	%{build_dir}/linux-%{tar_ver}

# Common target directories
%define	_bootdir	/boot
%define	devel_root	/usr/src/linux-%{kver_full}
%define	initrd_path %{_bootdir}/initrd-%{kver_full}.img
%if %{mdvver} >= 202310
%define	_modulesdir	/usr/lib/modules
%else
%define	_modulesdir	/lib/modules
%endif

# Directories needed for building
%define	temp_root	%{build_dir}/temp-root
%define	temp_boot	%{temp_root}%{_bootdir}
%define	temp_modules	%{temp_root}%{_modulesdir}
%define	temp_devel_root	%{temp_root}%{devel_root}

# Directories definition needed for installing
%define	target_boot	%{buildroot}%{_bootdir}
%define	target_modules	%{buildroot}%{_modulesdir}

# Manual control of creating and deleting keys
# "rnd" is "random" and means that a key pair is generated at build time
# and is not saved anywhere.
%define	certs_dir_rnd certs
%define	certs_signing_key_priv_rnd %{certs_dir_rnd}/signing_key_priv.key
%define	certs_signing_der %{certs_dir_rnd}/signing_key.x509
%define	certs_key_config_rnd %{certs_dir_rnd}/x509.genkey
%define	certs_public_keys %{certs_dir_rnd}/public.pem
%define	certs_verify_tmp %{certs_dir_rnd}/verify.tmp

%define	kernel_files %{_builddir}/kernel_files.list
%define	debuginfo_files %{_builddir}/debuginfo_files.list

# Append list of files generate by find-debuginfo.sh to our custom list
%global	__debug_install_post \
%{__debug_install_post} \
cat %{_builddir}/debugfiles.list >> %{debuginfo_files}

############################################################################

%if %{with binary_extra_modules}
# global instead of define to speed up things
%global nvidia_615_j %{kroko_j -p kernel-source-nvidia615-open -r 615}
%global nvidia_615_n %{kroko_n -p kernel-source-nvidia615-open -r 615}
%global nvidia_615_j %{kroko_j -p kernel-source-nvidia615-proprietary -r 615}
%global nvidia_615_n %{kroko_n -p kernel-source-nvidia615-proprietary -r 615}

# For SRPM stage when auto-krokodil-rpm-macros is not installed
%{?!kroko_mk_release:%global kroko_mk_release(n:) %{nil}}
%{?!kroko_req_modules_in_kernel:%global kroko_req_modules_in_kernel(j:n:p:) %{nil}}

# global, not define, must be expanded only once
%global kroko_release %kroko_mk_release -n kernel-%{kernelversion}.%{patchlevel}-%{flavour}

%endif

############################################################################

# Buildtime flags
%{?_without_doc: %global build_doc 0}
%{?_without_devel: %global build_devel 0}
%{?_without_debug: %global build_debug 0}
%{?_without_perf: %global build_perf 0}

%{?_with_doc: %global build_doc 1}
%{?_with_devel: %global build_devel 1}
%{?_with_debug: %global build_debug 1}
%{?_with_perf: %global build_perf 1}
%{?_with_modxz: %global build_modxz 0}

# Build defines
%define	build_doc	0
%define	build_devel	1
%define	build_debug	0

# Build kernel-headers package
%define	build_headers	1

%define	build_perf	1

%if %{with compress_modules}
%if %{with modxz}
%define	kmod_suffix .xz
%else
%define	kmod_suffix .zst
%endif
%else
%define	kmod_suffix %{nil}
%endif

%if !%{build_debug}
# Disable debug rpms.
%define	_enable_debug_packages	%{nil}
%define	debug_package		%{nil}
%endif

# End of user definitions

# http://nickdesaulniers.github.io/blog/2018/06/02/speeding-up-linux-kernel-builds-with-ccache/
%if %{with ccache}
%define	kmake KBUILD_BUILD_TIMESTAMP='' %make_build CC='ccache gcc' ARCH="%{arch_type}"
%else
%define	kmake %make_build CC='gcc' ARCH="%{arch_type}"
%endif

# There are places where parallel make don't work
%define	smake make
%ifarch %{ix86} %{x86_64}
%define	arch_type x86
%endif
%ifarch	aarch64
%define	arch_type arm64
%endif
%ifarch	riscv64
%define	arch_type riscv
%endif
%ifarch	loongarch64
%define	arch_type loongarch
%endif

# Parallelize xargs invocations on smp machines
%define	kxargs xargs %([ -z "$RPM_BUILD_NCPUS" ] \\\
	&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
	[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-P $RPM_BUILD_NCPUS")

#
# SRC RPM description
#
Summary:	The Linux kernel
Name:		kernel-%{kernelversion}.%{patchlevel}-%{flavour}
Version:	%{kversion}
Release:	%{fullrpmrel}
License:	GPLv2
Group:		System/Kernel and hardware
Url:		https://www.kernel.org

ExclusiveArch: %{x86_64} %{ix86} aarch64 riscv64 loongarch64

####################################################################
#
# Sources
#
Source0:	https://cdn.kernel.org/pub/linux/kernel/v%{kernelversion}.x/linux-%{tar_ver}.tar.xz

# TODO: Make a separate package "ksobirator" and BR it
# after testing these macros properly
Source3:	macros.ksobirator
# Load ksobirator macros only if the file is actually present:
# spectool parses the spec in an empty temp dir where Source3 does not exist
%{lua:
local f = rpm.expand("%{SOURCE3}")
if posix and posix.access(f, "r") then
    rpm.expand("%{load:" .. f .. "}")
end
}

# Kernel configuration files.
Source111:	kernel-x86_64.config
Source112:	kernel-i686.config
Source113:	kernel-arm64.config
Source114:	kernel-riscv64.config
Source115:	kernel-loongarch.config

Source80:	kernel.rpmlintrc

# Additional keys that can be used to sign kernel modules
# Generated by https://abf.io/soft/kernel-keys
# Source201..206: public_key_GOST_*.pem
%{expand:%(for i in `seq 1 6`; do echo "Source$((200+${i})): public_key_GOST_${i}.pem"; done)}
# Source207..212: public_key_RSA_*.pem
%{expand:%(for i in `seq 7 12`; do echo "Source$((200+${i})): public_key_RSA_${i}.pem"; done)}

####################################################################

# Patches

# The patch to make kernel x.y.z from x.y.0.
Patch1:		https://cdn.kernel.org/pub/linux/kernel/v%{kernelversion}.x/patch-%{kversion}.xz
# ROSA-specific patches
Patch2:		kernel-5.10.93-fix-perf-build.patch
# Perf docs are built after all the kernels. To validate the xml files
# generated during that process, xmlto tries to get DTD files from the Net.
# If it fails, the whole build fails, which is unfortunate. Let us avoid this.
Patch101:	0001-perf-skip-xmlto-validation.patch

# http://bugs.rosalinux.ru/show_bug.cgi?id=6235
# http://bugs.rosalinux.ru/show_bug.cgi?id=6459
Patch102:	0001-audit-make-it-less-verbose.patch

%if %{with aufs}
# Patch is a diff between Source0 and  https://github.com/sfjro/aufs-linux/tree/aufs6.6.4
Patch103:	aufs-6.12.diff
%endif

# For kmod() generator of RPM Provides
# Changes version of aacraid.ko
Patch111:	0001-Remove-RPM-illegal-chars-from-module-version.patch

# Allow to off modules signature check dynamically
Patch306:	0001-ROSA-ima-allow-to-off-modules-signature-check-dynami.patch
# Off SMACK, TOMOYO and AppArmor LSM modules by default while having them enabled by CONFIG_*
Patch307:	0001-security-off-odd-LSM-by-default.patch

# Support sound on notebook Aquarius NS685U R11 (https://linux-hardware.org/?probe=339dc3db60)
Patch501: 0401-ASoC-es8316-Use-increased-GPIO-debounce-time.patch
Patch502: 0402-ASoC-Intel-sof_es8336-Add-more-quirks-for-Russian-ha.patch
Patch503: 0403-ASoC-Intel-sof_es8336-Add-a-quirk-for-Aquarius-NS685.patch

# Disable AutoReq
AutoReq:	0
# but keep autoprov for kmod(xxx)
AutoProv:	1

BuildRequires:	bash
BuildRequires:	bc
BuildRequires:	binutils
BuildRequires:	bison
BuildRequires:	bzip2
%if %{with ccache}
BuildRequires:	ccache
%endif
BuildRequires:	flex
BuildRequires:	gcc
# ./scripts/mkcompile_h
BuildRequires:	hostname
BuildRequires:	kmod
BuildRequires:	sign-file
BuildRequires:	rsync
%if %{with compress_modules}
%if %{with modxz}
BuildRequires:	xz
%else
BuildRequires:	zstd
%endif
%endif
%ifarch aarch64
BuildRequires:	uboot-tools
%endif
BuildRequires:	kmod-devel
BuildRequires:	pkgconfig(libelf)
%ifarch x86_64 aarch64
BuildRequires:	numa-devel
%endif
%if %{with uml}
BuildRequires:	vde-devel
%endif
# For power tools
BuildRequires:	pkgconfig(ncurses)

# For perf
%if %{build_perf}
BuildRequires:	asciidoc
BuildRequires:	perl-ExtUtils-Embed
BuildRequires:	python3
BuildRequires:	xmlto-notex
BuildRequires:	audit-devel
BuildRequires:	binutils-devel
BuildRequires:	elfutils-devel
BuildRequires:	java-devel
BuildRequires:	libunwind-devel
BuildRequires:	newt-devel
BuildRequires:	perl-devel
BuildRequires:	pkgconfig(babeltrace)
BuildRequires:	pkgconfig(libcap)
BuildRequires:	pkgconfig(libcrypto)
BuildRequires:	pkgconfig(libtraceevent)
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(slang)
BuildRequires:	pkgconfig(zlib)
BuildRequires:	python3-setuptools
%endif

# (To generate keys)
# LibreSSL has GOST support without editing openssl.cnf
# or dlopen()-ing external library
BuildRequires:	libressl
# To verify signatures (find, xargs, hexdump)
BuildRequires:	findutils
BuildRequires:	util-linux

%if %{with binary_extra_modules}
BuildRequires:	auto-krokodil-rpm-macros
# Status of upsteamization:
# https://github.com/morrownr/8821cu-20210916/issues/149#issuecomment-2197464252
# Then Larry Finger left this world...
# https://github.com/morrownr/88x2bu-20210702/issues/224#issuecomment-2404823387
# Nvidia470+ are x86_64 only (maybe aarch64 will be also packaged later)
# nvidia390 is not buildable with kernel 6.6 on i686
%ifarch %{x86_64}
BuildRequires:	kernel-source-nvidia615-open
BuildRequires:	kernel-source-nvidia615-proprietary
%endif
BuildRequires:	kernel-source-tripso
BuildRequires:	kernel-source-ipt-so
BuildRequires:	kernel-source-nwfermi
%if %{with binary_virtualbox_host}
BuildRequires:	kernel-source-virtualbox
%endif
BuildRequires:	kernel-source-v4l2loopback
BuildRequires:	kernel-source-hotfix-kvadra-touchpad
%if %{with binary_shredder}
BuildRequires: kernel-source-shredder-kernel
%endif
# Rosa-test-suite is maintained in certified branches only nlkm, memfreetest, pcietest
%if %{with nickel}
BuildRequires:	kernel-source-rosa-test-suite
%endif
%endif
# End of with binary_extra_modules

Provides:	kernel = %{EVRD}
Provides:	kernel-%{flavour} = %{EVRD}
Provides:	kernel-abi(%{kver_full}) = %{EVRD}
# Dnf config-manager --dump | grep installonly
Provides:	installonlypkg(kernel) = %{EVRD}.image
Provides:	installonlypkg(kernel) = %{EVRD}.modules

# dracut needed only for initrd
Recommends:	dracut
Requires(posttrans):	kmod >= 28-3

# Need for rebuild dkms drivers
Recommends:	(%{name}-devel%{_isa} = %{EVRD} if dkms)
# not blob, support of devices supported by r8168 is removed from r8169

# Usually necessary, but sometimes user may want to not install them
Recommends:	linux-firmware
Recommends:	microcode
# Set BFQ as default scheduler for HDDs
# https://www.phoronix.com/scan.php?page=article&item=linux-50hdd-io
Recommends:	udev-rules-ioschedulers
Recommends:	wireless-regdb

%if %{with flow_abi}
Requires:	kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
%endif

%ifarch %{ix86}
Conflicts:	arch(x86_64)
%endif

# XXX temporary hack to upgrade from kernel-headers 1:5.4
%if %{build_headers}
Recommends:	kernel-headers = %{EVRD}
%endif

%if %{with binary_extra_modules}
%ifarch %{x86_64}
%kroko_req_modules_in_kernel -j %{nvidia_615_j} -n %{nvidia_615_n} -p %{kver_full}
%endif
%endif

%description
The kernel package contains the Linux kernel (vmlinuz), the core of your
operating system. The kernel handles the basic functions
of the operating system: memory allocation, process allocation, device
input and output, etc. This is a general-purpose kernel.

%posttrans
# update information about modules, useful if kernel-module* packages were
# installed in one transaction with this kernel (%%transfiletrigger* will run later)
depmod -a %{kver_full}
# We always regenerate initrd here, even if it already exists. This may
# happen if kernel-<...>-devel is installed first, triggers rebuild of
# DKMS modules and some of these request remaking of initrd. The initrd
# that is created then will be non-functional. But when the user installs
# kernel-<...> package, that defunct initrd will be replaced with a working
# one here.
if command -v dracut >/dev/null 2>&1; then
	dracut -f %{initrd_path} %{kver_full}
fi

# File triggers from grub packages will handle this.
#/usr/sbin/update-grub2

%transfiletriggerin -- %{_modulesdir}/%{kver_full}
# Detect all modules, including ones inside kernel-module* packages
if grep -qE '/.*\.ko(|\..*)' ; then
	depmod -a %{kver_full}
fi

%transfiletriggerpostun -- %{_modulesdir}/%{kver_full}
# Handle e.g. removal of kernel-module* packages
# List of files is not available here (?)
depmod -a %{kver_full}

%files -f %{kernel_files}
%{_bootdir}/System.map-%{kver_full}
%{_bootdir}/symvers-%{kver_full}.*
%{_bootdir}/config-%{kver_full}
%{_bootdir}/vmlinuz-%{kver_full}
%ghost %{initrd_path}
%ifarch %{armx} riscv64
%{_bootdir}/dtb-%{kver_full}
%endif
%{_modulesdir}/%{kver_full}/modules.*
%if %{with flow_abi}
%{_modulesdir}/%{kver_full}/kernel/zzz-%{kernelversion}.%{patchlevel}-rosa-flow-abi
%endif
%if %{with binary_extra_modules}
%if %{with binary_shredder}
%exclude %{_modulesdir}/%{kver_full}/kernel/extra/shredder-kernel.ko%{kmod_suffix}
%endif
%exclude %{_modulesdir}/%{kver_full}/kernel/drivers/media/v4l2loopback.ko%{kmod_suffix}
%if %{with binary_virtualbox_host}
# vbox host modules may be built here (vboxnetflt vboxnetadp vboxdrv vboxpci)
# vbox guest modules are in the mainline kernel now (vboxvideo vboxguest vboxsf)
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/vbox*.ko%{kmod_suffix}
%endif
%exclude %{_modulesdir}/%{kver_full}/kernel/net/xt_TRIPSO.ko%{kmod_suffix}
%exclude %{_modulesdir}/%{kver_full}/kernel/net/xt_so.ko%{kmod_suffix}
%if %{with nickel}
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/nlkm.ko%{kmod_suffix}
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/memfreetest.ko%{kmod_suffix}
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/pcietest.ko%{kmod_suffix}
%endif
%endif
# End of with binary_extra_modules

############################################################################

%if %{build_devel}
%package devel
Summary:	Development files for %{name}
Group:		Development/Kernel
Requires:	glibc-devel
Requires:	ncurses-devel
Requires:	gcc
Requires:	make
Requires:	perl
Requires:	%{name} = %{EVRD}
Provides:	kernel-devel = %{kverrel}
Provides:	kernel-%{flavour}-devel = %{kverrel}
Provides:	installonlypkg(kernel) = %{EVRD}.devel

# Have dkms updated/installed before the kernel, scriptlet here checks if dkms exists
OrderWithRequires(post):	dkms
# Try to remove the main kernel package after removing this devel package
# because there may be dkms-built kernel modules inside directories owned
# by the main package, try to get rid of such files before RPM starts to
# deal with directories owned in the main package
# (note that the devel package does not explicitly require the main package,
# there is no need to do so, a kernel module may be built using just the devel part).
OrderWithRequires(postun): %{name} = %{EVRD}

%ifarch %{ix86}
Conflicts:	arch(x86_64)
%endif

%description devel
This package contains the kernel files (headers and build tools) that should
be enough to build additional drivers for use with %{name}.


%post devel
if command -v dkms_autoinstaller >/dev/null 2>&1; then
	dkms_autoinstaller start %{kver_full}
fi


%preun devel
# If any DKMS modules with REMAKE_INITRD=yes in their configs have been
# uninstalled, initrd has been regenerated for the given kernel. However,
# the kernel itself might have been uninstalled before, so that (defunct)
# initrd image files would be left behind. Remove them if the kernel itself
# is no longer installed. Should work if they are uninstalled in parallel
# too.
if ! test -f /boot/vmlinuz-%{kver_full}; then
	rm -f /boot/initrd-%{kver_full}.img
	rm -f /boot/initrd-%{kver_full}_old.img
fi

if ! command -v dkms >/dev/null 2>&1; then exit 0; fi

for ii in $(/usr/sbin/dkms status -k %{kver_full} | awk '{ print $1 $2; }'); do
	mod=$(echo $ii | awk -v FS=',' '{ print $1; }')
	ver=$(echo $ii | awk -v FS=',' '{ print $2; }')
	/usr/sbin/dkms --rpm_safe_upgrade uninstall -m $mod -v $ver -k %{kver_full} || :
done


%files devel
%{devel_root}
%{_modulesdir}/%{kver_full}/build
%{_modulesdir}/%{kver_full}/source
%endif
# End of build_devel

############################################################################

%if %{build_debug}
%package debuginfo
Summary:	Debuginfo for %{name}
Group:		Development/Debug
Provides:	kernel-debug = %{kverrel}
AutoReq:	0
AutoProv:	0

%description debuginfo
This package contains the files with debuginfo for %{name}.

%files debuginfo -f %{debuginfo_files}
%{_bootdir}/vmlinux-%{kver_full}
%endif
# End of build_debug

############################################################################
%if %{with bpftool}
%package -n bpftool
Summary:	Inspection and simple manipulation of eBPF programs and maps
Group:		System/Kernel and hardware
BuildRequires:  pahole
BuildRequires:  lld
BuildRequires:  llvm

%description -n bpftool
This package contains the bpftool, which allows inspection and simple
manipulation of eBPF programs and maps.

%files -n bpftool
%{_sbindir}/bpftool
%{_sysconfdir}/bash_completion.d/bpftool
%endif

############################################################################

%if %{build_doc}
%package doc
Summary:	Various documentation bits found in the kernel source
Group:		Documentation
BuildArch:	noarch

%description doc
This package contains documentation files from the kernel source.

%files doc
%doc linux-%{tar_ver}/Documentation/*
%endif

############################################################################

%if %{build_perf}
%package -n perf
Summary:	perf tool and the supporting documentation
Group:		System/Kernel and hardware

%description -n perf
The package contains perf tool and the supporting documentation.

%files -n perf
%{_bindir}/perf
%ifarch %{x86_64}
%{_bindir}/perf-read-vdso32
%endif
%{_bindir}/trace
%{_includedir}/perf/perf_dlfilter.h
%dir %{_libexecdir}/perf-core
%{_libdir}/libperf-jvmti.so
%{_libexecdir}/perf-core/*
%{_mandir}/man[1-8]/perf*
%{_sysconfdir}/bash_completion.d/perf
#{_datadir}/perf-core/strace/groups/*
%{_datadir}/doc/perf-tip/*.txt
%endif

############################################################################

%if %{build_headers}
%package -n kernel-headers
Summary:	Linux kernel header files mostly used by your C library
Group:		System/Kernel and hardware
Provides:	linux-userspace-headers = %{EVRD}
Provides:	kernel-release-headers = %{EVRD}

%description -n kernel-headers
C header files from the Linux kernel. The header files define
structures and constants that are needed for building most
standard programs, notably the C library.

This package is not suitable for building kernel modules, you
should use the 'kernel-devel' package instead.

%files -n kernel-headers
%{_includedir}/*
%if %{build_perf}
%exclude %{_includedir}/perf/perf_dlfilter.h
%endif
%endif

############################################################################

%if %{with uml}
%package uml
Summary:	User Mode Linux binary
Group:		System/Kernel and hardware
Provides:	kernel-uml = %{kverrel}
Provides:	kernel-uml-%{flavour} = %{kverrel}
Provides:	installonlypkg(kernel) = %{EVRD}.uml

%description uml
User Mode Linux binary.
Stripped, debug is in %{name}-debuginfo.

%files uml
%{_bindir}/linux-uml-%{kver_full}

#-----------------------------------------------------------------------------

%package uml-modules
Summary:	User Mode Linux (UML) kernel modules
Group:		System/Kernel and hardware
Provides:	kernel-uml-modules = %{kverrel}
Provides:	kernel-uml-modules-%{flavour} = %{kverrel}
Provides:	installonlypkg(kernel-module) = %{EVRD}.uml

%description uml-modules
User Mode Linux (UML) kernel modules:
- not compressed;
- not stripped;
- signed.

%files uml-modules
%{_modulesdir}-uml/%{kver_full}

%endif
# End of uml

#-----------------------------------------------------------------------------

###############################
# Extra modules package definitions

%if %{with binary_extra_modules}
# "-r xxx-blacklist" was not added for modules bellow because
# blacklisted modules have not appeared in upstream yet
%ifarch %{x86_64}
%kroko_kmod_pkg -r %{kroko_release} -j %{nvidia_615_j} -n %{nvidia_615_n} -f %{flavour} -t proprietary -k %{kernelversion}.%{patchlevel} -m %{sublevel} -p %{kver_full} -s %{NAME} -c %{kmod_suffix}
%kroko_kmod_pkg -r %{kroko_release} -j %{nvidia_615_j} -n %{nvidia_615_n} -f %{flavour} -t open -k %{kernelversion}.%{patchlevel} -m %{sublevel} -p %{kver_full} -s %{NAME} -c %{kmod_suffix}
%endif
%ksob_mk_module_pkg -n xt_TRIPSO -s net -r tripso
%ksob_mk_module_pkg -n xt_so -s net -r ipt-so
%ksob_mk_module_pkg -n nwfermi -s drivers/input
%ksob_mk_module_pkg -n v4l2loopback -s drivers/media -r v4l2loopback
%ksob_mk_module_pkg -n hotfix-kvadra-touchpad -s extra -r hotfix-kvadra-touchpad-forceload

%if %{with binary_shredder}
%ksob_mk_module_pkg -n shredder-kernel -s extra -r rosa-shredder-user
%endif

#-----------------------------------------------------------------------------

###############
# Virtualbox host

%if %{with binary_virtualbox_host}
%ksob_mk_module_pkg -n vboxnetflt -s misc
%ksob_mk_module_pkg -n vboxnetadp -s misc
%ksob_mk_module_pkg -n vboxdrv -s misc
%ksob_mk_module_pkg -n vboxpci -s misc

# A package which will pull all those modules
%package -n kernel-modules-virtualbox-host-%{ksob_kernel}
Summary:	Meta package to pull VirtualBox host kernel modules for kernel-%{flavour}-%{kernelversion}.%{patchlevel}
Group:		System/Kernel and hardware
Requires:	%ksob_module_pkg_name vboxnetflt
Requires:	%ksob_module_pkg_name vboxnetadp
Requires:	%ksob_module_pkg_name vboxdrv
Requires:	%ksob_module_pkg_name vboxpci

%description -n kernel-modules-virtualbox-host-%{ksob_kernel}
Meta package to pull VirtualBox host kernel modules for %{name}.

%files -n kernel-modules-virtualbox-host-%{ksob_kernel}
# empty
%endif
#End of ifarch x86

#-----------------------------------------------------------------------------

%if %{with nickel}
%ksob_mk_module_pkg -n nlkm -s misc
%ksob_mk_module_pkg -n memfreetest -s misc
%ksob_mk_module_pkg -n pcietest -s misc
%endif

%endif
# End of binary_extra_modules

#################################################################

%if %{with flow_abi}
%package -n kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
Summary:	Directory to install third-party binary kernel modules for kernels %{kernelversion}.%{patchlevel}.x
Group:		System/Kernel and hardware

%description -n kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
This package contains a directory to install third-party binary kernel modules for kernels %{kernelversion}.%{patchlevel}.x.
Some vendors provide binary-only kernel modules. They can put them into %{_modulesdir}/%{kernelversion}.%{patchlevel}-rosa-flow-abi.
kmod tools will find them for kernels 5.4.x of "generic" and "nickel" flavours
but there is no guarantee that these modules will load and work correctly on
newer or older kernels then the ones they were build against.

We call this "flow ABI" because most ABIs are not changed between %{kernelversion}.%{patchlevel}.x releases,
but there are no specific guarantees. ABI may evolve and change.
We highly recommend to use DKMS and build third-party kernel modules from source for every kernel!
This package does nothing, just owns a directory for third-party binary kernel modules.

%files -n kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
%{_modulesdir}/%{kernelversion}.%{patchlevel}-rosa-flow-abi
%endif
# End of flow_abi

################################################

%prep
# Avoid accidental merge
%if 0%{?rpm5}
%{error:Package structure is for dnf, not for urpmi!}
%endif

%setup -q -n %{top_dir_name} -c

%if %{with uml}
cp -r %{src_dir} %{src_dir}.uml
%endif
cd %{src_dir}

%autopatch -p1
grep -Irl /lib/modules | xargs sed -i -e 's,/lib/modules,%{_modulesdir},g' -e 's,/usr/usr/lib/modules,/usr/lib/modules,g'

#
# Setup Begin
#

##################################
# Kernel configuration

echo "Creating the kernel configuration file."

# Configs
cp %{SOURCE111} .
cp %{SOURCE112} .
cp %{SOURCE113} .
cp %{SOURCE114} .
cp %{SOURCE115} .
cp kernel-%{arch_suffix}.config .config

touch %{build_dir}/.config.append

# Get rid of unwanted files
find . -name '*~' -o -name '*.orig' -o -name '*.append' -delete
# Wipe all .gitignore/.get_maintainer.ignore files
find . -name "*.g*ignore" -delete

# adapt for non-usr-moved platforms
%if %{without fail}
%if %{mdvver} < 202310
sed -i -e 's,/usr/sbin/,/sbin/,g' .config
%endif
%endif

# Disable debug info if requested (enabled by default)
%if ! %build_debug
sed -i -e '/CONFIG_DEBUG_INFO/d' -e '/CONFIG_GDB_SCRIPTS/d' .config
echo '# CONFIG_DEBUG_INFO is not set' >> %{build_dir}/.config.append
echo '# CONFIG_GDB_SCRIPTS is not set' >> %{build_dir}/.config.append
%endif

sed -i '/CONFIG_MODULE_SIG_FORCE/d' .config
%if %{with oblig_signed_modules}
# Disallow loading not signed modules
# But 0001-ROSA-ima-allow-to-off-modules-signature-check-dynami.patch allows to override this in cmdline
echo CONFIG_MODULE_SIG_FORCE=y >> %{build_dir}/.config.append
%else
echo CONFIG_MODULE_SIG_FORCE=n >> %{build_dir}/.config.append
%endif

sed -i '/CONFIG_MODULE_SIG_KEY/d' .config
# Set path to the key that will be generated later by openssl/libressl
echo CONFIG_MODULE_SIG_KEY=\"%{certs_signing_key_priv_rnd}\" >> %{build_dir}/.config.append

# Set path to one PEM file with all keys that the kernel must trust
sed -i '/CONFIG_SYSTEM_TRUSTED_KEYS/d' .config
echo CONFIG_SYSTEM_TRUSTED_KEYS=\"%{certs_public_keys}\" >> %{build_dir}/.config.append

# Memory wiping
# Introduced in kernel 5.3 by commit 6471384af2a6530696fc0203bafe4de41a23c9ef
# Estimated performance impact is described in the commit
# "Fill newly allocated pages and heap objects with zeroes."
# To enable, add to cmdline: init_on_alloc=1
sed -i '/CONFIG_INIT_ON_ALLOC_DEFAULT_ON/d' .config
echo CONFIG_INIT_ON_ALLOC_DEFAULT_ON=n >> %{build_dir}/.config.append
# "Fill freed pages and heap objects with zeroes"
# To disable, add to cmdline: init_on_free=0
sed -i '/CONFIG_INIT_ON_FREE_DEFAULT_ON/d' .config
%if %{with nickel}
echo CONFIG_INIT_ON_FREE_DEFAULT_ON=y >> %{build_dir}/.config.append
%else
echo CONFIG_INIT_ON_FREE_DEFAULT_ON=n >> %{build_dir}/.config.append
%endif
# Here enabling only either only init_on_free or only init_on_alloc
# makes sense; init_on_alloc is not about protecting information.

# To load kernel keyring in UML
for i in STREEBOG SHA1 SHA256 SHA512 ECRDSA RSA ; do
	if ! grep -q "^CONFIG_CRYPTO_${i}=y$" .config; then
		sed -i "/CONFIG_CRYPTO_${i}/d" .config
		echo "CONFIG_CRYPTO_${i}=y" >> %{build_dir}/.config.append
	fi
done

cat %{build_dir}/.config.append >> .config

##################
# End of kernel config


# Store the config file in the appropriate directory.
CONFIG_DIR=arch/%{arch_type}/configs
mkdir -p "${CONFIG_DIR}"

cfg_file=arch/%{arch_type}/configs/%{arch_suffix}_defconfig-%{flavour}

make ARCH=%{arch_type} oldconfig
# When it is needed to edit kernel configs, run:
# abf fetch
# rpmbuild --define "_sourcedir $PWD" --with=fail -bb kernel.spec
# and then work with the config in the buildroot with applied patches etc.
%{?_with_fail:exit 1}
mv .config ${cfg_file}
echo "Created ${cfg_file}."

# Make sure that package version matches the reality
test "$(grep '^VERSION =' Makefile | awk '{print $NF}')" = %{kernelversion}
test "$(grep '^PATCHLEVEL =' Makefile | awk '{print $NF}')" = %{patchlevel}
test "$(grep '^SUBLEVEL =' Makefile | awk '{print $NF}')" = %{sublevel}

# Get rid of unwanted files
find . -name '*~' -o -name '*.orig' -o -name '*.append' | %kxargs rm -f
find . -name '.get_maintainer.ignore' | %kxargs rm -f

# Versionize python shebang (#!/usr/bin/env python -> #!/usr/bin/python3) in scripts
grep -Irl '^#!/usr/bin/env python' | xargs sed -i '1 s,^#!/usr/bin/env python$,#!%{__python3},'

# Drop env from bash scripts
sed -i '1 s,^#!.*env .*,#!%{_bindir}/bash,' scripts/config

# Drop env from perl scripts
grep -IrlE '^#!.*env perl' | xargs sed -i -e '1 s,^#!/usr/bin/env perl$,#!{_bindir}/perl,'

# Franckly, Under Closer looK on other modules, it was probably a bad idea to move this header in 6.12
mkdir -pv "%{src_dir}/include/asm"
ln -s ../linux/unaligned.h "%{src_dir}/include/asm/unaligned.h"

############################################################################

%build
# Ensure that build time generated private keys don't get published
# as e.g. "RPM build root" on ABF!
# Note that ABF sends SIGKILL to rpm-build.sh when the build is terminated;
# in this case trap will not work, but RPM build root also will not be
# saved because rpm-build.sh saves it, but it is SIGKILLed.
# For best security we could store private keys in RAM (not reachable from
# filesystem, so not in /tmp!) and override sth like fopen() by LD_PRELOAD
# to give the content of keys from RAM when a virtual address of a key file
# is accessed, but currently I don't know how to implement this (TODO: ).
_cleanup(){
# Show resulting kernel public keys for debugging
	cat "%{src_dir}/%{certs_dir_rnd}/x509_certificate_list" | base64 -d || :
	rm -fvr "%{src_dir}/%{certs_dir_rnd}"
%if %{with uml}
	cat "%{src_dir}.uml/%{certs_dir_rnd}/x509_certificate_list" | base64 -d || :
	rm -fvr "%{src_dir}.uml/%{certs_dir_rnd}"
%endif
}
# Make a trap to delete keys even if %%build fails in the middle
trap "_cleanup" EXIT

rm -rf %{temp_root}
install -d %{temp_root}

cd %{src_dir}

### Keys for signing kernel modules
# Keys can be generated both manually and automatically,
# let's generate them by ourselves to take full control of the process
# https://www.ibm.com/support/knowledgecenter/en/SSB23S_1.1.0.13/gtps7/cfgcert.html
# See also certs/Makefile in kernel source
mkdir -p "%{certs_dir_rnd}"

# On ABF, %%packager == $username <$email>
# Try to extract email from %%packager if it is set
_get_email(){
	# Check that macro %%packager was set and is not empty
	if echo '%{packager}' | grep -q 'packager}$' || [ -z "%{packager}" ]
		# If was not set or is empty, use default email
		then echo 'rpmbuild@rosa.unknown' && return
		# Otherwise try to extract email from 'name <email>' or sth else
		else temp="$(echo '%{packager}' | tr '[:upper:]' '[:lower:]' | tr ' ' '\n' | tr -d '<>' | grep -E '@.*\..*' | head -n 1)"
	fi
	# Validate that what we have now is a valid email
	# https://stackoverflow.com/a/2138832, https://stackoverflow.com/a/41192733
	# Note that we set %%_buildshell to /bin/bash to guarantee the work of this bashism
	regex_email="^[a-z0-9!#\$%&'*+/=?^_\`{|}~-]+(\.[a-z0-9!#$%&'*+/=?^_\`{|}~-]+)*@([a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]([a-z0-9-]*[a-z0-9])?\$"
	if [[ "$temp" =~ ${regex_email} ]]
		# If it is, use it
		then echo "$temp" && return
		# Otherwise use default email
		else echo 'rpmbuild@rosa.unknown' && return
	fi
	# If script above has not return'ed for any reason,
	# e.g. because of non-bash shell being not able to
	# process regexp, use default email
	echo 'rpmbuild@rosa.unknown'
}
email="$(_get_email)"

cat <<EOF > "%{certs_key_config_rnd}"
[ req ]
prompt = no
string_mask = utf8only
#default_keyfile = %%{certs_signing_key_priv_rnd}
distinguished_name = req_distinguished_name
x509_extensions = myexts
[ req_distinguished_name ]
organizationName = %{vendor} rpmbuild
commonName = Build time autogenerated @ALGO@ kernel key
emailAddress = ${email}
[ myexts ]
basicConstraints=critical,CA:FALSE
keyUsage=digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid
EOF
cat "%{certs_key_config_rnd}"
sed -e 's,@ALGO@,RSA,g' "%{certs_key_config_rnd}" > "%{certs_key_config_rnd}.RSA"
sed -e 's,@ALGO@,GOST R 34.10-2012,g' "%{certs_key_config_rnd}" > "%{certs_key_config_rnd}.GOST"
# Avoid using the template
rm -f "%{certs_key_config_rnd}"

_libressl_gen_key(){
	if [ "$GOST_KEY" = 1 ]
	then
		lssl_req_gost_args="\
			-newkey gost2001 \
			-pkeyopt dgst:streebog512 -pkeyopt paramset:A \
			-streebog512"
		OUT="%{certs_signing_key_priv_rnd}.GOST"
		CONFIG="%{certs_key_config_rnd}.GOST"
	else
		lssl_req_gost_args=""
		OUT="%{certs_signing_key_priv_rnd}.RSA"
		CONFIG="%{certs_key_config_rnd}.RSA"
	fi
		libressl req -new -nodes -utf8 -batch \
			$lssl_req_gost_args \
			-days 109500 \
			-x509 -config "$CONFIG" \
			-out "$OUT" \
			-keyout "$OUT"

	# Verify
	if [ "$GOST_KEY" = 1 ]; then
		libressl x509 -in "%{certs_signing_key_priv_rnd}.GOST" -text -noout \
			| grep -E 'Signature Algorithm:.*GOST R 34.10-2012'
		libressl x509 -in "%{certs_signing_key_priv_rnd}.GOST" -text -noout \
			| grep -E 'Digest Algorithm:.*GOST R 34-11-2012'
		libressl x509 -in "%{certs_signing_key_priv_rnd}.GOST" -text -noout \
			| grep -E 'Public Key Algorithm:.*GOST R 34.10-2012'
	fi
}

GOST_KEY=0 _libressl_gen_key
GOST_KEY=1 _libressl_gen_key
# Fake CONFIG_MODULE_SIG_KEY to make build scripts happy
cp -v "%{certs_signing_key_priv_rnd}.RSA" "%{certs_signing_key_priv_rnd}"

# Strip public parts from the generated PEMs
sed -n \
	'/^-----BEGIN CERTIFICATE-----$/,/^-----END CERTIFICATE-----$/p' \
	"%{certs_signing_key_priv_rnd}.GOST" \
	"%{certs_signing_key_priv_rnd}.RSA" \
	> "%{certs_public_keys}"

%if %{with additional_keys}
# Add additional public RSA keys to the list of trusted keys for kernel modules
# Build kernel --without additional_keys if you do not want to trust them
cat %{expand:%(for i in `seq 1 12`; do echo "%%SOURCE$((200+${i}))" | tr "\n" " "; done)} \
	>> "%{certs_public_keys}"
%endif
# End of additional_keys
cat %{certs_public_keys}

# .config
%smake -s mrproper
cp arch/%{arch_type}/configs/%{arch_suffix}_defconfig-%{flavour} .config

# Make sure EXTRAVERSION says what we want it to say
LC_ALL=C sed -ri "s/^EXTRAVERSION.*/EXTRAVERSION = -%{flavour}-%{buildrpmrel}/" Makefile

# Build the kernel
echo "Building kernel %{kver_full}"

TARGETS="all"
# need to install dtbs to proper boot arm64/riscv64 devices
%ifarch %{armx} riscv64
	TARGETS="$TARGETS dtbs"
%endif

%kmake V=1 -s $TARGETS

# Install modules
mkdir -p %{temp_modules}/%{kver_full}
%smake INSTALL_MOD_PATH=%{temp_root} KERNELRELEASE=%{kver_full} modules_install

%if %{with binary_extra_modules}
# Build and install procedure is specific to each Makefile from kernel-source-* packages
# See also: https://www.kernel.org/doc/html/latest/kbuild/modules.html
# Copy directory because write permissions are required
# `make modules_install` must be done before this, otherwise these copied files will be deleted
_build_nvidia(){
	local t="${2:-}"
	test -n "$t" && t="-$t"
	cp -r "$(rpm -q --qf "/usr/src/nvidia${1}${t}-%%{VERSION}-%%{RELEASE}" kernel-source-nvidia${1}${t})" kernel-source-nvidia${1}${t}
	pushd kernel-source-nvidia${1}${t}
	%make_build SYSSRC=%{src_dir}
	mkdir -p %{temp_modules}/%{kver_full}/kernel/drivers/video/nvidia${1}${t}.%{kroko_release}
	# put them here to extract debug and compress, will be moved later
	install -m0644 $(find . -name '*.ko') %{temp_modules}/%{kver_full}/kernel/drivers/video/nvidia${1}${t}.%{kroko_release}/"$i"
	popd
	rm -fr kernel-source-nvidia${1}${t}
	# for rosa-kernel-tools
	mkdir -p %{temp_root}/var/spool/initramfs-regen
	touch %{temp_root}/var/spool/initramfs-regen/nvidia${1}${t}.%{kroko_release}
}

%ifarch %{x86_64}
_build_nvidia 615 proprietary
_build_nvidia 615 open
%endif

cp -r "$(rpm -q --qf '/usr/src/tripso-%%{VERSION}-%%{RELEASE}' kernel-source-tripso)" kernel-source-tripso
pushd kernel-source-tripso
%kmake KDIR=%{src_dir}
mkdir -p %{temp_modules}/%{kver_full}/kernel/net
cp xt_TRIPSO.ko %{temp_modules}/%{kver_full}/kernel/net/
popd
rm -fr kernel-source-tripso

cp -r "$(rpm -q --qf '/usr/src/ipt-so-%%{VERSION}-%%{RELEASE}' kernel-source-ipt-so)" kernel-source-ipt-so
pushd kernel-source-ipt-so
%kmake KDIR=%{src_dir}
mkdir -p %{temp_modules}/%{kver_full}/kernel/net
cp xt_so.ko %{temp_modules}/%{kver_full}/kernel/net/
popd
rm -fr kernel-source-ipt-so

cp -r "$(rpm -q --qf '/usr/src/nwfermi-%%{VERSION}-%%{RELEASE}' kernel-source-nwfermi)" kernel-source-nwfermi
pushd kernel-source-nwfermi
#%%kmake KERNEL_SOURCE=%{src_dir}
make -C %{src_dir} M="$PWD" modules
mkdir -p %{temp_modules}/%{kver_full}/kernel/drivers/input
cp nwfermi.ko %{temp_modules}/%{kver_full}/kernel/drivers/input/
popd
rm -fr kernel-source-nwfermi

%if %{with binary_shredder}
cp -r "$(rpm -q --qf '/usr/src/shredder-kernel-%%{VERSION}-%%{RELEASE}' kernel-source-shredder-kernel)" kernel-source-shredder-kernel
pushd kernel-source-shredder-kernel
%kmake KERNEL_PATH=%{src_dir}
mkdir -p %{temp_modules}/%{kver_full}/kernel/extra/
cp shredder-kernel.ko %{temp_modules}/%{kver_full}/kernel/extra/
popd
rm -fr kernel-source-shredder-kernel
%endif

%if %{with binary_virtualbox_host}
# build commands for virtualbox are based on the ones from the virtualbox package
cp -r "$(rpm -q --qf '/usr/src/virtualbox-%%{VERSION}-%%{RELEASE}' kernel-source-virtualbox)" kernel-source-virtualbox
mkdir -p %{temp_modules}/%{kver_full}/kernel/misc/
pushd kernel-source-virtualbox
make -C vboxdrv KERN_DIR=%{src_dir} KERN_VER=%{kver_full}
cp -fv vboxdrv/Module.symvers vboxnetflt
cp -fv vboxdrv/Module.symvers vboxnetadp
make -C vboxnetflt KERN_DIR=%{src_dir} KERN_VER=%{kver_full}
make -C vboxnetadp KERN_DIR=%{src_dir} KERN_VER=%{kver_full}
cp -fv vboxnetadp/Module.symvers vboxpci/
make -C vboxpci KERN_DIR=%{src_dir} KERN_VER=%{kver_full}
for i in vboxnetflt vboxnetadp vboxdrv vboxpci
do
	cp -v "${i}/${i}.ko" %{temp_modules}/%{kver_full}/kernel/misc/
done
popd
%endif

cp -r "$(rpm -q --qf '/usr/src/v4l2loopback-%%{VERSION}-%%{RELEASE}' kernel-source-v4l2loopback)" kernel-source-v4l2loopback
pushd kernel-source-v4l2loopback
cat Kbuild > Makefile
mkdir -p %{temp_modules}/%{kver_full}/kernel/drivers/media
make -C %{src_dir} M="$PWD" modules
cp v4l2loopback.ko %{temp_modules}/%{kver_full}/kernel/drivers/media
pushd
rm -fr kernel-source-v4l2loopback

cp -r "$(rpm -q --qf '/usr/src/hotfix-kvadra-touchpad-%%{VERSION}-%%{RELEASE}' kernel-source-hotfix-kvadra-touchpad)" kernel-source-hotfix-kvadra-touchpad
pushd kernel-source-hotfix-kvadra-touchpad
make -C %{src_dir} M="$PWD" modules
mkdir -p %{temp_modules}/%{kver_full}/kernel/extra/
cp hotfix-kvadra-touchpad.ko %{temp_modules}/%{kver_full}/kernel/extra/
popd
rm -fr kernel-source-hotfix-kvadra-touchpad

%if %{with nickel}
# rosa-test-suite uses /sr/src/xxx-version, not /usr/src/xxx-version-release
cp -r "$(rpm -q --qf '/usr/src/rosa-test-suite-%%{VERSION}' kernel-source-rosa-test-suite)" kernel-source-rosa-test-suite
pushd kernel-source-rosa-test-suite
mkdir -p %{temp_modules}/%{kver_full}/kernel/misc/
for i in nlkm memfreetest pcietest
do
cat << EOF > Makefile
obj-m := ${i}.o
all:
	make -C %{src_dir} M=\$(PWD) modules
EOF
%kmake
cp -fv ${i}.ko %{temp_modules}/%{kver_full}/kernel/misc/
done
popd
%endif
# End with nickel <- with binary_extra_modules

%endif
# End with binary_extra_modules

%if %{with uml}
cp -rv %{certs_dir_rnd} %{src_dir}.uml/
pushd %{src_dir}.uml
%kmake ARCH=um defconfig
%kmake ARCH=um linux
install -Dm0755 linux %{temp_root}%{_bindir}/linux-uml-%{kver_full}
#rm -fv linux
%kmake V=1 ARCH=um modules
mkdir -p %{temp_root}%{_modulesdir}-uml/%{kver_full}/
%kmake ARCH=um INSTALL_MOD_PATH=%{temp_root}%{_modulesdir}-uml/%{kver_full}/ modules_install
popd
%endif

install -d %{temp_boot}
install -m 644 System.map %{temp_boot}/System.map-%{kver_full}
install -m 644 .config %{temp_boot}/config-%{kver_full}
%if %{with modxz}
xz -c Module.symvers > %{temp_boot}/symvers-%{kver_full}.xz
%else
%{zstd_cmd} Module.symvers
install -m 644 Module.symvers.zst %{temp_boot}/symvers-%{kver_full}.zst
%endif

%ifarch %{armx} riscv64
%make_build ARCH=%{arch_type} V=1 INSTALL_DTBS_PATH=%{temp_boot}/dtb-%{kver_full} dtbs_install
%endif

%ifarch aarch64 riscv64
	cp -f arch/%{arch_type}/boot/Image* %{temp_boot}/vmlinuz-%{kver_full}
%else
%ifarch loongarch64
	cp -f arch/%{arch_type}/boot/vmlinuz.efi %{temp_boot}/vmlinuz-%{kver_full}
%else
	cp -f arch/%{arch_type}/boot/bzImage %{temp_boot}/vmlinuz-%{kver_full}
%endif
%endif

# Headers
%if %{build_headers}
%make_build INSTALL_HDR_PATH=%{temp_root}%{_prefix} KERNELRELEASE=%{kver_full} headers_install
find %{temp_root}%{_prefix} -name .install -or -name ..install.cmd | %kxargs rm -f
%endif

# Remove /lib/firmware, we use a separate linux-firmware package
rm -rf %{temp_root}/lib/firmware

# Prepare the files for kernel*-devel
%if %{build_devel}

mkdir -p %{temp_devel_root}
for i in $(find . -name 'Makefile*'); do cp -R --parents $i %{temp_devel_root}; done
for i in $(find . -name 'Kconfig*' -o -name 'Kbuild*'); do cp -R --parents $i %{temp_devel_root}; done

cp -fR include %{temp_devel_root}

cp -fR scripts %{temp_devel_root}
cp -fR kernel/bounds.c %{temp_devel_root}/kernel
cp -fR kernel/time/timeconst.bc %{temp_devel_root}/kernel/time
cp -fR tools %{temp_devel_root}/
cp -fR arch/%{arch_type}/kernel/asm-offsets.{c,s} %{temp_devel_root}/arch/%{arch_type}/kernel/
%ifarch %{ix86} %{x86_64}
cp -fR arch/%{arch_type}/kernel/asm-offsets_{32,64}.c %{temp_devel_root}/arch/%{arch_type}/kernel/
cp -fR arch/%{arch_type}/purgatory/* %{temp_devel_root}/arch/%{arch_type}/purgatory/
# Needed for arch/x86/purgatory
cp -fR lib/*.h lib/*.c %{temp_devel_root}/lib/
cp -fR arch/%{arch_type}/entry/syscalls/syscall* %{temp_devel_root}/arch/%{arch_type}/entry/syscalls/
cp -fR arch/%{arch_type}/tools %{temp_devel_root}/arch/%{arch_type}/
# needed for kexec
cp -fR arch/%{arch_type}/boot/*.h %{temp_devel_root}/arch/%{arch_type}/boot/
cp -fR arch/%{arch_type}/boot/*.c %{temp_devel_root}/arch/%{arch_type}/boot/
%endif
cp -fR arch/%{arch_type}/include %{temp_devel_root}/arch/%{arch_type}/
cp -fR .config Module.symvers %{temp_devel_root}

# Needed for truecrypt build (Danny)
cp -fR drivers/md/dm.h %{temp_devel_root}/drivers/md/

# Needed for lirc_gpio (#39004)
cp -fR drivers/media/pci/bt8xx/bttv{,p}.h %{temp_devel_root}/drivers/media/pci/bt8xx/
cp -fR drivers/media/pci/bt8xx/bt848.h %{temp_devel_root}/drivers/media/pci/bt8xx/

# Add acpica header files, needed for fglrx build
cp -fR drivers/acpi/acpica/*.h %{temp_devel_root}/drivers/acpi/acpica/

%if %{with aufs}
# aufs2 has a special file needed
cp -fR fs/aufs/magic.mk %{temp_devel_root}/fs/aufs
%endif

# SELinux needs security/selinux/include
cp -fR security/selinux/include %{temp_devel_root}/security/selinux

for i in alpha arc avr32 blackfin c6x cris csky frv h8300 hexagon ia64 m32r m68k m68knommu metag microblaze \
	mips mn10300 nds32 nios2 openrisc parisc powerpc s390 score sh sparc tile unicore32 xtensa; do
	rm -rf %{temp_devel_root}/arch/$i
done

# Clean the scripts tree, and make sure everything is ok (sanity check)
# running prepare+scripts (tree was already "prepared" in build)
pushd %{temp_devel_root}
	%smake V=1 -s clean ARCH=%{arch_type}
popd

rm -f %{temp_devel_root}/.config.old

# Fix permissions
chmod -R a+rX %{temp_devel_root}

# Disable mrproper in -devel rpms
#patch -p1 --fuzz=0 -d %{temp_devel_root} -i %{SOURCE2}
%endif
# End of build_devel


# TODO: maybe move to /usr/lib/debug?
%if %{build_debug}
find %{temp_modules}/%{kver_full}/kernel \
	-name "*.ko" | \
	%kxargs -I '{}' objcopy --only-keep-debug '{}' '{}'.debug
find %{temp_modules}/%{kver_full}/kernel \
	-name "*.ko" | %kxargs -I '{}' \
	sh -c 'cd `dirname {}`; \
		objcopy --add-gnu-debuglink=`basename {}`.debug \
		--strip-debug `basename {}`'
%endif
# End of build_debug
%if %{with binary_extra_modules}
# https://patchwork.kernel.org/patch/11446123/
_libressl_sign(){
	if [ ! -f "$1" ]; then
		echo "No file $1"
		return 0
	fi
	f="$1"
%if %{with gost_sign}
	sign-file streebog512 \
		"%{certs_signing_key_priv_rnd}.GOST" "%{certs_signing_key_priv_rnd}.GOST" "$f"
%else
	sign-file sha512 \
		"%{certs_signing_key_priv_rnd}.RSA" "%{certs_signing_key_priv_rnd}.RSA" "$f"
%endif
	unset f
}
export -f _libressl_sign
find %{temp_modules}/%{kver_full}/kernel \
%if %{with uml}
	%{temp_root}%{_modulesdir}-uml/%{kver_full} \
%endif
-name '*.ko' -print0 | sort -u | \
	xargs --null -P "$(nproc)" -I {} "$SHELL" -e -x -c 'if ! _libressl_sign "{}"; \
		then echo Failed _libressl_sign on "{}" && exit 1; fi'
%endif
# Set extraversion to match srpm to get nice version reported by the tools
LC_ALL=C sed -ri "s/^EXTRAVERSION.*/EXTRAVERSION = -%{fullrpmrel}/" Makefile

%if %{build_perf}
%smake -C tools/perf -s PYTHON=%{__python3} HAVE_CPLUS_DEMANGLE=1 WERROR=0 prefix=%{_prefix} lib=%{_lib} NO_GTK2=1 all
%smake -C tools/perf -s prefix=%{_prefix} lib=%{_lib} NO_GTK2=1 man
%endif

%if %{with bpftool}
%smake -C tools/bpf/bpftool CC=%{__cc} HOSTCC=%{__cc} ARCH=%{arch_type} LLVM=1 DESTDIR="%{temp_root}" V=0 VERBOSE=0
%smake -C tools/bpf/bpftool DESTDIR="%{temp_root}" prefix=%{_prefix} bash_compdir=%{_sysconfdir}/bash_completion.d/ mandir=%{_mandir} ARCH=%{arch_type} install V=0 VERBOSE=0
%endif

_cleanup

############################################################################

%install
cd %{src_dir}

# TODO: get rid of temporary directory, install to buildroot directly?
# We want to be able to test several times the install part
rm -rf %{buildroot}
cp -a %{temp_root} %{buildroot}

%if %{with gost_sign}
# Multithreaded verification that every kernel module has a signature attached to it
mkdir -p "%{certs_dir_rnd}"
touch %{certs_verify_tmp}
_verify_signature(){
	if [ -z "$1" ] || [ ! -f "$1" ]; then return; fi
	if hexdump -C "$1" | rev | cut -f 2 -d '|' | rev | tr -d '\n' | grep -q '~Module signature appended~'; then
		if [ -f %{certs_verify_tmp} ]; then
			rm -f %{certs_verify_tmp}
		fi
	else
		echo "ERROR: Module $1 has no signature attached to it!"
		exit 1
	fi
}
export -f _verify_signature
find %{target_modules} \
%if %{with uml}
	%{buildroot}%{_modulesdir}-uml/%{kver_full} \
%endif
-name '*.ko' -print0 | sort -u | \
	xargs --null -P "$(nproc)" -I {} "$SHELL" -c '_verify_signature "{}"'
if [ -f %{certs_verify_tmp} ]; then
	echo "ERROR: seems that signatures of none modules were verified!"
	exit 1
fi
rm -f %{certs_verify_tmp}
%endif

# Compressing modules
%if %{with compress_modules}
# Tested on /lib/modules/5.10.34-generic-2rosa2019.1-x86_64, the results are the following:
# * decompressed: 266.3 MiB
# * xz -9 --extreme: 67.8 MiB
# * zstd --ultra -22 without training: 73.5 MiB
# * zstd -6 without training: 79.6 MiB
# * zstd --ultra -22 with training: 66.3 MiB (the winner!)
# Training takes only a few minutes, make it here in place with current zstd and kernel modules.
# But! Decompressing also requires a dictionary for zstd, that will be too complex, so not using training :(
# We already use zstd in dracut to compress initrds quickly and with good compression ration.
# Testing speed of loading modules:
# `time modinfo bcache.ko.xz` took 0,048s, `time modinfo bcache.ko.zstd` took 0,014s (for multiple times)
# find /lib/modules/5.10.34-generic-2rosa2019.1-x86_64 -type f -name '*.ko.zst' > /tmp/zst.list
# time { for i in `cat /tmp/zst.list`; do modinfo $i >/dev/null 2>&1; done ;}
# took ~31-40s, with disk cache (2+ runs) ~33s
# find /lib/modules/5.10.34-generic-1rosa2019.1-x86_64 -type f -name '*.ko.xz' > /tmp/xz.list
# time { for i in `cat /tmp/xz.list`; do modinfo $i >/dev/null 2>&1; done ;}
# took 43-47s, with disk cache (2+ runs) ~42s, +21%%
# zstd-compressed initramfs image initrd-5.10.34-generic-1rosa2019.1-x86_64.img with *.ko.xz is 56,3 MiB
# zstd-compressed initramfs image initrd-5.10.34-generic-2rosa2019.1-x86_64.img with *.ko.zst is 58,4 MiB (+3.6%%)
# /lib/modules/5.10.34-generic-1rosa2019.1-x86_64 (*.ko.xz) is 78,1 MiB
# /lib/modules/5.10.34-generic-2rosa2019.1-x86_64 (*.ko.zst) is 83,9 MiB (+7%%)
# When zstd is compressing cpio (initrd image) with zstd-compressed kernel modules inside it, does it recompress data?
# It is not easy to make a choice between zstd and xz for kernel modules... Disk space (and so speed of installing
# RPM packages) is not much bigger, we do not try to support super low end devices, operation speed is a bit better.
# I have not seen measurable difference in startup time according to systemd-analyze.
# Note that decompression after zstd --ultra -22 will consume more memory than after zstd -6, see commit message in
# https://github.com/torvalds/linux/commit/73f3d1b48f5069d46b. I did not benchmark -6 vs -22 in runtime.
# Let's use zstd for now.
# zstd may also be used to compress linux-firmware to save a lot of space on disk,
# but upstream kernels still cannot decompress it.
#{zstd_cmd} -T0 --train $(find . -type f -name '*.ko')
#[ -f dictionary ]
# -T1 (one thread) because we run multiple zstd processes by xargs
%if %{with modxz}
find %{target_modules} -name "*.ko" | %kxargs xz -6e
%else
find %{target_modules} -name "*.ko" | %kxargs %{zstd_cmd} --rm -T1 #-D dictionary
rm -f dictionary
%endif
%endif

%if %{with binary_extra_modules}
# Move nvidia modules to manage them via alternatives(8), leave *.debug
# TODO: better handle debug here and in the package in general
find %{target_modules}/%{kver_full}/kernel/drivers/video -name 'nvidia???*' -type d -maxdepth 1 |
while read -r line
do
	nv="$(basename "$line")"
	mkdir -p %{buildroot}%{kroko_kmods_dir}/"$nv"-%{kver_full}
	mv -v "$line"/*.ko%{kmod_suffix} %{buildroot}%{kroko_kmods_dir}/"$nv"-%{kver_full}
	dir_no_buildroot="$(echo "$line" | sed -e 's,^%{buildroot},,')"
	echo "%exclude $dir_no_buildroot" >> %{kernel_files}
	%if %{build_debug}
	echo "%dir $dir_no_buildroot" >> %{debuginfo_files}
	%endif
done
%endif
#/with binary_extra_modules

find %{buildroot}%{_modulesdir}/%{kver_full} -type f -name '*.ko%{kmod_suffix}' | sed -e 's,^%{buildroot},,' | sort -u >> %{kernel_files}
find %{buildroot}%{_modulesdir}/%{kver_full} -type d | sed -e 's,^%{buildroot},%dir ,' | sort -u >> %{kernel_files}

# We estimate the size of the initramfs because rpm needs to take this size
# into consideration when performing disk space calculations (See rhbz#530778)
# 200 MiB is a bit more than needed, but let's be more sure that there is enough space.
# On my PC, zstd-compressed initrds take 170 MiB.
# Real size of the RPM package should not increase because RPM compresses the payload.
# This file is %%ghost, so the real initrd will be deleted when uninstalling this package.
# See also: kb#456
# https://kbr.rosa.ru/kanboard/?controller=TaskViewController&action=show&task_id=456&project_id=1
dd if=/dev/zero of=%{buildroot}%{initrd_path} bs=1M count=200

%if %{build_debug}
install -m 644 vmlinux %{buildroot}%{_bootdir}/vmlinux-%{kver_full}
find %{buildroot}%{_modulesdir} -type f -name '*.debug' | sed -e 's,^%{buildroot},,' | sort -u >> %{debuginfo_files}
%endif
# End of build_debug

pushd %{target_modules}
for i in *; do
	rm -f $i/build $i/source
	ln -sf /usr/src/linux-$i $i/build
	ln -sf /usr/src/linux-$i $i/source
done

# Sniff, if we compressed all the modules, we change the stamp :(
# we really need the depmod -ae here
for i in *; do
	/usr/sbin/depmod -ae -b %{buildroot} -F %{target_boot}/System.map-$i $i
	echo $?
done

# We used to create modules.description files which contained the
# description strings for the modules as shown by modinfo. These files
# are unlikely to be used right now, so create them (in case some old tool
# checks for their existence) but keep them empty.
for i in *; do
	touch $i/modules.description
done
popd

# Need to set extraversion to match srpm again to avoid rebuild
LC_ALL=C sed -ri "s/^EXTRAVERSION.*/EXTRAVERSION = -%{fullrpmrel}/" Makefile

%if %{build_perf}
# Perf tool binary and supporting scripts/binaries
make -C tools/perf -s V=1 DESTDIR=%{buildroot} WERROR=0 HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} lib=%{_lib} install

# Versionize shebang (#!/usr/bin/env python -> #!/usr/bin/python3)
sed -i '1 s,^#!/usr/bin/env python$,#!%{__python3},' \
	%{buildroot}%{_libexecdir}/perf-core/scripts/python/exported-sql-viewer.py \
	%{buildroot}%{_libexecdir}/perf-core/scripts/python/libxed.py
sed -i -e '1s,^#!/usr/bin/python$,#!%{__python3},' \
	%{buildroot}%{_libexecdir}/perf-core/tests/shell/lib/perf_json_output_lint.py

# Perf man pages (note: implicit rpm magic compresses them later)
make -C tools/perf -s V=1 DESTDIR=%{buildroot} WERROR=0 HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install-man
%endif

# Delete junk
rm -fr %{buildroot}%{_usr}/src/*/kernel-source-*

%if %{with flow_abi}
# Prefix with "zzz" to put this directory into the end of search list
# and avoid tricks with depmod configs
mkdir -p %{buildroot}%{_modulesdir}/%{kernelversion}.%{patchlevel}-rosa-flow-abi
ln -s %{_modulesdir}/%{kernelversion}.%{patchlevel}-rosa-flow-abi %{buildroot}%{_modulesdir}/%{kver_full}/kernel/zzz-%{kernelversion}.%{patchlevel}-rosa-flow-abi
%endif

# Fix perms
%if %{build_perf}
chmod -x %{buildroot}%{_sysconfdir}/bash_completion.d/perf
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 61 |14mr|libcomps-0.1.24-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_with docs

%define major 0
%define libname %mklibname comps %{major}
%define devname %mklibname comps -d

Name:		libcomps
Version:	0.1.24
Release:	1
Summary:	Comps XML file manipulation library
Group:		System/Libraries
License:	GPLv2+
URL:		https://github.com/rpm-software-management/libcomps
Source0:	https://github.com/rpm-software-management/libcomps/archive/refs/tags/%{version}.tar.gz?/%{name}-%{version}.tar.gz
# Filters out rpmlint warnings
Source1:	libcomps.rpmlintrc
BuildRequires:	pkgconfig(zlib)
BuildRequires:	pkgconfig(libxml-2.0)
BuildRequires:	pkgconfig(check)
BuildRequires:	pkgconfig(expat)
BuildRequires:	pkgconfig(icu-i18n)
BuildRequires:	cmake
BuildRequires:	python3-setuptools
%if %{with docs}
BuildRequires:	doxygen
BuildRequires:	graphviz
%endif

# prevent provides from nonstandard paths:
%define __provides_exclude_from ^%{python3_sitearch}/.*\\.so$

%description
Libcomps is library for structure-like manipulation with content of
comps XML files. Supports read/write XML file, structure(s) modification.

%package -n %{libname}
Summary:	Libraries for %{name}
Group:		System/Libraries

%description -n %{libname}
Libraries for %{name}.

%package -n %{devname}
Summary:	Development files for libcomps library
Group:		Development/C
Provides:	%{name}-devel = %{EVRD}
Requires:	%{libname} = %{EVRD}

%description -n %{devname}
Development files for %{name}.

%if %{with docs}
%package doc
Summary:	Documentation files for libcomps library
Group:		Documentation
Requires:	%{name}-devel = %{EVRD}
BuildArch:	noarch
BuildRequires:	doxygen

%description doc
Documentation files for libcomps library.

%package -n python-libcomps-doc
Summary:	Documentation files for python bindings libcomps library
Group:		Documentation
Requires:	python-%{name} = %{EVRD}
BuildArch:	noarch
BuildRequires:	python3-sphinx

%description -n python-libcomps-doc
Documentation files for python bindings libcomps library.
%endif

%package -n python3-libcomps
Summary:	Python 3 bindings for libcomps library
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
Requires:	%{libname} = %{EVRD}

%description -n python3-libcomps
Python3 bindings for libcomps library.

%prep
%autosetup -p1

%build
%cmake \
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
%if %{without docs}
	-DENABLE_DOCS=OFF \
%endif
	-DENABLE_TESTS=OFF \
	../libcomps/

%make_build
%if %{with docs}
make docs
make pydocs
%endif

# (tpg) disable tests for now https://github.com/rpm-software-management/libcomps/issues/60
%if 0
%check
cd ./build
make test
cd -
%endif

%install
%make_install -C build

%files -n %{libname}
%{_libdir}/libcomps.so.%{major}*

%files -n %{devname}
%doc README.md COPYING
%{_libdir}/libcomps.so
%{_libdir}/pkgconfig/libcomps.pc
%{_includedir}/*

%if %{with docs}
%files doc
%doc build/docs/libcomps-doc/html

%files -n python-libcomps-doc
%doc build/src/python/docs/html
%endif

%files -n python3-libcomps
%{python3_sitearch}/*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 62 |14mr|libfastjson-1.2304.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 4
%define libname %mklibname fastjson %{major}
%define devname %mklibname fastjson -d

Summary:	Fast JSON parsing library, a fork of json-c
Name:		libfastjson
Version:	1.2304.0
Release:	2
License:	MIT
Group:		System/Libraries
Url:		https://github.com/rsyslog/libfastjson
Source0:	http://download.rsyslog.com/libfastjson/%{name}-%{version}.tar.gz

%description
A fast JSON parsing library, a fork of json-c, developed by the rsyslog team
and used for rsyslog and liblognorm.

#----------------------------------------------------------------------------

%package -n %{libname}
Summary:	Fast JSON parsing shared library
Group:		System/Libraries

%description -n %{libname}
A fast JSON parsing library, a fork of json-c, developed by the rsyslog team
and used for rsyslog and liblognorm.

%files -n %{libname}
%{_libdir}/libfastjson.so.%{major}*

#----------------------------------------------------------------------------

%package -n %{devname}
Summary:	Development files for libfastjson
Group:		Development/C
Requires:	%{libname} = %{EVRD}
Provides:	%{name}-devel = %{EVRD}

%description -n %{devname}
A fast JSON parsing library, a fork of json-c, developed by the rsyslog team
and used for rsyslog and liblognorm.

%files -n %{devname}
%{_libdir}/libfastjson.so
%{_includedir}/libfastjson
%{_libdir}/pkgconfig/libfastjson.pc

#----------------------------------------------------------------------------

%prep
%setup -q

%build
%configure \
	--disable-static
%make_build

%install
%make_install

%check
%make_build check

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 63 |14mr|libmodulemd-2.15.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 2
%define girapi %{major}.0
%define libname %mklibname modulemd %{major}
%define girname %mklibname modulemd-gir %{girapi}
%define devname %mklibname modulemd -d

%bcond_without gir
%bcond_with gtk-doc

Summary:	Library for manipulating module metadata files
Name:		libmodulemd
Version:	2.15.3
Release:	1
License:	LGPLv2+
Group:		System/Libraries
URL:		https://github.com/fedora-modularity/%{name}
Source0:	https://github.com/fedora-modularity/libmodulemd/releases/download/%{version}/modulemd-%{version}.tar.xz
BuildRequires:	cmake
BuildRequires:	coreutils
%if %{with gtk-doc}
BuildRequires:	gtk-doc
%endif
BuildRequires:	help2man
BuildRequires:	meson
BuildRequires:	python3-gobject3
BuildRequires:	magic-devel
BuildRequires:	pkgconfig(gobject-introspection-1.0)
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(rpm)
BuildRequires:	pkgconfig(yaml-0.1)

%description
Library for manipulating module metadata files.

%files
%{_bindir}/modulemd-validator
%{_mandir}/man1/modulemd-validator.*

#----------------------------------------------------------------------------

%package -n %{libname}
Summary:	Library for manipulating module metadata files
Group:		System/Libraries

%description -n %{libname}
Library for manipulating module metadata files.

%files -n %{libname}
%{_libdir}/%{name}.so.%{major}*

#----------------------------------------------------------------------------

%package -n %{girname}
Summary:	GObject Introspection interface description for libmodulemd
Group:		System/Libraries
Requires:	%{libname} = %{EVRD}

%description -n %{girname}
GObject Introspection interface description for libmodulemd.

%files -n %{girname}
%{_libdir}/girepository-1.0/Modulemd-%{girapi}.typelib

#----------------------------------------------------------------------------

%package -n %{devname}
Summary:	Development files for %{name}
Group:		Development/C
Requires:	%{girname} = %{EVRD}
Requires:	%{libname} = %{EVRD}
Provides:	%{name}-devel = %{EVRD}

%description -n %{devname}
Development files for %{name}.

%files -n %{devname}
%license COPYING
%{_libdir}/%{name}.so
%{_datadir}/gir-1.0/Modulemd-%{girapi}.gir
%{_includedir}/modulemd-%{major}.0
%{_libdir}/pkgconfig/modulemd-%{major}*.pc
%if %{with gtk-doc}
%doc %{_datadir}/gtk-doc/html/modulemd-%{girapi}
%endif

#----------------------------------------------------------------------------

%package -n python3-%{name}
Summary:	Python bindings for %{name}
Group:		Development/Python
Requires:	%{girname} = %{EVRD}
Requires:	python3-gobject3

%description -n python3-%{name}
This package provides the Python 3 bindings for %{name}.

%files -n python3-%{name}
%{python3_sitearch}/gi/overrides/Modulemd.py*
%optional %{python3_sitearch}/gi/overrides/__pycache__/Modulemd*

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n modulemd-%{version}

# https://github.com/fedora-modularity/libmodulemd/issues/387
sed -i -e 's,/usr/bin/sh,/bin/sh,g' modulemd/clang_simple_version.sh

%build
%meson \
%if !%{with gir}
	-Dskip_introspection=true \
%endif
%if %{without gtk-doc}
	-Dwith_docs=false \
%endif
%meson_build

%install
%meson_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 64 |14mr|librepo-1.21.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# OMV is missing stuff for tests
%bcond_with tests

# prevent provides from nonstandard paths:
%global	__provides_exclude_from ^%{python3_sitearch}/.*\\.so$

# Using LibreSSL to support GOST TLS and libcurl-libressl
# to avoid mixing OpenSSL and LibreSSL in one runtime
%global optflags %{optflags} -L%{libressl_prefix}/lib -I%{libressl_prefix}/include

%define	major 0
%define	libname %mklibname repo %{major}
%define	devname %mklibname repo -d

Summary:	Repodata downloading library
Name:		librepo
Version:	1.21.1
Release:	1
Group:		System/Libraries
License:	LGPLv2+
Url:		https://github.com/rpm-software-management/librepo
Source0:	https://github.com/rpm-software-management/librepo/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires:	cmake
BuildRequires:	doxygen
BuildRequires:	patchelf
BuildRequires:	pkgconfig(check)
BuildRequires:	pkgconfig(libselinux)
BuildRequires:	pkgconfig(glib-2.0)
BuildRequires:	pkgconfig(gpg-error)
BuildRequires:	pkgconfig(gpgme)
BuildRequires:	pkgconfig(libassuan)
BuildRequires:	pkgconfig(libattr)
BuildRequires:	pkgconfig(libcurl-libressl)
BuildRequires:	pkgconfig(libressl)
BuildRequires:	pkgconfig(libxml-2.0)
BuildRequires:	pkgconfig(zck)
# not used, just makes cmake happy
BuildRequires:	pkgconfig(libcurl)

%description
A library providing C and Python (libcURL like) API for downloading repository
metadata.

#-----------------------------------------------------------------------------

%package -n %{libname}
Summary:	Libraries for %{name}
Group:		System/Libraries

%description -n %{libname}
This package contains the main %{name} library.

%files -n %{libname}
%{_libdir}/librepo.so.%{major}

#-----------------------------------------------------------------------------

%package -n %{devname}
Summary:	Repodata downloading library
Group:		Development/C
Provides:	%{name}-devel = %{EVRD}
Requires:	%{libname}%{?_isa} = %{EVRD}

%description -n %{devname}
Development files for %{name}.

%files -n %{devname}
%doc COPYING README.md
%{_libdir}/librepo.so
%{_libdir}/pkgconfig/librepo.pc
%{_includedir}/librepo/

#-----------------------------------------------------------------------------

%package -n python3-librepo
Summary:	Python 3 bindings for the librepo library
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
%if %{with tests}
BuildRequires:	python3-gpg
BuildRequires:	python3-flask
BuildRequires:	python3-nose
%endif
BuildRequires:	python3-sphinx
BuildRequires:	python3-xattr
Requires:	%{libname}%{?_isa} = %{EVRD}

%description -n python3-librepo
Python 3 bindings for the librepo library.

%files -n python3-librepo
%{python3_sitearch}/%{name}

#-----------------------------------------------------------------------------

%prep
%autosetup -p1

%build
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_DESIRED:str=3
%make_build


%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 65 |14mr|libsolv-0.7.40-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 1
%define libname %mklibname solv %{major}
%define extlibname %mklibname solvext %{major}
%define devname %mklibname solv -d

%define _disable_lto 1

Summary:	Package dependency solver and repository storage system
Name:		libsolv
Version:	0.7.40
Release:	2
License:	MIT
Group:		System/Libraries
# See also: https://github.com/openSUSE/libsolv
URL:		http://en.opensuse.org/openSUSE:Libzypp_satsolver
Source0:	https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz
# https://github.com/openSUSE/libsolv/pull/631, kb#633
Patch0001:	0001-Prefer-lib-named-packages-when-resolving-soname-depe.patch
# Teach libsolv about znver1 and e2k arches
# znver1 is x86_64 with -mtune=znver1, invented in OpenMandriva and not used in ROSA
# e2k is Russian VLIW-like architecture
Patch0501:	libsolv-arches.diff
# OpenMandriva patch for transitioning from RPM5
Patch1001:	1001-ext-Ignore-DistEpoch-entirely.patch

BuildRequires:	cmake
BuildRequires:	ninja
BuildRequires:	gcc
BuildRequires:	gcc-c++
BuildRequires:	pkgconfig(icu-i18n)
BuildRequires:	pkgconfig(rpm)
BuildRequires:	pkgconfig(zlib)
#BuildRequires:	pkgconfig(bzip2)
BuildRequires:	bzip2-devel
BuildRequires:	pkgconfig(liblzma)
BuildRequires:	pkgconfig(libzstd)
BuildRequires:	pkgconfig(libxml-2.0)
BuildRequires:	pkgconfig(zck)
Requires:	gzip
Requires:	bzip2
Requires:	xz
Requires:	coreutils

%description
Solving dependencies is the core functionality for any software management
application on Linux.

Dependencies are used to divide and share functionalities across multiple
software elements.

Linux (and Unix) follows two basic concepts to implement Divide & Conquer -
breaking a large problem into smaller, more manageable ones.

* Make each program do one thing well. See Basics of the Unix Philosophy
  for details.
* Use shared libraries to share implementations and save disk and memory
  space

Every software package expresses the functionalities it provides to others
and those it requires from others through dependencies.

The task of the dependency resolver is to check and fulfill all these
relations when managing software.

Basic laws of resolving

The dependency solver tries to solve dependencies without user intervention
based on two basic rules

* Fulfill the install/remove requests given at start
* Keep the (dependencies of the) installed system consistent

Since the solver treats every package alike, these rules have some major and
sometimes unexpected implications. A broken dependency might result in
removal of lots of packages - the resulting system is still consistent
but highly unusable.

%files
%{_bindir}/*
%exclude %{_bindir}/solv
%{_mandir}/man1/*

#------------------------------------------------------------------------------

%package demo
Summary:	Package dependency solver and repository storage system
Group:		System/Libraries
Requires:	%{name} = %{EVRD}
Requires:	curl
Requires:	gnupg2

%description demo
Applications demoing the %{name} library.

%files demo
%{_bindir}/solv

#------------------------------------------------------------------------------
%package -n python3-%{name}
Summary:        Python bindings for the %{name} library
BuildRequires:  swig
BuildRequires:  python3-devel
Requires:       %{libname} = %{EVRD}

%description -n python3-%{name}
Python bindings for the %{name} library.

%files -n python3-%{name}
%{python3_sitearch}/_solv.so
%{python3_sitearch}/solv.py
%optional %{python3_sitearch}/__pycache__/*.*

#------------------------------------------------------------------------------

%package -n %{libname}
Summary:	Package dependency solver and repository storage system
Group:		System/Libraries
Requires:	%{name} = %{EVRD}

%description -n %{libname}
Package dependency solver and repository storage system.

%files -n %{libname}
%{_libdir}/libsolv.so.%{major}

#------------------------------------------------------------------------------

%package -n %{extlibname}
Summary:	Package dependency solver and repository storage system
Group:		System/Libraries

%description -n %{extlibname}
Package dependency solver and repository storage system.

%files -n %{extlibname}
%{_libdir}/libsolvext.so.%{major}

#------------------------------------------------------------------------------

%package -n %{devname}
Summary:	Development files for %{name}
Group:		Development/C
Requires:	%{libname} = %{EVRD}
Requires:	%{extlibname} = %{EVRD}
Provides:	%{name}-devel = %{EVRD}
Provides:	solv-devel = %{EVRD}

%description -n %{devname}
Development files (Headers etc.) for %{name}.

%files -n %{devname}
%{_includedir}/*
%{_libdir}/pkgconfig/libsolv.pc
%{_libdir}/pkgconfig/libsolvext.pc
%{_libdir}/*.so
%{_datadir}/cmake/Modules/FindLibSolv.cmake
%{_mandir}/man3/*

#------------------------------------------------------------------------------

%prep
%autosetup -p1

%build

# The parameters below are intended to ensure
# that the DNF stack works correctly on OpenMandriva
# The FEDORA switch sets some definitions up that aren't
# otherwise available.
%cmake -GNinja \
  -DFEDORA=1 \
  -DENABLE_RPMDB=ON \
  -DENABLE_RPMDB_BYRPMHEADER=ON \
  -DENABLE_RPMDB_LIBRPM=ON \
  -DENABLE_RPMPKG_LIBRPM=ON \
  -DENABLE_RPMMD=ON \
  -DENABLE_COMPS=ON \
  -DENABLE_APPDATA=ON \
  -DUSE_VENDORDIRS=ON \
  -DWITH_LIBXML2=ON \
  -DENABLE_LZMA_COMPRESSION=ON \
  -DENABLE_BZIP2_COMPRESSION=ON \
  -DENABLE_ZSTD_COMPRESSION=ON \
  -DENABLE_ZCHUNK_COMPRESSION=ON \
  -DWITH_SYSTEM_ZCHUNK=ON \
  -DENABLE_HELIXREPO=ON \
  -DENABLE_SUSEREPO=ON \
  -DENABLE_APK=ON \
  -DENABLE_DEBIAN=ON \
  -DENABLE_ARCHREPO=ON \
  -DMULTI_SEMANTICS=ON \
  -DENABLE_COMPLEX_DEPS=ON \
  -DENABLE_CONDA=ON \
  -DENABLE_PERL=OFF \
  -DENABLE_RUBY=OFF \
  -DENABLE_PYTHON=ON \
  -DPYTHON_EXECUTABLE=%{__python3}

%ninja_build

%install
%ninja_install -C build

%check
cd build
LD_LIBRARY_PATH=$PWD/src:$PWD/ext ninja test

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 66 |14mr|llhttp-9.4.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define major 9
%define libname %mklibname %{name} %{major}
%define devname %mklibname %{name} -d

Name:           llhttp
Version:        9.4.2
Release:        1
Summary:        Port of http_parser to llparse
Group:          System/Libraries
# License of llhttp is MIT; nothing from the NodeJS dependency bundle is
# installed, so its contents do not contribute to the license of the binary
# RPMs, and we do not need a file llhttp-%%{version}-bundled-licenses.txt.
License:        MIT
URL:            https://github.com/nodejs/llhttp
Source0:        https://github.com/nodejs/llhttp/archive/refs/tags/release/v%{version}.tar.gz
BuildRequires:  cmake

%description
This project is a port of http_parser to TypeScript. llparse is used to
generate the output C source file, which could be compiled and linked with the
embedder's program (like Node.js).

This copy of the library is compiled with LLHTTP_STRICT_MODE set to 0
(disabled), which is the default.

#----------------------------------------------------------------------------
%package -n %{libname}
Summary:        Port of http_parser to llparse
Group:          System/Libraries

%description -n %{libname}
This project is a port of http_parser to TypeScript. llparse is used to
generate the output C source file, which could be compiled and linked with the
embedder's program (like Node.js).

This copy of the library is compiled with LLHTTP_STRICT_MODE set to 0
(disabled), which is the default.

%files -n %{libname}
%{_libdir}/libllhttp.so.%{major}*

#----------------------------------------------------------------------------

%package -n %{devname}
Summary:        Development files for llhttp
Group:          System/Libraries
Provides:       %{name}-devel = %{EVRD}
Requires:       %{libname} = %{EVRD}

%description -n %{devname}
The llhttp-devel package contains libraries and header files for
developing applications that use llhttp.

%files -n %{devname}
%doc README.md
%{_includedir}/llhttp.h
%{_libdir}/libllhttp.so
%{_libdir}/cmake/llhttp
%{_libdir}/pkgconfig/libllhttp.pc

#----------------------------------------------------------------------------
%prep
%setup -q -n %{name}-release-v%{version}

%build
%cmake
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 67 |14mr|llvm22-22.1.8-10~bootstrap
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_without lldb
%bcond_without polly
%bcond_without clang
%bcond_without lld
%bcond_with apidox

# Bootstrap:
# 1) build minimal llvm
# 2) build full llvm with that minimal llvm
# because gcc fails to build compiler-rt (%%bcond_with rt):
# https://github.com/google/highway/issues/2250
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109753
%bcond_without bootstrap

# build llvmXX with system llvm/clang (not used for now)
%bcond_with clangascxx

%if %{with bootstrap}
# build llvmXX by llvmXX
%bcond_with selfbuild
%bcond_with clangd
%bcond_with libclc
%bcond_with openmp
%bcond_with rt
%bcond_with spirv
%else
%bcond_without selfbuild
%bcond_without clangd
%bcond_without libclc
%bcond_without openmp
%bcond_without rt
%bcond_without spirv
%endif

# May get run out of disk space when building with debug.
# Building with debug takes ~1.5 hours, without - ~0.5 h,
# most time is spent by RPM processing debuginfo.
# Builds with debug fail (get killed by OOM killer) too often...
%bcond_with debug

# When building longarch64 with lto enabled, builds crash
# due to lack of memory. Disabled it to check if the
# package is being assembled.

%ifarch loongarch64
%global _disable_lto 1
%endif

# building with LTO is slow
# and not enough RAM (4 G) on i686
%ifnarch loongarch64
%if %{without bootstrap} && %{__isa_bits} > 32
%bcond_without lto
%else
%bcond_with lto
%endif
%endif

%if %{with selfbuild}
%if %{with clangascxx}
%{error:Do not use both selfbuild and clangascxx, choose one of them}
%endif
%endif

%define oname llvm

%define _obindir /usr/bin
%define _olibdir /usr/%{_lib}
%define _prefix /opt/%{name}
%define _bindir %{_prefix}/bin
%define _datadir %{_prefix}/share
%define _includedir %{_prefix}/include
%define _libdir %{_prefix}/%{_lib}
%define _libexecdir %{_prefix}/libexec
%define _mandir %{_prefix}/share/man
%define __ninja %{_obindir}/ninja

%if %{with debug}
#global reltype RelWithDebInfo
%global reltype Release
# minimal debug info to reduce memory usage, but force DWARFv4 instead of default DWARFv5,
# because debugedit->readelf (binutils) in rosa2021.1 cannot handle v5
# (llvm20 builds itself with v5 by default)
%global debugcflags -gdwarf-4 -g1
%else
%global debug_package %{nil}
%global debugcflags %{nil}
%global reltype Release
%endif

%if %{without lto}
%define _disable_lto 1
%endif

%global _disable_ld_no_undefined 1
# do not remove with_lto - needed for rosa2021.1 where -flto is not in default optflags
%global optflags %{optflags} -fno-strict-aliasing %{?with_lto:-flto}

%define maj_ver 22
%define min_ver %(echo %{version} | cut -d. -f2)
%define libname %mklibname llvm%{maj_ver}
%define libclang %mklibname clang%{maj_ver}
%define libclangcpp %mklibname clang-cpp%{maj_ver}
%define libremarks %mklibname remarks%{maj_ver}
%define liblto %mklibname lto%{maj_ver}
%define libspirvtools %mklibname SPIRV-Tools%{maj_ver}
%define libspirvtoolsdiff %mklibname SPIRV-Tools-diff%{maj_ver}
%define libspirvtoolslink %mklibname SPIRV-Tools-link%{maj_ver}
%define libspirvtoolslint %mklibname SPIRV-Tools-lint%{maj_ver}
%define libspirvtoolsopt %mklibname SPIRV-Tools-opt%{maj_ver}
%define libspirvtoolsreduce %mklibname SPIRV-Tools-reduce%{maj_ver}
%define libspirvtoolsshared %mklibname SPIRV-Tools-shared%{maj_ver}

%define project %{?with_clang:clang;clang-tools-extra;}%{?with_lldb:lldb;}%{?with_lld:lld;}%{?with_rt:compiler-rt;}%{?with_libclc:libclc;}%{?with_openmp:openmp;}

%if %{with spirv}
%define spirv2llvm_ver 22.1.6
# commit specified in SPIRV-LLVM-Translator/spirv-headers-tag.conf
%define vulkan_sdk_version 1.4.357.0
%endif

%global __provides_exclude ^cmake\\(Polly|polly

Summary:	LLVM and Clang in %{_prefix}
# llvm20
Name:		llvm%{maj_ver}
Version:	22.1.8
Release:	10%{?with_bootstrap:~bootstrap}
License:	NCSA
Group:		Development/Other
Url:		http://llvm.org
Source0:	https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-%{version}.tar.gz
%if %{with spirv}
Source1:	https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v%{spirv2llvm_ver}.tar.gz?/SPIRV-LLVM-Translator-%{spirv2llvm_ver}.tar.gz
Source2:	https://github.com/KhronosGroup/SPIRV-Headers/archive/vulkan-sdk-%{vulkan_sdk_version}.tar.gz?/SPIRV-Headers-%{vulkan_sdk_version}.tar.gz
Source3:	https://github.com/KhronosGroup/SPIRV-Tools/archive/vulkan-sdk-%{vulkan_sdk_version}.tar.gz?/SPIRV-Tools-%{vulkan_sdk_version}.tar.gz
Source4:	spirv-tools-soname.patch
%endif
Source1000:	llvm%{maj_ver}.rpmlintrc
# Adjust the search paths to match the OS, adjust the default compiler flags as well.
Patch1:		clang-rosa.patch
%if %{with selfbuild}
BuildRequires:	%{name}
%endif
%if %{with clangascxx}
BuildRequires:	clang
%endif
BuildRequires:	gcc
BuildRequires:	stdc++-devel
BuildRequires:	binutils-devel
BuildRequires:	bison
BuildRequires:	chrpath
BuildRequires:	cmake
BuildRequires:	ninja
BuildRequires:	flex
BuildRequires:	graphviz
BuildRequires:	groff
BuildRequires:	libstdc++-devel
BuildRequires:	libtool
BuildRequires:	pkgconfig(libffi)
BuildRequires:	pkgconfig(libtirpc)
# patchelf is for %%check
BuildRequires:	patchelf
BuildRequires:	python3
BuildRequires:	sed
BuildRequires:	tcl
BuildRequires:	zip
%if %{with apidox}
BuildRequires:	doxygen
%endif
Requires:	libstdc++-devel
%if %{with clangd}
Recommends:	clangd-%{maj_ver} = %{EVRD}
%endif
Requires:	%{libname} = %{EVRD}
Requires:	%{libclang} = %{EVRD}
Requires:	%{libclangcpp} = %{EVRD}
Requires:	%{libremarks} = %{EVRD}
Requires:	%{liblto} = %{EVRD}
%if %{with spirv}
Requires:	%{libspirvtools} = %{EVRD}
Requires:	%{libspirvtoolsdiff} = %{EVRD}
Requires:	%{libspirvtoolslink} = %{EVRD}
Requires:	%{libspirvtoolslint} = %{EVRD}
Requires:	%{libspirvtoolsopt} = %{EVRD}
Requires:	%{libspirvtoolsreduce} = %{EVRD}
Requires:	%{libspirvtoolsshared} = %{EVRD}
%endif

# Do not provide libraries from /opt and do not try to depend from them
# ! Nothing must be linked with libllvm etc. from here!
AutoReq: 0
AutoProv: 0
# Require this manually instead of AutoReq
Requires:	%(patchelf --print-soname /usr/%{_lib}/libffi.so || echo foo)%{_arch_tag_suffix}


%description
LVM is a robust system, particularly well suited for developing new mid-level
language-independent analyses and optimizations of all sorts, including those
that require  extensive interprocedural analysis. LLVM is also a great target
for front-end development for conventional or research programming languages,
including those which require compile-time, link-time, or run-time optimization
for effective implementation, proper tail calls or garbage collection.

This package contains LLVM and Clang in %{_prefix}.

%files
%{_prefix}
%if %{with polly}
%exclude %{_bindir}/polly*
%exclude %{_libdir}/*Polly*
%exclude %{_libdir}/cmake/polly
%exclude %{_includedir}/polly
%endif
%if %{with spirv}
%exclude %{_bindir}/*spirv*
%exclude %{_includedir}/LLVMSPIRVLib
%exclude %{_libdir}/libLLVMSPIRVLib*
%exclude %{_libdir}/pkgconfig/LLVMSPIRVLib.pc
%endif

#----------------------------------------------------------------------------

%package -n %{libname}
Summary:	LLVM %{maj_ver} shared library
Group:		System/Libraries

%description -n %{libname}
LLVM %{maj_ver} shared library

%files -n %{libname}
%{_olibdir}/libLLVM-%{maj_ver}*.so
%{_olibdir}/libLLVM.so.%{maj_ver}.%{min_ver}

#----------------------------------------------------------------------------

%package -n %{libclang}
Summary:	LLVM %{maj_ver} shared library
Group:		System/Libraries

%description -n %{libclang}
LLVM %{maj_ver} shared library

%files -n %{libclang}
%{_olibdir}/libclang.so.%{maj_ver}*

#----------------------------------------------------------------------------

%package -n %{libclangcpp}
Summary:	LLVM %{maj_ver} shared library
Group:		System/Libraries

%description -n %{libclangcpp}
LLVM %{maj_ver} shared library

%files -n %{libclangcpp}
%{_olibdir}/libclang-cpp.so.%{maj_ver}.%{min_ver}

#----------------------------------------------------------------------------

%package -n %{libremarks}
Summary:	LLVM %{maj_ver} shared library
Group:		System/Libraries

%description -n %{libremarks}
LLVM %{maj_ver} shared library

%files -n %{libremarks}
%{_olibdir}/libRemarks.so.%{maj_ver}.%{min_ver}

#----------------------------------------------------------------------------

%package -n %{liblto}
Summary:	LLVM %{maj_ver} shared library
Group:		System/Libraries

%description -n %{liblto}
LLVM %{maj_ver} shared library

%files -n %{liblto}
%{_olibdir}/libLTO.so.%{maj_ver}.%{min_ver}

#----------------------------------------------------------------------------
%if %{with clangd}
%package -n clangd-%{maj_ver}
Summary:	clangd - Language server that provides IDE-like features to editors
Group:          Development/Other

%description -n clangd-%{maj_ver}
clangd - Language server that provides IDE-like features to editors

%files -n clangd-%{maj_ver}
%{_bindir}/clangd
%{_obindir}/clangd-%{maj_ver}
%endif #/with_clangd
#----------------------------------------------------------------------------

%if %{with polly}
%package -n polly-%{maj_ver}
Summary:	Polyhedral optimizations for LLVM
Group:		System/Libraries
AutoProv:	0

%description -n polly-%{maj_ver}
Polly is a polyhedral optimizer for LLVM.

Using an abstract mathematical representation it analyzes and optimizes
the memory access pattern of a program. This includes data-locality
optimizations for cache locality as well as automatic parallelization
for thread-level and SIMD parallelism.

Our overall goal is an integrated optimizer for data-locality and
parallelism that takes advantage of multi-cores, cache hierarchies,
short vector instructions as well as dedicated accelerators.

%files -n polly-%{maj_ver}
%{_bindir}/pollycc
%{_bindir}/pollyc++
%{_libdir}/LLVMPolly.so
%{_libdir}/libPolly*.a
%{_libdir}/cmake/polly
%{_includedir}/polly
%endif #/with_polly

#----------------------------------------------------------------------------

%if %{with spirv}
%package -n spirv-llvm-translator-%{maj_ver}
Summary:	Khronos LLVM to SPIRV Translator %{maj_ver}
Group:		Development/Other
AutoProv:	0

%description -n spirv-llvm-translator-%{maj_ver}
Khronos LLVM to SPIRV Translator. This is a library
to be used by Mesa for OpenCL support. It translate
LLVM IR to Khronos SPIR-V. It also includes a
standalone tool used for building libclc.

Located in %{_prefix}, for using with LLVM %{maj_ver}.
Real version is %{spirv2llvm_ver}.

%files -n spirv-llvm-translator-%{maj_ver}
%{_bindir}/llvm-spirv
%{_includedir}/LLVMSPIRVLib
%{_libdir}/libLLVMSPIRVLib*
%{_libdir}/pkgconfig/LLVMSPIRVLib.pc

#----------------------------------------------------------------------------

%package -n %{libspirvtools}
Summary:	Library libSPIRV-Tools built with LLVM %{maj_ver}
Group:		System/Libraries

%description -n %{libspirvtools}
%{summary}.
Real version is %{vulkan_sdk_version}.

%files -n %{libspirvtools}
%{_olibdir}/libSPIRV-Tools.so.%{maj_ver}

#----------------------------------------------------------------------------

%package -n %{libspirvtoolsdiff}
Summary:	Library libSPIRV-Tools-diff built with LLVM %{maj_ver}
Group:		System/Libraries

%description -n %{libspirvtoolsdiff}
%{summary}.
Real version is %{vulkan_sdk_version}.

%files -n %{libspirvtoolsdiff}
%{_olibdir}/libSPIRV-Tools-diff.so.%{maj_ver}

#----------------------------------------------------------------------------

%package -n %{libspirvtoolslink}
Summary:	Library libSPIRV-Tools-link built with LLVM %{maj_ver}
Group:		System/Libraries

%description -n %{libspirvtoolslink}
%{summary}.
Real version is %{vulkan_sdk_version}.

%files -n %{libspirvtoolslink}
%{_olibdir}/libSPIRV-Tools-link.so.%{maj_ver}

#----------------------------------------------------------------------------

%package -n %{libspirvtoolslint}
Summary:	Library libSPIRV-Tools-lint built with LLVM %{maj_ver}
Group:		System/Libraries

%description -n %{libspirvtoolslint}
%{summary}.
Real version is %{vulkan_sdk_version}.

%files -n %{libspirvtoolslint}
%{_olibdir}/libSPIRV-Tools-lint.so.%{maj_ver}

#----------------------------------------------------------------------------

%package -n %{libspirvtoolsopt}
Summary:	Library libSPIRV-Tools-opt built with LLVM %{maj_ver}
Group:		System/Libraries

%description -n %{libspirvtoolsopt}
%{summary}.
Real version is %{vulkan_sdk_version}.

%files -n %{libspirvtoolsopt}
%{_olibdir}/libSPIRV-Tools-opt.so.%{maj_ver}

#----------------------------------------------------------------------------

%package -n %{libspirvtoolsreduce}
Summary:	Library libSPIRV-Tools-opt built with LLVM %{maj_ver}
Group:		System/Libraries

%description -n %{libspirvtoolsreduce}
%{summary}.
Real version is %{vulkan_sdk_version}.

%files -n %{libspirvtoolsreduce}
%{_olibdir}/libSPIRV-Tools-reduce.so.%{maj_ver}

#----------------------------------------------------------------------------

%package -n %{libspirvtoolsshared}
Summary:	Library libSPIRV-Tools-opt built with LLVM %{maj_ver}
Group:		System/Libraries

%description -n %{libspirvtoolsshared}
%{summary}.
Real version is %{vulkan_sdk_version}.

%files -n %{libspirvtoolsshared}
%{_olibdir}/libSPIRV-Tools-shared.so.%{maj_ver}

#----------------------------------------------------------------------------

# maj_ver is our fake version for spirv-tools, so adding "llvm" prefix before maj_ver

%package -n spirv-tools-llvm%{maj_ver}
Summary:	API and commands for processing SPIR-V modules built with LLVM %{maj_ver}
Group:		Development/Other

%description -n spirv-tools-llvm%{maj_ver}
%{summary}.
Real version is %{vulkan_sdk_version}.

%files -n spirv-tools-llvm%{maj_ver}
%{_bindir}/spirv-*

%endif #/with_spirv
#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n llvm-project-llvmorg-%{version}

%if %{with spirv}
tar -xf %{SOURCE1}
mv SPIRV-LLVM-Translator-%{spirv2llvm_ver} llvm-spirv
tar -xf %{SOURCE2}
mv SPIRV-Headers-vulkan-sdk-%{vulkan_sdk_version} SPIRV-Headers
tar -xf %{SOURCE3}
mv SPIRV-Tools-vulkan-sdk-%{vulkan_sdk_version} SPIRV-Tools
pushd SPIRV-Tools
	patch -p1 < %{SOURCE4}
	# https://github.com/KhronosGroup/SPIRV-Tools/commit/becf97fd
	sed -i -e 's,3.22.1,3.21.0,g' -e 's,3.22.2,3.21.0,g' CMakeLists.txt
	sed -i -e '/add_subdirectory(test)/d' CMakeLists.txt
popd
%endif

%build
%set_build_flags

%if %{without debug}
export CFLAGS="$CFLAGS -g0"
export CXXFLAGS="$CXXFLAGS -g0"
export LDFLAGS="$LDFLAGS -g0 -Wl,--strip-debug"
%endif
%if %{with selfbuild}
export LDFLAGS="$LDFLAGS -fuse-ld=lld"
export CC=%{_bindir}/clang
export CXX=%{_bindir}/clang++
%endif
%if %{with clangascxx}
export LDFLAGS="$LDFLAGS -fuse-ld=lld"
export CC=%{_obindir}/clang
export CXX=%{_obindir}/clang++
%endif

%ifarch %ix86
# Fix noexecstack
for i in compiler-rt/lib/builtins/i386/*.S; do
	cat >>$i <<'EOF'
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
EOF
done
%endif

cmake -S llvm -B build -GNinja \
	-DCMAKE_BUILD_TYPE=%{reltype} \
	-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
	-DBUILD_SHARED_LIBS:BOOL=OFF \
	-DBUILD_STATIC_LIBS:BOOL=ON \
	-DLLVM_ENABLE_PROJECTS:STRING='%{project}' \
	-DLLVM_LIBDIR_SUFFIX=$(echo %{_lib} | sed -e 's,^lib,,') \
	-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
	-DDLLVM_LINK_LLVM_DYLIB:BOOL=ON \
	-DLLVM_VERSION_SUFFIX="" \
	-DLLVM_INCLUDE_TESTS:BOOL=OFF \
	-DLLVM_ENABLE_FFI:BOOL=ON \
	-DLLVM_ENABLE_RTTI:BOOL=ON \
	-DLLVM_BINUTILS_INCDIR="%{_includedir}" \
	-DCLANG_LIBDIR_SUFFIX=$(echo %{_lib} | sed -e 's,^lib,,') \
	-DCLANG_REPOSITORY_STRING="%{vendor} %{version}-%{release}" \
	-DCLANG_DEFAULT_CXX_STDLIB="libstdc++" \
	-DCLANG_DEFAULT_RTLIB="libgcc" \
	-DOCAMLFIND=NOTFOUND \
%if %{with apidox}
	-DLLVM_INCLUDE_DOCS:BOOL=ON \
	-DLLVM_BUILD_DOCS:BOOL=ON \
%endif
%if %{with clangd}
	-DCLANG_ENABLE_CLANGD:BOOL=ON \
%else
	-DCLANG_ENABLE_CLANGD:BOOL=OFF \
%endif
%if %{with openmp}
	-DLIBOMP_INSTALL_ALIASES=OFF \
%endif
	-DLLVM_OPTIMIZED_TABLEGEN=ON

%ninja_build -C build

%if %{with polly}
export PATH="$PWD/build/bin:$PATH"
export LD_LIBRARY_PATH="$PWD/build/%{_lib}:$LD_LIBRARY_PATH"

cmake -S polly -B polly_build -GNinja \
	-DCMAKE_BUILD_TYPE=%{reltype} \
	-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
	-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
	-DLLVM_LIBDIR_SUFFIX=$(echo %{_lib} | sed -e 's,^lib,,')
%ninja_build -C polly_build
%endif

%if %{with spirv}
cmake -S llvm-spirv -B spirv2llvm_build -GNinja \
	-DCMAKE_BUILD_TYPE=%{reltype} \
	-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
	-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
	-DLLVM_LIBDIR_SUFFIX=$(echo %{_lib} | sed -e 's,^lib,,') \
	-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR="$PWD/SPIRV-Headers"
%ninja_build -C spirv2llvm_build

# build options as in import/spirv-tools
cmake -S SPIRV-Tools -B spirvtools_build -GNinja \
	-DCMAKE_BUILD_TYPE=%{reltype} \
	-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
	-DCMAKE_INSTALL_LIBDIR="%{_lib}" \
	-DCMAKE_SYSTEM_NAME="Linux" \
	-DENABLE_RTTI=ON \
	-DPYTHON_EXECUTABLE:FILEPATH="%{__python3}" \
	-DSPIRV-Headers_SOURCE_DIR="$PWD/SPIRV-Headers" \
	-DSPIRV_TOOLS_BUILD_STATIC=OFF \
	-DSPIRV_TOOLS_LIBRARY_TYPE="SHARED" \
	-DBUILD_SHARED_LIBS=1 \
	-DSPIRV_TOOLS_SOVERSION=%{maj_ver} \
	-DSPIRV_WERROR=OFF
%ninja_build -C spirvtools_build
%endif

%install
%ninja_install -C build

%if %{with polly}
%ninja_install -C polly_build
# [From OMV]
# Polly bits as described on
# http://polly.llvm.org/example_load_Polly_into_clang.html
cat >%{buildroot}%{_bindir}/pollycc <<'EOF'
#!/bin/sh
exec %{_bindir}/clang -O3 -Xclang -load -Xclang %{_libdir}/LLVMPolly.so "$@"
EOF
cat >%{buildroot}%{_bindir}/pollyc++ <<'EOF'
#!/bin/sh
exec %{_bindir}/clang++ -O3 -Xclang -load -Xclang %{_libdir}/LLVMPolly.so "$@"
EOF
chmod 0755 %{buildroot}%{_bindir}/pollycc %{buildroot}%{_bindir}/pollyc++
%endif

%if %{with spirv}
%ninja_install -C spirv2llvm_build
# probably no sense to install SPIRV-Headers
%ninja_install -C spirvtools_build
%endif

# Install libraries used for testing
cp -a build/%{_lib}/BugpointPasses.so %{buildroot}%{_libdir}
#cp -a build/%{_lib}/LLVMHello.so %{buildroot}%{_libdir}

# Will be used in Mesa and ispc
mkdir -p %{buildroot}%{_olibdir}
install -m0755 %{buildroot}%{_libdir}/libLLVM-%{maj_ver}.so %{buildroot}%{_olibdir}
install -m0755 %{buildroot}%{_libdir}/libclang.so.%{maj_ver}.%{min_ver} %{buildroot}%{_olibdir}
pushd %{buildroot}%{_libdir}
ln -svf libclang.so.%{maj_ver}.%{min_ver} libclang.so
popd

ls -la %{buildroot}%{_libdir}/*.so*
install -m0755 %{buildroot}%{_libdir}/libclang-cpp.so.%{maj_ver}.%{min_ver} %{buildroot}%{_olibdir}
install -m0755 %{buildroot}%{_libdir}/libRemarks.so.%{maj_ver}.%{min_ver} %{buildroot}%{_olibdir}
install -m0755 %{buildroot}%{_libdir}/libLTO.so.%{maj_ver}.%{min_ver} %{buildroot}%{_olibdir}

%if %{with spirv}
for i in "" -diff -link -lint -opt -reduce -shared
do
	install -m0755 %{buildroot}%{_libdir}/libSPIRV-Tools${i}.so.%{maj_ver} %{buildroot}%{_olibdir}
	ln -sf %{_olibdir}/libSPIRV-Tools${i}.so.%{maj_ver} %{buildroot}%{_libdir}/libSPIRV-Tools${i}.so
	rm -fv %{buildroot}%{_libdir}/libSPIRV-Tools${i}.so.*
done
%endif

%if %{with rt}
ln -s %{_libdir}/clang/%{maj_ver}/lib/*-linux-gnu \
	%{buildroot}%{_libdir}/clang/%{maj_ver}/lib/%{_os}
%endif

%if %{with clangd}
mkdir -p %{buildroot}%{_obindir}
ln -s %{_bindir}/clangd \
    %{buildroot}%{_obindir}/clangd-%{maj_ver}
%endif

# RPATH to /opt/... is not needed here
patchelf --remove-rpath %{buildroot}%{_olibdir}/*.so*

# Versionize shebangs python
sed '1 s,^.*$,#!%{__python3},' -i %{buildroot}%{_bindir}/{hmaptool,scan-view}

%check
# check runability of binary
%{buildroot}%{_bindir}/clang --version
%{buildroot}%{_bindir}/llvm-config --shared-mode
# ensure that it does not get lost (-DLLVM_BINUTILS_INCDIR is set for this)
find %{buildroot} | grep -qi LLVMgold.so

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 68 |14mr|meson-1.12.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Running tests needs lot of time
%bcond_with check

Summary:	High productivity build system
Name:		meson
Version:	1.12.1
Release:	1
License:	ASL 2.0
Group:		Development/Tools
Url:		http://mesonbuild.com
Source0:	https://github.com/mesonbuild/meson/releases/download/%{version}/%{name}-%{version}.tar.gz
Source2:	%{name}.macros

BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-setuptools

%if %{with check}
BuildRequires:	locales
BuildRequires:	ninja

# Various languages
BuildRequires:	gcc
BuildRequires:	gcc-c++
BuildRequires:	gcc-gfortran
BuildRequires:	gcc-objc
BuildRequires:	gcc-objc++
BuildRequires:	gnustep-base-devel
BuildRequires:	java-devel
BuildRequires:	mono
BuildRequires:	pkgconfig(mono)
BuildRequires:	rust

# Various libs support
BuildRequires:	asan-devel
BuildRequires:	bison
BuildRequires:	boost-devel
BuildRequires:	cups-devel
BuildRequires:	flex
BuildRequires:	gettext
BuildRequires:	git
BuildRequires:	gmock-devel
BuildRequires:	gtest-devel
BuildRequires:	gtk-doc
BuildRequires:	itstool
BuildRequires:	libwmf-devel
BuildRequires:	llvm-devel
BuildRequires:	locales-en
BuildRequires:	nasm
BuildRequires:	pcap-devel
BuildRequires:	pkgconfig
BuildRequires:	pkgconfig(Qt5Core)
BuildRequires:	pkgconfig(Qt5Gui)
BuildRequires:	pkgconfig(Qt5Widgets)
BuildRequires:	pkgconfig(glib-2.0)
BuildRequires:	pkgconfig(glib-sharp-2.0)
BuildRequires:	pkgconfig(gobject-introspection-1.0)
BuildRequires:	pkgconfig(gtk+-3.0)
BuildRequires:	pkgconfig(libgcrypt)
BuildRequires:	pkgconfig(protobuf)
BuildRequires:	pkgconfig(sdl2)
BuildRequires:	pkgconfig(vapigen)
BuildRequires:	pkgconfig(vulkan)
BuildRequires:	pkgconfig(zlib)
BuildRequires:	python3-cython
BuildRequires:	python3-gobject3
BuildRequires:	qt5-linguist-tools
BuildRequires:	qt5-tools
BuildRequires:	texlive-epstopdf
BuildRequires:	units
BuildRequires:	vala
BuildRequires:	vala-tools
BuildRequires:	wxgtku3.0-devel
%endif

Requires:	ninja
Requires:	python3-setuptools
BuildArch:	noarch

%description
Meson is a build system designed to optimize programmer productivity. It aims
to do this by providing simple, out-of-the-box support for modern software
development tools and practices, such as unit tests, coverage reports,
Valgrind, CCache and the like.

%files
%doc README.md COPYING
%{_bindir}/%{name}
%{_datadir}/polkit-1/actions/com.mesonbuild.install.policy
%{_mandir}/man1/%{name}.1.*
%{_rpmmacrodir}/*%{name}*
%{python3_sitelib}/%{name}-*.dist-info/
%{python3_sitelib}/mesonbuild/

#----------------------------------------------------------------------------

%prep
%setup -q


%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel


%install
%pyproject_install

# Install our rpm macro helper for meson
%install_macro meson %{SOURCE2}

%if %{with check}
%check
# TODO: Investigate and fix failures
# Missing compilers or their dependencies
rm -rf "test cases/fortran/1 basic/"
rm -rf "test cases/fortran/2 modules/"
rm -rf "test cases/fortran/3 module procedure/"
rm -rf "test cases/fortran/4 self dependency/"
rm -rf "test cases/fortran/5 static/"
rm -rf "test cases/fortran/6 dynamic/"
rm -rf "test cases/fortran/7 generated/"
rm -rf "test cases/fortran/8 module names/"
rm -rf "test cases/fortran/9 cpp/"
rm -rf "test cases/fortran/10 find library/"
rm -rf "test cases/fortran/11 compiles links runs/"
rm -rf "test cases/fortran/12 submodule/"
rm -rf "test cases/fortran/13 coarray/"
rm -rf "test cases/nasm/1 configure/"
rm -rf "test cases/rust/1 basic/"
# Lack of dependencies
# Cannot find libboost_thread.so which exists
rm -rf "test cases/frameworks/1 boost"
#rm -rf "test cases/frameworks/3 gmock/"
# Due to missing libtinfo
rm -rf "test cases/frameworks/15 llvm"
# Remove MPI tests for now because it is complicated to run.
rm -rf "test cases/frameworks/17 mpi"
rm -rf "test cases/frameworks/18 vulkan/"
rm -rf "test cases/frameworks/19 pcap/"
rm -rf "test cases/frameworks/20 cups/"
rm -rf "test cases/frameworks/21 libwmf/"
rm -rf "test cases/frameworks/22 gir link order"
rm -rf "test cases/frameworks/24 libgcrypt/"
rm -rf "test cases/frameworks/26 netcdf/"
rm -rf "test cases/common/190 openmp"

export MESON_PRINT_TEST_OUTPUT=1
export LC_ALL=UTF-8
python3 run_tests.py
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 69 |14mr|mock-6.8-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Builds packages inside chroots
Name:		mock
Version:	6.8
Release:	2
License:	GPLv2+
Group:		Development/Other
Url:		https://github.com/rpm-software-management/mock/
Source0:	https://github.com/rpm-software-management/mock/releases/download/%{name}-%{version}-1/%{name}-%{version}.tar.gz
# For x86_64 rosa2023.1
Source1:	rosa202310-x86_64.cfg
# Sysusers file to create the mock group
Source2:	%{name}.sysusers
BuildArch:	noarch
Requires:	%{name}-filesystem = %{EVRD}
Requires:	distribution-gpg-keys
Requires:	dnf5
Requires:	dnf5-plugins
Requires:	procps-ng
Requires:	python3
Requires:	python3-backoff
Requires:	python3-distro
Requires:	python3-jinja2
Requires:	python3-pyroute2
Requires:	python3-requests
Requires:	python3-rpm
Requires:	python3-six
Requires:	python3-templated-dictionary
Requires:	python3-yaml
Requires:	systemd
Requires:	bsdtar
Requires:	usermode-consoleonly
Recommends:	btrfs-progs
Recommends:	createrepo_c
Recommends:	dnf-utils
Recommends:	dnf-yum
Recommends:	(%{name}-configs-x86_64 if arch(x86_64))

# default.cfg was moved
Conflicts:	mock < 2.11

%description
Mock takes an SRPM and builds it in a chroot.

%files
%doc %{_docdir}/%{name}-%{version}/site-defaults.cfg
%ghost %config(noreplace) %{_sysconfdir}/%{name}/default.cfg
%ghost %config(noreplace) %{_sysconfdir}/%{name}/hermetic-build.cfg
%{_bindir}/%{name}
%{_bindir}/mockchain
%{_bindir}/mock-parse-buildlog
%attr(0644,root,mock) %{_datadir}/bash-completion/completions/%{name}
%{_datadir}/bash-completion/completions/mock-parse-buildlog
%{_datadir}/cheat/%{name}
%{_libexecdir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_mandir}/man1/mock-parse-buildlog.1*
%{python3_sitelib}/*
%config(noreplace) %{_sysconfdir}/%{name}/*.ini
%config(noreplace) %{_sysconfdir}/pam.d/%{name}
%dir %{_sysconfdir}/pki/%{name}
%config(noreplace) %{_sysconfdir}/pki/mock/*
%config(noreplace) %{_sysconfdir}/security/console.apps/%{name}

%defattr(0775,root,mock,02775)
%dir %{_localstatedir}/cache/%{name}
%dir %{_localstatedir}/lib/%{name}

%exclude %{python3_sitelib}/mockbuild/plugins/lvm_root.*
%exclude %{python3_sitelib}/mockbuild/scm.*

#----------------------------------------------------------------------------

%package scm
Summary:	Mock SCM integration module
Group:		Development/Other
Requires:	%{name} = %{EVRD}
Requires:	git
Requires:	subversion
Requires:	tar

%description scm
Mock SCM integration module.

%files scm
%optional %{python3_sitelib}/mockbuild/__pycache__/scm.*.py*
%{python3_sitelib}/mockbuild/scm.py*

#----------------------------------------------------------------------------

%package lvm
Summary:	LVM plugin for mock
Group:		Development/Other
Requires:	%{name} = %{EVRD}
Requires:	lvm2

%description lvm
Mock plugin that enables using LVM as a backend and support creating snapshots
of the buildroot.

%files lvm
%{python3_sitelib}/mockbuild/plugins/lvm_root.*
%optional %{python3_sitelib}/mockbuild/plugins/__pycache__/lvm_root.*.py*

#----------------------------------------------------------------------------

%package filesystem
Summary:	Mock filesystem layout
Group:		Development/Other
Requires(pre):	systemd

%description filesystem
Filesystem layout and group for Mock.

%pre filesystem
%sysusers_create_package %{name} %SOURCE2

%files filesystem
%license COPYING
%{_sysusersdir}/%{name}.conf
%dir %{_datadir}/cheat
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/eol
%dir %{_sysconfdir}/%{name}/eol/templates
%dir %{_sysconfdir}/%{name}/templates

#----------------------------------------------------------------------------

%package configs-x86_64
Summary:	Default configs for mock x86_64
Group:		Development/Other
Requires:	bsdtar
Requires:	zstd
Requires:	%{name}
# make /etc/mock/default.cfg (%%ghost) exist
Requires(posttrans):	%{name}

%description configs-x86_64
Default config for mock x86_64.

%files configs-x86_64
%config(noreplace) %{_sysconfdir}/%{name}/rosa202310-x86_64.cfg

%posttrans configs-x86_64
if [ ! -a /etc/mock/default.cfg ]; then
	cp -f /etc/mock/rosa202310-x86_64.cfg /etc/mock/default.cfg
fi

#----------------------------------------------------------------------------

%prep
%autosetup -p1
sed -i	\
	-e 's|^VERSION = .*|VERSION="%{version}"|'			\
	-e 's|^SYSCONFDIR = .*|SYSCONFDIR="%{_sysconfdir}"|'			\
	-e 's|^PYTHONDIR = .*|PYTHONDIR="%{python3_sitelib}"|'			\
	-e 's|^PKGPYTHONDIR = .*|PKGPYTHONDIR="%{python3_sitelib}/mockbuild"|'	\
		py/mock-parse-buildlog.py py/mockbuild/constants.py
sed -i 's|@VERSION@|%{version}|' docs/%{name}.1 docs/mock-parse-buildlog.1
sed -i "/nr_inodes=0/d" py/mockbuild/plugins/tmpfs.py

%build

%install
#base filesystem
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/eol/templates
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/templates

install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf

install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_libexecdir}/%{name}
install mockchain %{buildroot}%{_bindir}/mockchain
install py/mock-parse-buildlog.py %{buildroot}%{_bindir}/mock-parse-buildlog
install py/%{name}.py %{buildroot}%{_libexecdir}/%{name}/%{name}
ln -s consolehelper %{buildroot}%{_bindir}/%{name}

install -d %{buildroot}%{_sysconfdir}/pam.d
cp -a etc/pam/* %{buildroot}%{_sysconfdir}/pam.d/

install -d %{buildroot}%{_sysconfdir}/%{name}
cp -a etc/%{name}/* %{buildroot}%{_sysconfdir}/%{name}/

install -d %{buildroot}%{_sysconfdir}/security/console.apps/
cp -a etc/consolehelper/%{name} %{buildroot}%{_sysconfdir}/security/console.apps/%{name}

install -d %{buildroot}%{_datadir}/bash-completion/completions/
cp -a etc/bash_completion.d/* %{buildroot}%{_datadir}/bash-completion/completions/
ln -s %{name} %{buildroot}%{_datadir}/bash-completion/completions/mock-parse-buildlog

install -d %{buildroot}%{_sysconfdir}/pki/%{name}
cp -a etc/pki/* %{buildroot}%{_sysconfdir}/pki/%{name}/

install -d %{buildroot}%{python3_sitelib}/
cp -a py/mockbuild %{buildroot}%{python3_sitelib}/

install -d %{buildroot}%{_mandir}/man1
cp -a docs/%{name}.1 docs/mock-parse-buildlog.1 %{buildroot}%{_mandir}/man1/
install -d %{buildroot}%{_datadir}/cheat
cp -a docs/%{name}.cheat %{buildroot}%{_datadir}/cheat/%{name}

install -d %{buildroot}/var/lib/%{name}
install -d %{buildroot}/var/cache/%{name}

mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}
install -p -m 0644 docs/site-defaults.cfg %{buildroot}%{_docdir}/%{name}-%{version}

sed -i 's/^_MOCK_NVR = None$/_MOCK_NVR = "%name-%version-%release"/' \
    %{buildroot}%{_libexecdir}/%{name}/%{name}

cp %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/
sed -i -e "s,^config_opts\(.\)'useradd'\(.\) = .*,config_opts\1'useradd'\2 = '/usr/sbin/useradd -o -m -u {{chrootuid}} -g {{chrootgid}} -d {{chroothome}} {{chrootuser}}'," -e "s,^user_agent=$,user_agent={{ user_agent }}," %{buildroot}%{_sysconfdir}/%{name}/*.cfg

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 70 |14mr|newmoon-35.0.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%ifarch %{ix86}
%define debug_package %{nil}
%endif

%define oname palemoon
%define over %(echo %{version} |cut -d. -f-2).0
%define newmoon_appid \{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4\}

# For bundled NSS. copied from firefox.spec
# Do not make provides from plugins /usr/lib64/*/*.so
%global __provides_exclude_from ^%{_libdir}/.*/.*\\.so$
# Do not require filtered out provides
# To inspect them:
# for i in /usr/lib64/firefox/* ; do if file $i | grep -q ELF ; then echo ; echo -- $i ; LC_ALL=C ldd $i | grep found ; fi; done
# To make this list:
# ( for i in /usr/lib64/firefox/* ; do if file $i | grep -q ELF ; then LC_ALL=C ldd $i | grep found | awk '{print $1}' | awk -F '\\.so' '{print $1}' ; fi; done ) | sort -u | tr '\n' '|'
%global __requires_exclude ^(libhunspell|liblgpllibs|libmozavutil|libmozgtk|libmozsandbox|libmozsqlite3|libmozwayland|libnspr4|libnss3|libnssutil3|libplc4|libplds4|libsmime3|libssl3|libxul)\\.so.*$

# Supported l10n language lists
%define langlist ar bg cs da de el en_GB es_AR es_ES es_MX fa fi fr gl hi hr hu id is it ja kn ko nl pl pt_BR pt_PT ro ru sk sl sr sv_SE th tl tr uk vi zh_CN zh_TW

# Disabled myspell dicts, for any reason
%define disabled_dict_langlist ar da el es_AR fi gl_ES hr is nl pt_BR ro sk sl sr sv_SE tr zh_CN zh_TW

# Language descriptions
%define language_ar ar
%define langname_ar Arabic
%define language_bg bg
%define langname_bg Bulgarian
%define language_cs cs
%define langname_cs Czech
%define language_da da
%define langname_da Dansk
%define language_de de
%define langname_de German
%define language_el el
%define langname_el Greek
%define language_en_GB en-GB
%define langname_en_GB British English
%define language_es_AR es-AR
%define langname_es_AR Spanish (Argentina)
%define language_es_ES es-ES
%define langname_es_ES Spanish
%define language_es_MX es-MX
%define langname_es_MX Spanish (Mexico)
%define language_fa fa
%define langname_fa Farsi
%define language_fi fi
%define langname_fi Finnish
%define language_fr fr
%define langname_fr French
%define language_gl gl
%define langname_gl Galician (Spain)
%define language_hi hi
%define langname_hi Hindi
%define language_hr hr
%define langname_hr Croatian
%define language_hu hu
%define langname_hu Hungarian
%define language_id id
%define langname_id Indonesian
%define language_is is
%define langname_is Icelandic
%define language_it it
%define langname_it Italian
%define language_ja ja
%define langname_ja Japanese
%define language_kn kn
%define langname_kn Kannada
%define language_ko ko
%define langname_ko Korean
%define language_nl nl
%define langname_nl Dutch
%define language_pl pl
%define langname_pl Polish
%define language_pt_BR pt-BR
%define langname_pt_BR Brazilian portuguese
%define language_pt_PT pt-PT
%define langname_pt_PT Portuguese
%define language_ro ro
%define langname_ro Romanian
%define language_ru ru
%define langname_ru Russian
%define language_sk sk
%define langname_sk Slovak
%define language_sl sl
%define langname_sl Slovenian
%define language_sr sr
%define langname_sr Serbian
%define language_sv_SE sv-SE
%define langname_sv_SE Swedish
%define language_th th
%define langname_th Thai
%define language_tl tl
%define langname_tl Tagalog (Philippines)
%define language_tr tr
%define langname_tr Turkish
%define language_uk uk
%define langname_uk Ukrainian
%define language_vi vi
%define langname_vi Viet
%define language_zh_CN zh-CN
%define langname_zh_CN Simplified Chinese
%define language_zh_TW zh-TW
%define langname_zh_TW Traditional Chinese

%define newmoon_major %{version}
%define newmoon_version %{version}
%define newmoon_mozillapath %{_libdir}/%{name}-%{version}
%define newmoon_pluginsdir %{_libdir}/mozilla/plugins
%define newmoon_appid \{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4\}
%define newmoon_extdir %{_datadir}/mozilla/extensions/%{newmoon_appid}

# Defaults (all languages enabled by default)
# dicts
%{expand:%(for lang in %langlist; do echo "%%define with_dict_$lang 0"; done)}
%{expand:%(for lang in %disabled_dict_langlist; do echo "%%define with_dict_$lang 0"; done)}

# Locales
%{expand:%(for lang in %langlist; do echo "%%define locale_$lang `echo $lang | cut -d _ -f 1` "; done)}

Summary:	Web browser based on Goanna engine
Name:		newmoon
Version:	35.0.1
Release:	1
License:	MPLv2.0
Group:		Networking/WWW
Url:		http://www.palemoon.org
Source0:	https://repo.palemoon.org/MoonchildProductions/Pale-Moon/archive/%{version}_Release.tar.gz?/Pale-Moon-%{version}_Release.tar.gz
Source1:	https://repo.palemoon.org/MoonchildProductions/UXP/archive/RB_20260922.tar.gz?/UXP-RB_20260922.tar.gz
Source2:	xulstore.json
Source3:	newmoon.rpmlintrc
Source4:	newmoon.desktop
Source5:	firefox-searchengines-yandex.xml
Source6:	firefox-searchengines-google.xml
Source7:	pale-moon-32.4.1-enable-addons.patch
Source8:	pale-moon-32.4.1-gcc11.patch
Source9:	kde.js
# https://raw.githubusercontent.com/LibreOffice/dictionaries/master/ru_RU/ru_RU.aff
Source10:	ru_RU.aff
# https://raw.githubusercontent.com/LibreOffice/dictionaries/master/ru_RU/ru_RU.dic
Source11:	ru_RU.dic
# Save .xpi from https://addons.palemoon.org/language-packs/ by "Save object us..." for "Install Now"
# or use upd-l10n.sh script for create tarball
# Fake tarball l10n sources
Source12:	%{name}-l10n-%{over}.tar.xz
# Language package template
Source13:	%{name}-l10n-template.in
Source14:	newmoon-brand.dtd
Source15:	newmoon-brand.properties
Source20:	upd-l10n.sh
Patch0:		palemoon-28.0.1-prefs-edit.patch
Patch1:		pale-moon-33.8.1.1-user-agent-overrides.patch
Patch2:		pale-moon-33.7.2-branding.patch
BuildRequires:	autoconf2.1
BuildRequires:	doxygen
BuildRequires:	imagemagick
BuildRequires:	makedepend
BuildRequires:	nasm
BuildRequires:	python3-simplejson
BuildRequires:	rootcerts
BuildRequires:	unzip
BuildRequires:	valgrind
BuildRequires:	wget
BuildRequires:	yasm
BuildRequires:	zip
BuildRequires:	libiw-devel
BuildRequires:	nss-static-devel
BuildRequires:	pkgconfig(alsa)
BuildRequires:	pkgconfig(gconf-2.0)
BuildRequires:	pkgconfig(gl)
BuildRequires:	pkgconfig(glib-2.0)
BuildRequires:	pkgconfig(gstreamer-1.0)
BuildRequires:	pkgconfig(gstreamer-app-1.0)
BuildRequires:	pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires:	pkgconfig(gtk+-2.0)
BuildRequires:	pkgconfig(gtk+-3.0)
BuildRequires:	pkgconfig(libIDL-2.0)
BuildRequires:	pkgconfig(libnotify)
BuildRequires:	pkgconfig(libproxy-1.0)
BuildRequires:	pkgconfig(libpulse)
BuildRequires:	pkgconfig(libstartup-notification-1.0)
BuildRequires:	pkgconfig(opus)
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(sndio)
BuildRequires:	pkgconfig(xinerama)
BuildRequires:	pkgconfig(xscrnsaver)
BuildRequires:	pkgconfig(xt)
Requires:	indexhtml
Requires:	libhunspell
# fixes bug #42096
Requires:	mailcap
Requires:	xdg-utils
Recommends:	%{_lib}avcodec58
Recommends:	%{_lib}canberra0
Recommends:	%{_lib}cups2
%{expand:
%(for i in %{langlist}; do \
echo "Recommends:	(%{name}-${i} = %{EVRD} if locales-${i%%_*})";
done)}
Recommends:	%{name}-searchplugins = %{EVRD}
Provides:	%{oname} = %{EVRD}
Provides:	%{name} = %(echo %{version} | cut -d. -f-2).0
Provides:	webclient

%description
New Moon (unofficial branding for Pale Moon) is an Open Source, Goanna-based
web browser available for Microsoft Windows and Linux (with other operating
systems in development), focusing on efficiency and ease of use.

New Moon offers you a browsing experience in a browser completely built from
its own, independently developed source that has been forked off from
Firefox/Mozilla code, with carefully selected features and optimizations
to improve the browser's speed, resource use, stability and user experience,
while offering full customization and a growing collection of extensions and
themes to make the browser truly your own.

%files
%{_bindir}/%{name}
%{_datadir}/applications/*.desktop
%dir %{_datadir}/mozilla/extensions/%{newmoon_appid}
%dir %{_libdir}/mozilla
%dir %{_libdir}/mozilla/extensions
%dir %{_libdir}/mozilla/extensions/%{newmoon_appid}
%dir %{_libdir}/mozilla/plugins
%{_iconsdir}/hicolor/*/apps/*.png
%{_libdir}/%{name}-%{version}*
%exclude %{_libdir}/%{name}-%{version}/browser/searchplugins/bing.xml
%exclude %{_libdir}/%{name}-%{version}/browser/searchplugins/duckduckgo-palemoon.xml
%exclude %{_libdir}/%{name}-%{version}/browser/searchplugins/ecosia.xml
%exclude %{_libdir}/%{name}-%{version}/browser/searchplugins/ekoru.xml
%exclude %{_libdir}/%{name}-%{version}/browser/searchplugins/google.xml
%exclude %{_libdir}/%{name}-%{version}/browser/searchplugins/mojeek.xml
%exclude %{_libdir}/%{name}-%{version}/browser/searchplugins/wikipedia.xml
%exclude %{_libdir}/%{name}-%{version}/browser/searchplugins/yahoo.xml

#----------------------------------------------------------------------------

%package searchplugins
Summary:	Additional search engines for %{name}
Group:		Development/Other

%description searchplugins
Additional search engines for %{name}.

%files searchplugins
%{_libdir}/%{name}-%{version}/browser/searchplugins/bing.xml
%{_libdir}/%{name}-%{version}/browser/searchplugins/duckduckgo-palemoon.xml
%{_libdir}/%{name}-%{version}/browser/searchplugins/ecosia.xml
%{_libdir}/%{name}-%{version}/browser/searchplugins/ekoru.xml
%{_libdir}/%{name}-%{version}/browser/searchplugins/google.xml
%{_libdir}/%{name}-%{version}/browser/searchplugins/mojeek.xml
%{_libdir}/%{name}-%{version}/browser/searchplugins/wikipedia.xml
%{_libdir}/%{name}-%{version}/browser/searchplugins/yahoo.xml

#----------------------------------------------------------------------------

%package devel
Summary:	Development files for %{name}
Group:		Development/Other

%description devel
Files and macros mainly for building New Moon extensions.

%files devel
%{_rpmmacrodir}/*%{name}*

#----------------------------------------------------------------------------

# Expand all languages packages.
%{expand:%(\
	for lang in %langlist; do\
		echo "%%{expand:%%(sed "s!__LANG__!$lang!g" %{_sourcedir}/%{name}-l10n-template.in 2> /dev/null)}";\
	done\
	)
}

#----------------------------------------------------------------------------

%prep
%setup -qn pale-moon -a1 -a12
%autopatch -p1
rmdir platform
mv uxp platform
patch -p1 < %{SOURCE7}
patch -p1 < %{SOURCE8}
mv %{name}-l10n-%{over}/*.xpi ./

pushd platform/js/src
autoconf-2.13
popd
autoconf-2.13

%build
%ifarch %{ix86}
%global optflags %(echo %{optflags} | sed -e 's/-gdwarf-4//' -e 's/-Wa,--compress-debug-sections//')
%endif

%set_build_flags
CFLAGS=$(echo %{optflags} | sed -e 's/-fexceptions//')
CFLAGS="$CFLAGS -fno-strict-aliasing -Wno-ignored-optimization-argument"
CXXFLAGS="$CFLAGS -fpermissive"
RPM_OPT_FLAGS="$CFLAGS"
LDFLAGS="%{ldflags}"
export CFLAGS
export CXXFLAGS
export RPM_OPT_FLAGS
export LDFLAGS

export MOZCONFIG=`pwd`/mozconfig
cat << EOF > $MOZCONFIG
ac_add_options --datadir="%{_datadir}"
# https://github.com/MoonchildProductions/UXP/issues/1073
ac_add_options --disable-accessibility
ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
ac_add_options --disable-optimize
ac_add_options --disable-startupcache
ac_add_options --disable-tests
ac_add_options --disable-webrtc
ac_add_options --enable-application=%{oname}
ac_add_options --enable-av1
ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --enable-devtools
ac_add_options --enable-faststripe
ac_add_options --enable-gamepad
ac_add_options --enable-jemalloc
ac_add_options --enable-libproxy
ac_add_options --enable-raw
ac_add_options --enable-sndio
ac_add_options --enable-startup-notification
ac_add_options --enable-synth-pico
ac_add_options --enable-system-cairo
ac_add_options --enable-system-pixman
#ac_add_options --enable-ui-locale=ru-RU
ac_add_options --host=%{_host}
ac_add_options --includedir="%{_includedir}"
ac_add_options --libdir="%{_libdir}"
ac_add_options --prefix="%{_prefix}"
ac_add_options --target=%{_target_platform}
ac_add_options --with-distribution-id=org.rosa
ac_add_options --with-pthreads
ac_add_options --with-system-bz2
ac_add_options --with-system-jpeg
mk_add_options AUTOCLOBBER=1
mk_add_options MOZILLA_OFFICIAL=0
mk_add_options MOZ_MAKE_FLAGS="%{_smp_mflags}"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj
EOF

%ifarch %{ix86}
sed -i "/ac_add_options --enable-av1/ s/enable/disable/" $MOZCONFIG
%endif

./mach build --verbose

%install
make -C %{_builddir}/obj/%{oname}/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0

# Copy files to buildroot
mkdir -p %{buildroot}%{_libdir}/%{name}-%{version}
cp -rfL %{_builddir}/obj/dist/bin/* %{buildroot}%{_libdir}/%{name}-%{version}

mkdir -p %{buildroot}%{_bindir}
ln -sf %{_libdir}/%{name}-%{version}/%{oname} %{buildroot}%{_bindir}/%{name}
mkdir -p %{buildroot}%{_libdir}/%{name}-%{version}/browser/defaults/preferences/
install -m 644 %{SOURCE9} %{buildroot}%{_libdir}/%{name}-%{version}/browser/defaults/preferences/kde.js

# Create and own %%_libdir/mozilla/plugins & newmoon extensions directories
mkdir -p %{buildroot}%{_libdir}/mozilla/plugins
mkdir -p %{buildroot}%{_libdir}/mozilla/extensions/%{newmoon_appid}
mkdir -p %{buildroot}%{_datadir}/mozilla/extensions/%{newmoon_appid}

# (tpg) desktop entry
mkdir -p %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop

# (tpg) icons
for i in 16 22 24 32 48 128; do
# (cg) Not all icon sizes are installed with make install, so just redo it here.
	convert %{_builddir}/obj/dist/bin/browser/icons/mozicon128.png -scale ${i}x${i} %{buildroot}%{_libdir}/%{name}-%{version}/browser/chrome/icons/default/default${i}.png
	mkdir -p %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps
	ln -sf %{_libdir}/%{name}-%{version}/browser/chrome/icons/default/default$i.png %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps/%{name}.png ;
done

# exclusions
rm -f %{buildroot}%{_libdir}/%{name}-%{version}/README.txt
rm -f %{buildroot}%{_libdir}/%{name}-%{version}/removed-files
rm -f %{buildroot}%{_libdir}/%{name}-%{version}/precomplete

install -D -m644 %{oname}/app/profile/prefs.js %{buildroot}%{_libdir}/%{name}-%{version}/browser/defaults/preferences/prefs.js
cat << EOF >> %{buildroot}%{_libdir}/%{name}-%{version}/browser/defaults/preferences/prefs.js
pref("app.update.auto", false);
pref("app.update.enabled", false);
pref("browser.backspace_action", 2);
pref("browser.ctrlTab.previews", true);
pref("browser.display.use_system_colors", true);
pref("browser.download.folderList", 1);
pref("browser.EULA.override", true);
pref("browser.link.open_newwindow", 3);
pref("browser.newtab.url", "file:///usr/share/doc/HTML/index.html");
pref("browser.search.openintab", true);
pref("browser.shell.checkDefaultBrowser", false);
pref("browser.startup.homepage", "file:///usr/share/doc/HTML/index.html");
pref("browser.startup.page", 1);
pref("browser.tabs.insertRelatedAfterCurrent", true);
pref("browser.tabs.onTop", true);
pref("dom.ipc.plugins.enabled.nswrapper*", false);
pref("extensions.autoDisableScopes", 0);
pref("extensions.shownSelectionUI", true);
pref("general.useragent.compatMode", 2);
pref("general.useragent.override.consultant.ru", "Mozilla/5.0 (X11; Linux %{_target_cpu}; rv:78.0) Gecko/20100101 Firefox/78.0");
pref("intl.locale.matchOS", true);
pref("network.manage-offline-status", true);
pref("startup.homepage_welcome_url", "file:///usr/share/doc/HTML/first_startup.html");
pref("startup.homepage_override_url", "file:///usr/share/doc/HTML/index.html");
EOF

install -m644 %{SOURCE2} %{buildroot}%{_libdir}/%{name}-%{version}/browser/defaults/preferences/xulstore.json

cp %{SOURCE10} %{SOURCE11} %{buildroot}%{_libdir}/%{name}-%{version}/dictionaries

# (lm) touch and %%ghost bookmarks.html to a proper uninstall
touch %{buildroot}%{_libdir}/%{name}-%{version}/browser/defaults/preferences/bookmarks.html

# search engines
mkdir -p %{buildroot}%{_libdir}/%{name}-%{version}/browser/searchplugins
cp %{SOURCE5} %{buildroot}%{_libdir}/%{name}-%{version}/browser/searchplugins/yandex.xml
cp %{SOURCE6} %{buildroot}%{_libdir}/%{name}-%{version}/browser/searchplugins/google.xml
cp %{oname}/locales/en-US/searchplugins/bing.xml %{buildroot}%{_libdir}/%{name}-%{version}/browser/searchplugins/bing.xml
cp %{oname}/locales/en-US/searchplugins/duckduckgo-%{oname}.xml %{buildroot}%{_libdir}/%{name}-%{version}/browser/searchplugins/duckduckgo-%{oname}.xml
cp %{oname}/locales/en-US/searchplugins/wikipedia.xml %{buildroot}%{_libdir}/%{name}-%{version}/browser/searchplugins/wikipedia.xml
cp %{oname}/locales/en-US/searchplugins/yahoo.xml %{buildroot}%{_libdir}/%{name}-%{version}/browser/searchplugins/yahoo.xml

cat <<EOF >macro
# Macros from %{name} package
%%newmoon_major %{version}
%%newmoon_version %{version}
%%newmoon_mozillapath %{_libdir}/%{name}-%{version}
%%newmoon_pluginsdir %{_libdir}/mozilla/plugins
%%newmoon_appid \{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4\}
%%newmoon_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{newmoon_appid}; else echo %%{_libdir}/mozilla/extensions/%%{newmoon_appid}; fi)
EOF
%install_macro %{name} macro

# Default useragent for webvideo like tvzvezda
sed -i -e "/general.useragent.compatMode.firefox/ s/false/true/"	\
	-e "/general.useragent.compatMode.gecko/ s/false/true/"		\
	-e "/general.useragent.compatMode/ s/0/2/"			\
	%{buildroot}%{_libdir}/%{name}-%{version}/browser/defaults/preferences/palemoon.js		\
	%{buildroot}%{_libdir}/%{name}-%{version}/browser/defaults/preferences/palemoon-branding.js	\
	%{buildroot}%{_libdir}/%{name}-%{version}/goanna.js

# newmoon-l10n
# Convert rpm macros to bash variables
%{expand:%(for lang in %langlist; do echo "language_$lang=%%{language_$lang}"; done)}

mkdir -p %{buildroot}%{newmoon_extdir}/

# Install all languages
for lang in %{langlist}; do
	language="language_$lang"
	language=${!language}
	# l10n
	mkdir ${language}
	mv pm-langpack-$(echo $lang |tr _ - |tr '[:upper:]' '[:lower:]')-%{over}.xpi ${language}/${language}.xpi
	pushd ${language}
	unzip -q ${language}.xpi
	install -m 644 %{SOURCE14} browser/chrome/${language}/locale/branding/brand.dtd
	install -m 644 %{SOURCE15} browser/chrome/${language}/locale/branding/brand.properties
	if [ "$language" = ru ]; then
		sed -i "s/Developer Tools/Средства разработчика/" browser/chrome/ru/locale/browser/browser.dtd
		sed -i "/webDeveloperMenu\.accesskey/ s/\x22v\x22/\x22е\x22/" browser/chrome/ru/locale/browser/browser.dtd
		sed -i "s/Service Workers/Фоновые скрипты/" browser/chrome/ru/locale/ru/devtools/client/menus.properties
		sed -i "s/\(devtoolsServiceWorkers.accesskey=\)k/\1к/" browser/chrome/ru/locale/ru/devtools/client/menus.properties
		sed -i "s/System Defaults/Настройки системы/" browser/chrome/ru/locale/browser/preferences/main.dtd
		sed -i "s/Always check to see if/Всегда проверять, что/" browser/chrome/ru/locale/browser/preferences/main.dtd
		sed -i "/alwaysCheckDefault\.accesskey/ s/\x22w\x22/\x22е\x22/" browser/chrome/ru/locale/browser/preferences/main.dtd
		sed -i "s/is the default browser on startup/выставлен браузером по умолчанию/" browser/chrome/ru/locale/browser/preferences/main.dtd
		sed -i "s/Make /Выставить /" browser/chrome/ru/locale/browser/preferences/main.dtd
		sed -i "s/; the default browser/; браузером по умолчанию/" browser/chrome/ru/locale/browser/preferences/main.dtd
		sed -i "s/is currently your default browser/выставлен браузером по умолчанию/" browser/chrome/ru/locale/browser/preferences/main.dtd
		sed -i "s/Data Privacy/приватность/" browser/chrome/ru/locale/browser/preferences/privacy.dtd
		sed -i "s/Tell sites not to share or sell my data/Просить сайты не распространять и не продавать мои данные/" browser/chrome/ru/locale/browser/preferences/privacy.dtd
		sed -i "/sendGPCheader\.accesskey/ s/\x22n\x22/\x22н\x22/" browser/chrome/ru/locale/browser/preferences/privacy.dtd
		sed -i "s/Learn More/Узнать больше/" browser/chrome/ru/locale/browser/preferences/privacy.dtd
	fi
	zip -q -r ${language}.xpi *
	mv ${language}.xpi ../
	popd
	rm -rf ${language}
	install -m 644 ${language}.xpi %{buildroot}%{newmoon_extdir}/langpack-${language}@palemoon.org.xpi
done

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 71 |14mr|nlohmann_json-3.11.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define     debug_package %{nil}

Name:           nlohmann_json
Version:	3.11.3
Release:	1
Summary:        JSON for Modern C++
License:        MIT
Group:          Development/Java
URL:            https://nlohmann.github.io/json/
Source:         https://github.com/nlohmann/json/archive/v%{version}.tar.gz#/json-%{version}.tar.gz
Patch0:         nlohman_json-install-path.patch
BuildRequires:  cmake
BuildRequires:  pkgconfig

Requires:       stdc++-devel
Provides:       %{name}-devel = %{EVRD}

%description
Development files for a header-only library
to make JSON a first-class datatype for C++11

%prep
%autosetup -n json-%{version} -p1

%build
%cmake \
  -DJSON_BuildTests:BOOL=OFF \
  -DJSON_MultipleHeaders=ON

%make_build

%install
%make_install -C build

%files
%license LICENSE.MIT
%doc README.md
%{_includedir}/nlohmann
%dir %{_libdir}/cmake/nlohmann_json
%{_libdir}/cmake/nlohmann_json/nlohmann_jsonConfig.cmake
%{_libdir}/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake
%{_libdir}/cmake/nlohmann_json/nlohmann_jsonTargets.cmake
%{_libdir}/pkgconfig/nlohmann_json.pc

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 72 |14mr|nvchecker-2.20-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	New version checker for software releases
Name:		nvchecker
Version:	2.20
Release:	1
License:	MIT
Group:		Development/Other
Url:		https://github.com/lilydjwg/nvchecker
Source0:	https://github.com/lilydjwg/nvchecker/archive/refs/tags/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros
Provides:	python3-%{name} = %{EVRD}
BuildArch:	noarch

%description
nvchecker (short for new version checker) is for checking
if a new version of some software has been released.

%files
%doc README.rst
%{_bindir}/nvchecker
%{_bindir}/nvchecker-ini2toml
%{_bindir}/nvchecker-notify
%{_bindir}/nvcmp
%{_bindir}/nvtake
%{python3_sitelib}/nvchecker_source
%{python3_sitelib}/nvchecker-%{version}*-info
%{python3_sitelib}/nvchecker

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{name}-%{version}

# for autoinstall BuildRequires
%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 73 |14mr|nvidia615-615.71.09-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define _duplicate_files_terminate_build 0

# FIXME: fix the cases when immediate symbol resolution is not enough.
# For the present, fall back to the old symbol resolution rules for ld.
%define _disable_ld_now 1

# Do not spend a lot of time on useless generator if it is installed locally
%define __typelib_path %{nil}

# Disable debug rpms.
%define _enable_debug_packages	%{nil}
%define debug_package		%{nil}

%define priority	9700
%ifarch aarch64
%define pkgname64	NVIDIA-Linux-aarch64-%{version}
%else
%define pkgname64	NVIDIA-Linux-x86_64-%{version}
%endif
%define drivername		%{name}
%define driverpkgname		%{name}-core
%define modulename		nvidia
# for description and documentation
%define xorg_extra_modules	%{_libdir}/xorg/extra-modules
%define nvidia_driversdir	%{_libdir}/%{drivername}/xorg
%define nvidia_extensionsdir	%{_libdir}/%{drivername}/xorg
%define nvidia_modulesdir	%{_libdir}/%{drivername}/xorg
%define nvidia_wine	        %{_libdir}/%{drivername}/wine
%define nvidia_libdir		%{_libdir}/%{drivername}
%define nvidia_libdir32		%{_prefix}/lib/%{drivername}
%define nvidia_bindir		%{nvidia_libdir}/bin

%define pkgname %{pkgname64}

# wine, steam etc. will pull them
%bcond_with force_32bit_deps
%bcond_without binary_kernel_modules

# 1) Dependencies from itself (from filtered provides) (libnv*, libEGL_nvidia*)
# 2) (anssi) Allow installing of 64-bit package if the runtime dependencies
# of 32-bit libraries are not satisfied. If a 32-bit package that requires
# libGL.so.1 is installed, the 32-bit mesa libs are pulled in and that will
# pull the dependencies of 32-bit nvidia libraries in as well.
# 3) No need to depend from OpenSSL 3. Those who need offloading feature
# for OpenSSL will have it installed, others may not have OpenSSL 3.x in ROSA < 2023.1
%global __requires_exclude ^lib(nv|cuda|nvidia|EGL|GL|X11|Xext|xcb|drm|gbm|wayland|crypto).*\\.so(\\.[^\\s]*)?$

# no need to provide libraries in %%nvidia_libdir
%global __provides_exclude ^lib.*\\.so

%global major %(echo %{version} | awk -F '.' '{print $1}')

%if %{with binary_kernel_modules}
# e.g.: kabi_72 = 7.2.8-generic-1rosa14-x86_64
%define kabi_72 %(if rpm -q kernel-7.2-generic-devel 1>/dev/null 2>/dev/null; then rpm -ql kernel-7.2-generic-devel | grep -E '/lib/modules/.*/source$' | tail -n1 | awk -F '/' '{print $(NF-1)}'; else echo 0; fi)
%define version_j %(echo %{VERSION} | awk -F '.' '{print $1}')
%define version_n %(echo %{VERSION} | awk -F '.' '{print $2}')
# For SRPM stage when auto-krokodil-rpm-macros is not installed
%{?!kroko_req_modules_in_nvidia:%global kroko_req_modules_in_nvidia(k:f:j:n:) %{nil}}
%{?!kroko_mk_release:%global kroko_mk_release(n:) %{nil}}
# global, not define, must be expanded only once
%global kroko_release %kroko_mk_release -n nvidia%{major}
# For SRPM stage when auto-krokodil-rpm-macros is not installed
%{?!kroko_req_modules_in_nvidia:%define kroko_req_modules_in_nvidia(k:f:j:n:) %{nil}}
%endif

# Make parts of different major versions of drivers conflict with one another
# to guarantee that each of them is automaticaly removed when running
# dnf --allowerasing nvidiaXXX-core
# when nvidiaYYY is already installed and pulled nvidiaYYY-n as its dependency.
# n - name
%define nv_cross_conflict(n:) %{expand:
Provides:	nvidia-%{-n*} = %{major}
Conflicts:	nvidia-%{-n*} > %{major}
Conflicts:	nvidia-%{-n*} < %{major}
}

# Replace non-LTS/obsolete branches if all hardware supported by them
# is supported by this branch (because NVIDIA stopped maintaining
# compatibility with new kernels and minor updates to old kernels)
%bcond_with replace
%if %{with replace}
%define replace_list 510 515 520 525 550 555 565 570 575 580 590 595 610
# n - name
%define nv_replace_branch(n:) %{expand:
%(for i in %{replace_list}; do
  echo "Conflicts: nvidia$i-%{-n*} < %{major}";
  echo "Obsoletes: nvidia$i-%{-n*} < %{major}";
done)}
%define kmod_replace_args -o %{quote:%{replace_list}}
%else
%define nv_replace_branch(n:) %{nil}
%define kmod_replace_args %{nil}
%endif

%define _firmwarepath /usr/lib/firmware

Summary:	NVIDIA proprietary X.org driver and libraries
Name:		nvidia615
Version:	615.71.09
Release:	1
%ifarch aarch64
Source0:	http://download.nvidia.com/XFree86/Linux-aarch64/%{version}/%{pkgname64}.run
%else
Source0:	http://download.nvidia.com/XFree86/Linux-x86_64/%{version}/%{pkgname64}.run
%endif
Source1:	https://download.nvidia.com/XFree86/NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-%{version}.tar.xz
# GPLv2 source code; see also http://cgit.freedesktop.org/~aplattner/
Source2:	http://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-%{version}.tar.bz2
Source3:	http://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-%{version}.tar.bz2
Source4:	http://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-%{version}.tar.bz2
Source5:	http://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-%{version}.tar.bz2
Source6:	https://gitweb.frugalware.org/frugalware-current/raw/master/source/x11-extra/nvidia/xorg-nvidia.conf
Source7:	60-nvidia.rules
Source10:	60-nvidia-uvm.rules
Source11:	nvidia-uvm.conf
Source13:	10-nvidia.rules
Source16:	nvidia-power-management.conf
Source17:	70-nvidia.preset

Source100:	%{name}.rpmlintrc

# Allow building the drivers with a different GCC version than the kernel.
# Might be risky but it is still better than failed builds of the drivers
# resulting in broken graphics at the users' machines after a GCC update.
Patch1:		no-cc-version-check.patch

License:	Freeware
URL:		http://www.nvidia.com/object/unix.html
Group:		System/Kernel and hardware
Provides:	should-restart = system

# Staring from v396.x, 32-bit x86 systems are not supported by the driver.
# aarch64: for Tegra/Grace (GB10, DGX Spark) and PCIe NVIDIA GPUs in ARM servers
ExclusiveArch:	%{x86_64} aarch64

BuildRequires:	auto-krokodil-rpm-generators
%if %{with binary_kernel_modules}
BuildRequires:	auto-krokodil-rpm-macros >= 0.32
BuildRequires:	kernel-7.2-generic-devel
BuildRequires:	findutils
BuildRequires:	zstd
%endif
BuildRequires:	jq
BuildRequires:	imagemagick
BuildRequires:	pkgconfig(pciaccess)
BuildRequires:	pkgconfig(xrender)
BuildRequires:	pkgconfig(gtk+-2.0)
BuildRequires:	pkgconfig(xv)
BuildRequires:	pkgconfig(gl)
BuildRequires:	pkgconfig(egl)
BuildRequires:	pkgconfig(xxf86vm)
BuildRequires:	pkgconfig(vdpau) >= 1.1
BuildRequires:	pkgconfig(libtirpc)
BuildRequires:	pkgconfig(dbus-1)
BuildRequires:	vulkan-headers

%description
The proprietary driver for NVidia GPUs, long-lived branch.

#-----------------------------------------------------------------------------

%package -n %{driverpkgname}
Summary:	NVIDIA proprietary X.org driver and libraries
Group:		System/Kernel and hardware
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends:	%{drivername}-doc-html = %{EVRD}
Provides:	%{name} = %{EVRD}
# package was renamed
Obsoletes:	x11-driver-video-%{drivername} < %{EVRD}
Conflicts:	x11-driver-video-%{drivername} < %{EVRD}
# At least mplayer dlopens libvdpau.so.1, so the software will not pull in
# the vdpau library package. We ensure its installation here.
Requires:	%{_lib}vdpau1 >= 1.1
Requires:	auto-krokodil-filesystem
Recommends:	%{drivername}-cuda-opencl = %{EVRD}
Requires:	(%{drivername}-proprietary-kernel-modules or %{drivername}-open-kernel-modules or dkms-%{drivername}-proprietary or dkms-%{drivername}-open)
# We (bitedasher@ and mikhailnov@) believe that today, 30.09.2025, most users need proprietary, not open modules
# TOOD: look into webservers stats, which package is downloaded more often
Suggests:	%{drivername}-proprietary-kernel-modules
Requires:	(%{drivername}-dracut if dracut)
Requires:	%{drivername}-blacklist
Requires:	%{drivername}-power
Requires:	%{drivername}-wayland

Requires:	%{_lib}gldispatch0
Requires:	%{_lib}opengl0
Requires:	%{_lib}glvnd-glx
Requires:	%{_lib}glvnd-egl
Requires:	%{_lib}glvnd-gles
Requires:	%{_lib}nvidia-egl-gbm1
Requires:	%{_lib}nvidia-egl-xcb1
Requires:	%{_lib}nvidia-egl-wayland1
# Copied from the task-x11 package.
# These packages are needed in the wayland session if the
# task-x11 package along with the dependencies is deleted.
Recommends:	libvdpau-va-gl
Recommends:	nvidia-vaapi-driver
Recommends:	vaapi-driver-vdpau
# set SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false for systemd 256+
# https://github.com/systemd/systemd/commit/0b958bb3e
Recommends:	systemd-settings-disable-freeze-user-sessions-on-sleep

# Package cannot be installed as BuildRequires if it requires both
# 64 and 32 bit packages. Needed for python-pyopencl build on ABF.
%if %{with force_32bit_deps}
# Pull the 32-bit GLVND libraries in as well, the 32-bit applications
# running on 64-bit systems (e.g. Steam) might need them.
Recommends:	libgldispatch0
Recommends:	libopengl0
Recommends:	libglvnd-glx
Recommends:	libglvnd-egl
Recommends:	libglvnd-gles
Recommends:	libnvidia-egl-gbm1
Recommends:	libnvidia-egl-xcb1
Recommends:	libnvidia-egl-wayland1

%endif
Requires:	egl-gbm
Requires:	egl-wayland
Requires:	egl-wayland2
Requires:	egl-x11
Requires:	vulkan
Requires:	libglvnd
Provides:	nvidia = %{EVRD}
%nv_cross_conflict -n core
%nv_replace_branch -n core

%description -n %{driverpkgname}
NVIDIA proprietary X.org graphics driver, related libraries and
configuration tools.

%files -n %{driverpkgname} -f %{pkgname}/nvidia.files
%ghost %{_sysconfdir}/ld.so.conf.d/GL.conf
%ghost %{_sysconfdir}/X11/xinit.d/nvidia-settings.xinit
%dir %{_sysconfdir}/%{drivername}
%{_sysconfdir}/modprobe.d/%{drivername}.conf
%{_sysconfdir}/%{drivername}/ld.so.conf
%{_sysconfdir}/%{drivername}/nvidia-settings.xinit
%{_sysconfdir}/%{drivername}/nvidia.icd
%{_sysconfdir}/vulkan/icd.d/nvidia_icd.json
%ifarch x86_64
%{_sysconfdir}/vulkansc/icd.d/nvidia_icd_vksc.json
%endif
%{_sysconfdir}/vulkan/implicit_layer.d/nvidia_layers.json
%{_datadir}/glvnd/egl_vendor.d/10_nvidia.json
%{_datadir}/egl/egl_external_platform.d/10_nvidia_wayland.json
%{_datadir}/egl/egl_external_platform.d/15_nvidia_gbm.json
%{_datadir}/egl/egl_external_platform.d/09_nvidia_wayland2.json
%dir %{_datadir}/nvidia
%{_datadir}/nvidia/nvidia-application-profiles-%{version}-rc
%{_datadir}/nvidia/nvidia-application-profiles-%{version}-key-documentation
%{_datadir}/nvidia/nvoptix.bin
%{_datadir}/nvidia/dlsnetparams.csv

%dir %{_sysconfdir}/OpenCL
%dir %{_sysconfdir}/OpenCL/vendors
%ghost %{_sysconfdir}/OpenCL/vendors/nvidia.icd
%{_datadir}/X11/xorg.conf.d/15-nvidia.conf
%{_libdir}/gbm/nvidia-drm_gbm.so
%ifarch x86_64
%{_prefix}/lib/gbm/nvidia-drm_gbm.so
%endif

%ghost %{_bindir}/nvidia-debugdump
%ghost %{_bindir}/nvidia-ngx-updater
%ghost %{_bindir}/nvidia-settings
%ghost %{_bindir}/nvidia-smi
%ghost %{_bindir}/nvidia-xconfig
%ghost %{_bindir}/nvidia-modprobe
%ghost %{_bindir}/nvidia-persistenced
%ghost %{_bindir}/nvidia-bug-report.sh
%ghost %{_bindir}/nvidia-powerd
%ifarch x86_64
%ghost %{_bindir}/nvidia-pcc
%endif
%ghost %{_bindir}/nvidia-sleep.sh
%ghost %{_bindir}/nvidia-cuda-mps-control
%ghost %{_bindir}/nvidia-cuda-mps-server
%ghost %{_bindir}/nvidia-networking-bug-report.py
%dir %{nvidia_bindir}
%{nvidia_bindir}/nvidia-debugdump
%{nvidia_bindir}/nvidia-ngx-updater
%{nvidia_bindir}/nvidia-settings
%{nvidia_bindir}/nvidia-smi
%{nvidia_bindir}/nvidia-xconfig
%{nvidia_bindir}/nvidia-modprobe
%{nvidia_bindir}/nvidia-persistenced
%{nvidia_bindir}/nvidia-bug-report.sh
%{nvidia_bindir}/nvidia-powerd
%ifarch x86_64
%{nvidia_bindir}/nvidia-pcc
%endif
%{nvidia_bindir}/nvidia-sleep.sh
%{nvidia_bindir}/nvidia-cuda-mps-control
%{nvidia_bindir}/nvidia-cuda-mps-server
%{nvidia_bindir}/nvidia-networking-bug-report.py

%{_firmwarepath}/nvidia/gsp_ga10x.bin
%{_firmwarepath}/nvidia/gsp_tu10x.bin
%{_firmwarepath}/nvidia/ucodes_ga10x.bin
%{_firmwarepath}/nvidia/ucodes_tu10x.bin
%{_firmwarepath}/nvidia/%{version}/gsp_ga10x.bin
%{_firmwarepath}/nvidia/%{version}/gsp_tu10x.bin
%{_firmwarepath}/nvidia/%{version}/ucodes_ga10x.bin
%{_firmwarepath}/nvidia/%{version}/ucodes_tu10x.bin
%{_sysconfdir}/modprobe.d/nvidia-uvm.conf
%{_udevrulesdir}/10-nvidia.rules
# UDev rules for PCI-Express Runtime D3 (RTD3) Power Management
%{_udevrulesdir}/60-nvidia.rules
%{_udevrulesdir}/60-nvidia-uvm.rules

%ghost %{_mandir}/man1/nvidia-xconfig.1%{_extension}
%ghost %{_mandir}/man1/nvidia-settings.1%{_extension}
%ghost %{_mandir}/man1/nvidia-modprobe.1%{_extension}
%ghost %{_mandir}/man1/nvidia-persistenced.1%{_extension}
%ghost %{_mandir}/man1/nvidia-smi.1%{_extension}
%ghost %{_mandir}/man1/nvidia-cuda-mps-control.1%{_extension}
%{_mandir}/man1/alt-%{drivername}-xconfig.1*
%{_mandir}/man1/alt-%{drivername}-settings.1*
%{_mandir}/man1/alt-%{drivername}-modprobe.1*
%{_mandir}/man1/alt-%{drivername}-persistenced.1*
%{_mandir}/man1/alt-%{drivername}-smi.1*
%{_mandir}/man1/alt-%{drivername}-cuda-mps-control.1*

%ghost %{_datadir}/applications/rosa-nvidia-settings.desktop
%dir %{_datadir}/%{drivername}
%{_datadir}/%{drivername}/rosa-nvidia-settings.desktop

%{_datadir}/egl/egl_external_platform.d/20_nvidia_xcb.json
%{_datadir}/egl/egl_external_platform.d/20_nvidia_xlib.json

%{_datadir}/nvidia/files.d/sandboxutils-filelist.json

%{_iconsdir}/hicolor/16x16/apps/%{drivername}-settings.png
%{_iconsdir}/hicolor/32x32/apps/%{drivername}-settings.png
%{_iconsdir}/hicolor/48x48/apps/%{drivername}-settings.png
%{_iconsdir}/hicolor/128x128/apps/nvidia-settings.png

%dir %{nvidia_libdir}
%dir %{nvidia_libdir}/vdpau
%{_libdir}/nvidia
%{nvidia_libdir}/libGLX_nvidia.so.%{version}
%{nvidia_libdir}/libGLX_nvidia.so.0
%{nvidia_libdir}/libGLX_indirect.so.0
%{nvidia_libdir}/libnvidia-nvvm70.so.4
%{nvidia_libdir}/libnvidia-fmdrv.so.1
%{nvidia_libdir}/libnvidia-fmdrv.so.%{version}
%{nvidia_libdir}/libnvidia-imex.so.1
%{nvidia_libdir}/libnvidia-imex.so.%{version}
%{nvidia_libdir}/libnvidia-present.so.%{version}
%{nvidia_libdir}/libnvidia-ptxjitcompiler.so.*
%{nvidia_libdir}/libnvidia-glcore.so.%{version}
%{nvidia_libdir}/libnvidia-cfg.so.%{version}
%{nvidia_libdir}/libnvidia-tls.so.%{version}
%{nvidia_libdir}/libnvidia-glvkspirv.so.%{version}
%{nvidia_libdir}/vdpau/libvdpau_nvidia.so.%{version}
%{nvidia_libdir}/libEGL_nvidia.so.0
%{nvidia_libdir}/libEGL_nvidia.so.%{version}
%{nvidia_libdir}/libGLESv1_CM_nvidia.so.1
%{nvidia_libdir}/libGLESv1_CM_nvidia.so.%{version}
%{nvidia_libdir}/libGLESv2_nvidia.so.2
%{nvidia_libdir}/libGLESv2_nvidia.so.%{version}
%{nvidia_libdir}/libnvidia-allocator.so.%{version}
%{nvidia_libdir}/libnvidia-allocator.so.1
%{nvidia_libdir}/libnvidia-api.so.1
%{nvidia_libdir}/libnvidia-eglcore.so.%{version}
%{nvidia_libdir}/libnvidia-egl-xcb.so.1*
%{nvidia_libdir}/libnvidia-egl-xlib.so.1*
%ifarch x86_64
%{nvidia_libdir}/libnvidia-vksc-core.so.1
%{nvidia_libdir}/libnvidia-vksc-core.so.%{version}
%endif
%{nvidia_libdir}/libnvidia-glsi.so.%{version}
%{nvidia_libdir}/libnvidia-gpucomp.so.%{version}
%{nvidia_libdir}/libnvidia-cfg.so.1
%{nvidia_libdir}/libnvidia-fbc.so.1
%{nvidia_libdir}/libnvidia-fbc.so.%{version}
%{nvidia_libdir}/libnvidia-ml.so.1
%{nvidia_libdir}/libnvidia-ml.so.%{version}
%{nvidia_libdir}/libnvidia-gtk2.so.%{version}
%{nvidia_libdir}/libnvidia-gtk3.so.%{version}
%{nvidia_libdir}/libnvidia-egl-wayland.so.1*
%{nvidia_libdir}/libnvidia-egl-wayland2.so.1*
%{nvidia_libdir}/libnvidia-egl-gbm.so.1*
%{nvidia_libdir}/libnvidia-rtcore.so.%{version}
%{nvidia_libdir}/libnvoptix.so.%{version}
%{nvidia_libdir}/libnvoptix.so.1
%{nvidia_libdir}/libnvidia-opticalflow.so.%{version}
%{nvidia_libdir}/libnvidia-opticalflow.so.1
%{nvidia_libdir}/libnvidia-ngx.so.%{version}
%{nvidia_libdir}/libnvidia-nvvm.so.4
%{nvidia_libdir}/libnvidia-nvvm.so.%{version}
%ifarch x86_64
%{nvidia_libdir}/libnvidia-pkcs11-openssl3.so.%{version}
%{nvidia_libdir}/libnvidia-pkcs11.so.%{version}
%endif
%{nvidia_libdir}/libnvidia-sandboxutils.so.1
%{nvidia_libdir}/libnvidia-sandboxutils.so.%{version}
%ifarch x86_64
%{nvidia_libdir}/libnvidia-wayland-client.so.%{version}
%endif
%{nvidia_libdir}/libnvidia-tileiras.so.%{version}
%ifarch aarch64
%{nvidia_libdir}/libnvidia-rmapi-tegra.so.%{version}
%endif
%ifarch x86_64
%dir %{nvidia_libdir32}
%dir %{nvidia_libdir32}/vdpau
%{_prefix}/lib/nvidia
%{nvidia_libdir32}/libGLX_nvidia.so.%{version}
%{nvidia_libdir32}/libGLX_nvidia.so.0
%{nvidia_libdir32}/libGLX_indirect.so.0
%{nvidia_libdir32}/libnvidia-ptxjitcompiler.so.*
%{nvidia_libdir32}/libnvidia-glcore.so.%{version}
%{nvidia_libdir32}/libnvidia-ml.so.1
%{nvidia_libdir32}/libnvidia-ml.so.%{version}
%{nvidia_libdir32}/libnvidia-nvvm.so.4
%{nvidia_libdir32}/libnvidia-nvvm.so.%{version}
%{nvidia_libdir32}/libnvidia-tls.so.%{version}
%{nvidia_libdir32}/libnvidia-glvkspirv.so.%{version}
%{nvidia_libdir32}/vdpau/libvdpau_nvidia.so.%{version}
%{nvidia_libdir32}/libnvidia-fbc.so.1
%{nvidia_libdir32}/libnvidia-fbc.so.%{version}
%{nvidia_libdir32}/libEGL_nvidia.so.0
%{nvidia_libdir32}/libEGL_nvidia.so.%{version}
%{nvidia_libdir32}/libGLESv1_CM_nvidia.so.1
%{nvidia_libdir32}/libGLESv1_CM_nvidia.so.%{version}
%{nvidia_libdir32}/libGLESv2_nvidia.so.2
%{nvidia_libdir32}/libGLESv2_nvidia.so.%{version}
%{nvidia_libdir32}/libnvidia-eglcore.so.%{version}
%{nvidia_libdir32}/libnvidia-egl-gbm.so.1*
%{nvidia_libdir32}/libnvidia-egl-wayland.so.1*
%{nvidia_libdir32}/libnvidia-egl-wayland2.so.1*
%{nvidia_libdir32}/libnvidia-egl-xcb.so.1*
%{nvidia_libdir32}/libnvidia-egl-xlib.so.1*
%{nvidia_libdir32}/libnvidia-glsi.so.%{version}
%{nvidia_libdir32}/libnvidia-gpucomp.so.%{version}
%{nvidia_libdir32}/libnvidia-opticalflow.so.%{version}
%{nvidia_libdir32}/libnvidia-opticalflow.so.1
%{nvidia_libdir32}/libnvidia-allocator.so.%{version}
%{nvidia_libdir32}/libnvidia-allocator.so.1
%{nvidia_libdir32}/libnvidia-tileiras.so.%{version}
%endif

%ghost %{_libdir}/vdpau/libvdpau_nvidia.so.1
%ifarch x86_64
%ghost %{_prefix}/lib/vdpau/libvdpau_nvidia.so.1
%endif

%dir %{nvidia_modulesdir}
%{nvidia_extensionsdir}/libglxserver_nvidia.so.%{version}
%{nvidia_extensionsdir}/libglxserver_nvidia.so
%{nvidia_driversdir}/nvidia_drv.so

%ifarch x86_64
%{nvidia_wine}/_nvngx.dll
%{nvidia_wine}/nvngx.dll
%{nvidia_wine}/nvngx_dlssg.dll
%endif

%postun -n %{driverpkgname}
if [ ! -f %{_sysconfdir}/%{drivername}/ld.so.conf ]; then
  %{_sbindir}/update-alternatives --remove gl_conf %{_sysconfdir}/%{drivername}/ld.so.conf
fi
# explicit /sbin/ldconfig due to alternatives
/sbin/ldconfig -X

%posttrans -n %{driverpkgname}
%{_sbindir}/update-alternatives \
	--install %{_sysconfdir}/ld.so.conf.d/GL.conf gl_conf %{_sysconfdir}/%{drivername}/ld.so.conf %{priority} \
	--slave %{_mandir}/man1/nvidia-settings.1%{_extension} man_nvidiasettings%{_extension} %{_mandir}/man1/alt-%{drivername}-settings.1%{_extension} \
	--slave %{_mandir}/man1/nvidia-xconfig.1%{_extension} man_nvidiaxconfig%{_extension} %{_mandir}/man1/alt-%{drivername}-xconfig.1%{_extension} \
	--slave %{_mandir}/man1/nvidia-smi.1%{_extension} nvidia-smi.1%{_extension} %{_mandir}/man1/alt-%{drivername}-smi.1%{_extension} \
	--slave %{_mandir}/man1/nvidia-cuda-mps-control.1%{_extension} nvidia-cuda-mps-control.1%{_extension} %{_mandir}/man1/alt-%{drivername}-cuda-mps-control.1%{_extension} \
	--slave %{_datadir}/applications/rosa-nvidia-settings.desktop nvidia_desktop %{_datadir}/%{drivername}/rosa-nvidia-settings.desktop \
	--slave %{_bindir}/nvidia-settings nvidia_settings %{nvidia_bindir}/nvidia-settings \
	--slave %{_bindir}/nvidia-smi nvidia_smi %{nvidia_bindir}/nvidia-smi \
	--slave %{_bindir}/nvidia-xconfig nvidia_xconfig %{nvidia_bindir}/nvidia-xconfig \
	--slave %{_bindir}/nvidia-debugdump nvidia-debugdump %{nvidia_bindir}/nvidia-debugdump \
	--slave %{_bindir}/nvidia-ngx-updater nvidia-ngx-updater %{nvidia_bindir}/nvidia-ngx-updater \
	--slave %{_bindir}/nvidia-bug-report.sh nvidia_bug_report %{nvidia_bindir}/nvidia-bug-report.sh \
	--slave %{_bindir}/nvidia-powerd nvidia-powerd %{nvidia_bindir}/nvidia-powerd \
	--slave %{_bindir}/nvidia-sleep.sh nvidia-sleep %{nvidia_bindir}/nvidia-sleep.sh \
	--slave %{_bindir}/nvidia-cuda-mps-control nvidia-cuda-mps-control %{nvidia_bindir}/nvidia-cuda-mps-control \
	--slave %{_bindir}/nvidia-cuda-mps-server nvidia-cuda-mps-server %{nvidia_bindir}/nvidia-cuda-mps-server \
	--slave %{_bindir}/nvidia-networking-bug-report.py nvidia-networking-bug-report.py %{nvidia_bindir}/nvidia-networking-bug-report.py \
	--slave %{_bindir}/nvidia-modprobe nvidia-modprobe %{nvidia_bindir}/nvidia-modprobe \
	--slave %{_bindir}/nvidia-persistenced nvidia-persistenced %{nvidia_bindir}/nvidia-persistenced \
	--slave %{_sysconfdir}/X11/xinit.d/nvidia-settings.xinit nvidia-settings.xinit %{_sysconfdir}/%{drivername}/nvidia-settings.xinit \
	--slave %{_libdir}/vdpau/libvdpau_nvidia.so.1 %{_lib}vdpau_nvidia.so.1 %{nvidia_libdir}/vdpau/libvdpau_nvidia.so.%{version} \
	--slave %{_sysconfdir}/OpenCL/vendors/nvidia.icd nvidia.icd %{_sysconfdir}/%{drivername}/nvidia.icd \
%ifarch x86_64
	--slave %{_prefix}/lib/vdpau/libvdpau_nvidia.so.1 libvdpau_nvidia.so.1 %{nvidia_libdir32}/vdpau/libvdpau_nvidia.so.%{version} \
%endif
	--slave %{xorg_extra_modules} xorg_extra_modules %{nvidia_extensionsdir}

# explicit /sbin/ldconfig due to alternatives
/sbin/ldconfig -X

#-----------------------------------------------------------------------------
%if %{with binary_kernel_modules}

%package -n %{drivername}-proprietary-kernel-modules
Summary:	Meta-package to install proprietary NVIDIA GPU driver with proprietary kernel modules
Group:		System/Kernel and hardware
BuildArch:	noarch
Requires:	%{driverpkgname}
%kroko_req_modules_in_nvidia -t proprietary -k 7.2 -f generic -j %{version_j} -n %{version_n}
Conflicts:	%{drivername}-open-kernel-modules
%nv_cross_conflict -n proprietary-kernel-modules
%nv_replace_branch -n proprietary-kernel-modules

%description -n %{drivername}-proprietary-kernel-modules
Meta-package to install proprietary NVIDIA GPU driver with proprietary kernel modules

%files -n %{drivername}-proprietary-kernel-modules
%{_datadir}/auto-krokodil/drivers/%{name}-proprietary.json

#-----------------------------------------------------------------------------

%package -n %{drivername}-open-kernel-modules
Summary:	Meta-package to install proprietary NVIDIA GPU driver with open kernel modules
Group:		System/Kernel and hardware
Url:		https://github.com/NVIDIA/open-gpu-kernel-modules
BuildArch:	noarch
Requires:	%{driverpkgname}
%kroko_req_modules_in_nvidia -t open -k 7.2 -f generic -j %{version_j} -n %{version_n}
Conflicts:	%{drivername}-proprietary-kernel-modules
%nv_cross_conflict -n open-kernel-modules
%nv_replace_branch -n open-kernel-modules

%description -n %{drivername}-open-kernel-modules
Meta-package to install proprietary NVIDIA GPU driver with open kernel modules

%files -n %{drivername}-open-kernel-modules
%{_datadir}/auto-krokodil/drivers/%{name}-open.json

%endif #/with binary_kernel_modules
#-----------------------------------------------------------------------------

%package -n dkms-%{drivername}-proprietary
Summary:	Proprietary kernel modules for NVIDIA GPUs, built on the host by dkms
Group:		System/Kernel and hardware
BuildArch:	noarch
Requires:	%{driverpkgname}
Requires:	dkms
Requires(post):	dkms
Requires(preun):	dkms
Requires:	kernel-source-%{drivername}-proprietary = %{EVRD}
Requires(post):	kernel-source-%{drivername}-proprietary = %{EVRD}
Provides:	%{drivername}-dkms-proprietary = %{EVRD}
Conflicts:	dkms-%{drivername}-open
%nv_cross_conflict -n dkms-proprietary
%nv_replace_branch -n dkms-proprietary
%nv_replace_branch -n dkms

%description -n dkms-%{drivername}-proprietary
Proprietary kernel modules for NVIDIA GPUs, built on the host by dkms

%files -n dkms-%{drivername}-proprietary
%{_usrsrc}/%{drivername}-proprietary-%{version}-%{release}/dkms*

%post -n dkms-%{drivername}-proprietary
set -x
/usr/sbin/dkms --rpm_safe_upgrade add -m %{drivername}-proprietary -v %{version}-%{release}

for kk in /lib/modules/*; do
	kk=$(echo $kk | sed 's/^\/lib\/modules\///');
	if test -d "/lib/modules/$kk/build"; then
		/usr/sbin/dkms --rpm_safe_upgrade build -m %{drivername}-proprietary -v %{version}-%{release} -k $kk &&
		/usr/sbin/dkms --rpm_safe_upgrade install -m %{drivername}-proprietary -v %{version}-%{release} -k $kk || true
	else
		echo "WARNING: No development files for kernel \"$kk\"" > /dev/stderr;
	fi;
done

%preun -n dkms-%{drivername}-proprietary
/sbin/rmmod %{kname} >/dev/null 2>&1 || true
set -x
/usr/sbin/dkms --rpm_safe_upgrade remove -m %{drivername}-proprietary -v %{version}-%{release} --all || true

#-----------------------------------------------------------------------------

%package -n dkms-%{drivername}-open
Summary:	Open kernel modules for NVIDIA GPUs, built on the host by dkms
Group:		System/Kernel and hardware
Url:		https://github.com/NVIDIA/open-gpu-kernel-modules
BuildArch:	noarch
Requires:	%{driverpkgname}
Requires:	dkms
Requires(post):	dkms
Requires(preun):	dkms
Requires:	kernel-source-%{drivername}-open = %{EVRD}
Requires(post):	kernel-source-%{drivername}-open = %{EVRD}
Provides:	%{drivername}-dkms-open = %{EVRD}
Conflicts:	dkms-%{drivername}-proprietary
%nv_cross_conflict -n dkms-open
%nv_replace_branch -n dkms-open

%description -n dkms-%{drivername}-open
Open kernel modules for NVIDIA GPUs, built on the host by dkms

%files -n dkms-%{drivername}-open
%{_usrsrc}/%{drivername}-open-%{version}-%{release}/dkms*

%post -n dkms-%{drivername}-open
set -x
/usr/sbin/dkms --rpm_safe_upgrade add -m %{drivername}-open -v %{version}-%{release}

for kk in /lib/modules/*; do
	kk=$(echo $kk | sed 's/^\/lib\/modules\///');
	if test -d "/lib/modules/$kk/build"; then
		/usr/sbin/dkms --rpm_safe_upgrade build -m %{drivername}-open -v %{version}-%{release} -k $kk &&
		/usr/sbin/dkms --rpm_safe_upgrade install -m %{drivername}-open -v %{version}-%{release} -k $kk || true
	else
		echo "WARNING: No development files for kernel \"$kk\"" > /dev/stderr;
	fi;
done

%preun -n dkms-%{drivername}-open
/sbin/rmmod %{kname} >/dev/null 2>&1 || true
set -x
/usr/sbin/dkms --rpm_safe_upgrade remove -m %{drivername}-open -v %{version}-%{release} --all || true

#-----------------------------------------------------------------------------

%package -n %{drivername}-dracut
Summary:	Dracut (initramfs) configuration for %{drivername}
Group:		System/Kernel and hardware
BuildArch:	noarch
Requires:	dracut
Requires:	rosa-kernel-tools
%nv_cross_conflict -n dracut
%nv_replace_branch -n dracut

%description -n %{drivername}-dracut
Dracut (initramfs) configuration for %{drivername}.
Include Nvidia kernel modules into initramfs (initrd).

%files -n %{drivername}-dracut
%config(noreplace) %{_sysconfdir}/dracut.conf.d/10-%{drivername}.conf
/var/spool/initramfs-regen/%{drivername}-dracut

#-----------------------------------------------------------------------------

%package -n %{drivername}-blacklist
Summary:	Blacklist opensource Nouveau driver
Group:		System/Kernel and hardware
BuildArch:	noarch
%nv_cross_conflict -n blacklist
%nv_replace_branch -n blacklist

%description -n %{drivername}-blacklist
Blacklist opensource Nouveau driver.
Proprietary Nvidia driver replaces it.

%files -n %{drivername}-blacklist
%config(noreplace) %{_sysconfdir}/modprobe.d/%{drivername}-blacklist-nouveau.conf

#-----------------------------------------------------------------------------

%package -n %{drivername}-wayland
Summary:	NVIDIA Wayland driver
Group:		System/Kernel and hardware
BuildArch:	noarch
%nv_cross_conflict -n wayland
%nv_replace_branch -n wayland

%description -n %{drivername}-wayland
Proprietary Nvidia wayland driver.

%files -n %{drivername}-wayland
%config(noreplace) %{_sysconfdir}/modprobe.d/%{drivername}-wayland.conf

#-----------------------------------------------------------------------------

%package -n %{drivername}-power
Summary:	Advanced  power management
Group:		System/Kernel and hardware
%nv_cross_conflict -n power
%nv_replace_branch -n power
# systemd units are in the "core" subpackage in nvidia470,
# some hardware is supported by both 470 and 550, so we need smooth upgrade
Conflicts:	nvidia470-core < 550

%description -n %{drivername}-power
Advanced  power management, preserve memory allocation on suspend/resume.

%files -n %{drivername}-power
%config(noreplace) %{_sysconfdir}/modprobe.d/nvidia-power-management.conf
%{nvidia_bindir}/nvidia-sleep.sh
%{nvidia_bindir}/nvidia-powerd
%{_datadir}/dbus-1/system.d/nvidia-dbus.conf
%{_presetdir}/70-nvidia.preset
%{_systemd_util_dir}/system-sleep/nvidia
%{_unitdir}/nvidia-hibernate.service
%{_unitdir}/nvidia-powerd.service
%{_unitdir}/nvidia-resume.service
%{_unitdir}/nvidia-suspend.service
%{_unitdir}/nvidia-suspend-nofreeze.conf
%{_unitdir}/nvidia-suspend-then-hibernate.service

%post -n %{drivername}-power
%systemd_post nvidia-hibernate.service
%systemd_post nvidia-resume.service
%systemd_post nvidia-powerd.service
%systemd_post nvidia-suspend.service
%systemd_post nvidia-suspend-then-hibernate.service

%preun -n %{drivername}-power
%systemd_preun nvidia-hibernate.service
%systemd_preun nvidia-resume.service
%systemd_preun nvidia-powerd.service
%systemd_preun nvidia-suspend.service
%systemd_preun nvidia-suspend-then-hibernate.service

%postun -n %{drivername}-power
%systemd_postun_with_restart nvidia-hibernate.service
%systemd_postun_with_restart nvidia-resume.service
%systemd_postun_with_restart nvidia-powerd.service
%systemd_postun_with_restart nvidia-suspend.service
%systemd_postun_with_restart nvidia-suspend-then-hibernate.service

#-----------------------------------------------------------------------------

%package -n kernel-source-%{drivername}-proprietary
Summary:	Kernel source of %{drivername}
Group:		System/Kernel and hardware
BuildArch:	noarch

%description -n kernel-source-%{drivername}-proprietary
Kernel source of %{drivername}

%files -n kernel-source-%{drivername}-proprietary
%license %{pkgname}/LICENSE
%{_usrsrc}/%{drivername}-proprietary-%{version}-%{release}
%exclude %{_usrsrc}/%{drivername}-proprietary-%{version}-%{release}/dkms*

#-----------------------------------------------------------------------------

%package -n kernel-source-%{drivername}-open
Summary:	Kernel source of %{drivername}
Group:		System/Kernel and hardware
BuildArch:	noarch

%description -n kernel-source-%{drivername}-open
Kernel source of %{drivername}

%files -n kernel-source-%{drivername}-open
%license NVIDIA-kernel-module-source-%{version}/COPYING
%doc NVIDIA-kernel-module-source-%{version}/README.md
%{_usrsrc}/%{drivername}-open-%{version}-%{release}
%exclude %{_usrsrc}/%{drivername}-open-%{version}-%{release}/dkms*

#-----------------------------------------------------------------------------

%package -n %{drivername}-devel
Summary:	NVIDIA OpenGL/CUDA development libraries and headers
Group:		Development/C
Requires:	%{driverpkgname} = %{EVRD}
Requires:	%{drivername}-cuda-opencl = %{EVRD}
Requires:	%{_lib}vdpau-devel
%nv_cross_conflict -n devel
%nv_replace_branch -n devel

%description -n %{drivername}-devel
NVIDIA OpenGL/CUDA headers. This package is not required for normal use.

%files -n %{drivername}-devel
%{nvidia_libdir}/libcuda.so
%{nvidia_libdir}/libnvcuvid.so
%{nvidia_libdir}/libnvidia-cfg.so
%{nvidia_libdir}/libnvidia-fbc.so
%{nvidia_libdir}/libOpenCL.so
%{nvidia_libdir}/libnvidia-ml.so
%{nvidia_libdir}/libnvidia-nvvm.so
%{nvidia_libdir}/libnvidia-encode.so
%{nvidia_libdir}/libnvidia-opticalflow.so
%{nvidia_libdir}/libnvidia-allocator.so
%{nvidia_libdir}/libnvidia-ptxjitcompiler.so
%{nvidia_libdir}/libnvidia-sandboxutils.so
%{nvidia_libdir}/libvdpau_nvidia.so
%ifarch aarch64
%{nvidia_libdir}/libnvcuextend.so
%endif
%ifarch x86_64
%{nvidia_libdir32}/libcuda.so
%{nvidia_libdir32}/libnvcuvid.so
%{nvidia_libdir32}/libnvidia-fbc.so
%{nvidia_libdir32}/libOpenCL.so
%{nvidia_libdir32}/libnvidia-ml.so
%{nvidia_libdir32}/libnvidia-nvvm.so
%{nvidia_libdir32}/libnvidia-encode.so
%{nvidia_libdir32}/libnvidia-opticalflow.so
%{nvidia_libdir32}/libnvidia-allocator.so
%{nvidia_libdir32}/libnvidia-ptxjitcompiler.so
%{nvidia_libdir32}/libvdpau_nvidia.so
%endif

%postun -n %{drivername}-devel
# Explicit /sbin/ldconfig due to a non-standard library directory.
/sbin/ldconfig -X

%posttrans -n %{drivername}-devel
# Explicit /sbin/ldconfig due to a non-standard library directory.
# The applications like Blender may need to find libcuda.so, for example.
/sbin/ldconfig -X

#-----------------------------------------------------------------------------

%package -n %{drivername}-cuda-opencl
Summary:	CUDA and OpenCL libraries for NVIDIA proprietary driver
Group:		System/Kernel and hardware
Provides:	%{drivername}-cuda = %{EVRD}
%nv_cross_conflict -n cuda-opencl
%nv_replace_branch -n cuda-opencl

%description -n %{drivername}-cuda-opencl
Cuda and OpenCL libraries for NVIDIA proprietary driver. This package is not
required for normal use, it provides libraries to use NVIDIA cards for High
Performance Computing (HPC).

%files -n %{drivername}-cuda-opencl
%{nvidia_libdir}/libnvcuvid.so.%{version}
%{nvidia_libdir}/libnvcuvid.so.1
%{nvidia_libdir}/libnvidia-encode.so.1
%{nvidia_libdir}/libnvidia-encode.so.%{version}
%{nvidia_libdir}/libOpenCL.so.1.0.0
%{nvidia_libdir}/libOpenCL.so.1.0
%{nvidia_libdir}/libOpenCL.so.1
%{nvidia_libdir}/libcudadebugger.so.%{version}
%{nvidia_libdir}/libcudadebugger.so.1
%{nvidia_libdir}/libcuda.so.%{version}
%{nvidia_libdir}/libcuda.so.1
%{nvidia_libdir}/libnvidia-opencl.so.%{version}
%{nvidia_libdir}/libnvidia-opencl.so.1
%ifarch aarch64
%{nvidia_libdir}/libnvcuextend.so.%{version}
%{nvidia_libdir}/libnvcuextend.so.1
%endif
%ifarch x86_64
%{nvidia_libdir32}/libnvidia-opencl.so.*
%{nvidia_libdir32}/libnvcuvid.so.%{version}
%{nvidia_libdir32}/libnvcuvid.so.1
%{nvidia_libdir32}/libnvidia-encode.so.1
%{nvidia_libdir32}/libnvidia-encode.so.%{version}
%{nvidia_libdir32}/libOpenCL.so.1.0.0
%{nvidia_libdir32}/libOpenCL.so.1.0
%{nvidia_libdir32}/libOpenCL.so.1
%{nvidia_libdir32}/libcuda.so.%{version}
%{nvidia_libdir32}/libcuda.so.1
%endif

%posttrans -n %{drivername}-cuda-opencl
# Explicit /sbin/ldconfig due to a non-standard library directory.
/sbin/ldconfig -X

#-----------------------------------------------------------------------------

# HTML doc splitted off because of size, for live cds:
%package -n %{drivername}-doc-html
Summary:	NVIDIA html documentation (%{drivername})
Group:		System/Kernel and hardware
BuildArch:	noarch
Requires:	%{driverpkgname} = %{EVRD}
%nv_cross_conflict -n doc-html
%nv_replace_branch -n doc-html

%description -n %{drivername}-doc-html
HTML version of the README.txt file provided in package
%{driverpkgname}.

%files -n %{drivername}-doc-html -f %{pkgname}/nvidia-html.files

#-----------------------------------------------------------------------------

%if %{with binary_kernel_modules}
# TODO: package it better
%package debug
Summary:       Debug for %{NAME} binary kernel modules
Group:         Development/Debug
Requires:      auto-krokodil-filesystem
%nv_cross_conflict -n debug
%nv_replace_branch -n debug

%description debug
Debug for %{NAME} binary kernel modules

%files debug
%{kroko_kmods_dir}/*/*.debug
%endif #/with binary_kernel_modules
#----------------------------------------------------------------------------

%prep
%setup -q -c -T -a 1 -a 2 -a 3 -a 4 -a 5
sh %{SOURCE0} --extract-only

dir0="$PWD"

pushd %{pkgname}/
rm -rf usr/src/nv/precompiled
%patch -P 1 -p1
popd

# We need a different dkms.conf because the one supplied in the upstream
# is actually a template. The real file is generated from it by
# nvidia-installer which we do not use.
pushd %{pkgname}/kernel
mv dkms.conf dkms.conf.orig

# Notes from the original dkms.conf:
# ---------------
# By default, DKMS will add KERNELRELEASE to the make command line; however,
# this will cause the kernel module build to infer that it was invoked via
# Kbuild directly instead of DKMS. The dkms(8) manual page recommends quoting
# the 'make' command name to suppress this behavior.
# ---------------
cat > dkms.conf <<EOF
PACKAGE_NAME="%{drivername}-proprietary"
PACKAGE_VERSION="%{version}"
BUILT_MODULE_NAME[0]="nvidia"
DEST_MODULE_LOCATION[0]="/kernel/drivers/video"
BUILT_MODULE_NAME[1]="nvidia-modeset"
DEST_MODULE_LOCATION[1]="/kernel/drivers/video"
BUILT_MODULE_NAME[2]="nvidia-drm"
DEST_MODULE_LOCATION[2]="/kernel/drivers/video"
BUILT_MODULE_NAME[3]="nvidia-uvm"
DEST_MODULE_LOCATION[3]="/kernel/drivers/video"
BUILT_MODULE_NAME[4]="nvidia-peermem"
DEST_MODULE_LOCATION[4]="/kernel/drivers/video"
MAKE="'make' -j\$parallel_jobs KERNEL_UNAME=\${kernelver} IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 modules"
CLEAN="'make' clean"
AUTOINSTALL="yes"
EOF
sed -e 's,%{drivername}-proprietary,%{drivername}-open,g' dkms.conf > "$dir0"/NVIDIA-kernel-module-source-%{version}/dkms.conf
popd

rm -fv nvidia-settings-%{version}/src/*/*.a

ln -s %{pkgname}/kernel kernel-proprietary
ln -s NVIDIA-kernel-module-source-%{version} kernel-open

%build
dir0="$PWD"

%if %{with binary_kernel_modules}
for type in \
	proprietary \
	open
do

mkdir -p ${dir0}/kmods-${type}
cp -r --dereference kernel-${type} ${dir0}/kmods-${type}/kernel-7.2
pushd ${dir0}/kmods-${type}/kernel-7.2
%make_build SYSSRC=/lib/modules/%{kabi_72}/source MODULE_ROOT="$PWD"
mkdir -p ${dir0}/kmods-${type}/%{kabi_72}
mv -v $(find . -name '*.ko') ${dir0}/kmods-${type}/%{kabi_72}
popd

done
%endif

# The code contains dozens on top of dozens on top of dozens of "false" positives
export CFLAGS="%optflags -Wno-error=format-security"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="%{?ldflags}"
%make_build -C nvidia-settings-%{version}/src/libXNVCtrl
%make_build -C nvidia-settings-%{version}
%make_build -C nvidia-xconfig-%{version}
%make_build -C nvidia-modprobe-%{version}
%make_build -C nvidia-persistenced-%{version} LIBS="-ltirpc -ldl"

%install
dir0="$PWD"

%if %{with binary_kernel_modules}
list="%{kabi_72}"
for type in \
	proprietary \
	open
do
	# copied from kernel
	# extract debuginfo
	# TODO: sync location of *.debug files with kernel
	find kmods-${type} \
		-name "*.ko" | \
		xargs -I '{}' objcopy --only-keep-debug '{}' '{}'.debug
	find kmods-${type} \
		-name "*.ko" | xargs -I '{}' \
		sh -e -c 'cd $(dirname {}) && basename=$(basename {}) && \
			objcopy --add-gnu-debuglink=$basename.debug --strip-debug $basename'
	# TODO: maybe make modules compression be a macro to ensure that they
	# are compressed in the same way here and in the kernel itself
	find kmods-${type} -type f -name '*.ko' | xargs -I'{}' -P"$(nproc)" zstd --ultra -22 '{}'
	for i in $list; do
		mkdir -p %{buildroot}%{kroko_kmods_dir}/%{NAME}-${type}.%{kroko_release}-${i}
		install -m0644 ${dir0}/kmods-${type}/$i/*.ko.zst %{buildroot}%{kroko_kmods_dir}/%{NAME}-${type}.%{kroko_release}-${i}
		install -m0644 ${dir0}/kmods-${type}/$i/*.debug %{buildroot}%{kroko_kmods_dir}/%{NAME}-${type}.%{kroko_release}-${i}
	done
done
%endif

cd %{pkgname}

# dkms
install -d -m755 %{buildroot}%{_usrsrc}/%{drivername}-%{version}-%{release}

# menu entry
install -d -m755 %{buildroot}%{_datadir}/%{drivername}
cat > %{buildroot}%{_datadir}/%{drivername}/rosa-nvidia-settings.desktop <<EOF
[Desktop Entry]
Name=NVIDIA Display Settings
GenericName=Configure NVIDIA X driver
GenericName[ru]=Настройка драйвера NVIDIA X
Comment=Configure NVIDIA X driver
Comment[ru]=Настройка драйвера NVIDIA X
Exec=%{_bindir}/nvidia-settings
Icon=%{drivername}-settings
Terminal=false
Type=Application
Categories=GTK;Settings;HardwareSettings;X-MandrivaLinux-System-Configuration;
EOF

install -d -m755	%{buildroot}%{_datadir}/applications
touch			%{buildroot}%{_datadir}/applications/rosa-nvidia-settings.desktop

# Configs
install -D -m 644 %{SOURCE6} %{buildroot}%{_datadir}/X11/xorg.conf.d/15-nvidia.conf

# icons
install -d -m755 %{buildroot}%{_iconsdir}/hicolor/{16x16,32x32,48x48}/apps
convert -strip nvidia-settings.png -resize 16x16 %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{drivername}-settings.png
convert -strip nvidia-settings.png -resize 32x32 %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{drivername}-settings.png
convert -strip nvidia-settings.png -resize 48x48 %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{drivername}-settings.png

error_fatal() {
	echo "Error: $@." >&2
	exit 1
}

error_unhandled() {
	echo "Warning: $@." >&2
	echo "Warning: $@." >> warns.log
	# cause distro builds to fail in case of unhandled files
	exit 1
}

parseparams() {
	for value in $rest; do
		local param=$1
		[ -n "$param" ] || error_fatal "unhandled parameter $value"
		shift
		eval $param=$value

		[ -n "$value" ] || error_fatal "empty $param"

		# resolve libdir based on $arch
		if [ "$param" = "arch" ]; then
			case "$arch" in
			NATIVE)		nvidia_libdir=%{nvidia_libdir};;
			COMPAT32)	nvidia_libdir=%{nvidia_libdir32};;
			*)		error_fatal "unknown arch $arch"
			esac
		fi
	done
}

add_to_list() {
	# on distro builds, only use .manifest for doc files
	[ "${2#%doc}" = "${2}" ] && return
	local list="$1.files"
	local entry="$2"
	echo $entry >> $list
}

install_symlink() {
	local pkg="$1"
	local dir="$2"
	mkdir -p %{buildroot}$dir
	ln -s $dest %{buildroot}$dir/$file
	add_to_list $pkg $dir/$file
}

install_lib_symlink() {
	local pkg="$1"
	local dir="$2"
	case "$file" in
	libvdpau_*.so)
		# vdpau drivers => not put into -devel
		;;
	*.so)
		pkg=nvidia-devel;;
	esac
	install_symlink $pkg $dir
}

install_file_only() {
	local pkg="$1"
	local dir="$2"
	mkdir -p %{buildroot}$dir
	# replace 0444 with more usual 0644
	[ "$perms" = "0444" ] && perms="0644"
	install -m $perms $file %{buildroot}$dir
}

install_file() {
	local pkg="$1"
	local dir="$2"
	install_file_only $pkg $dir
	add_to_list $pkg $dir/$(basename $file)
}

get_module_dir() {
	local subdir="$1"
	case "$subdir" in
	extensions*)	echo %{nvidia_extensionsdir};;
	drivers/)	echo %{nvidia_driversdir};;
	/)		echo %{nvidia_modulesdir};;
	*)		error_unhandled "unhandled module subdir $subdir"
			echo %{nvidia_modulesdir};;
	esac
}

for file in nvidia.files nvidia-devel.files nvidia-cuda.files nvidia-dkms.files nvidia-html.files; do
	rm -f $file
	touch $file
done

# install files according to .manifest
cat .manifest | tail -n +9 | sort | uniq | while read line; do
	arch=
	style=
	subdir=
	dest=
	nvidia_libdir=
	inherit_path_str=
	glvnd=

	rest=${line%%%%MODULE:*}
	file=${rest%%%% *}
	rest=${rest#* }
	perms=${rest%%%% *}
	rest=${rest#* }
	type=${rest%%%% *}
	[ "${rest#* }" = "$rest" ] && rest= || rest=${rest#* }

	case "$type" in
	CUDA_LIB)
		parseparams arch subdir
		install_file nvidia-cuda $nvidia_libdir/$subdir
		;;
	CUDA_SYMLINK)
		parseparams arch subdir dest
		install_lib_symlink nvidia-cuda $nvidia_libdir/$subdir
		;;
	ENCODEAPI_LIB)
		parseparams arch subdir
		install_file nvidia $nvidia_libdir/$subdir
		;;
	ENCODEAPI_LIB_SYMLINK)
		parseparams arch dest
		install_lib_symlink nvidia $nvidia_libdir
		;;
	ICON)
		parseparams subdir
		install_file_only nvidia-settings.png %{_datadir}/icons/hicolor/128x128/apps
		;;
	EXPLICIT_PATH)
		parseparams dest
		install_file nvidia %{_datadir}/nvidia
		;;
	NVCUVID_LIB)
		parseparams arch subdir
		install_file nvidia-cuda $nvidia_libdir/$subdir
		;;
	NVCUVID_LIB_SYMLINK)
		parseparams arch dest
		install_lib_symlink nvidia-cuda $nvidia_libdir
		;;
	NVIFR_LIB)
		parseparams arch subdir
		install_file nvidia $nvidia_libdir/$subdir
		;;
	NVIFR_LIB_SYMLINK)
		parseparams arch dest
		install_lib_symlink nvidia $nvidia_libdir
		;;
	OPENGL_LIB)
		parseparams arch
		install_file nvidia $nvidia_libdir
		;;
	OPENGL_SYMLINK)
		parseparams arch dest
		install_lib_symlink nvidia $nvidia_libdir
		;;
	OPENGL_DATA)
		parseparams subdir
		# application profile filenames are versioned, we can use a common
		# non-alternativesized directory
		install_file nvidia %{_datadir}/nvidia
		;;
	GLVND_LIB)
		;;
	GLVND_SYMLINK)
		;;
	GLX_CLIENT_LIB|EGL_CLIENT_LIB)
		;;
	GLX_CLIENT_SYMLINK|EGL_CLIENT_SYMLINK)
		;;
	TLS_LIB)
		parseparams arch style subdir
		install_file nvidia $nvidia_libdir/$subdir
		;;
	TLS_SYMLINK)
		parseparams arch style subdir dest
		install_lib_symlink nvidia $nvidia_libdir/$subdir
		;;
	GBM_BACKEND_LIB_SYMLINK)
		[ "${rest#* }" != "$rest" ] || rest="NATIVE $rest"
		parseparams arch subdir dest
		#install_lib_symlink nvidia $nvidia_libdir
		;;
	UTILITY_LIB)
		# backward-compatibility
		[ -n "${rest}" ] || rest="NATIVE $rest"
		parseparams arch subdir
		install_file nvidia $nvidia_libdir/$subdir
		;;
	UTILITY_LIB_SYMLINK)
		# backward-compatibility
		[ "${rest#* }" != "$rest" ] || rest="NATIVE $rest"
		parseparams arch dest
		install_lib_symlink nvidia $nvidia_libdir
		;;
	OPENCL_LIB)
		[ -n "${rest}" ] || rest="NATIVE $rest"
		parseparams arch subdir
		install_file nvidia $nvidia_libdir/$subdir
		;;
	OPENCL_LIB_SYMLINK)
		[ "${rest#* }" != "$rest" ] || rest="NATIVE $rest"
		parseparams arch subdir dest
		install_lib_symlink nvidia $nvidia_libdir/$subdir
		;;
	OPENCL_WRAPPER_LIB)
		[ -n "${rest}" ] || rest="NATIVE $rest"
		parseparams arch subdir
		install_file nvidia $nvidia_libdir/$subdir
		;;
	OPENCL_WRAPPER_SYMLINK)
		[ "${rest#* }" != "$rest" ] || rest="NATIVE $rest"
		parseparams arch subdir dest
		install_lib_symlink nvidia $nvidia_libdir/$subdir
		;;
	VDPAU_LIB)
		parseparams arch subdir
		case $file in *libvdpau_nvidia.so*);; *) continue; esac
		install_file nvidia $nvidia_libdir/$subdir
		;;
	VDPAU_SYMLINK)
		parseparams arch subdir dest
		case $file in *libvdpau_nvidia.so*);; *) continue; esac
		install_lib_symlink nvidia $nvidia_libdir/$subdir
		;;
	VDPAU_WRAPPER_LIB)
		parseparams arch subdir
		case $file in *libvdpau_nvidia.so*);; *) continue; esac
		install_file nvidia $nvidia_libdir/$subdir
		;;
	VDPAU_WRAPPER_SYMLINK)
		parseparams arch subdir dest
		case $file in *libvdpau_nvidia.so*);; *) continue; esac
		install_lib_symlink nvidia $nvidia_libdir/$subdir
		;;
	XLIB_STATIC_LIB)
		install_file nvidia-devel %{nvidia_libdir}
		;;
	XLIB_SHARED_LIB)
		install_file nvidia %{nvidia_libdir}
		;;
	XLIB_SYMLINK)
		parseparams dest
		install_lib_symlink nvidia %{nvidia_libdir}
		;;
	LIBGL_LA)
		# (Anssi) we don't install .la files
		;;
	XMODULE_SHARED_LIB|GLX_MODULE_SHARED_LIB)
		parseparams subdir
		install_file nvidia $(get_module_dir $subdir)
		;;
	XMODULE_NEWSYM)
		# symlink that is created only if it doesn't already
		# exist (i.e. as part of x11-server)
		case "$file" in
		libwfb.so)
			continue
			;;
		*)
			error_unhandled "unknown XMODULE_NEWSYM type file $file, skipped"
			continue
		esac
		parseparams subdir dest
		install_symlink nvidia $(get_module_dir $subdir)
		;;
	XMODULE_SYMLINK|GLX_MODULE_SYMLINK)
		parseparams subdir dest
		install_symlink nvidia $(get_module_dir $subdir)
		;;
	VDPAU_HEADER)
		continue
		parseparams subdir
		install_file_only nvidia-devel %{_includedir}/%{drivername}/$subdir
		;;
	OPENGL_HEADER|CUDA_HEADER)
		parseparams subdir
		install_file_only nvidia-devel %{_includedir}/%{drivername}/$subdir
		;;
	DOCUMENTATION)
		parseparams subdir
		case $subdir in
		*/html)
			add_to_list nvidia-html "%%doc %{pkgname}/$file"
			continue
			;;
		*/include/*)
			continue
			;;
		esac
		case $file in
		*XF86Config*|*nvidia-settings.png)
			continue;;
		esac
		add_to_list nvidia "%%doc %{pkgname}/$file"
		;;
	MANPAGE|NVIDIA_MODPROBE_MANPAGE)
		parseparams subdir
		case "$file" in
		*nvidia-installer*)
			# not installed
			continue
			;;
		*nvidia-settings*|*nvidia-xconfig*|*nvidia-modprobe*|*nvidia-persistenced*)
			# installed separately below
			continue
			;;
		*nvidia-smi*|*nvidia-cuda-mps-control*)
			# ok
			;;
		*)
			error_unhandled "skipped unknown man page $(basename $file)"
			continue
		esac
		install_file_only nvidia %{_mandir}/$subdir
		;;
	UTILITY_BINARY)
		case "$file" in
		*nvidia-settings|*nvidia-xconfig|*nvidia-persistenced)
			# not installed, we install our own copy
			continue
			;;
		*nvidia-smi|*nvidia-bug-report.sh|*nvidia-sleep.sh|*nvidia-debugdump|*nvidia-networking-bug-report.py|*nvidia-ngx-updater|*nvidia-pcc|*nvidia-powerd)
			# ok
			;;
		*nvidia-cuda-mps-control|*nvidia-cuda-mps-server)
			# ok
			;;
		*)
			error_unhandled "unknown binary $(basename $file) will be installed to %{nvidia_bindir}/$(basename $file)"
			;;
		esac
		install_file nvidia %{nvidia_bindir}
		;;
	UTILITY_BIN_SYMLINK)
		case $file in nvidia-uninstall) continue;; esac
		parseparams dest
		install_symlink nvidia %{nvidia_bindir}
		;;
	INTERNAL_UTILITY*)
		case "$file" in
		*libglvnd_install_checker*)
			# ROSA does provide libglvnd, the checker is not needed.
			continue
			;;
		*)
			error_unhandled "unknown file $file of type $type to be installed, see .manifest."
			;;
		esac
		;;
	NVIDIA_MODPROBE)
		# A suid-root tool (GPLv2) used as fallback for loading the module and
		# creating the device nodes in case the driver component is running as
		# a non-root user (e.g. a CUDA application). While the module is automatically
		# loaded by udev rules, the device nodes are not automatically created
		# like with regular drivers and therefore this tool is installed on
		# ROSA as well, at least for now.
		;;
	INSTALLER_BINARY)
		# not installed
		;;
	KERNEL_MODULE_SRC)
		# These lines now have an item like "INHERIT_PATH_DEPTH:1"
		# It specifies, how many components of the path to skip.
		# For example, the manifest mat contain the following line:
		#   kernel/nvidia/nv.c 0644 KERNEL_MODULE_SRC INHERIT_PATH_DEPTH:1
		# Skip one component of the path as suggested by INHERIT_PATH_DEPTH:1,
		# and we get "nvidia/nv.c", which should be installed as
		# /usr/src/<driver-version-release>/nvidia/nv.c.
		parseparams inherit_path_str
		if [ $inherit_path_str != "INHERIT_PATH_DEPTH:1" ]; then
			error_unhandled "unexpected option for $file: \"$inherit_path_str\"."
		fi
		dest=$(echo $file | sed 's/[^/]*\///')
		install_file nvidia-dkms %{_usrsrc}/%{drivername}-proprietary-%{version}-%{release}/$(dirname $dest)
		;;
	DKMS_CONF)
		# We will replace it with our own dkms.conf below but the
		# file must be listed anyway.
		install_file nvidia-dkms %{_usrsrc}/%{drivername}-proprietary-%{version}-%{release}
		;;
	CUDA_ICD)
		# in theory this should go to the cuda subpackage, but it goes into the main package
		# as this avoids one broken symlink and it is small enough to not cause space issues
		install_file nvidia %{_sysconfdir}/%{drivername}
		;;
	VULKAN_ICD_JSON)
		parseparams dest
		install_file nvidia %{_sysconfdir}/vulkan/${dest}
		;;
	VULKANSC_ICD_JSON)
		parseparams dest
		install_file nvidia %{_sysconfdir}/vulkansc/${dest}
		;;
	GLVND_EGL_ICD_JSON)
		install_file nvidia %{_datadir}/glvnd/egl_vendor.d
		;;
	EGL_EXTERNAL_PLATFORM_JSON)
		install_file nvidia %{_datadir}/egl/egl_external_platform.d/
		;;
	GBM_EXTERNAL_PLATFORM_JSON)
		install_file nvidia %{_datadir}/egl/egl_external_platform.d/
		;;
	SANDBOXUTILS_FILELIST_JSON)
		install_file nvidia %{_datadir}/nvidia/files.d/
		;;
	APPLICATION_PROFILE)
		parseparams subdir
		# application profile filenames are versioned, we can use a common
		# non-alternativesized directory
		install_file nvidia %{_datadir}/nvidia/$subdir
		;;
	DOT_DESKTOP)
		# we provide our own for now
		;;
	XORG_OUTPUTCLASS_CONFIG)
		# nvidia-drm-outputclass.conf allows to load the appropriate
		# X11 driver automatically if nvidia kernel module is used
		# by the graphics device. Xorg >= 1.16.
		# Not needed in our case, because XFdrake should create the
		# Xorg config appropriately.
		;;
	FIRMWARE)
		install_file nvidia %{_firmwarepath}/nvidia
		;;
	SYSTEMD_UNIT)
		install_file nvidia %{_unitdir}
		;;
	SYSTEMD_UNIT_SYMLINK)
		;;
	SYSTEMD_SLEEP_SCRIPT)
		install_file nvidia %{_systemd_util_dir}/system-sleep
		;;
		WINE_LIB)
        install_file nvidia %{_libdir}/%{drivername}/wine
        ;;
	*)
		error_unhandled "file $(basename $file) of unknown type $type will be skipped"
	esac
done

[ -z "$warnings" ] || echo "Please file a bug about the above warnings at http://bugs.rosalinux.ru/." >> warns.log

# Create the convenience symlinks. As the packages with nvidia are mutually
# exclusive now, there is no need to use alternatives for this.
ln -s %{nvidia_libdir} %{buildroot}%{_libdir}/nvidia
%ifarch x86_64
ln -s %{nvidia_libdir32} %{buildroot}%{_prefix}/lib/nvidia
%endif

# confirm SONAME; if something else than libvdpau_nvidia.so or libvdpau_nvidia.so.1, adapt .spec as needed:
[ "$(objdump -p %{buildroot}%{nvidia_libdir}/vdpau/libvdpau_nvidia.so.%{version} | grep SONAME | gawk '{ print $2 }')" = "libvdpau_nvidia.so.1" ]

rm -f %{buildroot}%{nvidia_libdir}/vdpau/libvdpau_nvidia.so.1
%ifarch x86_64
rm -f %{buildroot}%{nvidia_libdir32}/vdpau/libvdpau_nvidia.so.1

# vdpau alternative symlink
install -d -m755 %{buildroot}%{_libdir}/vdpau
touch %{buildroot}%{_libdir}/vdpau/libvdpau_nvidia.so.1
install -d -m755 %{buildroot}%{_prefix}/lib/vdpau
touch %{buildroot}%{_prefix}/lib/vdpau/libvdpau_nvidia.so.1
%else
# vdpau alternative symlink
install -d -m755 %{buildroot}%{_libdir}/vdpau
touch %{buildroot}%{_libdir}/vdpau/libvdpau_nvidia.so.1
%endif

# self-built binaries
install -m755 ../nvidia-settings-%{version}/src/_out/*/nvidia-settings %{buildroot}%{nvidia_bindir}
install -m755 ../nvidia-xconfig-%{version}/_out/*/nvidia-xconfig %{buildroot}%{nvidia_bindir}
install -m755 ../nvidia-persistenced-%{version}/_out/*/nvidia-persistenced %{buildroot}%{nvidia_bindir}
install -m4755 ../nvidia-modprobe-%{version}/_out/*/nvidia-modprobe %{buildroot}%{nvidia_bindir}

# binary alternatives
install -d -m755			%{buildroot}%{_bindir}
touch					%{buildroot}%{_bindir}/nvidia-debugdump
touch					%{buildroot}%{_bindir}/nvidia-ngx-updater
touch					%{buildroot}%{_bindir}/nvidia-settings
touch					%{buildroot}%{_bindir}/nvidia-smi
touch					%{buildroot}%{_bindir}/nvidia-xconfig
touch					%{buildroot}%{_bindir}/nvidia-bug-report.sh
touch					%{buildroot}%{_bindir}/nvidia-powerd
%ifarch x86_64
touch					%{buildroot}%{_bindir}/nvidia-pcc
%endif
touch					%{buildroot}%{_bindir}/nvidia-sleep.sh
touch					%{buildroot}%{_bindir}/nvidia-modprobe
touch					%{buildroot}%{_bindir}/nvidia-persistenced
touch					%{buildroot}%{_bindir}/nvidia-cuda-mps-control
touch					%{buildroot}%{_bindir}/nvidia-cuda-mps-server
touch					%{buildroot}%{_bindir}/nvidia-networking-bug-report.py
# rpmlint:
chmod 0755				%{buildroot}%{_bindir}/*

# install man pages
install -m644 ../nvidia-settings-%{version}/doc/_out/*/nvidia-settings.1 %{buildroot}%{_mandir}/man1
install -m644 ../nvidia-xconfig-%{version}/_out/*/nvidia-xconfig.1 %{buildroot}%{_mandir}/man1
install -m644 ../nvidia-modprobe-%{version}/_out/*/nvidia-modprobe.1 %{buildroot}%{_mandir}/man1
install -m644 ../nvidia-persistenced-%{version}/_out/*/nvidia-persistenced.1 %{buildroot}%{_mandir}/man1

# bug #41638 - whatis entries of nvidia man pages appear wrong
gunzip %{buildroot}%{_mandir}/man1/*.gz
sed -r -i '/^nvidia\\-[a-z]+ \\- NVIDIA/s,^nvidia\\-,nvidia-,' %{buildroot}%{_mandir}/man1/*.1
cd %{buildroot}%{_mandir}/man1
rename nvidia alt-%{drivername} *
cd -
touch %{buildroot}%{_mandir}/man1/nvidia-xconfig.1%{_extension}
touch %{buildroot}%{_mandir}/man1/nvidia-settings.1%{_extension}
touch %{buildroot}%{_mandir}/man1/nvidia-modprobe.1%{_extension}
touch %{buildroot}%{_mandir}/man1/nvidia-persistenced.1%{_extension}
touch %{buildroot}%{_mandir}/man1/nvidia-smi.1%{_extension}
touch %{buildroot}%{_mandir}/man1/nvidia-cuda-mps-control.1%{_extension}

# cuda nvidia.icd
install -d -m755		%{buildroot}%{_sysconfdir}/OpenCL/vendors
touch				%{buildroot}%{_sysconfdir}/OpenCL/vendors/nvidia.icd

# ld.so.conf
install -d -m755		%{buildroot}%{_sysconfdir}/%{drivername}
echo "%{_libdir}" >>	%{buildroot}%{_sysconfdir}/%{drivername}/ld.so.conf
echo "%{nvidia_libdir}" >>	%{buildroot}%{_sysconfdir}/%{drivername}/ld.so.conf
%ifarch x86_64

echo "/usr/lib" >>	%{buildroot}%{_sysconfdir}/%{drivername}/ld.so.conf
echo "%{nvidia_libdir32}" >>	%{buildroot}%{_sysconfdir}/%{drivername}/ld.so.conf
%endif

install -d -m755		%{buildroot}%{_sysconfdir}/ld.so.conf.d
touch				%{buildroot}%{_sysconfdir}/ld.so.conf.d/GL.conf

# modprobe.d
install -d -m755			%{buildroot}%{_sysconfdir}/modprobe.d

# Allow the users to load this kernel module as "nvidia<version>" as well.
echo "alias %{drivername} nvidia" > %{buildroot}%{_sysconfdir}/modprobe.d/%{drivername}.conf

# xinit script
install -d -m755 %{buildroot}%{_sysconfdir}/%{drivername}
cat > %{buildroot}%{_sysconfdir}/%{drivername}/nvidia-settings.xinit <<EOF
# to be sourced
#
# Do not modify this file; the changes will be overwritten.
# If you want to disable automatic configuration loading, create
# /etc/sysconfig/nvidia-settings with this line: LOAD_NVIDIA_SETTINGS="no"
#
LOAD_NVIDIA_SETTINGS="yes"
[ -f %{_sysconfdir}/sysconfig/nvidia-settings ] && . %{_sysconfdir}/sysconfig/nvidia-settings
[ "\$LOAD_NVIDIA_SETTINGS" = "yes" ] && %{_bindir}/nvidia-settings --load-config-only
EOF
chmod 0755 %{buildroot}%{_sysconfdir}/%{drivername}/nvidia-settings.xinit
install -d -m755 %{buildroot}%{_sysconfdir}/X11/xinit.d
touch %{buildroot}%{_sysconfdir}/X11/xinit.d/nvidia-settings.xinit

install -d -m755 %{buildroot}%{_sysconfdir}/X11/xinit.d
touch %{buildroot}%{_sysconfdir}/X11/xinit.d/nvidia-settings.xinit

export EXCLUDE_FROM_STRIP="$(find %{buildroot} -type f \! -name nvidia-settings \! -name nvidia-xconfig \! -name nvidia-modprobe \! -name nvidia-persistenced)"

%if %{with binary_kernel_modules}
mkdir -p %{buildroot}%{_datadir}/auto-krokodil/drivers
cat supported-gpus/supported-gpus.json | jq '.chips |= map(select(.features | index("kernelopen") | not))' > %{buildroot}%{_datadir}/auto-krokodil/drivers/%{name}-proprietary.json
cat supported-gpus/supported-gpus.json | jq '.chips |= map(select(.features | index("kernelopen")))' > %{buildroot}%{_datadir}/auto-krokodil/drivers/%{name}-open.json
%endif

# Trigger rebuilding initrds
# For rosa-kernel-tools
mkdir -p %{buildroot}/var/spool/initramfs-regen
touch %{buildroot}/var/spool/initramfs-regen/%{drivername}-dracut

%if %{with binary_kernel_modules}
touch %{buildroot}/var/spool/initramfs-regen/%{NAME}-open.%{kroko_release}
touch %{buildroot}/var/spool/initramfs-regen/%{NAME}-proprietary.%{kroko_release}
%endif

mkdir -p %{buildroot}/etc/dracut.conf.d
cat > %{buildroot}/etc/dracut.conf.d/10-%{drivername}.conf << 'EOF'
add_drivers+=" nvidia nvidia_drm nvidia_modeset nvidia-peermem nvidia-uvm "
install_optional_items+=" /etc/modprobe.d/%{drivername}-wayland.conf "
install_optional_items+=" /etc/modprobe.d/%{drivername}-blacklist-nouveau.conf "
install_optional_items+=" /etc/modprobe.d/nvidia-power-management.conf "
EOF

mkdir -p %{buildroot}/etc/modprobe.d
echo "blacklist nouveau" > %{buildroot}/etc/modprobe.d/%{drivername}-blacklist-nouveau.conf
echo "options nvidia_drm fbdev=1" > %{buildroot}/etc/modprobe.d/%{drivername}-wayland.conf

# Blacklist nouveau, autoload nvidia-uvm module after nvidia module
install -p -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/modprobe.d/
install -p -m 0644 %{SOURCE16} %{buildroot}%{_sysconfdir}/modprobe.d/

# UDev rules for nvidia
mkdir -p %{buildroot}%{_udevrulesdir}
install -p -m 0644 %{SOURCE7} %{buildroot}%{_udevrulesdir}/

# UDev rules for nvidia-uvm
install -p -m 0644 %{SOURCE10} %{buildroot}%{_udevrulesdir}/

# Install dbus config
mkdir -p %{buildroot}%{_datadir}/dbus-1/system.d
install -p -m 0644 nvidia-dbus.conf %{buildroot}%{_datadir}/dbus-1/system.d/

# Install nvidia-fallback
mkdir -p %{buildroot}%{_unitdir}
install -p -m 0644 %{SOURCE13} %{buildroot}%{_udevrulesdir}/

mkdir -p %{buildroot}%{_presetdir}
install -p -m 0644 %{SOURCE17} %{buildroot}%{_presetdir}

mkdir -p %{buildroot}%{_libdir}/gbm
ln -s %{nvidia_libdir}/libnvidia-allocator.so.%{version} %{buildroot}%{_libdir}/gbm/nvidia-drm_gbm.so
%ifarch x86_64
mkdir -p %{buildroot}%{_prefix}/lib/gbm
ln -s %{nvidia_libdir32}/libnvidia-allocator.so.%{version} %{buildroot}%{_prefix}/lib/gbm/nvidia-drm_gbm.so
%endif

# TODO: install each license separately
sed -i'' -e '/LICENSE/d' nvidia.files

# Ignore powerd binary exiting if hardware is not present
# We should check for information in the DMI table
sed -i -e 's/ExecStart=/ExecStart=-/g' %{buildroot}%{_unitdir}/nvidia-powerd.service

# Firmware
mkdir -p %{buildroot}%{_firmwarepath}/nvidia
cp -a firmware %{buildroot}%{_firmwarepath}/nvidia/%{version}

cp -rv ${dir0}/NVIDIA-kernel-module-source-%{version} %{buildroot}%{_usrsrc}/%{drivername}-open-%{version}-%{release}
test -d %{buildroot}%{_usrsrc}/%{drivername}-proprietary-%{version}-%{release} && mv %{buildroot}%{_usrsrc}/%{drivername}{,-proprietary}-%{version}-%{release}

#-----------------------------------------------------------------------------------------------------------

%if %{with binary_kernel_modules}
%kroko_kmod_pkg -t proprietary -r %{kroko_release} -j %{version_j} -n %{version_n} -f generic -k 7.2 -m %(if rpm -q kernel-7.2-generic 1>/dev/null 2>/dev/null; then rpm -q --qf '%%{version}\n' kernel-7.2-generic | tail -n1 | awk -F '.' '{print $3}'; else echo 0; fi) -p %{kabi_72} -s %{NAME} -c .zst %{kmod_replace_args}
%kroko_kmod_pkg -t open -r %{kroko_release} -j %{version_j} -n %{version_n} -f generic -k 7.2 -m %(if rpm -q kernel-7.2-generic 1>/dev/null 2>/dev/null; then rpm -q --qf '%%{version}\n' kernel-7.2-generic | tail -n1 | awk -F '.' '{print $3}'; else echo 0; fi) -p %{kabi_72} -s %{NAME} -c .zst %{kmod_replace_args}
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 74 |14mr|order-rpm-generators-2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	RPM generators to fix package installation order
Name:		order-rpm-generators
Group:		System/Base
License:	GPLv2+
Url:		https://abf.io/import/order-rpm-generators
Version:	2
Release:	1
Source1:	ordergen.attr
Source3:	COPYING
BuildArch:	noarch

%description
RPM generators to fix package installation order
by generating "OrderWithRequires" values.

%files
%license COPYING
%{_fileattrsdir}/ordergen.attr

%prep
%setup -cT
cp %{sources} .

%install
install -m644 -D ordergen.attr %{buildroot}/%{_fileattrsdir}/ordergen.attr

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 75 |14mr|perl-5.44.0-28
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# ******************************************************************
# *** IMPORTANT: When upgrading to a newer, incompatible release ***
# *** (e.g. 5.26.x -> 5.27, not 5.26.1 -> 5.26.2), a number of   ***
# *** package builds will break due to the gprintify script in   ***
# *** spec-helper requiring some extra modules that can be       ***
# *** run by /usr/bin/perl.                                      ***
# *** Please make sure that after building the new perl package, ***
# *** you rebuild (in that order):                               ***
# *** perl-File-Slurp                                            ***
# *** perl-Test-Pod                                              ***
# *** perl-Devel-Symdump                                         ***
# *** perl-PathTools                                             ***
# *** perl-Pod-Coverage                                          ***
# *** perl-Test-Pod-Coverage                                     ***
# *** perl-Try-Tiny                                              ***
# *** perl-Test-Fatal                                            ***
# *** perl-Test-Nowarnings                                       ***
# *** perl-Test-Deep                                             ***
# *** perl-Test-Warnings                                         ***
# *** perl-Exporter-Tiny                                         ***
# *** perl-List-MoreUtils                                        ***
# *** perl-IPC-Run                                               ***
# ***                                                            ***
# *** gprintify is disabled for those packages; they will not    ***
# *** fail because of its dependencies.                          ***
# ***                                                            ***
# *** Due to other dependency issues in build roots, you will    ***
# *** also want to rebuild (in that order):                      ***
# *** perl-HTML-Tagset                                           ***
# *** perl-HTML-Parser                                           ***
# *** perl-Sub-Install                                           ***
# *** perl-Params-Util                                           ***
# *** perl-Data-OptList                                          ***
# *** perl-Test-Requires                                         ***
# *** perl-Spiffy                                                ***
# *** perl-Test-Base                                             ***
# *** perl-YAML                                                  ***
# *** perl-Module-Build                                          ***
# *** perl-DynaLoader-Functions                                  ***
# *** perl-Devel-CallChecker                                     ***
# *** perl-Params-Classify                                       ***
# *** perl-Module-Runtime                                        ***
# *** perl-Sub-Exporter                                          ***
# *** perl-Dist-CheckConflicts                                   ***
# *** perl-Module-Implementation                                 ***
# *** perl-Sub-Uplevel                                           ***
# *** perl-Test-Exception                                        ***
# *** perl-Test-Needs                                            ***
# *** perl-Capture-Tiny                                          ***
# *** perl-Test-Output                                           ***
# *** perl-Sub-Name                                              ***
# *** perl-Package-Stash-XS                                      ***
# *** perl-Package-Stash                                         ***
# *** perl-Package-DeprecationManager                            ***
# *** perl-Sub-Identify                                          ***
# *** perl-Scope-Guard                                           ***
# *** perl-Sub-Exporter-Progressive                              ***
# *** perl-B-Hooks-EndOfScope                                    ***
# *** perl-namespace-clean                                       ***
# *** perl-Class-Load                                            ***
# *** perl-Devel-GlobalDestruction                               ***
# *** perl-Devel-StackTrace                                      ***
# *** perl-Eval-Closure                                          ***
# *** perl-Class-C3-XS                                           ***
# *** perl-Algorithm-C3                                          ***
# *** perl-Class-C3                                              ***
# *** perl-File-Remove                                           ***
# *** perl-JSON                                                  ***
# *** perl-Module-ScanDeps                                       ***
# *** perl-Probe-Perl                                            ***
# *** perl-IPC-Run3                                              ***
# *** perl-Test-Script                                           ***
# *** perl-File-Which                                            ***
# *** perl-SUPER                                                 ***
# *** perl-Test-MockModule                                       ***
# *** perl-Archive-Zip                                           ***
# *** perl-PAR-Dist                                              ***
# *** perl-Module-Install                                        ***
# *** perl-MRO-Compat                                            ***
# *** perl-Task-Weaken                                           ***
# *** perl-Test-LongString                                       ***
# *** perl-Devel-OverloadInfo                                    ***
# *** perl-Moose                                                 ***
# *** perl-strictures                                            ***
# *** perl-Class-Method-Modifiers                                ***
# *** perl-Role-Tiny                                             ***
# *** perl-Sub-Quote                                             ***
# *** perl-Moo                                                   ***
# *** perl-PerlIO-utf8_strict                                    ***
# *** perl-IO-String                                             ***
# *** perl-Mixin-Linewise                                        ***
# *** perl-Config-INI                                            ***
# *** perl-Type-Tiny                                             ***
# *** perl-Array-Compare                                         ***
# *** perl-File-Slurp-Tiny                                       ***
# *** perl-Tree-DAG_Node                                         ***
# *** perl-Test-Warn                                             ***
# *** perl-Algorithm-Diff                                        ***
# *** perl-Text-Diff                                             ***
# *** perl-Test-Differences                                      ***
# *** perl-File-Slurper                                          ***
# *** perl-Pod-POM                                               ***
# *** perl-File-HomeDir                                          ***
# *** perl-AppConfig                                             ***
# *** perl-Text-Reform                                           ***
# *** perl-Text-Autoformat                                       ***
# *** perl-Template-Toolkit (force installation -- circular dep) ***
# *** perl-CGI                                                   ***
# *** perl-SGMLSpm                                               ***
# *** git                                                        ***
# *** perl-YAML-Tiny                                             ***
# ******************************************************************

%global perl_version    5.44.0
%global perl_epoch      5
%global perl_arch_stem -thread-multi
%global perl_archname %{_arch}-%{_os}%{perl_arch_stem}

# Avoid nasty circular dependency loop -- gprintify uses perl
# and various perl-modules not in the perl core distro
%define dont_gprintify 1

# (tpg) without this other perl modules fails to build
# do NOT remove it unless you want to fix all the perl crazy world
%define _disable_ld_no_undefined 1

# And don't run perl_cleaner -- we want to own some directories even
# if they're empty.
%define dont_cleanup_perl 1

%global parallel_tests 0
%global tapsetdir   %{_datadir}/systemtap/tapset

%bcond_with perl_bootstrap

%global dual_life 1
%global rebuild_from_scratch %{defined perl_bootstrap}

# This is to emulate the perl_archlib macro but of the newly installed perl
# which may be different
%define this_perl_archlib %{_prefix}/lib/perl5/%{version}/%{perl_archname}

# This overrides filters from build root (/usr/lib/rpm/macros.d/macros.perl)
# intentionally (unversioned perl(DB) is removed and versioned one is kept).
# Filter provides from *.pl files, bug #924938
%global __provides_exclude_from .*%{_docdir}|.*%{this_perl_archlib}/.*\\.pl$|.*%{perl_privlib}/.*\\.pl$
%global __requires_exclude_from %{_docdir}
%global __provides_exclude perl\\((VMS|Win32|BSD::|DB\\)$)
%global __requires_exclude perl\\((VMS|BSD::|Win32|Tk|Mac::|Your::Module::Here|unicore::Name|FCGI|Locale::Codes::.*(Code|Retired))

# Filter dependencies on private modules. Generator:
# for F in $(find lib -type f); do perl -e '$/ = undef; $_ = <>; if (/^package #\R([\w:]*);/m) { print qq{|^perl\\\\($1\\\\)} }' "$F"; done
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Locale::Codes::Country_Retired\\)|^perl\\(Locale::Codes::LangFam_Retired\\)|^perl\\(Locale::Codes::Script_Retired\\)|^perl\\(Locale::Codes::LangExt_Codes\\)|^perl\\(Locale::Codes::LangFam_Codes\\)|^perl\\(Locale::Codes::Script_Codes\\)|^perl\\(Locale::Codes::Language_Codes\\)|^perl\\(Locale::Codes::LangExt_Retired\\)|^perl\\(Locale::Codes::Currency_Codes\\)|^perl\\(Locale::Codes::LangVar_Retired\\)|^perl\\(Locale::Codes::Language_Retired\\)|^perl\\(Locale::Codes::Country_Codes\\)|^perl\\(Locale::Codes::LangVar_Codes\\)|^perl\\(Locale::Codes::Currency_Retired\\)

# same as we provide in /usr/lib/rpm/macros.d/macros.perl
%global perl5_testdir   %{_libexecdir}/perl5-tests

# Optional features
# We can bootstrap without gdbm
%bcond_without gdbm
# Support for groff, bug #135101
%bcond_without perl_enables_groff
# Run syslog tests
%bcond_with perl_enables_syslog_test

# SystemTap support
%bcond_without perl_enables_systemtap

# <> operator uses File::Glob nowadays. CSH is not needed.
%bcond_with perl_enables_tcsh
%bcond_with test

Name:           perl
# These are all found licenses. They are distributed among various
# subpackages.
# dist/Tie-File/lib/Tie/File.pm:        GPLv2+ or Artistic
# cpan/Getopt-Long/lib/Getopt/Long.pm:  GPLv2+ or Artistic
# cpan/Compress-Raw-Zlib/Zlib.xs:       (GPL+ or Artistic) and zlib
# cpan/Digest-MD5/MD5.xs:               (GPL+ or Artistic) and BSD
# cpan/Time-Piece/Piece.xs:             (GPL+ or Artistic) and BSD
# dist/PathTools/Cwd.xs:                (GPL+ or Artistic) and BSD
# util.c:                               (GPL+ or Artistic) and BSD
# cpan/perlfaq/lib/perlfaq4.pod:        (GPL+ or Artistic) and Public Domain
# cpan/Test-Simple/lib/Test/Tutorial.pod:   (GPL+ or Artistic) and
#                                           Public Domain
# cpan/MIME-Base64/Base64.xs:           (GPL+ or Artistic) and MIT
# cpan/Test-Simple/lib/ok.pm:           CC0
# cpan/Text-Tabs/lib/Text/Wrap.pm:      TTWL
# cpan/Encode/bin/encguess:             Artistic 2.0
# cpan/libnet/lib/Net/libnetFAQ.pod:    Artistic    (CPAN RT#117888)
# cpan/Unicode-Collate/Collate/allkeys.txt:     Unicode
# lib/unicore:                          UCD
# ext/SDBM_File/sdbm.{c,h}:             Public domain
# regexec.c, regcomp.c:                 HSLR
# cpan/Locale-Maketext-Simple/lib/Locale/Maketext/Simple.pm:    MIT (with
#                                       exception for Perl)
# time64.c:                             MIT
# pod/perlpodstyle.pod:                 MIT
# pod/perlunicook.pod:                  (GPL+ or Artistic) and Public Domain
# pod/perlgpl.pod:                      GPL text
# pod/perlartistic.pod:                 Artistic text
# ext/File-Glob/bsd_glob.{c,h}:         BSD
# Other files:                          GPL+ or Artistic
## Not is a binary package
# cpan/podlators/t/style/minimum-version.t          MIT
# cpan/Term-ANSIColor/t/lib/Test/RRA/Config.pm:     MIT
## Unbundled
# cpan/Compress-Raw-Bzip2/bzip2-src:    BSD
# cpan/Compress-Raw-Zlib/zlib-src:      zlib
## perl sub-package notice
# perluniprops.pod is generated from lib/unicore sources:   UCD
#
# This sub-subpackage doesn't contain any copyrightable material.
# Nevertheless, it needs a License tag, so we'll use the generic
# "perl" license.
License:        GPL+ or Artistic
Epoch:          %{perl_epoch}
Version:        %{perl_version}
# release number must be even higher, because dual-lived modules will be broken otherwise
# (tpg) for now keep at least 13 - 2019-11-11
Release:        28
Group:          Development/Perl
Summary:        Practical Extraction and Report Language
Url:            http://www.perl.org/
Source0:        http://www.cpan.org/src/5.0/perl-%{perl_version}.tar.xz
Source3:        macros.perl
#Systemtap tapset and example that make use of systemtap-sdt-devel
# build requirement. Written by lberk; Not yet upstream.
Source4:        perl.stp
Source5:        perl-example.stp
# Tom Christiansen confirms Pod::Html uses the same license as perl
Source6:        Pod-Html-license-clarification
# Pregenerated dependencies for bootstrap.
# If your RPM tool fails on including the source file, then you forgot to
# define _sourcedir macro to point to the directory with the sources.
Source7:        gendep.macros
%if %{with perl_bootstrap}
%include %{SOURCE7}
%endif
Source100:	perl.rpmlintrc

# Removes date check, Fedora/RHEL specific
Patch1:         perl-perlbug-tag.patch

# Fedora/RHEL only (64bit only)
Patch3:         perl-5.8.0-libdir64.patch

# Fedora/RHEL specific (use libresolv instead of libbind), bug #151127
Patch4:         perl-5.38.0-libresolv.patch

# FIXME: May need the "Fedora" references removed before upstreaming
# patches ExtUtils-MakeMaker
Patch5:         perl-USE_MM_LD_RUN_PATH.patch

# Provide maybe_command independently, bug #1129443
Patch6:         perl-5.38.0-Provide-ExtUtils-MM-methods-as-standalone-ExtUtils-M.patch

# The Fedora builders started randomly failing this futime test
# only on x86_64, so we just don't run it. Works fine on normal
# systems.
Patch7:         perl-5.10.0-x86_64-io-test-failure.patch

# switch off test, which is failing only on koji (fork)
Patch8:         perl-5.38.0-offtest.patch

# Define SONAME for libperl.so
Patch15:        perl-5.38.0-create_libperl_soname.patch

# Install libperl.so to -Dshrpdir value
Patch16:        perl-5.22.0-Install-libperl.so-to-shrpdir-on-Linux.patch

# Make *DBM_File desctructors thread-safe, bug #1107543, RT#61912
Patch26:        perl-5.38.0-Destroy-GDBM-NDBM-ODBM-SDBM-_File-objects-only-from-.patch

# Replace ExtUtils::MakeMaker dependency with ExtUtils::MM::Utils.
# This allows not to require perl-devel. Bug #1129443
Patch30:        perl-5.22.1-Replace-EU-MM-dependnecy-with-EU-MM-Utils-in-IPC-Cmd.patch

# Link XS modules to pthread library to fix linking with -z defs,
# <https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/3RHZEHLRUHJFF2XGHI5RB6YPDNLDR4HG/>
Patch79:        perl-5.27.8-hints-linux-Add-lphtread-to-lddlflags.patch

# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
Patch200:       perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch

# Link XS modules to libperl.so with EU::MM on Linux, bug #960048
Patch201:       perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-MM-on-Linux.patch

Patch300:       disable-stack-unwinding.patch

BuildRequires:  bash
BuildRequires:  pkgconfig(bzip2)
BuildRequires:  coreutils
BuildRequires:  findutils
BuildRequires:  bison
BuildRequires:  byacc
BuildRequires:  less
BuildRequires:  zip
BuildRequires:  gcc
BuildRequires:  binutils-devel
%if %{with gdbm}
BuildRequires:  gdbm-devel
%endif
# for iconv
BuildRequires:  glibc
%if %{with perl_enables_groff}
# Build-require groff tools for populating %%Config correctly, bug #135101
BuildRequires:  groff-base
%endif
BuildRequires:  db-devel
BuildRequires:  make
%if %{without perl_bootstrap}
BuildRequires:  perl
# dependency generators for perl() provides/requires:
# rpm-build 6.x no longer ships perl.prov/perl.req, they live here
BuildRequires:  perl-generators
%endif
BuildRequires:  sed
%if %{with perl_enables_systemtap}
BuildRequires:  systemtap-devel
%endif
BuildRequires:  tar
%if %{with perl_enables_tcsh}
BuildRequires:  tcsh
%endif
BuildRequires:  pkgconfig(zlib)

# For tests
%if %{with test}
BuildRequires:  procps
%if %{with perl_enables_syslog_test}
BuildRequires:  rsyslog
%endif
%endif

# compat macro needed for rebuild
%global perl_compat perl(:MODULE_COMPAT_5.38.0)

Requires:       %perl_compat
Requires:       perl-base%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
Requires:       perl-libs%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
### FIXME enable once macros.perl is removed from rpm-openmandriva-macros
#Requires:       perl-macros
Requires:       perl-utils
%if %{with perl_bootstrap}
%gendep_perl
%endif

Requires:       perl-File-Fetch
Requires:       perl-File-Path
Requires:       perl-File-Temp
Requires:       perl-Getopt-Long
Requires:       perl-Encode
Requires:       perl-IO-Compress
Requires:       perl-IO-Zlib
Requires:       perl-Compress-Raw-Zlib
Requires:       perl-Compress-Raw-Bzip2
Requires:       perl-Carp
Requires:       perl-Exporter
Requires:       perl-IPC-Cmd
Requires:       perl-Data-Dumper
Requires:       perl-Digest
Requires:       perl-Digest-MD5
Requires:       perl-Digest-SHA
Requires:       perl-MIME-Base64
Requires:       perl-Module-CoreList
Requires:       perl-Thread-Queue
Requires:       perl-version
Requires:       perl-threads
Requires:       perl-threads-shared
Requires:       perl-parent
Requires:       perl-autodie
Requires:       perl-constant
Requires:       perl-encoding

# For compatibility with Fedora packages
Provides:       perl-core = %{perl_version}-%{release}
Provides:       perl-core%{?_isa} = %{perl_version}-%{release}

Provides:       perl(version) = %{EVRD}

%description
Perl is a high-level programming language with roots in C, sed, awk and shell
scripting. Perl is good at handling processes and files, and is especially
good at handling text. Perl's hallmarks are practicality and efficiency.
While it is used to do a lot of different things, Perl's most common
applications are system administration utilities and web programming.

This is a metapackage with all the Perl bits and core modules that can be
found in the upstream tarball from perl.org.

If you need only a specific feature, you can install a specific package
instead. E.g. to handle Perl scripts with %{_bindir}/perl interpreter,
install perl-base package. See perl-base description for more
details on the Perl decomposition into packages.


%package base
Summary:        Standalone executable Perl interpreter
License:        (GPL+ or Artistic) and (GPLv2+ or Artistic) and BSD and Public Domain and UCD
# perl-base denotes a package with the perl executable.
# Full EVR is for compatibility with systems that swapped perl and perl-core
# <https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules>,
# bug #1464903.
Version:        %{perl_version}
Epoch:          %{perl_epoch}

# For compatibility with Fedora packages
Provides: perl-interpreter = %{perl_epoch}:%{perl_version}-%{release}

Requires:       perl-libs%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
# Require this till perl-interpreter sub-package provides any modules
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_interpreter
%endif

# We need this to break the dependency loop, and ensure that perl-libs
# gets installed before perl-interpreter.
Requires(post): perl-libs
# Same as perl-libs. We need macros in basic buildroot, where Perl is only
# because of git.
### FIXME enable once macros.perl is removed from rpm-openmandriva-macros
#Requires(post): perl-macros

# File provides
Provides:       perl(bytes_heavy.pl)
Provides:       perl(dumpvar.pl)
Provides:       perl(perl5db.pl)

# suidperl isn't created by upstream since 5.12.0
Obsoletes:      perl-suidperl <= 4:5.12.2
# perl was renamed to perl-interpreter and perl-core renamed to perl
# <https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules>,
# bug #1464903.
Obsoletes:      perl < 4:5.26.0-395
%rename perl-base

%description base
This is a Perl interpreter as a standalone executable %{_bindir}/perl
required for handling Perl scripts. It does not provide all the other Perl
modules or tools.

Install this package if you want to program in Perl or enable your system to
handle Perl scripts with %{_bindir}/perl interpreter.

If your script requires some Perl modules, you can install them with
"perl(MODULE)" where "MODULE" is a name of required module. E.g. install
"perl(Test::More)" to make Test::More Perl module available.

If you need all the Perl modules that come with upstream Perl sources, so
called core modules, install perl package.

If you only need perl run-time as a shared library, i.e. Perl interpreter
embedded into another application, the only essential package is perl-libs.

Perl header files can be found in perl-devel package.

Perl utils like "splain" or "perlbug" can be found in perl-utils package.


%package libs
Summary:        The libraries for the perl run-time
License:        (GPL+ or Artistic) and HSLR and MIT and UCD
# Compat provides
Provides:       %perl_compat
Provides:       perl(:MODULE_COMPAT_5.26.1)
Provides:       perl(:MODULE_COMPAT_5.26.0)
Provides:       perl(:MODULE_COMPAT_5.28.0)
Provides:       perl(:MODULE_COMPAT_5.38.0)
Provides:       perl(:MODULE_COMPAT_%{version})
# Interpreter version to fulfil required genersted from "require 5.006;"
Provides:       perl(:VERSION) = %{perl_version}
# Integeres are 64-bit on all platforms
Provides:       perl(:WITH_64BIT)
# Threading provides
Provides:       perl(:WITH_ITHREADS)
Provides:       perl(:WITH_THREADS)
# Largefile provides
Provides:       perl(:WITH_LARGEFILES)
# PerlIO provides
Provides:       perl(:WITH_PERLIO)
# Loaded by charnames, unicore/Name.pm does not declare unicore::Name module
Provides:       perl(unicore::Name)
# utf8 and utf8_heavy.pl require Carp, re, strict, warnings, XSLoader
Requires:       perl(Carp)
Requires:       perl(Exporter)
# Term::Cap is optional
Requires:       perl(XSLoader)
Requires:	%{_lib}perl5 = %{perl_epoch}:%{perl_version}-%{release}
%if %{with perl_bootstrap}
%gendep_perl_libs
%endif

# Remove private redefinitions
# XSLoader redefines DynaLoader name space for compatibility, but does not
# load the DynaLoader.pm (though the DynaLoader.xs is compiled into libperl).
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\((charnames|DynaLoader)\\)$

%description libs
The is a perl run-time (interpreter as a shared library and include
directories).


%package devel
Summary:        Header #files for use in perl development
# l1_char_class_tab.h is generated from lib/unicore sources:    UCD
License:        (GPL+ or Artistic) and UCD
%if %{with perl_enables_systemtap}
Requires:       systemtap-devel
%endif
Requires:       perl(ExtUtils::ParseXS)
# needed for check section
%if %{dual_life} || %{rebuild_from_scratch}
Requires:	perl(Test::More)
Requires:	perl(ExtUtils::Manifest)
%endif
Requires:	perl-srpm-macros
Requires:       %perl_compat
# Match library and header files when downgrading releases
Requires:       perl-libs%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
%if %{with perl_bootstrap}
%gendep_perl_devel
%endif

%description devel
This package contains header files and development modules.
Most perl packages will need to install perl-devel to build.


%package macros
Summary:        Macros for rpmbuild
License:        GPL+ or Artistic
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_macros
%endif

%description macros
Macros for rpmbuild are needed during build of srpm in koji. This
sub-package must be installed into buildroot, so it will be needed
by perl. Perl is needed because of git.


%package tests
Summary:        The Perl test suite
License:        GPL+ or Artistic
# right?
AutoReqProv:    0
Requires:       %perl_compat
# FIXME - note this will need to change when doing the core/minimal swizzle
Requires:       perl
%if %{with perl_bootstrap}
%gendep_perl_tests
%endif

%description tests
This package contains the test suite included with Perl %{perl_version}.

Install this if you want to test your Perl installation (binary and core
modules).


%package utils
Summary:        Utilities packaged with the Perl distribution
License:        GPL+ or Artistic
Epoch:          0
Version:        %{perl_version}
BuildArch:      noarch
# Match library exactly for splain messages
Requires:       perl-libs = %{perl_epoch}:%{perl_version}-%{release}
# Keep /usr/sbin/sendmail and Module::CoreList optional for the perlbug tool
%if %{with perl_bootstrap}
%gendep_perl_utils
%endif
Conflicts:      perl < 4:5.22.0-351

%description utils
Several utilities which come with Perl distribution like h2ph, perlbug,
perlthanks, pl2pm, and splain. Some utilities are provided by more specific
packages like perldoc by perl-Pod-Perldoc.


%if %{dual_life} || %{rebuild_from_scratch}
%package Archive-Tar
Summary:        A module for Perl manipulation of .tar files
License:        GPL+ or Artistic
Epoch:          0
Version:        2.32
BuildArch:      noarch
Requires:       %perl_compat
Requires:       perl(IO::Zlib) >= 1.01
# Optional run-time:
Requires:       perl(IO::Compress::Bzip2) >= 2.015
# IO::String not used if perl supports useperlio which is true
# Use Compress::Zlib's version for IO::Uncompress::Bunzip2
Requires:       perl(IO::Uncompress::Bunzip2) >= 2.015
%if %{without perl_bootstrap}
Requires:       perl(Text::Diff)
%endif
%if %{with perl_bootstrap}
%gendep_perl_Archive_Tar
%endif

%description Archive-Tar
Archive::Tar provides an object oriented mechanism for handling tar files.  It
provides class methods for quick and easy files handling while also allowing
for the creation of tar file objects for custom manipulation.  If you have the
IO::Zlib module installed, Archive::Tar will also support compressed or
gzipped tar files.
%endif

%package Attribute-Handlers
Summary:        Simpler definition of attribute handlers
License:        GPL+ or Artistic
Epoch:          0
Version:        1.01
BuildArch:      noarch
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Attribute_Handlers
%endif
Conflicts:      perl < 4:5.22.0-351

%description Attribute-Handlers
This Perl module, when inherited by a package, allows that package's class to
define attribute handler subroutines for specific attributes. Variables and
subroutines subsequently defined in that package, or in packages derived from
that package may be given attributes with the same names as the attribute
handler subroutines, which will then be called in one of the compilation
phases (i.e. in a "BEGIN", "CHECK", "INIT", or "END" block).

%if %{dual_life} || %{rebuild_from_scratch}
%package autodie
Summary:        Replace functions with ones that succeed or die
License:        GPL+ or Artistic
Epoch:          0
Version:        2.29
Requires:       %perl_compat
BuildArch:      noarch
Requires:       perl(B)
Requires:       perl(Fcntl)
Requires:       perl(overload)
Requires:       perl(POSIX)
%if %{with perl_bootstrap}
%gendep_perl_autodie
%endif
Conflicts:      perl < 4:5.16.2-259

%description autodie
The "autodie" and "Fatal" pragma provides a convenient way to replace
functions that normally return false on failure with equivalents that throw an
exception on failure.

However "Fatal" has been obsoleted by the new autodie pragma. Please use
autodie in preference to "Fatal".
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package bignum
Summary:        Transparent big number support for Perl
License:        GPL+ or Artistic
Epoch:          0
Version:        0.51
Requires:       %perl_compat
Requires:       perl(Carp)
# Math::BigInt::Lite is optional
Requires:       perl(Math::BigRat)
Requires:       perl(warnings)
BuildArch:      noarch
%if %{with perl_bootstrap}
%gendep_perl_bignum
%endif

%description bignum
This package attempts to make it easier to write scripts that use BigInts and
BigFloats in a transparent way.

%package Carp
Summary:        Alternative warn and die for modules
Epoch:          0
# Real version 1.50
Version:        1.50
License:        GPL+ or Artistic
Requires:       %perl_compat
Provides:       perl(Carp::Heavy) = %{version}
%if %{with perl_bootstrap}
%gendep_perl_Carp
%endif
BuildArch:      noarch

# Do not export unversioned module
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(Carp\\)\\s*$

%description Carp
The Carp routines are useful in your own modules because they act like
die() or warn(), but with a message which is more likely to be useful to a
user of your module. In the case of cluck, confess, and longmess that
context is a summary of every call in the call-stack. For a shorter message
you can use carp or croak which report the error as being from where your
module was called. There is no guarantee that that is where the error was,
but it is a good educated guess.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Compress-Raw-Bzip2
Summary:        Low-Level Interface to bzip2 compression library
License:        GPL+ or Artistic
Epoch:          0
Version:        2.084
Requires:       perl(Exporter), perl(File::Temp)
%if %{with perl_bootstrap}
%gendep_perl_Compress_Raw_Bzip2
%endif

%description Compress-Raw-Bzip2
This module provides a Perl interface to the bzip2 compression library.
It is used by IO::Compress::Bzip2.

%package Compress-Raw-Zlib
Summary:        Low-Level Interface to the zlib compression library
License:        (GPL+ or Artistic) and zlib
Epoch:          0
Version:        2.084
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Compress_Raw_Zlib
%endif

%description Compress-Raw-Zlib
This module provides a Perl interface to the zlib compression library.
It is used by IO::Compress::Zlib.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Config-Perl-V
Summary:        Structured data retrieval of perl -V output
License:        GPL+ or Artistic
Epoch:          0
Version:        0.32
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Config_Perl_V
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

%description Config-Perl-V
The command "perl -V" will return you an excerpt from the %%Config::Config
hash combined with the output of "perl -V" that is not stored inside the hash,
but only available to the perl binary itself. This package provides Perl
module that will return you the output of "perl -V" in a structure.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package constant
Summary:        Perl pragma to declare constants
License:        GPL+ or Artistic
Epoch:          0
Version:        1.33
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_constant
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.3-264

%description constant
This pragma allows you to declare constants at compile-time:

use constant PI => 4 * atan2(1, 1);

When you declare a constant such as "PI" using the method shown above,
each machine your script runs upon can have as many digits of accuracy
as it can use. Also, your program will be easier to read, more likely
to be maintained (and maintained correctly), and far less likely to
send a space probe to the wrong planet because nobody noticed the one
equation in which you wrote 3.14195.

When a constant is used in an expression, Perl replaces it with its
value at compile time, and may then optimize the expression further.
In particular, any code in an "if (CONSTANT)" block will be optimized
away if the constant is false.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package CPAN
Summary:        Query, download and build perl modules from CPAN sites
License:        GPL+ or Artistic
Epoch:          0
Version:        2.22
Requires:       make
# Prefer Archive::Tar and Compress::Zlib over tar and gzip
Requires:       perl(Archive::Tar) >= 1.50
Requires:       perl(base)
Requires:       perl(Data::Dumper)
%if %{without perl_bootstrap}
Requires:       perl(Devel::Size)
%endif
Requires:       perl(ExtUtils::Manifest)
%if %{without perl_bootstrap}
Requires:       perl(File::HomeDir) >= 0.65
%endif
Requires:       perl(File::Temp) >= 0.16
Requires:       perl(lib)
Requires:       perl(Net::Config)
Requires:       perl(Net::FTP)
Requires:       perl(POSIX)
Requires:       perl(Term::ReadLine)
%if %{without perl_bootstrap}
Requires:       perl(URI)
Requires:       perl(URI::Escape)
%endif
Requires:       perl(User::pwent)
# Optional but higly recommended:
%if %{without perl_bootstrap}
Requires:       perl(Archive::Zip)
Requires:       perl(Compress::Bzip2)
Requires:       perl(CPAN::Meta) >= 2.110.350
%endif
Requires:       perl(Compress::Zlib)
Requires:       perl(Digest::MD5)
# CPAN encourages Digest::SHA strongly because of integrity checks
Requires:       perl(Digest::SHA)
Requires:       perl(Dumpvalue)
Requires:       perl(ExtUtils::CBuilder)
%if %{without perl_bootstrap}
# Avoid circular deps local::lib -> Module::Install -> CPAN when bootstraping
# local::lib recommended by CPAN::FirstTime default choice, bug #1122498
Requires:       perl(local::lib)
%endif
# FIXME is this actually a hard requirement?
Requires:       perl(Module::Build)
%if %{without perl_bootstrap}
Requires:       perl(Text::Glob)
%endif
Requires:       %perl_compat
Provides:       cpan = %{version}
%if %{with perl_bootstrap}
%gendep_perl_CPAN
%endif
BuildArch:      noarch

%description CPAN
The CPAN module automates or at least simplifies the make and install of
perl modules and extensions. It includes some primitive searching
capabilities and knows how to use LWP, HTTP::Tiny, Net::FTP and certain
external download clients to fetch distributions from the net.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package CPAN-Meta
Summary:        Distribution metadata for a CPAN dist
Epoch:          0
Version:        2.150010
License:        GPL+ or Artistic
Requires:       %perl_compat
Requires:       perl(CPAN::Meta::YAML) >= 0.011
Requires:       perl(Encode)
Requires:       perl(JSON::PP) >= 2.27300
%if %{with perl_bootstrap}
%gendep_perl_CPAN_Meta
%endif
BuildArch:      noarch

%description CPAN-Meta
Software distributions released to the CPAN include a META.json or, for
older distributions, META.yml, which describes the distribution, its
contents, and the requirements for building and installing the
distribution. The data structure stored in the META.json file is described
in CPAN::Meta::Spec.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package CPAN-Meta-Requirements
Summary:        Set of version requirements for a CPAN dist
Epoch:          0
# Real version 2.145 (2.140 in perl 5.38, Range.pm appeared in 2.141)
Version:        2.145
License:        GPL+ or Artistic
Requires:       %perl_compat
BuildArch:      noarch
# CPAN-Meta-Requirements used to have six decimal places
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(CPAN::Meta::Requirements\\)(\\s|$)
Provides:       perl(CPAN::Meta::Requirements) = %{version}000
%if %{with perl_bootstrap}
%gendep_perl_CPAN_Meta_Requirements
%endif

%description CPAN-Meta-Requirements
A CPAN::Meta::Requirements object models a set of version constraints like
those specified in the META.yml or META.json files in CPAN distributions.
It can be built up by adding more and more constraints, and it will reduce
them to the simplest representation.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package CPAN-Meta-YAML
Version:        0.018
Epoch:          0
Summary:        Read and write a subset of YAML for CPAN Meta files
License:        GPL+ or Artistic
BuildArch:      noarch
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_CPAN_Meta_YAML
%endif

%description CPAN-Meta-YAML
This module implements a subset of the YAML specification for use in reading
and writing CPAN metadata files like META.yml and MYMETA.yml. It should not be
used for any other general YAML parsing or generation task.
%endif


%if %{dual_life} || %{rebuild_from_scratch}
%package Data-Dumper
Summary:        Stringify perl data structures, suitable for printing and eval
License:        GPL+ or Artistic
Epoch:          0
Version:        2.174
Requires:       %perl_compat
Requires:       perl(Scalar::Util)
Requires:       perl(XSLoader)
%if %{with perl_bootstrap}
%gendep_perl_Data_Dumper
%endif

%description Data-Dumper
Given a list of scalars or reference variables, writes out their contents
in perl syntax. The references can also be objects. The content of each
variable is output in a single Perl statement. Handles self-referential
structures correctly.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package DB_File
Summary:        Perl5 access to Berkeley DB version 1.x
License:        GPL+ or Artistic
Epoch:          0
Version:        1.843
Requires:       %perl_compat
Requires:       perl(Fcntl)
Requires:       perl(XSLoader)
%if %{with perl_bootstrap}
%gendep_perl_DB_File
%endif
Conflicts:      perl < 4:5.16.3-264

%description DB_File
DB_File is a module which allows Perl programs to make use of the facilities
provided by Berkeley DB version 1.x (if you have a newer version of DB, you
will be limited to functionality provided by interface of version 1.x). The
interface defined here mirrors the Berkeley DB interface closely.
%endif

%package Devel-Peek
Summary:        A data debugging tool for the XS programmer
License:        GPL+ or Artistic
Epoch:          0
Version:        1.28
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Devel_Peek
%endif
Conflicts:      perl < 4:5.22.0-351

%description Devel-Peek
Devel::Peek contains functions which allows raw Perl datatypes to be
manipulated from a Perl script. This is used by those who do XS programming to
check that the data they are sending from C to Perl looks as they think it
should look.

%if %{dual_life} || %{rebuild_from_scratch}
%package Devel-PPPort
Summary:        Perl Pollution Portability header generator
License:        GPL+ or Artistic
Epoch:          0
Version:        3.52
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Devel_PPPort
%endif
Conflicts:      perl < 4:5.20.1-310

%description Devel-PPPort
Perl's API has changed over time, gaining new features, new functions,
increasing its flexibility, and reducing the impact on the C name space
environment (reduced pollution). The header file written by this module,
typically ppport.h, attempts to bring some of the newer Perl API features
to older versions of Perl, so that you can worry less about keeping track
of old releases, but users can still reap the benefit.
%endif

%package Devel-SelfStubber
Summary:        Generate stubs for a SelfLoading module
License:        GPL+ or Artistic
Epoch:          0
Version:        1.06
BuildArch:      noarch
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Devel_SelfStubber
%endif
Conflicts:      perl < 4:5.22.0-351

%description Devel-SelfStubber
Devel::SelfStubber prints the stubs you need to put in the module before the
__DATA__ token (or you can get it to print the entire module with stubs
correctly placed). The stubs ensure that if a method is called, it will get
loaded. They are needed specifically for inherited autoloaded methods.

%if %{dual_life} || %{rebuild_from_scratch}
%package Digest
Summary:        Modules that calculate message digests
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          0
Version:        1.17.01
BuildArch:      noarch
Requires:       %perl_compat
Requires:       perl(MIME::Base64)
%if %{with perl_bootstrap}
%gendep_perl_Digest
%endif

%description Digest
The Digest:: modules calculate digests, also called "fingerprints" or
"hashes", of some data, called a message. The digest is (usually)
some small/fixed size string. The actual size of the digest depend of
the algorithm used. The message is simply a sequence of arbitrary
bytes or bits.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Digest-MD5
Summary:        Perl interface to the MD5 Algorithm
License:        (GPL+ or Artistic) and BSD
# Epoch bump for clean upgrade over old standalone package
Epoch:          0
Version:        2.55
Requires:       %perl_compat
Requires:       perl(XSLoader)
# Recommended
Requires:       perl(Digest::base) >= 1.00
%if %{with perl_bootstrap}
%gendep_perl_Digest_MD5
%endif

%description Digest-MD5
The Digest::MD5 module allows you to use the RSA Data Security Inc. MD5
Message Digest algorithm from within Perl programs. The algorithm takes as
input a message of arbitrary length and produces as output a 128-bit
"fingerprint" or "message digest" of the input.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Digest-SHA
Summary:        Perl extension for SHA-1/224/256/384/512
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        6.02
Requires:       %perl_compat
Requires:       perl(Carp)
# Recommended
Requires:       perl(Digest::base)
%if %{with perl_bootstrap}
%gendep_perl_Digest_SHA
%endif

%description Digest-SHA
Digest::SHA is a complete implementation of the NIST Secure Hash
Standard.  It gives Perl programmers a convenient way to calculate
SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 message digests.  The
module can handle all types of input, including partial-byte data.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Encode
Summary:        Character encodings in Perl
License:        (GPL+ or Artistic) and Artistic 2.0 and UCD
Epoch:          4
Version:        3.01
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Encode
%endif

%description Encode
The Encode module provides the interface between Perl strings and the rest
of the system. Perl strings are sequences of characters.

%package encoding
Summary:        Write your Perl script in non-ASCII or non-UTF-8
License:        GPL+ or Artistic
Epoch:          4
Version:        2.22
# Keeping this sub-package arch-specific because it installs files into
# arch-specific directories.
Requires:       %perl_compat
Requires:       perl(Carp)
# Config not needed on perl ≥ 5.008
# Consider Filter::Util::Call as mandatory, bug #1165183, CPAN RT#100427
Requires:       perl(Filter::Util::Call)
# I18N::Langinfo is optional
# PerlIO::encoding is optional
Requires:       perl(utf8)
%if %{with perl_bootstrap}
%gendep_perl_encoding
%endif
Conflicts:      perl-Encode < 2:2.60-314

%description encoding
With the encoding pragma, you can write your Perl script in any encoding you
like (so long as the Encode module supports it) and still enjoy Unicode
support.

However, this encoding module is deprecated under perl 5.18. It uses
a mechanism provided by perl that is deprecated under 5.18 and higher, and may
be removed in a future version.

The easiest and the best alternative is to write your script in UTF-8.

%package Encode-devel
Summary:        Character encodings in Perl
License:        (GPL+ or Artistic) and UCD
Epoch:          4
Version:        3.01
Requires:       %perl_compat
Requires:       %{name}-Encode = %{epoch}:%{version}-%{release}
Recommends:     perl-devel
%if %{with perl_bootstrap}
%gendep_perl_Encode_devel
%endif
BuildArch:      noarch

%description Encode-devel
enc2xs builds a Perl extension for use by Encode from either Unicode Character
Mapping files (.ucm) or Tcl Encoding Files (.enc). You can use enc2xs to add
your own encoding to perl. No knowledge of XS is necessary.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Env
Summary:        Perl module that imports environment variables as scalars or arrays
License:        GPL+ or Artistic
Epoch:          0
Version:        1.04
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Env
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.2-265

%description Env
Perl maintains environment variables in a special hash named %%ENV. For when
this access method is inconvenient, the Perl module Env allows environment
variables to be treated as scalar or array variables.
%endif

%package Errno
Summary:        System errno constants
License:        GPL+ or Artistic
Epoch:          0
Version:        1.30
Requires:       %perl_compat
# Errno.pm bakes in kernel version at build time and compares it against
# $Config{osvers} at run time. Match exact interpreter build. Bug #1393421.
Requires:       perl-libs%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_Errno
%endif
Conflicts:      perl < 4:5.22.0-351

%description Errno
"Errno" defines and conditionally exports all the error constants defined in
your system "errno.h" include file. It has a single export tag, ":POSIX",
which will export all POSIX defined error numbers.

%if %{dual_life} || %{rebuild_from_scratch}
%package experimental
Summary:        Experimental features made easy
License:        GPL+ or Artistic
Epoch:          0
Version:        0.020
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_experimental
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.20.0-303

%description experimental
This pragma provides an easy and convenient way to enable or disable
experimental features.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Exporter
Summary:        Implements default import method for modules
License:        GPL+ or Artistic
Epoch:          0
Version:        5.73
Requires:       %perl_compat
Requires:       perl(Carp) >= 1.05
%if %{with perl_bootstrap}
%gendep_perl_Exporter
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.2-265

%description Exporter
The Exporter module implements an import method which allows a module to
export functions and variables to its users' name spaces. Many modules use
Exporter rather than implementing their own import method because Exporter
provides a highly flexible interface, with an implementation optimized for
the common case.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-CBuilder
Summary:        Compile and link C code for Perl modules
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        0.280231
BuildArch:      noarch
# C and C++ compilers are highly recommended because compiling code is the
# purpose of ExtUtils::CBuilder, bug #1547165
Requires:       gcc
Requires:       gcc-c++
Requires:       perl-devel
Requires:       %perl_compat
Requires:       perl(DynaLoader)
Requires:       perl(ExtUtils::Mksymlists)
Requires:       perl(File::Spec) >= 3.13
Requires:       perl(Perl::OSType) >= 1
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_CBuilder
%endif

%description ExtUtils-CBuilder
This module can build the C portions of Perl modules by invoking the
appropriate compilers and linkers in a cross-platform manner. It was motivated
by the Module::Build project, but may be useful for other purposes as well.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-Command
Summary:        Perl routines to replace common UNIX commands in Makefiles
License:        GPL+ or Artistic
Epoch:          1
Version:        7.34
BuildArch:      noarch
Requires:       %perl_compat
Conflicts:      perl < 4:5.20.1-312
Requires:       perl(File::Find)
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_Command
%endif

%description ExtUtils-Command
This Perl module is used to replace common UNIX commands. In all cases the
functions work with @ARGV rather than taking arguments. This makes them
easier to deal with in Makefiles.
%endif

%package ExtUtils-Embed
Summary:        Utilities for embedding Perl in C/C++ applications
License:        GPL+ or Artistic
Epoch:          0
Version:        1.35
Requires:       perl-devel
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_Embed
%endif
BuildArch:      noarch

%description ExtUtils-Embed
Utilities for embedding Perl in C/C++ applications.


%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-Install
Summary:        Install files from here to there
License:        GPL+ or Artistic
Epoch:          0
Version:        2.14
BuildArch:      noarch
Requires:       %perl_compat
Requires:       perl(Data::Dumper)
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_Install
%endif

%description ExtUtils-Install
Handles the installing and uninstalling of perl modules, scripts, man
pages, etc.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-MakeMaker
Summary:        Create a module Makefile
License:        GPL+ or Artistic
Epoch:          1
Version:        7.34
# These dependencies are weak in order to relieve building noarch
# packages from perl-devel and gcc. See bug #1547165.
# If an XS module is built, the generated Makefile executes gcc.
Recommends:     gcc
# If an XS module is built, code generated from XS will be compiled and it
# includes Perl header files.
Recommends:     perl-devel
Requires:       %perl_compat
Requires:       perl(Data::Dumper)
Requires:       perl(DynaLoader)
Requires:       perl(ExtUtils::Command)
Requires:       perl(ExtUtils::Install)
Requires:       perl(ExtUtils::Manifest)
Requires:       perl(File::Find)
Requires:       perl(Getopt::Long)
# Optional Pod::Man is needed for generating manual pages from POD
Requires:       perl(Pod::Man)
Requires:       perl(POSIX)
Requires:       perl(Test::Harness)
Requires:       perl(version)
# If an XS module is compiled, xsubpp(1) is needed
Requires:       perl-ExtUtils-ParseXS
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_MakeMaker
%endif
BuildArch:      noarch

# Filter false DynaLoader provides. Versioned perl(DynaLoader) keeps
# unfiltered on perl package, no need to reinject it.
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(DynaLoader\\)\\s*$
%global __provides_exclude %__provides_exclude|^perl\\(ExtUtils::MakeMaker::_version\\)

%description ExtUtils-MakeMaker
Create a module Makefile.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-Manifest
Summary:        Utilities to write and check a MANIFEST file
License:        GPL+ or Artistic
Epoch:          0
Version:        1.70
Requires:       %perl_compat
Requires:       perl(File::Path)
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_Manifest
%endif
BuildArch:      noarch

%description ExtUtils-Manifest
%{summary}.
%endif

%package ExtUtils-Miniperl
Summary:        Write the C code for perlmain.c
License:        GPL+ or Artistic
Epoch:          0
Version:        1.09
Requires:       perl-devel
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_Miniperl
%endif
BuildArch:      noarch

%description ExtUtils-Miniperl
writemain() takes an argument list of directories containing archive libraries
that relate to perl modules and should be linked into a new perl binary. It
writes a corresponding perlmain.c file that is a plain C file containing all
the bootstrap code to make the If the first argument to writemain() is a
reference to a scalar it is used as the filename to open for ouput. Any other
reference is used as the filehandle to write to. Otherwise output defaults to
STDOUT.

%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-MM-Utils
Summary:        ExtUtils::MM methods without dependency on ExtUtils::MakeMaker
License:        GPL+ or Artistic
Epoch:          1
# Real version 7.11_06
# Dual-life ExtUtils-MakeMaker generate it with its version
Version:        7.24
BuildArch:      noarch
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_MM_Utils
%endif

%description ExtUtils-MM-Utils
This is a collection of ExtUtils::MM subroutines that are used by many
other modules but that do not need full-featured ExtUtils::MakeMaker. The
issue with ExtUtils::MakeMaker is it pulls in Perl header files and that
is an overkill for small subroutines.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-ParseXS
Summary:        Module and a script for converting Perl XS code into C code
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        3.40
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_ParseXS
%endif
BuildArch:      noarch

%description ExtUtils-ParseXS
ExtUtils::ParseXS will compile XS code into C code by embedding the constructs
necessary to let C functions manipulate Perl values and creates the glue
necessary to let Perl access those functions.
%endif


%if %{dual_life} || %{rebuild_from_scratch}
%package File-Fetch
Summary:        Generic file fetching mechanism
License:        GPL+ or Artistic
Epoch:          0
Version:        0.56
Requires:       perl(IPC::Cmd) >= 0.36
Requires:       perl(Module::Load::Conditional) >= 0.04
Requires:       perl(Params::Check) >= 0.07
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_File_Fetch
%endif
BuildArch:      noarch

%description File-Fetch
File::Fetch is a generic file fetching mechanism.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package File-Path
Summary:        Create or remove directory trees
License:        GPL+ or Artistic
Epoch:          0
Version:        2.16
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_File_Path
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.2-265

%description File-Path
This module provides a convenient way to create directories of arbitrary
depth and to delete an entire directory subtree from the file system.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package File-Temp
Summary:        Return name and handle of a temporary file safely
License:        GPL+ or Artistic
Epoch:          0
Version:        0.2309
Requires:       %perl_compat
BuildArch:      noarch
Requires:       perl(File::Path) >= 2.06
Requires:       perl(POSIX)
%if %{with perl_bootstrap}
%gendep_perl_File_Temp
%endif
Conflicts:      perl < 4:5.16.2-265

%description File-Temp
File::Temp can be used to create and open temporary files in a safe way.
There is both a function interface and an object-oriented interface. The
File::Temp constructor or the tempfile() function can be used to return the
name and the open file handle of a temporary file. The tempdir() function
can be used to create a temporary directory.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
# FIXME Filter-Simple? version?
%package Filter
Summary:        Perl source filters
License:        GPL+ or Artistic
Epoch:          2
Version:        1.55
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Filter
%endif

%description Filter
Source filters alter the program text of a module before Perl sees it, much as
a C preprocessor alters the source text of a C program before the compiler
sees it.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Filter-Simple
Summary:        Simplified Perl source filtering
License:        GPL+ or Artistic
Epoch:          0
Version:        0.95
BuildArch:      noarch
Requires:       %perl_compat
Conflicts:      perl < 4:5.20.1-312
Requires:       perl(Text::Balanced) >= 1.97
Requires:       perl(warnings)
%if %{with perl_bootstrap}
%gendep_perl_Filter_Simple
%endif

%description Filter-Simple
The Filter::Simple Perl module provides a simplified interface to
Filter::Util::Call; one that is sufficient for most common cases.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Getopt-Long
Summary:        Extended processing of command line options
License:        GPLv2+ or Artistic
Epoch:          1
Version:        2.50
Requires:       %perl_compat
Requires:       perl(overload)
Requires:       perl(Text::ParseWords)
# Recommended:
Requires:       perl(Pod::Usage) >= 1.14
%if %{with perl_bootstrap}
%gendep_perl_Getopt_Long
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.3-268

%description Getopt-Long
The Getopt::Long module implements an extended getopt function called
GetOptions(). It parses the command line from @ARGV, recognizing and removing
specified options and their possible values.  It adheres to the POSIX syntax
for command line options, with GNU extensions. In general, this means that
options have long names instead of single letters, and are introduced with
a double dash "--". Support for bundling of command line options, as was the
case with the more traditional single-letter approach, is provided but not
enabled by default.
%endif

%package IO
Summary:        Perl input/output modules
License:        GPL+ or Artistic
Epoch:          0
Version:        1.40
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_IO
%endif

%description IO
This is a collection of Perl input/output modules.

%if %{dual_life} || %{rebuild_from_scratch}
%package IO-Compress
Summary:        IO::Compress wrapper for modules
License:        GPL+ or Artistic
Epoch:          0
Version:        2.084
Requires:       %perl_compat
Obsoletes:      perl-Compress-Zlib <= 2.020
Provides:       perl(IO::Uncompress::Bunzip2)
%if %{with perl_bootstrap}
%gendep_perl_IO_Compress
%endif
BuildArch:      noarch

%description IO-Compress
This module is the base class for all IO::Compress and IO::Uncompress modules.
This module is not intended for direct use in application code. Its sole
purpose is to to be sub-classed by IO::Compress modules.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package IO-Socket-IP
Summary:        Drop-in replacement for IO::Socket::INET supporting both IPv4 and IPv6
License:        GPL+ or Artistic
Epoch:          0
Version:        0.39
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_IO_Socket_IP
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.20.0-303

%description IO-Socket-IP
This module provides a protocol-independent way to use IPv4 and IPv6
sockets, as a drop-in replacement for IO::Socket::INET. Most constructor
arguments and methods are provided in a backward-compatible way.
%endif

%package IO-Zlib
Summary:        Perl IO:: style interface to Compress::Zlib
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        1.10
Requires:       perl(Compress::Zlib)
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_IO_Zlib
%endif
BuildArch:      noarch

%description IO-Zlib
This modules provides an IO:: style interface to the Compress::Zlib package.
The main advantage is that you can use an IO::Zlib object in much the same way
as an IO::File object so you can have common code that doesn't know which sort
of file it is using.


%if %{dual_life} || %{rebuild_from_scratch}
%package IPC-Cmd
Summary:        Finding and running system commands made easy
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          2
Version:        1.02
Requires:       perl(ExtUtils::MM::Utils)
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_IPC_Cmd
%endif
BuildArch:      noarch

%description IPC-Cmd
IPC::Cmd allows you to run commands, interactively if desired, in a platform
independent way, but have them still work.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package IPC-SysV
Summary:        Object interface to System V IPC
License:        GPL+ or Artistic
Epoch:          0
Version:        2.07
Requires:       %perl_compat
Requires:       perl(DynaLoader)
%if %{with perl_bootstrap}
%gendep_perl_IPC_SysV
%endif
Conflicts:      perl < 4:5.22.0-351

%description IPC-SysV
This is an object interface for System V messages, semaphores, and
inter-process calls.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package HTTP-Tiny
Summary:        A small, simple, correct HTTP/1.1 client
License:        GPL+ or Artistic
Epoch:          0
Version:        0.076
Requires:       perl(bytes)
Requires:       perl(Carp)
Requires:       perl(IO::Socket)
Requires:       perl(Time::Local)
%if %{with perl_bootstrap}
%gendep_perl_HTTP_Tiny
%endif
BuildArch:      noarch

%description HTTP-Tiny
This is a very simple HTTP/1.1 client, designed primarily for doing simple GET
requests without the overhead of a large framework like LWP::UserAgent.
It is more correct and more complete than HTTP::Lite. It supports proxies
(currently only non-authenticating ones) and redirection. It also correctly
resumes after EINTR.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package JSON-PP
Summary:        JSON::XS compatible pure-Perl module
Epoch:          1
Version:        4.02
License:        GPL+ or Artistic
BuildArch:      noarch
Requires:       %perl_compat
Requires:       perl(Data::Dumper)
Requires:       perl(Encode)
Requires:       perl(Math::BigFloat)
Requires:       perl(Math::BigInt)
Requires:       perl(Scalar::Util)
Requires:       perl(subs)
%if %{with perl_bootstrap}
%gendep_perl_JSON_PP
%endif
Conflicts:      perl-JSON < 2.50

%description JSON-PP
JSON::XS is the fastest and most proper JSON module on CPAN. It is written by
Marc Lehmann in C, so must be compiled and installed in the used environment.
JSON::PP is a pure-Perl module and is compatible with JSON::XS.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package libnet
Summary:        Perl clients for various network protocols
License:        (GPL+ or Artistic) and Artistic
Epoch:          0
Version:        3.11
Requires:       %perl_compat
Requires:       perl(File::Basename)
Requires:       perl(IO::Socket) >= 1.05
# Prefer IO::Socket::IP over IO::Socket::INET6 and IO::Socket::INET
Requires:       perl(IO::Socket::IP) >= 0.20
Requires:       perl(POSIX)
Requires:       perl(Socket) >= 2.016
Requires:       perl(utf8)
%if %{with perl_bootstrap}
%gendep_perl_libnet
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

%description libnet
This is a collection of Perl modules which provides a simple and
consistent programming interface (API) to the client side of various
protocols used in the internet community.
%endif

%package libnetcfg
Summary:        Configure libnet
License:        GPL+ or Artistic
Epoch:          %perl_epoch
Version:        %perl_version
# Net::Config is optional
BuildArch:      noarch
%if %{with perl_bootstrap}
%gendep_perl_libnetcfg
%endif
Conflicts:      perl-devel < 4:5.22.0-347

%description libnetcfg
The libnetcfg utility can be used to configure the libnet.

%if %{dual_life} || %{rebuild_from_scratch}
%package Locale-Maketext
Summary:        Framework for localization
License:        GPL+ or Artistic
Epoch:          0
Version:        1.29
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Locale_Maketext
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.3-268

%description Locale-Maketext
It is a common feature of applications (whether run directly, or via the Web)
for them to be "localized" -- i.e., for them to present an English interface
to an English-speaker, a German interface to a German-speaker, and so on for
all languages it's programmed with. Locale::Maketext is a framework for
software localization; it provides you with the tools for organizing and
accessing the bits of text and text-processing code that you need for
producing localized applications.
%endif

%package Locale-Maketext-Simple
Summary:        Simple interface to Locale::Maketext::Lexicon
License:        MIT
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        0.21.01
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Locale_Maketext_Simple
%endif
BuildArch:      noarch

%description Locale-Maketext-Simple
This module is a simple wrapper around Locale::Maketext::Lexicon, designed
to alleviate the need of creating Language Classes for module authors.

%if %{dual_life} || %{rebuild_from_scratch}
%package Math-BigInt
Summary:        Arbitrary-size integer and float mathematics
License:        GPL+ or Artistic
Epoch:          1
# Real version 1.999837
Version:        1.9998.37
Requires:       %perl_compat
Requires:       perl(Carp)
# File::Spec not used on recent perl
%if %{with perl_bootstrap}
%gendep_perl_Math_BigInt
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

# Do not export unversioned module
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(Math::BigInt\\)\\s*$

%description Math-BigInt
This provides Perl modules for arbitrary-size integer and float mathematics.

%package Math-BigInt-FastCalc
Summary:        Math::BigInt::Calc XS implementation
License:        GPL+ or Artistic
Epoch:          0
# Version normalized to dot format
# Real version 0.5008
Version:        0.500.800
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Math_BigInt_FastCalc
%endif
Conflicts:      perl < 4:5.22.0-348

%description Math-BigInt-FastCalc
This package provides support for faster big integer calculations.

%package Math-BigRat
Summary:        Arbitrary big rational numbers
License:        GPL+ or Artistic
Epoch:          0
Version:        0.2614
Requires:       %perl_compat
Requires:       perl(Math::BigInt)
%if %{with perl_bootstrap}
%gendep_perl_Math_BigRat
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-348

%description Math-BigRat
Math::BigRat complements Math::BigInt and Math::BigFloat by providing support
for arbitrary big rational numbers.
%endif

%package Math-Complex
Summary:        Complex numbers and trigonometric functions
License:        GPL+ or Artistic
Epoch:          0
Version:        1.59.01
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Math_Complex
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-348

%description Math-Complex
This package lets you create and manipulate complex numbers. By default, Perl
limits itself to real numbers, but an extra "use" statement brings full
complex support, along with a full set of mathematical functions typically
associated with and/or extended to complex numbers.

%package Memoize
Summary:        Transparently speed up functions by caching return values
License:        GPL+ or Artistic
Epoch:          0
Version:        1.03.01
Requires:       %perl_compat
# Keep Time::HiRes optional
%if %{with perl_bootstrap}
%gendep_perl_Memoize
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-350

%description Memoize
Memoizing a function makes it faster by trading space for time. It does
this by caching the return values of the function in a table. If you call
the function again with the same arguments, memoize jumps in and gives
you the value out of the table, instead of letting the function compute
the value all over again.

%if %{dual_life} || %{rebuild_from_scratch}
%package MIME-Base64
Summary:        Encoding and decoding of Base64 and quoted-printable strings
# cpan/MIME-Base64/Base64.xs:   (GPL+ or Artistic) and MIT (Bellcore's part)
# Other files:                  GPL+ or Artistic
License:        (GPL+ or Artistic) and MIT
Epoch:          0
Version:        3.15
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_MIME_Base64
%endif
Conflicts:      perl < 4:5.22.0-347

%description MIME-Base64
This package contains a Base64 encoder/decoder and a quoted-printable
encoder/decoder. These encoding methods are specified in RFC 2045 - MIME
(Multipurpose Internet Mail Extensions).
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Module-CoreList
Summary:        What modules are shipped with versions of perl
License:        GPL+ or Artistic
Epoch:          1
Version:        5.20190522
Requires:       %perl_compat
Requires:       perl(List::Util)
Requires:       perl(version) >= 0.88
%if %{with perl_bootstrap}
%gendep_perl_Module_CoreList
%endif
BuildArch:      noarch

%description Module-CoreList
Module::CoreList provides information on which core and dual-life modules
are shipped with each version of perl.


%package Module-CoreList-tools
Summary:        Tool for listing modules shipped with perl
License:        GPL+ or Artistic
Epoch:          1
Version:        5.20190522
Requires:       %perl_compat
Requires:       perl(feature)
Requires:       perl(version) >= 0.88
Requires:       perl-Module-CoreList = %{epoch}:%{version}-%{release}
%if %{with perl_bootstrap}
%gendep_perl_Module_CoreList_tools
%endif
# The files were distributed with perl.spec's subpackage
# perl-Module-CoreList <= 1:5.020001-309
Conflicts:      perl-Module-CoreList < 1:5.020001-310
BuildArch:      noarch

%description Module-CoreList-tools
This package provides a corelist(1) tool which can be used to query what
modules were shipped with given perl version.
%endif


%if %{dual_life} || %{rebuild_from_scratch}
%package Module-Load
Summary:        Runtime require of both modules and files
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        0.34
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Module_Load
%endif
BuildArch:      noarch

%description Module-Load
Module::Load eliminates the need to know whether you are trying to require
either a file or a module.
%endif


%if %{dual_life} || %{rebuild_from_scratch}
%package Module-Load-Conditional
Summary:        Looking up module information / loading at runtime
License:        GPL+ or Artistic
Epoch:          0
Version:        0.68
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Module_Load_Conditional
%endif
BuildArch:      noarch

%description Module-Load-Conditional
Module::Load::Conditional provides simple ways to query and possibly load any
of the modules you have installed on your system during runtime.
%endif


%package Module-Loaded
Summary:        Mark modules as loaded or unloaded
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        0.08
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Module_Loaded
%endif
BuildArch:      noarch

%description Module-Loaded
When testing applications, often you find yourself needing to provide
functionality in your test environment that would usually be provided by
external modules. Rather than munging the %%INC by hand to mark these external
modules as loaded, so they are not attempted to be loaded by perl, this module
offers you a very simple way to mark modules as loaded and/or unloaded.


%if %{dual_life} || %{rebuild_from_scratch}
%package Module-Metadata
Summary:        Gather package and POD information from perl module files
Epoch:          0
Version:        1.000036
License:        GPL+ or Artistic
BuildArch:      noarch
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Module_Metadata
%endif

%description Module-Metadata
Gather package and POD information from perl module files
%endif

%package Net-Ping
Summary:        Check a remote host for reachability
License:        GPL+ or Artistic
Epoch:          0
Version:        2.71
Requires:       %perl_compat
# Keep Net::Ping::External optional
%if %{with perl_bootstrap}
%gendep_perl_Net_Ping
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-350

%description Net-Ping
Net::Ping module contains methods to test the reachability of remote hosts on
a network.

%package open
Summary:        Perl pragma to set default PerlIO layers for input and output
License:        GPL+ or Artistic
Epoch:          0
Version:        1.11
Requires:       %perl_compat
Requires:       perl(Carp)
Requires:       perl(Encode)
Requires:       perl(encoding)
%if %{with perl_bootstrap}
%gendep_perl_open
%endif
Conflicts:      perl < 4:5.20.2-326
BuildArch:      noarch

%description open
The "open" pragma serves as one of the interfaces to declare default "layers"
(also known as "disciplines") for all I/O.

%if %{dual_life} || %{rebuild_from_scratch}
%package parent
Summary:        Establish an ISA relationship with base classes at compile time
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        0.237
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_parent
%endif
BuildArch:      noarch

%description parent
parent allows you to both load one or more modules, while setting up
inheritance from those modules at the same time. Mostly similar in effect to:

    package Baz;

    BEGIN {
        require Foo;
        require Bar;

        push @ISA, qw(Foo Bar);
    }
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Params-Check
Summary:        Generic input parsing/checking mechanism
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        0.38
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Params_Check
%endif
BuildArch:      noarch

%description Params-Check
Params::Check is a generic input parsing/checking mechanism.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package PathTools
Summary:        PathTools Perl module (Cwd, File::Spec)
License:        (GPL+ or Artistic) and BSD
Epoch:          0
# Converted from 3.76
Version:        3.760
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_PathTools
%endif

%description PathTools
PathTools Perl module (Cwd, File::Spec).
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package perlfaq
Summary:        Frequently asked questions about Perl
# Code examples are Public Domain
License:        (GPL+ or Artistic) and Public Domain
Epoch:          0
Version:        5.20190126
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_perlfaq
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

%description perlfaq
The perlfaq comprises several documents that answer the most commonly asked
questions about Perl and Perl programming.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package PerlIO-via-QuotedPrint
Summary:        PerlIO layer for quoted-printable strings
License:        GPL+ or Artistic
Epoch:          0
Version:        0.08
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_PerlIO_via_QuotedPrint
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

%description PerlIO-via-QuotedPrint
This module implements a PerlIO layer that works on files encoded in the
quoted-printable format. It will decode from quoted-printable while
reading from a handle, and it will encode as quoted-printable while
writing to a handle.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Perl-OSType
Summary:        Map Perl operating system names to generic types
Version:        1.010
Epoch:          0
License:        GPL+ or Artistic
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Perl_OSType
%endif
BuildArch:      noarch

%description Perl-OSType
Modules that provide OS-specific behaviors often need to know if the current
operating system matches a more generic type of operating systems. For example,
'linux' is a type of 'Unix' operating system and so is 'freebsd'.
This module provides a mapping between an operating system name as given by $^O
and a more generic type. The initial version is based on the OS type mappings
provided in Module::Build and ExtUtils::CBuilder (thus, Microsoft operating
systems are given the type 'Windows' rather than 'Win32').
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Pod-Checker
Summary:        Check POD documents for syntax errors
Epoch:          4
Version:        1.73
License:        GPL+ or Artistic
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Pod_Checker
%endif
BuildArch:      noarch

%description Pod-Checker
Module and tools to verify POD documentation contents for compliance with the
Plain Old Documentation format specifications.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Pod-Escapes
Summary:        Resolve POD escape sequences
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        1.07
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Pod_Escapes
%endif
BuildArch:      noarch

%description Pod-Escapes
This module provides things that are useful in decoding Pod E<...> sequences.
%endif

%package Pod-Html
Summary:        Convert POD files to HTML
License:        GPL+ or Artistic
Epoch:          0
# Real version 1.24
Version:        1.24
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Pod_Html
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-350

%description Pod-Html
This package converts files from POD format (see perlpod) to HTML format. It
can automatically generate indexes and cross-references, and it keeps a cache
of things it knows how to cross-reference.

%if %{dual_life} || %{rebuild_from_scratch}
%package Pod-Perldoc
Summary:        Look up Perl documentation in Pod format
License:        GPL+ or Artistic
Epoch:          0
Version:        3.2801
%if %{with perl_enables_groff}
# Pod::Perldoc::ToMan executes roff
Requires:       groff-base
%endif
Requires:       %perl_compat
Requires:       perl(File::Temp) >= 0.22
Requires:       perl(HTTP::Tiny)
Requires:       perl(IO::Handle)
Requires:       perl(IPC::Open3)
# POD2::Base is optional
# Pod::Checker is not needed if Pod::Simple::Checker is available
Requires:       perl(Pod::Simple::Checker)
Requires:       perl(Pod::Simple::RTF) >= 3.16
Requires:       perl(Pod::Simple::XMLOutStream) >= 3.16
Requires:       perl(Text::ParseWords)
# Tk is optional
Requires:       perl(Symbol)
%if %{with perl_bootstrap}
%gendep_perl_Pod_Perldoc
%endif
BuildArch:      noarch

%description Pod-Perldoc
perldoc looks up a piece of documentation in .pod format that is embedded
in the perl installation tree or in a perl script, and displays it via
"groff -man | $PAGER". This is primarily used for the documentation for
the perl library modules.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Pod-Simple
Summary:        Framework for parsing POD documentation
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        3.35
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Pod_Simple
%endif
BuildArch:      noarch

%description Pod-Simple
Pod::Simple is a Perl library for parsing text in the Pod ("plain old
documentation") markup language that is typically used for writing
documentation for Perl and for Perl modules.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Pod-Usage
Summary:        Print a usage message from embedded pod documentation
License:        GPL+ or Artistic
Epoch:          4
Version:        1.69
Requires:       %perl_compat
# Pod::Usage executes perldoc from perl-Pod-Perldoc by default
Requires:       perl-Pod-Perldoc
Requires:       perl(Pod::Text)
%if %{with perl_bootstrap}
%gendep_perl_Pod_Usage
%endif
BuildArch:      noarch

%description Pod-Usage
pod2usage will print a usage message for the invoking script (using its
embedded POD documentation) and then exit the script with the desired exit
status. The usage message printed may have any one of three levels of
"verboseness": If the verbose level is 0, then only a synopsis is printed.
If the verbose level is 1, then the synopsis is printed along with a
description (if present) of the command line options and arguments. If the
verbose level is 2, then the entire manual page is printed.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package podlators
Summary:        Format POD source into various output formats
License:        (GPL+ or Artistic) and MIT
Epoch:          0
Version:        4.11
BuildArch:      noarch
Requires:       %perl_compat
Requires:       perl(File::Spec) >= 0.8
Requires:       perl(Pod::Simple) >= 3.06
%if %{with perl_bootstrap}
%gendep_perl_podlators
%endif
Conflicts:      perl < 4:5.16.1-234

%description podlators
This package contains Pod::Man and Pod::Text modules which convert POD input
to *roff source output, suitable for man pages, or plain text.  It also
includes several sub-classes of Pod::Text for formatted output to terminals
with various capabilities.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Scalar-List-Utils
Summary:        A selection of general-utility scalar and list subroutines
License:        GPL+ or Artistic
Epoch:          3
# Real version 1.50
Version:        1.50
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Scalar_List_Utils
%endif

%description Scalar-List-Utils
Scalar::Util and List::Util contain a selection of subroutines that people have
expressed would be nice to have in the perl core, but the usage would not
really be high enough to warrant the use of a keyword, and the size so small
such that being individual extensions would be wasteful.
%endif

%package SelfLoader
Summary:        Load functions only on demand
License:        GPL+ or Artistic
Epoch:          0
Version:        1.25
BuildArch:      noarch
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_SelfLoader
%endif
Conflicts:      perl < 4:5.22.0-351

%description SelfLoader
This Perl module tells its users that functions in a package are to be
autoloaded from after the "__DATA__" token. See also "Autoloading" in
perlsub.

%if %{dual_life} || %{rebuild_from_scratch}
%package Socket
Summary:        C socket.h defines and structure manipulators
License:        GPL+ or Artistic
Epoch:          4
Version:        2.027
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Socket
%endif

%description Socket
This module is just a translation of the C socket.h file.  Unlike the old
mechanism of requiring a translated socket.ph file, this uses the h2xs program
(see the Perl source distribution) and your native C compiler.  This means
that it has a far more likely chance of getting the numbers right.  This
includes all of the commonly used pound-defines like AF_INET, SOCK_STREAM, etc.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Storable
Summary:        Persistence for Perl data structures
License:        GPL+ or Artistic
Epoch:          1
Version:        3.15
Requires:       %perl_compat
# Carp substitutes missing Log::Agent
Requires:       perl(Carp)
Requires:       perl(Config)
# Fcntl is optional, but locking is good
Requires:       perl(Fcntl)
Requires:       perl(IO::File)
%if %{with perl_bootstrap}
%gendep_perl_Storable
%endif
Conflicts:      perl < 4:5.16.3-274

%description Storable
The Storable package brings persistence to your Perl data structures
containing scalar, array, hash or reference objects, i.e. anything that
can be conveniently stored to disk and retrieved at a later time.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Sys-Syslog
Summary:        Perl interface to the UNIX syslog(3) calls
License:        GPL+ or Artistic
Epoch:          0
Version:        0.35
Requires:       %perl_compat
Requires:       perl(XSLoader)
%if %{with perl_bootstrap}
%gendep_perl_Sys_Syslog
%endif
Conflicts:      perl < 4:5.16.3-269

%description Sys-Syslog
Sys::Syslog is an interface to the UNIX syslog(3) function. Call syslog() with
a string priority and a list of printf() arguments just like at syslog(3).
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Term-ANSIColor
Summary:        Color screen output using ANSI escape sequences
License:        GPL+ or Artistic
Epoch:          0
Version:        4.06
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_Term_ANSIColor
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.18.2-302

%description Term-ANSIColor
This module has two interfaces, one through color() and colored() and the
other through constants. It also offers the utility functions uncolor(),
colorstrip(), colorvalid(), and coloralias(), which have to be explicitly
imported to be used.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Term-Cap
Summary:        Perl termcap interface
License:        GPL+ or Artistic
Epoch:          0
Version:        1.17
Requires:       %perl_compat
# ncurses for infocmp tool
Requires:       ncurses
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_Term_Cap
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

%description Term-Cap
These are low-level functions to extract and use capabilities from a terminal
capability (termcap) database.
%endif

%package Test
Summary:        Simple framework for writing test scripts
License:        GPL+ or Artistic
Epoch:          0
Version:        1.31
Requires:       %perl_compat
# Algorithm::Diff 1.15 is optional
Requires:       perl(File::Temp)
%if %{with perl_bootstrap}
%gendep_perl_Test
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-351

%description Test
The Test Perl module simplifies the task of writing test files for Perl modules,
such that their output is in the format that Test::Harness expects to see.

%if %{dual_life} || %{rebuild_from_scratch}
%package Test-Harness
Summary:        Run Perl standard test scripts with statistics
License:        GPL+ or Artistic
Epoch:          1
Version:        3.42
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Test_Harness
%endif
BuildArch:      noarch

%description Test-Harness
Run Perl standard test scripts with statistics.
Use TAP::Parser, Test::Harness package was whole rewritten.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Test-Simple
Summary:        Basic utilities for writing tests
License:        (GPL+ or Artistic) and CC0 and Public Domain
Epoch:          1
Version:        1.302162
Requires:       %perl_compat
Requires:       perl(Data::Dumper)
%if %{with perl_bootstrap}
%gendep_perl_Test_Simple
%endif
BuildArch:      noarch

%description Test-Simple
Basic utilities for writing tests.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Text-Balanced
Summary:        Extract delimited text sequences from strings
License:        GPL+ or Artistic
Epoch:          0
Version:        2.03
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Text_Balanced
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

%description Text-Balanced
These Perl subroutines may be used to extract a delimited substring, possibly
after skipping a specified prefix string.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Text-ParseWords
Summary:        Parse text into an array of tokens or array of arrays
License:        GPL+ or Artistic
Epoch:          0
Version:        3.30
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_Text_ParseWords
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.2-256

%description Text-ParseWords
Parse text into an array of tokens or array of arrays.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Text-Tabs+Wrap
Summary:        Expand tabs and do simple line wrapping
License:        TTWL
Epoch:          0
Version:        2013.0523
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Text_Tabs_Wrap
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.20.2-325

%description Text-Tabs+Wrap
Text::Tabs performs the same job that the UNIX expand(1) and unexpand(1)
commands do: adding or removing tabs from a document.

Text::Wrap::wrap() will reformat lines into paragraphs. All it does is break
up long lines, it will not join short lines together.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Thread-Queue
Summary:        Thread-safe queues
License:        GPL+ or Artistic
Epoch:          0
Version:        3.13
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_Thread_Queue
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.2-257

%description Thread-Queue
This module provides thread-safe FIFO queues that can be accessed safely by
any number of threads.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Time-HiRes
Summary:        High resolution alarm, sleep, gettimeofday, interval timers
License:        GPL+ or Artistic
Epoch:          1
Version:        1.9760
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_Time_HiRes
%endif
Conflicts:      perl < 4:5.16.3-271

%description Time-HiRes
The Time::HiRes module implements a Perl interface to the usleep, nanosleep,
ualarm, gettimeofday, and setitimer/getitimer system calls, in other words,
high resolution time and timers.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Time-Local
Summary:        Efficiently compute time from local and GMT time
License:        GPL+ or Artistic
Epoch:          0
# Real version 1.28
Version:        1.280
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Time_Local
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.3-262

%description Time-Local
This module provides functions that are the inverse of built-in perl functions
localtime() and gmtime(). They accept a date as a six-element array, and
return the corresponding time(2) value in seconds since the system epoch
(Midnight, January 1, 1970 GMT on Unix, for example). This value can be
positive or negative, though POSIX only requires support for positive values,
so dates before the system's epoch may not work on all operating systems.
%endif

%package Time-Piece
Summary:        Time objects from localtime and gmtime
License:        (GPL+ or Artistic) and BSD
Epoch:          0
# Really 1.34
Version:        1.340
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Time_Piece
%endif

%description Time-Piece
The Time::Piece module replaces the standard localtime and gmtime functions
with implementations that return objects.  It does so in a backwards compatible
manner, so that using localtime or gmtime as documented in perlfunc still
behave as expected.

%if %{dual_life} || %{rebuild_from_scratch}
%package threads
Summary:        Perl interpreter-based threads
License:        GPL+ or Artistic
Epoch:          1
Version:        2.22
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_threads
%endif

%description threads
Since Perl 5.8, thread programming has been available using a model called
interpreter threads  which provides a new Perl interpreter for each thread,
and, by default, results in no data or state information being shared between
threads.

(Prior to Perl 5.8, 5005threads was available through the Thread.pm API. This
threading model has been deprecated, and was removed as of Perl 5.10.0.)

As just mentioned, all variables are, by default, thread local. To use shared
variables, you need to also load threads::shared.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package threads-shared
Summary:        Perl extension for sharing data structures between threads
License:        GPL+ or Artistic
Epoch:          0
Version:        1.60
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_threads_shared
%endif

%description threads-shared
By default, variables are private to each thread, and each newly created thread
gets a private copy of each existing variable. This module allows you to share
variables across different threads (and pseudo-forks on Win32). It is used
together with the threads module.  This module supports the sharing of the
following data types only: scalars and scalar refs, arrays and array refs, and
hashes and hash refs.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Unicode-Collate
Summary:        Unicode Collation Algorithm
License:        (GPL+ or Artistic) and Unicode
Epoch:          0
Version:        1.27
Requires:       %perl_compat
Requires:       perl(Unicode::Normalize)
%if %{with perl_bootstrap}
%gendep_perl_Unicode_Collate
%endif
Conflicts:      perl < 4:5.22.0-347

%description Unicode-Collate
This package is Perl implementation of Unicode Technical Standard #10 (Unicode
Collation Algorithm).
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Unicode-Normalize
Summary:        Unicode Normalization Forms
License:        GPL+ or Artistic
Epoch:          0
Version:        1.26
Requires:       %perl_compat
# unicore/CombiningClass.pl and unicore/Decomposition.pl from perl, perl is
# auto-detected.
%if %{with perl_bootstrap}
%gendep_perl_Unicode_Normalize
%endif
Conflicts:      perl < 4:5.22.0-347

%description Unicode-Normalize
This package provides Perl functions that can convert strings into various
Unicode normalization forms as defined in Unicode Standard Annex #15.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package version
Summary:        Perl extension for Version Objects
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          6
# real version 0.9924
Version:        0.99.24
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_version
%endif
BuildArch:      noarch

%description version
Perl extension for Version Objects.
%endif

%package disable-stack-unwinding
Summary:	Disable stack unwinding in Perl

%description disable-stack-unwinding
Disable stack unwinding in Perl

%prep
%setup -q -n perl-%{perl_version}
%autopatch -p1

%if %{without perl_bootstrap}
# Local patch tracking
perl -x patchlevel.h \
    'Fedora Patch1: Removes date check, Fedora/RHEL specific' \
    'Fedora Patch3: support for libdir64' \
    'Fedora Patch4: use libresolv instead of libbind' \
    'Fedora Patch5: USE_MM_LD_RUN_PATH' \
    'Fedora Patch6: Provide MM::maybe_command independently (bug #1129443)' \
    'Fedora Patch7: Dont run one io test due to random builder failures' \
    'Fedora Patch15: Define SONAME for libperl.so' \
    'Fedora Patch16: Install libperl.so to -Dshrpdir value' \
    'Fedora Patch26: Make *DBM_File desctructors thread-safe (RT#61912)' \
    'Fedora Patch27: Make PadlistNAMES() lvalue again (CPAN RT#101063)' \
    'Fedora Patch30: Replace EU::MakeMaker dependency with EU::MM::Utils in IPC::Cmd (bug #1129443)' \
    'Fedora Patch31: Make File::Glob more resistant against degenerative matching (RT#131211)' \
    'Fedora Patch34: Fix cloning :via handles on thread creation (RT#131221)' \
    'Fedora Patch45: Fix File::Glob rt131211.t test random failures' \
    'Fedora Patch46: Fix t/op/hash.t test random failures' \
    'Fedora Patch47: Parse caret variables with subscripts as normal variables inside ${...} escaping (RT#131664)' \
    'Fedora Patch49: Do not display too many bytes when reporting malformed UTF-8 character' \
    'Fedora Patch51: Fix error message for "our sub foo::bar" (RT#131679)' \
    'Fedora Patch52: Fix executing arybase::_tie_it() in Safe compartement (RT#131588)' \
    'Fedora Patch59: Fix an overflow in the lexer when reading a new line (RT#131793)' \
    'Fedora Patch60: Fix Term::ReadLine not to create spurious &STDERR files (RT#132008)' \
    'Fedora Patch63: Fix a crash when a match for inversely repeated group fails (RT#132017)' \
    'Fedora Patch79: Link XS modules to pthread library to fix linking with -z defs' \
    'Fedora Patch81: Fix a heap use after free when moving a stack (RT#131954)' \
    'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
    'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
    %{nil}
%endif

#copy the example script
cp -a %{SOURCE5} .

#copy Pod-Html license clarification
cp %{SOURCE6} .

#
# Candidates for doc recoding (need case by case review):
# find . -name "*.pod" -o -name "README*" -o -name "*.pm" | xargs file -i | grep charset= | grep -v '\(us-ascii\|utf-8\)'
recode()
{
    iconv -f "${2:-iso-8859-1}" -t utf-8 < "$1" > "${1}_"
    touch -r "$1" "${1}_"
    mv -f "${1}_" "$1"
}
# TODO iconv fail on this one
##recode README.tw big5
#recode pod/perlebcdic.pod
#recode pod/perlhack.pod
#recode pod/perlhist.pod
#recode pod/perlthrtut.pod
#recode AUTHORS

find . -name \*.orig -exec rm -fv {} \;

# Configure Compress::Zlib to use system zlib
sed -i 's|BUILD_ZLIB      = True|BUILD_ZLIB      = False|
    s|INCLUDE         = ./zlib-src|INCLUDE         = %{_includedir}|
    s|LIB             = ./zlib-src|LIB             = %{_libdir}|' \
    cpan/Compress-Raw-Zlib/config.in

# Ensure that we never accidentally bundle zlib or bzip2
rm -rf cpan/Compress-Raw-Zlib/zlib-src
rm -rf cpan/Compress-Raw-Bzip2/bzip2-src
sed -i '/\(bzip2\|zlib\)-src/d' MANIFEST

%if !%{with gdbm}
# Do not install anything requiring NDBM_File if NDBM is not available.
rm -rf 'cpan/Memoize/Memoize/NDBM_File.pm'
sed -i '\|cpan/Memoize/Memoize/NDBM_File.pm|d' MANIFEST
%endif

%build
echo "RPM Build arch: %{_arch}"

# use "lib", not %%{_lib}, for privlib, sitelib, and vendorlib
# To build production version, we would need -DDEBUGGING=-g

# Perl INC path (perl -V) in search order:
# - /usr/local/share/perl5            -- for CPAN     (site lib)
# - /usr/local/lib[64]/perl5          -- for CPAN     (site arch)
# - /usr/share/perl5/vendor_perl      -- 3rd party    (vendor lib)
# - /usr/lib[64]/perl5/vendor_perl    -- 3rd party    (vendor arch)
# - /usr/share/perl5                  -- Fedora       (priv lib)
# - /usr/lib[64]/perl5                -- Fedora       (arch lib)

%global privlib     %{_prefix}/share/perl5
%global archlib     %{_libdir}/perl5

%global perl_vendorlib  %{privlib}/vendor_perl
%global perl_vendorarch %{archlib}/vendor_perl

BUILD_BZIP2=0
BZIP2_LIB=%{_libdir}
export BUILD_BZIP2 BZIP2_LIB

# ldflags is not used when linking XS modules.
# Only ldflags is used when linking miniperl.
# Only ccflags and ldflags are used for Configure's compiler checks.
# Set optimize=none to prevent from injecting upstream's value.
/bin/sh Configure -des \
        -Doptimize="none" \
        -Dccflags="${CFLAGS}" \
        -Dldflags="${CFLAGS} ${LDFLAGS}" \
        -Dccdlflags="-Wl,--enable-new-dtags ${CFLAGS} ${LDFLAGS}" \
        -Dlddlflags="-shared ${CFLAGS} ${LDFLAGS}" \
        -Dshrpdir="%{_libdir}" \
        -DDEBUGGING=-g \
        -Dversion=%{perl_version} \
        -Dmyhostname=localhost \
        -Dperladmin=root@localhost \
        -Dcc='%{__cc}' \
        -Dcf_by="%{vendor}" \
        -Dprefix=%{_prefix} \
%if %{without perl_enables_groff}
        -Dman1dir="%{_mandir}/man1" \
        -Dman3dir="%{_mandir}/man3" \
%endif
        -Dvendorprefix=%{_prefix} \
        -Dsiteprefix=%{_prefix}/local \
        -Dsitelib="%{_prefix}/local/share/perl5" \
        -Dsitearch="%{_prefix}/local/%{_lib}/perl5" \
        -Dprivlib="%{privlib}" \
        -Dvendorlib="%{perl_vendorlib}" \
        -Darchlib="%{archlib}" \
        -Dvendorarch="%{perl_vendorarch}" \
        -Darchname=%{perl_archname} \
        -Dlibpth="/usr/local/lib64 /lib64 %{_prefix}/lib64" \
%ifarch sparc sparcv9
        -Ud_longdbl \
%endif
        -Duseshrplib \
        -Dusethreads \
        -Duseithreads \
%if %{with perl_enables_systemtap}
        -Dusedtrace='/usr/bin/dtrace' \
%else
        -Uusedtrace \
%endif
        -Duselargefiles \
        -Dd_semctl_semun \
        -Di_db \
%if %{with gdbm}
        -Ui_ndbm \
        -Di_gdbm \
%endif
        -Di_shadow \
        -Di_syslog \
        -Dman3ext=3pm \
        -Duseperlio \
        -Dinstallusrbinperl=n \
        -Ubincompat5005 \
        -Uversiononly \
        -Dpager='/usr/bin/less -isr' \
        -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto \
        -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto \
        -Ud_endservent_r_proto -Ud_setservent_r_proto \
        -Dscriptdir='%{_bindir}' \
        -Dusesitecustomize \
        -Duse64bitint

# -Duseshrplib creates libperl.so, -Ubincompat5005 help create DSO -> libperl.so

BUILD_BZIP2=0
BZIP2_LIB=%{_libdir}
export BUILD_BZIP2 BZIP2_LIB

# Prepapre a symlink from proper DSO name to libperl.so now so that new perl
# can be executed from make.
%global soname libperl.so.%(echo '%{perl_version}' | sed 's/^\\([^.]*\\.[^.]*\\).*/\\1/')
test -L %soname || ln -s libperl.so %soname

%ifarch sparc64 %{arm}
%make_build -j1
%else
%make_build
%endif

%install
%make_install DESTDIR=%{buildroot}

mkdir -p %{buildroot}%{_sysconfdir}
cat > %{buildroot}%{_sysconfdir}/perl-disable-stack-unwinding << 'EOF'
Stack unwinding is disabled in Perl.
To enable it, remove this file by removing the package:
sudo dnf remove perl-disable-stack-unwinding

Раскрутка стека в Perl отключена.
Чтобы включить ее, удалите этот файл, удалив пакет:
sudo dnf remove perl-disable-stack-unwinding
EOF

%global build_archlib %{buildroot}%{archlib}
%global build_privlib %{buildroot}%{privlib}
%global build_bindir  %{buildroot}%{_bindir}
%global new_perl LD_PRELOAD="%{build_archlib}/CORE/libperl.so" \\\
    LD_LIBRARY_PATH="%{build_archlib}/CORE" \\\
    PERL5LIB="%{build_archlib}:%{build_privlib}" \\\
    %{build_bindir}/perl

# Make proper DSO names, move libperl to standard path.
mv "%{build_archlib}/CORE/libperl.so" \
    "%{buildroot}%{_libdir}/libperl.so.%{perl_version}"
ln -s "libperl.so.%{perl_version}" "%{buildroot}%{_libdir}/%{soname}"
ln -s "libperl.so.%{perl_version}" "%{buildroot}%{_libdir}/libperl.so"
# XXX: Keep symlink from original location because various code glues
# $archlib/CORE/$libperl to get the DSO.
ln -s "../../libperl.so.%{perl_version}" "%{build_archlib}/CORE/libperl.so"
# XXX: Remove the soname named file from CORE directory that was created as
# a symlink in build section and installed as a regular file by perl build
# system.
rm -f "%{build_archlib}/CORE/%{soname}"

install -p -m 755 utils/pl2pm %{build_bindir}/pl2pm

for i in asm/termios.h syscall.h syslimits.h syslog.h \
    sys/ioctl.h sys/socket.h sys/time.h wait.h
do
    %{new_perl} %{build_bindir}/h2ph -a -d %{build_archlib} $i || true
done

# vendor directories (in this case for third party rpms)
# perl doesn't create the auto subdirectory, but modules put things in it,
# so we need to own it.

# i don't like hardlinks, having symlinks instead:
ln -sf perl5 %{buildroot}%{_bindir}/perl
ln -s perl%{perl_version} %{buildroot}%{_bindir}/perl5

mkdir -p %{buildroot}%{perl_vendorarch}/auto
mkdir -p %{buildroot}%{perl_vendorlib}

#
# perl RPM macros (taken from the Fedora perl spec)
mkdir -p %{buildroot}%{_rpmmacrodir}
install -p -m 644 %{SOURCE3} %{buildroot}%{_rpmmacrodir}/macros.perl

#
# Core modules removal
#
# Dual-living binaries clashes on debuginfo files between perl and standalone
# packages. Excluding is not enough, we need to remove them. This is
# a work-around for rpmbuild bug #878863.
find %{buildroot} -type f -name '*.bs' -empty -delete
chmod -R u+w %{buildroot}/*

# miniperl? As an interpreter? How odd. Anyway, a symlink does it:
rm %{build_privlib}/ExtUtils/xsubpp
ln -s ../../../bin/xsubpp %{build_privlib}/ExtUtils/

# Don't need the .packlist
rm %{build_archlib}/.packlist

# Do not distribute File::Spec::VMS as it works on VMS only (bug #973713)
# We cannot remove it in %%prep because dist/Cwd/t/Spec.t test needs it.
rm %{build_archlib}/File/Spec/VMS.pm
rm %{buildroot}%{_mandir}/man3/File::Spec::VMS.3*

# for now, remove Bzip2:
# Why? Now is missing Bzip2 files and provides
##find %{buildroot} -name Bzip2 | xargs rm -r
##find %{buildroot} -name '*B*zip2*'| xargs rm

# tests -- FIXME need to validate that this all works as expected
mkdir -p %{buildroot}%{perl5_testdir}/perl-tests

# "core"
tar -cf - t/ | ( cd %{buildroot}%{perl5_testdir}/perl-tests && tar -xf - )

# "dual-lifed"
for dir in `find ext/ -type d -name t -maxdepth 2` ; do

    tar -cf - $dir | ( cd %{buildroot}%{perl5_testdir}/perl-tests/t && tar -xf - )
done

# Normalize shell bangs in tests.
# brp-mangle-shebangs executed by rpm-build chokes on t/TEST.
%{new_perl} -MConfig -i -pn \
    -e 's"\A#!(?:perl|\./perl|/usr/bin/perl|/usr/bin/env perl)\b"$Config{startperl}"' \
    $(find %{buildroot}%{perl5_testdir}/perl-tests -type f)

%if %{with perl_enables_systemtap}
# Systemtap tapset install
mkdir -p %{buildroot}%{tapsetdir}
%global libperl_stp libperl%{perl_version}-64.stp

sed \
  -e "s|LIBRARY_PATH|%{_libdir}/%{soname}|" \
  %{SOURCE4} \
  > %{buildroot}%{tapsetdir}/%{libperl_stp}
%endif

# TODO: Canonicalize test files (rewrite intrerpreter path, fix permissions)
# XXX: We cannot rewrite ./perl before %%check phase. Otherwise the test
# would run against system perl at build-time.
# See __spec_check_pre global macro in macros.perl.
#T_FILES=`find %%{buildroot}%%{perl5_testdir} -type f -name '*.t'`
#%%fix_shbang_line $T_FILES
#%%{__chmod} +x $T_FILES
#%%{_fixperms} %%{buildroot}%%{perl5_testdir}
#
# lib/perl5db.t will fail if Term::ReadLine::Gnu is available
%check
%if %{with test}
%{new_perl} -I/lib regen/lib_cleanup.pl
cd t
%{new_perl} -I../lib porting/customized.t --regen
cd -
%if %{parallel_tests}
    JOBS=$(printf '%%s' "%{?_smp_mflags}" | sed 's/.*-j\([0-9][0-9]*\).*/\1/')
    LC_ALL=C TEST_JOBS=$JOBS make test_harness
%else
    LC_ALL=C make test
%endif
%endif

%files
# We sub-package modules from perl-base subpackage. Main perl package
# is a meta package.

%files base
%{_mandir}/man1/*.1*
%{_mandir}/man3/*.3*
%{_bindir}/*
%{archlib}/*
%{privlib}/*


# libs
%exclude %dir %{archlib}
%exclude %dir %{archlib}/auto
%exclude %{archlib}/auto/re
%exclude %dir %{archlib}/CORE
%exclude %{archlib}/CORE/libperl.so
%exclude %{archlib}/re.pm
%exclude %{_libdir}/libperl.so.*
%exclude %dir %{perl_vendorarch}
%exclude %dir %{perl_vendorarch}/auto
%exclude %dir %{privlib}
%exclude %{privlib}/integer.pm
%exclude %{privlib}/strict.pm
%exclude %{privlib}/unicore
%exclude %{privlib}/utf8.pm
%exclude %{privlib}/warnings.pm
%exclude %{privlib}/XSLoader.pm
%exclude %dir %{perl_vendorlib}
%exclude %{_mandir}/man3/integer.*
%exclude %{_mandir}/man3/re.*
%exclude %{_mandir}/man3/strict.*
%exclude %{_mandir}/man3/utf8.*
%exclude %{_mandir}/man3/warnings.*
%exclude %{_mandir}/man3/XSLoader.*

# devel
%exclude %{_bindir}/h2xs
%exclude %{_mandir}/man1/h2xs*
%exclude %{_bindir}/perlivp
%exclude %{_mandir}/man1/perlivp*
%exclude %{archlib}/CORE/*.h
%exclude %{_libdir}/libperl.so
%exclude %{_mandir}/man1/perlxs*
%if %{with perl_enables_systemtap}
%exclude %dir %{_datadir}/systemtap
%exclude %dir %{_datadir}/systemtap/tapset
%endif

# utils
%exclude %{_bindir}/h2ph
%exclude %{_bindir}/perlbug
%exclude %{_bindir}/perlthanks
%exclude %{_bindir}/pl2pm
%exclude %{_bindir}/splain
%exclude %{privlib}/pod/perlutil.pod
%exclude %{_mandir}/man1/h2ph.*
%exclude %{_mandir}/man1/perlbug.*
%exclude %{_mandir}/man1/perlthanks.*
%exclude %{_mandir}/man1/perlutil.*
%exclude %{_mandir}/man1/pl2pm.*
%exclude %{_mandir}/man1/splain.*

# Archive-Tar
%exclude %{_bindir}/ptar
%exclude %{_bindir}/ptardiff
%exclude %{_bindir}/ptargrep
%exclude %dir %{privlib}/Archive
%exclude %{privlib}/Archive/Tar
%exclude %{privlib}/Archive/Tar.pm
%exclude %{_mandir}/man1/ptar.1*
%exclude %{_mandir}/man1/ptardiff.1*
%exclude %{_mandir}/man1/ptargrep.1*
%exclude %{_mandir}/man3/Archive::Tar*

# Attribute-Handlers
%exclude %{privlib}/Attribute
%exclude %{_mandir}/man3/Attribute::Handlers.*

# autodie
%exclude %{privlib}/autodie/
%exclude %{privlib}/autodie.pm
%exclude %{privlib}/Fatal.pm
%exclude %{_mandir}/man3/autodie.3*
%exclude %{_mandir}/man3/autodie::*
%exclude %{_mandir}/man3/Fatal.3*

# bignum
%exclude %{privlib}/bigint.pm
%exclude %{privlib}/bignum.pm
%exclude %{privlib}/bigrat.pm
%exclude %{privlib}/Math/BigFloat
%exclude %{privlib}/Math/BigInt/Trace.pm
%exclude %{_mandir}/man3/bigint.*
%exclude %{_mandir}/man3/bignum.*
%exclude %{_mandir}/man3/bigrat.*

# Carp
%exclude %{privlib}/Carp
%exclude %{privlib}/Carp.*
%exclude %{_mandir}/man3/Carp.*

# Config-Perl-V
%exclude %{privlib}/Config/Perl
%exclude %{_mandir}/man3/Config::Perl::V.*

# constant
%exclude %{privlib}/constant.pm
%exclude %{_mandir}/man3/constant.3*

# CPAN
%exclude %{_bindir}/cpan
%exclude %dir %{privlib}/App
%exclude %{privlib}/App/Cpan.pm
%exclude %{privlib}/CPAN
%exclude %{privlib}/CPAN.pm
%exclude %{_mandir}/man1/cpan.1*
%exclude %{_mandir}/man3/App::Cpan.*
%exclude %{_mandir}/man3/CPAN.*
%exclude %{_mandir}/man3/CPAN:*

# CPAN-Meta
%exclude %dir %{privlib}/CPAN
%exclude %{privlib}/CPAN/Meta.pm
%exclude %dir %{privlib}/CPAN/Meta
%exclude %{privlib}/CPAN/Meta/Converter.pm
%exclude %{privlib}/CPAN/Meta/Feature.pm
%exclude %dir %{privlib}/CPAN/Meta/History
%exclude %{privlib}/CPAN/Meta/History.pm
%exclude %{privlib}/CPAN/Meta/Merge.pm
%exclude %{privlib}/CPAN/Meta/Prereqs.pm
%exclude %{privlib}/CPAN/Meta/Spec.pm
%exclude %{privlib}/CPAN/Meta/Validator.pm
%exclude %dir %{privlib}/Parse
%exclude %dir %{privlib}/Parse/CPAN
%exclude %{privlib}/Parse/CPAN/Meta.pm
%exclude %{_mandir}/man3/CPAN::Meta*
%exclude %{_mandir}/man3/Parse::CPAN::Meta.3*

# CPAN-Meta-Requirements
%exclude %dir %{privlib}/CPAN
%exclude %dir %{privlib}/CPAN/Meta
%exclude %{privlib}/CPAN/Meta/Requirements.pm
%exclude %{privlib}/CPAN/Meta/Requirements/
%exclude %{_mandir}/man3/CPAN::Meta::Requirements*

# CPAN-Meta-YAML
%exclude %dir %{privlib}/CPAN
%exclude %dir %{privlib}/CPAN/Meta
%exclude %{privlib}/CPAN/Meta/YAML.pm
%exclude %{_mandir}/man3/CPAN::Meta::YAML*

# Compress-Raw-Bzip2
%exclude %dir %{archlib}/Compress
%exclude %dir %{archlib}/Compress/Raw
%exclude %{archlib}/Compress/Raw/Bzip2.pm
%exclude %dir %{archlib}/auto/Compress
%exclude %dir %{archlib}/auto/Compress/Raw
%exclude %{archlib}/auto/Compress/Raw/Bzip2
%exclude %{_mandir}/man3/Compress::Raw::Bzip2*

# Compress-Raw-Zlib
%exclude %dir %{archlib}/Compress
%exclude %dir %{archlib}/Compress/Raw
%exclude %{archlib}/Compress/Raw/Zlib.pm
%exclude %dir %{archlib}/auto/Compress
%exclude %dir %{archlib}/auto/Compress/Raw
%exclude %{archlib}/auto/Compress/Raw/Zlib
%exclude %{_mandir}/man3/Compress::Raw::Zlib*

# Data-Dumper
%exclude %dir %{archlib}/auto/Data
%exclude %dir %{archlib}/auto/Data/Dumper
%exclude %{archlib}/auto/Data/Dumper/Dumper.so
%exclude %dir %{archlib}/Data
%exclude %{archlib}/Data/Dumper.pm
%exclude %{_mandir}/man3/Data::Dumper.3*

# DB_File
%exclude %{archlib}/DB_File.pm
%exclude %dir %{archlib}/auto/DB_File
%exclude %{archlib}/auto/DB_File/DB_File.so
%exclude %{_mandir}/man3/DB_File*

# Devel-Peek
%dir %exclude %{archlib}/Devel
%exclude %{archlib}/Devel/Peek.pm
%dir %exclude %{archlib}/auto/Devel
%exclude %{archlib}/auto/Devel/Peek
%exclude %{_mandir}/man3/Devel::Peek.*

# Devel-PPPort
%exclude %{archlib}/Devel/PPPort.pm
%exclude %{_mandir}/man3/Devel::PPPort.3*

# Devel-SelfStubber
%exclude %dir %{privlib}/Devel
%exclude %{privlib}/Devel/SelfStubber.pm
%exclude %{_mandir}/man3/Devel::SelfStubber.*

# Digest
%exclude %{privlib}/Digest.pm
%exclude %dir %{privlib}/Digest
%exclude %{privlib}/Digest/base.pm
%exclude %{privlib}/Digest/file.pm
%exclude %{_mandir}/man3/Digest.3*
%exclude %{_mandir}/man3/Digest::base.3*
%exclude %{_mandir}/man3/Digest::file.3*

# Digest-MD5
%exclude %dir %{archlib}/Digest
%exclude %{archlib}/Digest/MD5.pm
%exclude %dir %{archlib}/auto/Digest
%exclude %{archlib}/auto/Digest/MD5
%exclude %{_mandir}/man3/Digest::MD5.3*

# Digest-SHA
%exclude %{_bindir}/shasum
%exclude %dir %{archlib}/Digest
%exclude %{archlib}/Digest/SHA.pm
%exclude %dir %{archlib}/auto/Digest
%exclude %{archlib}/auto/Digest/SHA
%exclude %{_mandir}/man1/shasum.1*
%exclude %{_mandir}/man3/Digest::SHA.3*

# Encode
%exclude %{_bindir}/encguess
%exclude %{_bindir}/piconv
%exclude %{archlib}/Encode*
%exclude %{archlib}/auto/Encode*
%exclude %{privlib}/Encode
%exclude %{_mandir}/man1/encguess.1*
%exclude %{_mandir}/man1/piconv.1*
%exclude %{_mandir}/man3/Encode*.3*

# encoding
%exclude %{archlib}/encoding.pm
%exclude %{_mandir}/man3/encoding.3*

# Encode-devel
%exclude %{_bindir}/enc2xs
%exclude %dir %{privlib}/Encode
%exclude %{privlib}/Encode/*.e2x
%exclude %{privlib}/Encode/encode.h
%exclude %{_mandir}/man1/enc2xs.1*

# Env
%exclude %{privlib}/Env.pm
%exclude %{_mandir}/man3/Env.3*

# Errno
%exclude %{archlib}/Errno.pm
%exclude %{_mandir}/man3/Errno.*

# Exporter
%exclude %{privlib}/Exporter*
%exclude %{_mandir}/man3/Exporter*

# experimental
%exclude %{privlib}/experimental*
%exclude %{_mandir}/man3/experimental*

# ExtUtils-CBuilder
%exclude %{privlib}/ExtUtils/CBuilder
%exclude %{privlib}/ExtUtils/CBuilder.pm
%exclude %{_mandir}/man3/ExtUtils::CBuilder*

# ExtUtils-Command
%exclude %{privlib}/ExtUtils/Command.pm
%exclude %{_mandir}/man3/ExtUtils::Command.*

# ExtUtils-Embed
%exclude %{privlib}/ExtUtils/Embed.pm
%exclude %{_mandir}/man3/ExtUtils::Embed*

# ExtUtils-Install
%exclude %{privlib}/ExtUtils/Install.pm
%exclude %{privlib}/ExtUtils/Installed.pm
%exclude %{privlib}/ExtUtils/Packlist.pm
%exclude %{_mandir}/man3/ExtUtils::Install.3*
%exclude %{_mandir}/man3/ExtUtils::Installed.3*
%exclude %{_mandir}/man3/ExtUtils::Packlist.3*

# ExtUtils-Manifest
%exclude %{privlib}/ExtUtils/Manifest.pm
%exclude %{privlib}/ExtUtils/MANIFEST.SKIP
%exclude %{_mandir}/man3/ExtUtils::Manifest.3*

# ExtUtils-MakeMaker
%exclude %{_bindir}/instmodsh
%exclude %{privlib}/ExtUtils/Command
%exclude %{privlib}/ExtUtils/Liblist
%exclude %{privlib}/ExtUtils/Liblist.pm
%exclude %{privlib}/ExtUtils/MakeMaker
%exclude %{privlib}/ExtUtils/MakeMaker.pm
%exclude %{privlib}/ExtUtils/MM.pm
%exclude %{privlib}/ExtUtils/MM_*.pm
%exclude %{privlib}/ExtUtils/MY.pm
%exclude %{privlib}/ExtUtils/Mkbootstrap.pm
%exclude %{privlib}/ExtUtils/Mksymlists.pm
%exclude %{privlib}/ExtUtils/testlib.pm
%exclude %{_mandir}/man1/instmodsh.1*
%exclude %{_mandir}/man3/ExtUtils::Command::MM*
%exclude %{_mandir}/man3/ExtUtils::Liblist.3*
%exclude %{_mandir}/man3/ExtUtils::MM.3*
%exclude %{_mandir}/man3/ExtUtils::MM_*
%exclude %{_mandir}/man3/ExtUtils::MY.3*
%exclude %{_mandir}/man3/ExtUtils::MakeMaker*
%exclude %{_mandir}/man3/ExtUtils::Mkbootstrap.3*
%exclude %{_mandir}/man3/ExtUtils::Mksymlists.3*
%exclude %{_mandir}/man3/ExtUtils::testlib.3*

# ExtUtils-Miniperl
%exclude %{privlib}/ExtUtils/Miniperl.pm
%exclude %{_mandir}/man3/ExtUtils::Miniperl.3*

# ExtUtils-MM-Utils
%exclude %dir %{privlib}/ExtUtils/MM
%exclude %{privlib}/ExtUtils/MM/Utils.pm
%exclude %{_mandir}/man3/ExtUtils::MM::Utils.*

# ExtUtils-ParseXS
%exclude %dir %{privlib}/ExtUtils/ParseXS
%exclude %{privlib}/ExtUtils/ParseXS.pm
%exclude %{privlib}/ExtUtils/ParseXS.pod
%exclude %{privlib}/ExtUtils/ParseXS/Constants.pm
%exclude %{privlib}/ExtUtils/ParseXS/CountLines.pm
%exclude %{privlib}/ExtUtils/ParseXS/Eval.pm
%exclude %{privlib}/ExtUtils/ParseXS/Utilities.pm
%exclude %dir %{privlib}/ExtUtils/Typemaps
%exclude %{privlib}/ExtUtils/Typemaps.pm
%exclude %{privlib}/ExtUtils/Typemaps/Cmd.pm
%exclude %{privlib}/ExtUtils/Typemaps/InputMap.pm
%exclude %{privlib}/ExtUtils/Typemaps/OutputMap.pm
%exclude %{privlib}/ExtUtils/Typemaps/Type.pm
%exclude %{privlib}/ExtUtils/xsubpp
%exclude %{_bindir}/xsubpp
%exclude %{_mandir}/man1/xsubpp*
%exclude %{_mandir}/man3/ExtUtils::ParseXS.3*
%exclude %{_mandir}/man3/ExtUtils::ParseXS::Constants.3*
%exclude %{_mandir}/man3/ExtUtils::ParseXS::Eval.3*
%exclude %{_mandir}/man3/ExtUtils::ParseXS::Utilities.3*
%exclude %{_mandir}/man3/ExtUtils::Typemaps.3*
%exclude %{_mandir}/man3/ExtUtils::Typemaps::Cmd.3*
%exclude %{_mandir}/man3/ExtUtils::Typemaps::InputMap.3*
%exclude %{_mandir}/man3/ExtUtils::Typemaps::OutputMap.3*
%exclude %{_mandir}/man3/ExtUtils::Typemaps::Type.3*

# File-Fetch
%exclude %{privlib}/File/Fetch.pm
%exclude %{_mandir}/man3/File::Fetch.3*

# File-Path
%exclude %{privlib}/File/Path.pm
%exclude %{_mandir}/man3/File::Path.3*

# File-Temp
%exclude %{privlib}/File/Temp.pm
%exclude %{_mandir}/man3/File::Temp.3*

# Filter
%exclude %dir %{archlib}/auto/Filter
%exclude %{archlib}/auto/Filter/Util
%exclude %dir %{archlib}/Filter
%exclude %{archlib}/Filter/Util
%exclude %{privlib}/pod/perlfilter.pod
%exclude %{_mandir}/man1/perlfilter.*
%exclude %{_mandir}/man3/Filter::Util::*

# Filter-Simple
%exclude %dir %{privlib}/Filter
%exclude %{privlib}/Filter/Simple.pm
%exclude %{_mandir}/man3/Filter::Simple.3*

# Getopt-Long
%exclude %{privlib}/Getopt/Long.pm
%exclude %{_mandir}/man3/Getopt::Long.3*

# IO
%exclude %dir %{archlib}/IO
%exclude %{archlib}/IO.pm
%exclude %{archlib}/IO/Dir.pm
%exclude %{archlib}/IO/File.pm
%exclude %{archlib}/IO/Handle.pm
%exclude %{archlib}/IO/Pipe.pm
%exclude %{archlib}/IO/Poll.pm
%exclude %{archlib}/IO/Seekable.pm
%exclude %{archlib}/IO/Select.pm
%exclude %dir %{archlib}/IO/Socket
%exclude %{archlib}/IO/Socket/INET.pm
%exclude %{archlib}/IO/Socket/UNIX.pm
%exclude %{archlib}/IO/Socket.pm
%exclude %dir %{archlib}/auto/IO
%exclude %{archlib}/auto/IO/IO.so
%exclude %{_mandir}/man3/IO.*
%exclude %{_mandir}/man3/IO::Dir.*
%exclude %{_mandir}/man3/IO::File.*
%exclude %{_mandir}/man3/IO::Handle.*
%exclude %{_mandir}/man3/IO::Pipe.*
%exclude %{_mandir}/man3/IO::Poll.*
%exclude %{_mandir}/man3/IO::Seekable.*
%exclude %{_mandir}/man3/IO::Select.*
%exclude %{_mandir}/man3/IO::Socket::INET.*
%exclude %{_mandir}/man3/IO::Socket::UNIX.*
%exclude %{_mandir}/man3/IO::Socket.*

# IO-Compress
%exclude %{_bindir}/zipdetails
%exclude %dir %{privlib}/IO
%exclude %dir %{privlib}/IO/Compress
%exclude %{privlib}/IO/Compress/FAQ.pod
%exclude %{_mandir}/man1/zipdetails.*
%exclude %{_mandir}/man3/IO::Compress::FAQ.*
# Compress-Zlib
%exclude %dir %{privlib}/Compress
%exclude %{privlib}/Compress/Zlib.pm
%exclude %{_mandir}/man3/Compress::Zlib*
# IO-Compress-Base
%exclude %{privlib}/File/GlobMapper.pm
%exclude %dir %{privlib}/IO
%exclude %dir %{privlib}/IO/Compress
%exclude %{privlib}/IO/Compress/Base
%exclude %{privlib}/IO/Compress/Base.pm
%exclude %dir %{privlib}/IO/Uncompress
%exclude %{privlib}/IO/Uncompress/AnyUncompress.pm
%exclude %{privlib}/IO/Uncompress/Base.pm
%exclude %{_mandir}/man3/File::GlobMapper.*
%exclude %{_mandir}/man3/IO::Compress::Base.*
%exclude %{_mandir}/man3/IO::Uncompress::AnyUncompress.*
%exclude %{_mandir}/man3/IO::Uncompress::Base.*
# IO-Compress-Zlib
%exclude %dir %{privlib}/IO
%exclude %dir %{privlib}/IO/Compress
%exclude %{privlib}/IO/Compress/Adapter
%exclude %{privlib}/IO/Compress/Deflate.pm
%exclude %{privlib}/IO/Compress/Gzip
%exclude %{privlib}/IO/Compress/Gzip.pm
%exclude %{privlib}/IO/Compress/RawDeflate.pm
%exclude %{privlib}/IO/Compress/Bzip2.pm
%exclude %{privlib}/IO/Compress/Zip
%exclude %{privlib}/IO/Compress/Zip.pm
%exclude %{privlib}/IO/Compress/Zlib
%exclude %dir %{privlib}/IO/Uncompress
%exclude %{privlib}/IO/Uncompress/Adapter
%exclude %{privlib}/IO/Uncompress/AnyInflate.pm
%exclude %{privlib}/IO/Uncompress/Bunzip2.pm
%exclude %{privlib}/IO/Uncompress/Gunzip.pm
%exclude %{privlib}/IO/Uncompress/Inflate.pm
%exclude %{privlib}/IO/Uncompress/RawInflate.pm
%exclude %{privlib}/IO/Uncompress/Unzip.pm
%exclude %{_mandir}/man3/IO::Compress::Deflate*
%exclude %{_mandir}/man3/IO::Compress::Bzip2*
%exclude %{_mandir}/man3/IO::Compress::Gzip*
%exclude %{_mandir}/man3/IO::Compress::RawDeflate*
%exclude %{_mandir}/man3/IO::Compress::Zip*
%exclude %{_mandir}/man3/IO::Uncompress::AnyInflate*
%exclude %{_mandir}/man3/IO::Uncompress::Bunzip2*
%exclude %{_mandir}/man3/IO::Uncompress::Gunzip*
%exclude %{_mandir}/man3/IO::Uncompress::Inflate*
%exclude %{_mandir}/man3/IO::Uncompress::RawInflate*
%exclude %{_mandir}/man3/IO::Uncompress::Unzip*

# IO-Socket-IP
%exclude %dir %{privlib}/IO
%exclude %dir %{privlib}/IO/Socket
%exclude %{privlib}/IO/Socket/IP.pm
%exclude %{_mandir}/man3/IO::Socket::IP.*

# IO-Zlib
%exclude %dir %{privlib}/IO
%exclude %{privlib}/IO/Zlib.pm
%exclude %{_mandir}/man3/IO::Zlib.*

# HTTP-Tiny
%exclude %dir %{privlib}/HTTP
%exclude %{privlib}/HTTP/Tiny.pm
%exclude %{_mandir}/man3/HTTP::Tiny*

# IPC-Cmd
%exclude %{privlib}/IPC/Cmd.pm
%exclude %{_mandir}/man3/IPC::Cmd.3*

# IPC-SysV
%exclude %{archlib}/auto/IPC
%exclude %{archlib}/IPC/Msg.pm
%exclude %{archlib}/IPC/Semaphore.pm
%exclude %{archlib}/IPC/SharedMem.pm
%exclude %{archlib}/IPC/SysV.pm
%exclude %{_mandir}/man3/IPC::Msg.*
%exclude %{_mandir}/man3/IPC::Semaphore.*
%exclude %{_mandir}/man3/IPC::SharedMem.*
%exclude %{_mandir}/man3/IPC::SysV.*

# JSON-PP
%exclude %{_bindir}/json_pp
%exclude %dir %{privlib}/JSON
%exclude %{privlib}/JSON/PP
%exclude %{privlib}/JSON/PP.pm
%exclude %{_mandir}/man1/json_pp.1*
%exclude %{_mandir}/man3/JSON::PP.3*
%exclude %{_mandir}/man3/JSON::PP::Boolean.3pm*

# libnet
%exclude %{privlib}/Net/Cmd.pm
%exclude %{privlib}/Net/Config.pm
%exclude %{privlib}/Net/Domain.pm
%exclude %{privlib}/Net/FTP
%exclude %{privlib}/Net/FTP.pm
%exclude %{privlib}/Net/libnetFAQ.pod
%exclude %{privlib}/Net/NNTP.pm
%exclude %{privlib}/Net/Netrc.pm
%exclude %{privlib}/Net/POP3.pm
%exclude %{privlib}/Net/SMTP.pm
%exclude %{privlib}/Net/Time.pm
%exclude %{_mandir}/man3/Net::Cmd.*
%exclude %{_mandir}/man3/Net::Config.*
%exclude %{_mandir}/man3/Net::Domain.*
%exclude %{_mandir}/man3/Net::FTP.*
%exclude %{_mandir}/man3/Net::libnetFAQ.*
%exclude %{_mandir}/man3/Net::NNTP.*
%exclude %{_mandir}/man3/Net::Netrc.*
%exclude %{_mandir}/man3/Net::POP3.*
%exclude %{_mandir}/man3/Net::SMTP.*
%exclude %{_mandir}/man3/Net::Time.*

# libnetcfg
%exclude %{_bindir}/libnetcfg
%exclude %{_mandir}/man1/libnetcfg*

# Locale-Maketext
%exclude %dir %{privlib}/Locale
%exclude %dir %{privlib}/Locale/Maketext
%exclude %{privlib}/Locale/Maketext.*
%exclude %{privlib}/Locale/Maketext/Cookbook.*
%exclude %{privlib}/Locale/Maketext/Guts.*
%exclude %{privlib}/Locale/Maketext/GutsLoader.*
%exclude %{privlib}/Locale/Maketext/TPJ13.*
%exclude %{_mandir}/man3/Locale::Maketext.*
%exclude %{_mandir}/man3/Locale::Maketext::Cookbook.*
%exclude %{_mandir}/man3/Locale::Maketext::Guts.*
%exclude %{_mandir}/man3/Locale::Maketext::GutsLoader.*
%exclude %{_mandir}/man3/Locale::Maketext::TPJ13.*

# Locale-Maketext-Simple
%exclude %dir %{privlib}/Locale
%exclude %dir %{privlib}/Locale/Maketext
%exclude %{privlib}/Locale/Maketext/Simple.pm
%exclude %{_mandir}/man3/Locale::Maketext::Simple.*

# Math-BigInt
%exclude %{privlib}/Math/BigFloat.pm
%exclude %{privlib}/Math/BigInt.pm
%exclude %dir %exclude %{privlib}/Math/BigInt
%exclude %{privlib}/Math/BigInt/Calc.pm
%exclude %{privlib}/Math/BigInt/Lib.pm
%exclude %{_mandir}/man3/Math::BigFloat.*
%exclude %{_mandir}/man3/Math::BigInt.*
%exclude %{_mandir}/man3/Math::BigInt::Calc.*
%exclude %{_mandir}/man3/Math::BigInt::Lib.*

# Math-BigInt-FastCalc
%exclude %{archlib}/Math
%exclude %{archlib}/auto/Math
%exclude %{_mandir}/man3/Math::BigInt::FastCalc.*

# Math-BigRat
%exclude %{privlib}/Math/BigRat.pm
%exclude %{_mandir}/man3/Math::BigRat.*

# Math-Complex
%dir %exclude %{privlib}/Math
%exclude %{privlib}/Math/Complex.pm
%exclude %{privlib}/Math/Trig.pm
%exclude %{_mandir}/man3/Math::Complex.*
%exclude %{_mandir}/man3/Math::Trig.*

# Memoize
%exclude %{privlib}/Memoize
%exclude %{privlib}/Memoize.pm
%exclude %{_mandir}/man3/Memoize::*
%exclude %{_mandir}/man3/Memoize.*

# MIME-Base64
%exclude %{archlib}/auto/MIME
%exclude %{archlib}/MIME
%exclude %{_mandir}/man3/MIME::*

# Module-CoreList
%exclude %dir %{privlib}/Module
%exclude %{privlib}/Module/CoreList
%exclude %{privlib}/Module/CoreList.pm
%exclude %{privlib}/Module/CoreList.pod
%exclude %{_mandir}/man3/Module::CoreList*

# Module-CoreList-tools
%exclude %{_bindir}/corelist
%exclude %{_mandir}/man1/corelist*

# Module-Load
%exclude %dir %{privlib}/Module
%exclude %{privlib}/Module/Load.pm
%exclude %{_mandir}/man3/Module::Load.*

# Module-Load-Conditional
%exclude %dir %{privlib}/Module
%exclude %{privlib}/Module/Load
%exclude %{_mandir}/man3/Module::Load::Conditional*

# Module-Loaded
%exclude %dir %{privlib}/Module
%exclude %{privlib}/Module/Loaded.pm
%exclude %{_mandir}/man3/Module::Loaded*

# Module-Metadata
%exclude %dir %{privlib}/Module
%exclude %{privlib}/Module/Metadata.pm
%exclude %{_mandir}/man3/Module::Metadata.3pm*

# Net-Ping
%exclude %{privlib}/Net/Ping.pm
%exclude %{_mandir}/man3/Net::Ping.*

# PathTools
%exclude %{archlib}/Cwd.pm
%exclude %{archlib}/File/Spec*
%exclude %{archlib}/auto/Cwd/
%exclude %{_mandir}/man3/Cwd*
%exclude %{_mandir}/man3/File::Spec*

# Params-Check
%exclude %{privlib}/Params/
%exclude %{_mandir}/man3/Params::Check*

# perlfaq
%exclude %{privlib}/perlfaq.pm
%exclude %{privlib}/pod/perlfaq*
%exclude %{privlib}/pod/perlglossary.pod
%exclude %{_mandir}/man1/perlfaq*
%exclude %{_mandir}/man1/perlglossary.*

# PerlIO-via-QuotedPrint
%exclude %{privlib}/PerlIO
%exclude %{_mandir}/man3/PerlIO::via::QuotedPrint.*

# Perl-OSType
%exclude %dir %{privlib}/Perl
%exclude %{privlib}/Perl/OSType.pm
%exclude %{_mandir}/man3/Perl::OSType.3pm*

# open
%exclude %{privlib}/open.pm
%exclude %{_mandir}/man3/open.3*

# parent
%exclude %{privlib}/parent.pm
%exclude %{_mandir}/man3/parent.3*

# Pod-Checker
%exclude %{_bindir}/podchecker
%exclude %{privlib}/Pod/Checker.pm
%exclude %{_mandir}/man1/podchecker.*
%exclude %{_mandir}/man3/Pod::Checker.*

# Pod-Escapes
%exclude %{privlib}/Pod/Escapes.pm
%exclude %{_mandir}/man3/Pod::Escapes.*

# Pod-Html
%exclude %{_bindir}/pod2html
%exclude %{privlib}/Pod/Html.pm
%exclude %{_mandir}/man1/pod2html.1*
%exclude %{_mandir}/man3/Pod::Html.*

# Pod-Perldoc
%exclude %{_bindir}/perldoc
%exclude %{privlib}/pod/perldoc.pod
%exclude %{privlib}/Pod/Perldoc.pm
%exclude %{privlib}/Pod/Perldoc/
%exclude %{_mandir}/man1/perldoc.1*
%exclude %{_mandir}/man3/Pod::Perldoc*

# Pod-Usage
%exclude %{_bindir}/pod2usage
%exclude %{privlib}/Pod/Usage.pm
%exclude %{_mandir}/man1/pod2usage.*
%exclude %{_mandir}/man3/Pod::Usage.*

# podlators
%exclude %{_bindir}/pod2man
%exclude %{_bindir}/pod2text
%exclude %{privlib}/pod/perlpodstyle.pod
%exclude %{privlib}/Pod/Man.pm
%exclude %{privlib}/Pod/ParseLink.pm
%exclude %{privlib}/Pod/Text
%exclude %{privlib}/Pod/Text.pm
%exclude %{_mandir}/man1/pod2man.1*
%exclude %{_mandir}/man1/pod2text.1*
%exclude %{_mandir}/man1/perlpodstyle.1*
%exclude %{_mandir}/man3/Pod::Man*
%exclude %{_mandir}/man3/Pod::ParseLink*
%exclude %{_mandir}/man3/Pod::Text*

# Pod-Simple
%exclude %{privlib}/Pod/Simple/
%exclude %{privlib}/Pod/Simple.pm
%exclude %{privlib}/Pod/Simple.pod
%exclude %{_mandir}/man3/Pod::Simple*

# Scalar-List-Utils
%exclude %{archlib}/List/
%exclude %{archlib}/Scalar/
%exclude %{archlib}/Sub/
%exclude %{archlib}/auto/List/
%exclude %{_mandir}/man3/List::Util*
%exclude %{_mandir}/man3/Scalar::Util*
%exclude %{_mandir}/man3/Sub::Util*

# SelfLoader
%exclude %{privlib}/SelfLoader.pm
%exclude %{_mandir}/man3/SelfLoader*

# Storable
%exclude %{archlib}/Storable.pm
%exclude %{archlib}/auto/Storable/
%exclude %{_mandir}/man3/Storable.*

# Sys-Syslog
%exclude %{archlib}/Sys/Syslog.pm
%exclude %{archlib}/auto/Sys/Syslog/
%exclude %{_mandir}/man3/Sys::Syslog.*

# Term-ANSIColor
%exclude %{privlib}/Term/ANSIColor.pm
%exclude %{_mandir}/man3/Term::ANSIColor*

# Term-Cap
%exclude %{privlib}/Term/Cap.pm
%exclude %{_mandir}/man3/Term::Cap.*

# Test
%exclude %{privlib}/Test.pm
%exclude %{_mandir}/man3/Test.*

# Test-Harness
%exclude %{_bindir}/prove
%exclude %dir %{privlib}/App
%exclude %{privlib}/App/Prove*
%exclude %{privlib}/TAP*
%exclude %dir %{privlib}/Test
%exclude %{privlib}/Test/Harness*
%exclude %{_mandir}/man1/prove.1*
%exclude %{_mandir}/man3/App::Prove*
%exclude %{_mandir}/man3/TAP*
%exclude %{_mandir}/man3/Test::Harness*

# Test-Simple
%exclude %{privlib}/ok*
%exclude %dir %{privlib}/Test
%exclude %{privlib}/Test/More*
%exclude %{privlib}/Test/Builder*
%exclude %{privlib}/Test/Tester*
%exclude %{privlib}/Test/Simple*
%exclude %{privlib}/Test/Tutorial*
%exclude %{privlib}/Test/use
%exclude %{privlib}/Test2*
%exclude %{_mandir}/man3/ok*
%exclude %{_mandir}/man3/Test::More*
%exclude %{_mandir}/man3/Test::Builder*
%exclude %{_mandir}/man3/Test::Tester*
%exclude %{_mandir}/man3/Test::Simple*
%exclude %{_mandir}/man3/Test::Tutorial*
%exclude %{_mandir}/man3/Test::use::*
%exclude %{_mandir}/man3/Test2*

# Text-Balanced
%exclude %{privlib}/Text/Balanced.pm
%exclude %{_mandir}/man3/Text::Balanced.*

# Text-ParseWords
%exclude %{privlib}/Text/ParseWords.pm
%exclude %{_mandir}/man3/Text::ParseWords.*

# Text-Tabs+Wrap
%exclude %{privlib}/Text/Tabs.pm
%exclude %{privlib}/Text/Wrap.pm
%exclude %{_mandir}/man3/Text::Tabs.*
%exclude %{_mandir}/man3/Text::Wrap.*

# Thread-Queue
%exclude %{privlib}/Thread/Queue.pm
%exclude %{_mandir}/man3/Thread::Queue.*

# Time-HiRes
%exclude %dir %{archlib}/Time
%exclude %{archlib}/Time/HiRes.pm
%exclude %dir %{archlib}/auto/Time
%exclude %{archlib}/auto/Time/HiRes
%exclude %{_mandir}/man3/Time::HiRes.*

# Time-Local
%exclude %{privlib}/Time/Local.pm
%exclude %{_mandir}/man3/Time::Local.*

# Time-Piece
%exclude %dir %{archlib}/Time
%exclude %{archlib}/Time/Piece.pm
%exclude %{archlib}/Time/Seconds.pm
%exclude %dir %{archlib}/auto/Time
%exclude %{archlib}/auto/Time/Piece
%exclude %{_mandir}/man3/Time::Piece.3*
%exclude %{_mandir}/man3/Time::Seconds.3*

# Socket
%exclude %dir %{archlib}/auto/Socket
%exclude %{archlib}/auto/Socket/Socket.*
%exclude %{archlib}/Socket.pm
%exclude %{_mandir}/man3/Socket.3*

# threads
%dir %exclude %{archlib}/auto/threads
%exclude %{archlib}/auto/threads/threads*
%exclude %{archlib}/threads.pm
%exclude %{_mandir}/man3/threads.3*

# threads-shared
%exclude %{archlib}/auto/threads/shared*
%exclude %dir %{archlib}/threads
%exclude %{archlib}/threads/shared*
%exclude %{_mandir}/man3/threads::shared*

# Unicode-Collate
%dir %exclude %{archlib}/auto/Unicode
%exclude %{archlib}/auto/Unicode/Collate
%dir %exclude %{archlib}/Unicode
%exclude %{archlib}/Unicode/Collate
%exclude %{archlib}/Unicode/Collate.pm
%exclude %{privlib}/Unicode/Collate
%exclude %{_mandir}/man3/Unicode::Collate.*
%exclude %{_mandir}/man3/Unicode::Collate::*

# Unicode-Normalize
%exclude %{archlib}/auto/Unicode/Normalize
%exclude %{archlib}/Unicode/Normalize.pm
%exclude %{_mandir}/man3/Unicode::Normalize.*

# version
%exclude %{privlib}/version.pm
%exclude %{privlib}/version.pod
%exclude %{privlib}/version/
%exclude %{_mandir}/man3/version.3*
%exclude %{_mandir}/man3/version::Internals.3*

%package -n %{_lib}%{name}5
Summary: The %{name} library, a part of %{name}
Group: System/Libraries
Obsoletes: %{_lib}perl5 < 4:5.38
Provides: libperl.so.5.30()(64bit) = 5.30
Provides: libperl.so.5.30 = 5.30
%description -n %{_lib}%{name}5
The perl library, a part of perl
%files -n %{_lib}%{name}5
%{_libdir}/lib%{name}.so.5*

%files libs
%license Artistic Copying
%doc AUTHORS README Changes
%dir %{archlib}
%dir %{archlib}/auto
%{archlib}/auto/re
%dir %{archlib}/CORE
%{archlib}/CORE/libperl.so
%{archlib}/re.pm
%dir %{perl_vendorarch}
%dir %{perl_vendorarch}/auto
%dir %{privlib}
%{privlib}/integer.pm
%{privlib}/strict.pm
%{privlib}/unicore
%{privlib}/utf8.pm
%{privlib}/warnings.pm
%{privlib}/XSLoader.pm
%dir %{perl_vendorlib}
%{_mandir}/man3/integer.*
%{_mandir}/man3/re.*
%{_mandir}/man3/strict.*
%{_mandir}/man3/utf8.*
%{_mandir}/man3/warnings.*
%{_mandir}/man3/XSLoader.*

%files devel
%{_bindir}/h2xs
%{_mandir}/man1/h2xs*
%{_bindir}/perlivp
%{_mandir}/man1/perlivp*
%{archlib}/CORE/*.h
%{_libdir}/libperl.so
%{_mandir}/man1/perlxs*
%if %{with perl_enables_systemtap}
%{tapsetdir}/%{libperl_stp}
%doc perl-example.stp
%endif

%files macros
%{_rpmmacrodir}/macros.perl

%files tests
%{perl5_testdir}/

%files utils
%{_bindir}/h2ph
%{_bindir}/perlbug
%{_bindir}/perlthanks
%{_bindir}/pl2pm
%{_bindir}/splain
%dir %{privlib}/pod
%{privlib}/pod/perlutil.pod
%{_mandir}/man1/h2ph.*
%{_mandir}/man1/perlbug.*
%{_mandir}/man1/perlthanks.*
%{_mandir}/man1/perlutil.*
%{_mandir}/man1/pl2pm.*
%{_mandir}/man1/splain.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Archive-Tar
%{_bindir}/ptar
%{_bindir}/ptardiff
%{_bindir}/ptargrep
%dir %{privlib}/Archive
%{privlib}/Archive/Tar
%{privlib}/Archive/Tar.pm
%{_mandir}/man1/ptar.1*
%{_mandir}/man1/ptardiff.1*
%{_mandir}/man1/ptargrep.1*
%{_mandir}/man3/Archive::Tar*
%endif

%files Attribute-Handlers
%{privlib}/Attribute
%{_mandir}/man3/Attribute::Handlers.*

%if %{dual_life} || %{rebuild_from_scratch}
%files autodie
%{privlib}/autodie/
%{privlib}/autodie.pm
%{privlib}/Fatal.pm
%{_mandir}/man3/autodie.3*
%{_mandir}/man3/autodie::*
%{_mandir}/man3/Fatal.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files bignum
%{privlib}/bigint.pm
%{privlib}/bignum.pm
%{privlib}/bigrat.pm
%dir %{privlib}/Math
%{privlib}/Math/BigFloat
%dir %{privlib}/Math/BigInt
%{privlib}/Math/BigInt/Trace.pm
%{_mandir}/man3/bigint.*
%{_mandir}/man3/bignum.*
%{_mandir}/man3/bigrat.*

%files Carp
%{privlib}/Carp
%{privlib}/Carp.*
%{_mandir}/man3/Carp.*

%files Compress-Raw-Bzip2
%dir %{archlib}/Compress
%dir %{archlib}/Compress/Raw
%{archlib}/Compress/Raw/Bzip2.pm
%dir %{archlib}/auto/Compress
%dir %{archlib}/auto/Compress/Raw
%{archlib}/auto/Compress/Raw/Bzip2
%{_mandir}/man3/Compress::Raw::Bzip2*

%files Compress-Raw-Zlib
%dir %{archlib}/Compress
%dir %{archlib}/Compress/Raw
%{archlib}/Compress/Raw/Zlib.pm
%dir %{archlib}/auto/Compress
%dir %{archlib}/auto/Compress/Raw
%{archlib}/auto/Compress/Raw/Zlib
%{_mandir}/man3/Compress::Raw::Zlib*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Config-Perl-V
%dir %{privlib}/Config
%{privlib}/Config/Perl
%{_mandir}/man3/Config::Perl::V.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files constant
%{privlib}/constant.pm
%{_mandir}/man3/constant.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files CPAN
%{_bindir}/cpan
%dir %{privlib}/App
%{privlib}/App/Cpan.pm
%{privlib}/CPAN
%{privlib}/CPAN.pm
%{_mandir}/man1/cpan.1*
%{_mandir}/man3/App::Cpan.*
%{_mandir}/man3/CPAN.*
%{_mandir}/man3/CPAN:*
%exclude %{privlib}/CPAN/Meta/
%exclude %{privlib}/CPAN/Meta.pm
%exclude %{_mandir}/man3/CPAN::Meta*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files CPAN-Meta
%dir %{privlib}/CPAN/Meta
%{privlib}/CPAN/Meta.pm
%{privlib}/CPAN/Meta/Converter.pm
%{privlib}/CPAN/Meta/Feature.pm
%dir %{privlib}/CPAN/Meta/History
%{privlib}/CPAN/Meta/History.pm
%{privlib}/CPAN/Meta/Merge.pm
%{privlib}/CPAN/Meta/Prereqs.pm
%{privlib}/CPAN/Meta/Spec.pm
%{privlib}/CPAN/Meta/Validator.pm
%dir %{privlib}/Parse/
%dir %{privlib}/Parse/CPAN/
%{privlib}/Parse/CPAN/Meta.pm
%{_mandir}/man3/CPAN::Meta*
%{_mandir}/man3/Parse::CPAN::Meta.3*
%exclude %{_mandir}/man3/CPAN::Meta::YAML*
%exclude %{_mandir}/man3/CPAN::Meta::Requirements*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files CPAN-Meta-Requirements
%dir %{privlib}/CPAN
%dir %{privlib}/CPAN/Meta
%{privlib}/CPAN/Meta/Requirements.pm
%{privlib}/CPAN/Meta/Requirements/Range.pm
%{_mandir}/man3/CPAN::Meta::Requirements*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files CPAN-Meta-YAML
%dir %{privlib}/CPAN
%dir %{privlib}/CPAN/Meta
%{privlib}/CPAN/Meta/YAML.pm
%{_mandir}/man3/CPAN::Meta::YAML*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Data-Dumper
%dir %{archlib}/auto/Data
%dir %{archlib}/auto/Data/Dumper
%{archlib}/auto/Data/Dumper/Dumper.so
%dir %{archlib}/Data
%{archlib}/Data/Dumper.pm
%{_mandir}/man3/Data::Dumper.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files DB_File
%{archlib}/DB_File.pm
%dir %{archlib}/auto/DB_File
%{archlib}/auto/DB_File/DB_File.so
%{_mandir}/man3/DB_File*
%endif

%files Devel-Peek
%dir %{archlib}/Devel
%{archlib}/Devel/Peek.pm
%dir %{archlib}/auto/Devel
%{archlib}/auto/Devel/Peek
%{_mandir}/man3/Devel::Peek.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Devel-PPPort
%dir %{archlib}/Devel
%{archlib}/Devel/PPPort.pm
%{_mandir}/man3/Devel::PPPort.3*
%endif

%files Devel-SelfStubber
%dir %{privlib}/Devel
%{privlib}/Devel/SelfStubber.pm
%{_mandir}/man3/Devel::SelfStubber.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Digest
%{privlib}/Digest.pm
%dir %{privlib}/Digest
%{privlib}/Digest/base.pm
%{privlib}/Digest/file.pm
%{_mandir}/man3/Digest.3*
%{_mandir}/man3/Digest::base.3*
%{_mandir}/man3/Digest::file.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Digest-MD5
%dir %{archlib}/Digest
%{archlib}/Digest/MD5.pm
%dir %{archlib}/auto/Digest
%{archlib}/auto/Digest/MD5
%{_mandir}/man3/Digest::MD5.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Digest-SHA
%{_bindir}/shasum
%dir %{archlib}/Digest
%{archlib}/Digest/SHA.pm
%dir %{archlib}/auto/Digest
%{archlib}/auto/Digest/SHA
%{_mandir}/man1/shasum.1*
%{_mandir}/man3/Digest::SHA.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Encode
%{_bindir}/encguess
%{_bindir}/piconv
%{archlib}/Encode*
%{archlib}/auto/Encode*
%{privlib}/Encode
%exclude %{privlib}/Encode/*.e2x
%exclude %{privlib}/Encode/encode.h
%{_mandir}/man1/encguess.1*
%{_mandir}/man1/piconv.1*
%{_mandir}/man3/Encode*.3*

%files encoding
%{archlib}/encoding.pm
%{_mandir}/man3/encoding.3*

%files Encode-devel
%{_bindir}/enc2xs
%dir %{privlib}/Encode
%{privlib}/Encode/*.e2x
%{privlib}/Encode/encode.h
%{_mandir}/man1/enc2xs.1*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Env
%{privlib}/Env.pm
%{_mandir}/man3/Env.3*
%endif

%files Errno
%{archlib}/Errno.pm
%{_mandir}/man3/Errno.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Exporter
%{privlib}/Exporter*
%{_mandir}/man3/Exporter*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files experimental
%{privlib}/experimental*
%{_mandir}/man3/experimental*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-CBuilder
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/CBuilder
%{privlib}/ExtUtils/CBuilder.pm
%{_mandir}/man3/ExtUtils::CBuilder*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-Command
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/Command.pm
%{_mandir}/man3/ExtUtils::Command.*
%endif

%files ExtUtils-Embed
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/Embed.pm
%{_mandir}/man3/ExtUtils::Embed*

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-Install
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/Install.pm
%{privlib}/ExtUtils/Installed.pm
%{privlib}/ExtUtils/Packlist.pm
%{_mandir}/man3/ExtUtils::Install.3*
%{_mandir}/man3/ExtUtils::Installed.3*
%{_mandir}/man3/ExtUtils::Packlist.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-Manifest
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/Manifest.pm
%{privlib}/ExtUtils/MANIFEST.SKIP
%{_mandir}/man3/ExtUtils::Manifest.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-MakeMaker
%{_bindir}/instmodsh
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/Command/
%{privlib}/ExtUtils/Liblist
%{privlib}/ExtUtils/Liblist.pm
%{privlib}/ExtUtils/MakeMaker
%{privlib}/ExtUtils/MakeMaker.pm
%{privlib}/ExtUtils/MM.pm
%{privlib}/ExtUtils/MM_*.pm
%{privlib}/ExtUtils/MY.pm
%{privlib}/ExtUtils/Mkbootstrap.pm
%{privlib}/ExtUtils/Mksymlists.pm
%{privlib}/ExtUtils/testlib.pm
%{_mandir}/man1/instmodsh.1*
%{_mandir}/man3/ExtUtils::Command::MM*
%{_mandir}/man3/ExtUtils::Liblist.3*
%{_mandir}/man3/ExtUtils::MM.3*
%{_mandir}/man3/ExtUtils::MM_*
%{_mandir}/man3/ExtUtils::MY.3*
%{_mandir}/man3/ExtUtils::MakeMaker*
%{_mandir}/man3/ExtUtils::Mkbootstrap.3*
%{_mandir}/man3/ExtUtils::Mksymlists.3*
%{_mandir}/man3/ExtUtils::testlib.3*
%endif

%files ExtUtils-Miniperl
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/Miniperl.pm
%{_mandir}/man3/ExtUtils::Miniperl.3*

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-MM-Utils
%dir %{privlib}/ExtUtils
%dir %{privlib}/ExtUtils/MM
%{privlib}/ExtUtils/MM/Utils.pm
%{_mandir}/man3/ExtUtils::MM::Utils.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-ParseXS
%dir %{privlib}/ExtUtils
%dir %{privlib}/ExtUtils/ParseXS
%{privlib}/ExtUtils/ParseXS.pm
%{privlib}/ExtUtils/ParseXS.pod
%{privlib}/ExtUtils/ParseXS/Constants.pm
%{privlib}/ExtUtils/ParseXS/CountLines.pm
%{privlib}/ExtUtils/ParseXS/Eval.pm
%{privlib}/ExtUtils/ParseXS/Utilities.pm
%dir %{privlib}/ExtUtils/Typemaps
%{privlib}/ExtUtils/Typemaps.pm
%{privlib}/ExtUtils/Typemaps/Cmd.pm
%{privlib}/ExtUtils/Typemaps/InputMap.pm
%{privlib}/ExtUtils/Typemaps/OutputMap.pm
%{privlib}/ExtUtils/Typemaps/Type.pm
%{privlib}/ExtUtils/xsubpp
%{_bindir}/xsubpp
%{_mandir}/man1/xsubpp*
%{_mandir}/man3/ExtUtils::ParseXS.3*
%{_mandir}/man3/ExtUtils::ParseXS::Constants.3*
%{_mandir}/man3/ExtUtils::ParseXS::Eval.3*
%{_mandir}/man3/ExtUtils::ParseXS::Utilities.3*
%{_mandir}/man3/ExtUtils::Typemaps.3*
%{_mandir}/man3/ExtUtils::Typemaps::Cmd.3*
%{_mandir}/man3/ExtUtils::Typemaps::InputMap.3*
%{_mandir}/man3/ExtUtils::Typemaps::OutputMap.3*
%{_mandir}/man3/ExtUtils::Typemaps::Type.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files File-Fetch
%dir %{privlib}/File
%{privlib}/File/Fetch.pm
%{_mandir}/man3/File::Fetch.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files File-Path
%dir %{privlib}/File
%{privlib}/File/Path.pm
%{_mandir}/man3/File::Path.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files File-Temp
%dir %{privlib}/File
%{privlib}/File/Temp.pm
%{_mandir}/man3/File::Temp.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Filter
%dir %{archlib}/auto/Filter
%{archlib}/auto/Filter/Util
%dir %{archlib}/Filter
%{archlib}/Filter/Util
%{privlib}/pod/perlfilter.pod
%{_mandir}/man1/perlfilter.*
%{_mandir}/man3/Filter::Util::*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Filter-Simple
%dir %{privlib}/Filter
%{privlib}/Filter/Simple.pm
%{_mandir}/man3/Filter::Simple.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Getopt-Long
%dir %{privlib}/Getopt
%{privlib}/Getopt/Long.pm
%{_mandir}/man3/Getopt::Long.3*
%endif

%files IO
%dir %{archlib}/IO
%{archlib}/IO.pm
%{archlib}/IO/Dir.pm
%{archlib}/IO/File.pm
%{archlib}/IO/Handle.pm
%{archlib}/IO/Pipe.pm
%{archlib}/IO/Poll.pm
%{archlib}/IO/Seekable.pm
%{archlib}/IO/Select.pm
%dir %{archlib}/IO/Socket
%{archlib}/IO/Socket/INET.pm
%{archlib}/IO/Socket/UNIX.pm
%{archlib}/IO/Socket.pm
%dir %{archlib}/auto/IO
%{archlib}/auto/IO/IO.so
%{_mandir}/man3/IO.*
%{_mandir}/man3/IO::Dir.*
%{_mandir}/man3/IO::File.*
%{_mandir}/man3/IO::Handle.*
%{_mandir}/man3/IO::Pipe.*
%{_mandir}/man3/IO::Poll.*
%{_mandir}/man3/IO::Seekable.*
%{_mandir}/man3/IO::Select.*
%{_mandir}/man3/IO::Socket::INET.*
%{_mandir}/man3/IO::Socket::UNIX.*
%{_mandir}/man3/IO::Socket.*

%if %{dual_life} || %{rebuild_from_scratch}
%files IO-Compress
# IO-Compress
%{_bindir}/zipdetails
%dir %{privlib}/IO
%dir %{privlib}/IO/Compress
%{privlib}/IO/Compress/FAQ.pod
%{_mandir}/man1/zipdetails.*
%{_mandir}/man3/IO::Compress::FAQ.*
# Compress-Zlib
%dir %{privlib}/Compress
%{privlib}/Compress/Zlib.pm
%{_mandir}/man3/Compress::Zlib*
#IO-Compress-Base
%dir %{privlib}/File
%{privlib}/File/GlobMapper.pm
%{privlib}/IO/Compress/Base
%{privlib}/IO/Compress/Base.pm
%dir %{privlib}/IO/Uncompress
%{privlib}/IO/Uncompress/AnyUncompress.pm
%{privlib}/IO/Uncompress/Base.pm
%{_mandir}/man3/File::GlobMapper.*
%{_mandir}/man3/IO::Compress::Base.*
%{_mandir}/man3/IO::Uncompress::AnyUncompress.*
%{_mandir}/man3/IO::Uncompress::Base.*
# IO-Compress-Zlib
%{privlib}/IO/Compress/Adapter
%{privlib}/IO/Compress/Deflate.pm
%{privlib}/IO/Compress/Bzip2.pm
%{privlib}/IO/Compress/Gzip
%{privlib}/IO/Compress/Gzip.pm
%{privlib}/IO/Compress/RawDeflate.pm
%{privlib}/IO/Compress/Zip
%{privlib}/IO/Compress/Zip.pm
%{privlib}/IO/Compress/Zlib
%{privlib}/IO/Uncompress/Adapter/
%{privlib}/IO/Uncompress/AnyInflate.pm
%{privlib}/IO/Uncompress/Bunzip2.pm
%{privlib}/IO/Uncompress/Gunzip.pm
%{privlib}/IO/Uncompress/Inflate.pm
%{privlib}/IO/Uncompress/RawInflate.pm
%{privlib}/IO/Uncompress/Unzip.pm
%{_mandir}/man3/IO::Compress::Deflate*
%{_mandir}/man3/IO::Compress::Gzip*
%{_mandir}/man3/IO::Compress::Bzip2*
%{_mandir}/man3/IO::Compress::RawDeflate*
%{_mandir}/man3/IO::Compress::Zip*
%{_mandir}/man3/IO::Uncompress::AnyInflate*
%{_mandir}/man3/IO::Uncompress::Bunzip2*
%{_mandir}/man3/IO::Uncompress::Gunzip*
%{_mandir}/man3/IO::Uncompress::Inflate*
%{_mandir}/man3/IO::Uncompress::RawInflate*
%{_mandir}/man3/IO::Uncompress::Unzip*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files IO-Socket-IP
%dir %{privlib}/IO
%dir %{privlib}/IO/Socket
%{privlib}/IO/Socket/IP.pm
%{_mandir}/man3/IO::Socket::IP.*
%endif

%files IO-Zlib
%dir %{privlib}/IO
%{privlib}/IO/Zlib.pm
%{_mandir}/man3/IO::Zlib.*

%if %{dual_life} || %{rebuild_from_scratch}
%files HTTP-Tiny
%dir %{privlib}/HTTP
%{privlib}/HTTP/Tiny.pm
%{_mandir}/man3/HTTP::Tiny*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files IPC-Cmd
%dir %{privlib}/IPC
%{privlib}/IPC/Cmd.pm
%{_mandir}/man3/IPC::Cmd.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files IPC-SysV
%{archlib}/auto/IPC
%dir %{archlib}/IPC
%{archlib}/IPC/Msg.pm
%{archlib}/IPC/Semaphore.pm
%{archlib}/IPC/SharedMem.pm
%{archlib}/IPC/SysV.pm
%{_mandir}/man3/IPC::Msg.*
%{_mandir}/man3/IPC::Semaphore.*
%{_mandir}/man3/IPC::SharedMem.*
%{_mandir}/man3/IPC::SysV.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files JSON-PP
%{_bindir}/json_pp
%dir %{privlib}/JSON
%{privlib}/JSON/PP
%{privlib}/JSON/PP.pm
%{_mandir}/man1/json_pp.1*
%{_mandir}/man3/JSON::PP.3*
%{_mandir}/man3/JSON::PP::Boolean.3pm*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files libnet
%dir %{privlib}/Net
%{privlib}/Net/Cmd.pm
%{privlib}/Net/Config.pm
%{privlib}/Net/Domain.pm
%{privlib}/Net/FTP
%{privlib}/Net/FTP.pm
%{privlib}/Net/libnetFAQ.pod
%{privlib}/Net/NNTP.pm
%{privlib}/Net/Netrc.pm
%{privlib}/Net/POP3.pm
%{privlib}/Net/SMTP.pm
%{privlib}/Net/Time.pm
%{_mandir}/man3/Net::Cmd.*
%{_mandir}/man3/Net::Config.*
%{_mandir}/man3/Net::Domain.*
%{_mandir}/man3/Net::FTP.*
%{_mandir}/man3/Net::libnetFAQ.*
%{_mandir}/man3/Net::NNTP.*
%{_mandir}/man3/Net::Netrc.*
%{_mandir}/man3/Net::POP3.*
%{_mandir}/man3/Net::SMTP.*
%{_mandir}/man3/Net::Time.*
%endif

%files libnetcfg
%{_bindir}/libnetcfg
%{_mandir}/man1/libnetcfg*

%if %{dual_life} || %{rebuild_from_scratch}
%files Locale-Maketext
%dir %{privlib}/Locale
%dir %{privlib}/Locale/Maketext
%{privlib}/Locale/Maketext.*
%{privlib}/Locale/Maketext/Cookbook.*
%{privlib}/Locale/Maketext/Guts.*
%{privlib}/Locale/Maketext/GutsLoader.*
%{privlib}/Locale/Maketext/TPJ13.*
%{_mandir}/man3/Locale::Maketext.*
%{_mandir}/man3/Locale::Maketext::Cookbook.*
%{_mandir}/man3/Locale::Maketext::Guts.*
%{_mandir}/man3/Locale::Maketext::GutsLoader.*
%{_mandir}/man3/Locale::Maketext::TPJ13.*
%endif

%files Locale-Maketext-Simple
%dir %{privlib}/Locale
%dir %{privlib}/Locale/Maketext
%{privlib}/Locale/Maketext/Simple.pm
%{_mandir}/man3/Locale::Maketext::Simple.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Math-BigInt
%dir %{privlib}/Math
%{privlib}/Math/BigFloat.pm
%{privlib}/Math/BigInt.pm
%dir %{privlib}/Math/BigInt
%{privlib}/Math/BigInt/Calc.pm
%{privlib}/Math/BigInt/Lib.pm
%{_mandir}/man3/Math::BigFloat.*
%{_mandir}/man3/Math::BigInt.*
%{_mandir}/man3/Math::BigInt::Calc.*
%{_mandir}/man3/Math::BigInt::Lib.*

%files Math-BigInt-FastCalc
%{archlib}/Math
%{archlib}/auto/Math
%{_mandir}/man3/Math::BigInt::FastCalc.*

%files Math-BigRat
%dir %{privlib}/Math
%{privlib}/Math/BigRat.pm
%{_mandir}/man3/Math::BigRat.*
%endif

%files Math-Complex
%dir %{privlib}/Math
%{privlib}/Math/Complex.pm
%{privlib}/Math/Trig.pm
%{_mandir}/man3/Math::Complex.*
%{_mandir}/man3/Math::Trig.*

%files Memoize
%{privlib}/Memoize
%{privlib}/Memoize.pm
%{_mandir}/man3/Memoize::*
%{_mandir}/man3/Memoize.*

%if %{dual_life} || %{rebuild_from_scratch}
%files MIME-Base64
%{archlib}/auto/MIME
%{archlib}/MIME
%{_mandir}/man3/MIME::*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Module-CoreList
%dir %{privlib}/Module
%{privlib}/Module/CoreList
%{privlib}/Module/CoreList.pm
%{privlib}/Module/CoreList.pod
%{_mandir}/man3/Module::CoreList*

%files Module-CoreList-tools
%{_bindir}/corelist
%{_mandir}/man1/corelist*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Module-Load
%dir %{privlib}/Module
%{privlib}/Module/Load.pm
%{_mandir}/man3/Module::Load.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Module-Load-Conditional
%dir %{privlib}/Module
%{privlib}/Module/Load
%{_mandir}/man3/Module::Load::Conditional*
%endif

%files Module-Loaded
%dir %{privlib}/Module
%{privlib}/Module/Loaded.pm
%{_mandir}/man3/Module::Loaded*

%if %{dual_life} || %{rebuild_from_scratch}
%files Module-Metadata
%dir %{privlib}/Module
%{privlib}/Module/Metadata.pm
%{_mandir}/man3/Module::Metadata.3pm*
%endif

%files Net-Ping
%dir %{privlib}/Net
%{privlib}/Net/Ping.pm
%{_mandir}/man3/Net::Ping.*

%if %{dual_life} || %{rebuild_from_scratch}
%files PathTools
%{archlib}/Cwd.pm
%dir %{archlib}/File
%{archlib}/File/Spec*
%{archlib}/auto/Cwd
%{_mandir}/man3/Cwd*
%{_mandir}/man3/File::Spec*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Params-Check
%{privlib}/Params/
%{_mandir}/man3/Params::Check*
%endif

%files open
%{privlib}/open.pm
%{_mandir}/man3/open.3*

%if %{dual_life} || %{rebuild_from_scratch}
%files parent
%{privlib}/parent.pm
%{_mandir}/man3/parent.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files perlfaq
%{privlib}/perlfaq.pm
%dir %{privlib}/pod
%{privlib}/pod/perlfaq*
%{privlib}/pod/perlglossary.pod
%{_mandir}/man1/perlfaq*
%{_mandir}/man1/perlglossary.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files PerlIO-via-QuotedPrint
%{privlib}/PerlIO
%{_mandir}/man3/PerlIO::via::QuotedPrint.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Perl-OSType
%dir %{privlib}/Perl
%{privlib}/Perl/OSType.pm
%{_mandir}/man3/Perl::OSType.3pm*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Pod-Checker
%{_bindir}/podchecker
%dir %{privlib}/Pod
%{privlib}/Pod/Checker.pm
%{_mandir}/man1/podchecker.*
%{_mandir}/man3/Pod::Checker.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Pod-Escapes
%dir %{privlib}/Pod
%{privlib}/Pod/Escapes.pm
%{_mandir}/man3/Pod::Escapes.*
%endif

%files Pod-Html
%license Pod-Html-license-clarification
%dir %{privlib}/Pod
%{_bindir}/pod2html
%{privlib}/Pod/Html.pm
%{_mandir}/man1/pod2html.1*
%{_mandir}/man3/Pod::Html.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Pod-Perldoc
%{_bindir}/perldoc
%{privlib}/pod/perldoc.pod
%dir %{privlib}/Pod
%{privlib}/Pod/Perldoc
%{privlib}/Pod/Perldoc.pm
%{_mandir}/man1/perldoc.1*
%{_mandir}/man3/Pod::Perldoc*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Pod-Usage
%{_bindir}/pod2usage
%dir %{privlib}/Pod
%{privlib}/Pod/Usage.pm
%{_mandir}/man1/pod2usage.*
%{_mandir}/man3/Pod::Usage.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files podlators
%{_bindir}/pod2man
%{_bindir}/pod2text
%{privlib}/pod/perlpodstyle.pod
%dir %{privlib}/Pod
%{privlib}/Pod/Man.pm
%{privlib}/Pod/ParseLink.pm
%{privlib}/Pod/Text
%{privlib}/Pod/Text.pm
%{_mandir}/man1/pod2man.1*
%{_mandir}/man1/pod2text.1*
%{_mandir}/man1/perlpodstyle.1*
%{_mandir}/man3/Pod::Man*
%{_mandir}/man3/Pod::ParseLink*
%{_mandir}/man3/Pod::Text*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Pod-Simple
%dir %{privlib}/Pod
%{privlib}/Pod/Simple
%{privlib}/Pod/Simple.pm
%{privlib}/Pod/Simple.pod
%{_mandir}/man3/Pod::Simple*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Scalar-List-Utils
%{archlib}/List
%{archlib}/Scalar
%{archlib}/Sub
%{archlib}/auto/List
%{_mandir}/man3/List::Util*
%{_mandir}/man3/Scalar::Util*
%{_mandir}/man3/Sub::Util*
%endif

%files SelfLoader
%{privlib}/SelfLoader.pm
%{_mandir}/man3/SelfLoader*

%if %{dual_life} || %{rebuild_from_scratch}
%files Sys-Syslog
%dir %{archlib}/Sys
%{archlib}/Sys/Syslog.pm
%dir %{archlib}/auto/Sys
%{archlib}/auto/Sys/Syslog
%{_mandir}/man3/Sys::Syslog.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Socket
%dir %{archlib}/auto/Socket
%{archlib}/auto/Socket/Socket.*
%{archlib}/Socket.pm
%{_mandir}/man3/Socket.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Storable
%{archlib}/Storable.pm
%{archlib}/auto/Storable
%{_mandir}/man3/Storable.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Term-ANSIColor
%dir %{privlib}/Term
%{privlib}/Term/ANSIColor.pm
%{_mandir}/man3/Term::ANSIColor*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Term-Cap
%dir %{privlib}/Term
%{privlib}/Term/Cap.pm
%{_mandir}/man3/Term::Cap.*
%endif

%files Test
%{privlib}/Test.pm
%{_mandir}/man3/Test.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Test-Harness
%{_bindir}/prove
%dir %{privlib}/App
%{privlib}/App/Prove*
%{privlib}/TAP*
%dir %{privlib}/Test
%{privlib}/Test/Harness*
%{_mandir}/man1/prove.1*
%{_mandir}/man3/App::Prove*
%{_mandir}/man3/TAP*
%{_mandir}/man3/Test::Harness*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Test-Simple
%{privlib}/ok*
%dir %{privlib}/Test
%{privlib}/Test/More*
%{privlib}/Test/Builder*
%{privlib}/Test/Tester*
%{privlib}/Test/Simple*
%{privlib}/Test/Tutorial*
%{privlib}/Test/use
%{privlib}/Test2*
%{_mandir}/man3/ok*
%{_mandir}/man3/Test::More*
%{_mandir}/man3/Test::Builder*
%{_mandir}/man3/Test::Tester*
%{_mandir}/man3/Test::Simple*
%{_mandir}/man3/Test::Tutorial*
%{_mandir}/man3/Test::use::*
%{_mandir}/man3/Test2*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Text-Balanced
%dir %{privlib}/Text
%{privlib}/Text/Balanced.pm
%{_mandir}/man3/Text::Balanced.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Text-ParseWords
%dir %{privlib}/Text
%{privlib}/Text/ParseWords.pm
%{_mandir}/man3/Text::ParseWords.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Text-Tabs+Wrap
%dir %{privlib}/Text
%{privlib}/Text/Tabs.pm
%{privlib}/Text/Wrap.pm
%{_mandir}/man3/Text::Tabs.*
%{_mandir}/man3/Text::Wrap.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Thread-Queue
%dir %{privlib}/Thread
%{privlib}/Thread/Queue.pm
%{_mandir}/man3/Thread::Queue.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Time-HiRes
%dir %{archlib}/Time
%{archlib}/Time/HiRes.pm
%dir %{archlib}/auto/Time
%{archlib}/auto/Time/HiRes
%{_mandir}/man3/Time::HiRes.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Time-Local
%dir %{privlib}/Time
%{privlib}/Time/Local.pm
%{_mandir}/man3/Time::Local.*
%endif

%files Time-Piece
%dir %{archlib}/Time
%{archlib}/Time/Piece.pm
%{archlib}/Time/Seconds.pm
%dir %{archlib}/auto/Time
%{archlib}/auto/Time/Piece
%{_mandir}/man3/Time::Piece.3*
%{_mandir}/man3/Time::Seconds.3*

%if %{dual_life} || %{rebuild_from_scratch}
%files threads
%dir %{archlib}/auto/threads
%{archlib}/auto/threads/threads*
%{archlib}/threads.pm
%{_mandir}/man3/threads.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files threads-shared
%dir %{archlib}/auto/threads
%{archlib}/auto/threads/shared*
%dir %{archlib}/threads
%{archlib}/threads/shared*
%{_mandir}/man3/threads::shared*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Unicode-Collate
%dir %{archlib}/auto/Unicode
%{archlib}/auto/Unicode/Collate
%dir %{archlib}/Unicode
%{archlib}/Unicode/Collate
%{archlib}/Unicode/Collate.pm
%dir %{privlib}/Unicode
%{privlib}/Unicode/Collate
%{_mandir}/man3/Unicode::Collate.*
%{_mandir}/man3/Unicode::Collate::*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Unicode-Normalize
%dir %{archlib}/auto/Unicode
%{archlib}/auto/Unicode/Normalize
%dir %{archlib}/Unicode
%{archlib}/Unicode/Normalize.pm
%{_mandir}/man3/Unicode::Normalize.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files version
%{privlib}/version.pm
%{privlib}/version.pod
%{privlib}/version/
%{_mandir}/man3/version.3*
%{_mandir}/man3/version::Internals.3*
%endif

%files disable-stack-unwinding
%{_sysconfdir}/perl-disable-stack-unwinding

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 76 |14mr|perl-generators-1.16-10
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global perl_bootstrap 1

Name:           perl-generators
Version:        1.16
Release:        10
Summary:        RPM Perl dependencies generators
Group:          Development/Perl
License:        GPL-1.0-or-later
URL:            http://jplesnik.fedorapeople.org/generators
Source0:        %{url}/generators-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  coreutils
BuildRequires:  make
%if !%{defined perl_bootstrap}
# Break build cycle: reflexive dependency
BuildRequires:  perl-generators
%endif
BuildRequires:  perl-interpreter
BuildRequires:  perl(Config)
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires:  perl(File::Copy)
BuildRequires:  perl(File::Find)
BuildRequires:  perl(strict)
BuildRequires:  perl(warnings)
BuildRequires:  sed
# Run-time:
BuildRequires:  perl(Fedora::VSP)
BuildRequires:  perl(File::Basename)
# Optional run-time:
# version not used at tests
# Tests:
BuildRequires:  perl(lib)
BuildRequires:  perl(Exporter)
BuildRequires:  perl(Test::More)
BuildRequires:  perl(Test::Simple)
Requires:       perl-interpreter >= 4:5.22.0-351
# Per Perl packaging guidelines, build-requiring perl-generators should
# deliver Perl macros
#Requires:       perl-macros
%if %{defined perl_bootstrap}
# Supply run-time dependencies manually when perl-generators is not available
Requires:       perl(Fedora::VSP)
Requires:       perl(File::Basename)
%endif
Recommends:     perl(version)

# The generators and attribute files were split from rpm-build
Conflicts:      rpm-build < 4.17.2-15

# Filter modules bundled for tests
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(PerlNS\\)

%description
This package provides RPM Perl dependencies generators which are used for
getting provides and requires from Perl binaries and modules.

%package tests
Summary:        Tests for %{name}
Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires:       perl-Test-Harness
%if %{defined perl_bootstrap}
# Supply run-time dependencies manually when perl-generators is not available
Requires:       perl(Exporter)
Requires:       perl(lib)
Requires:       perl(strict)
Requires:       perl(Test::More)
Requires:       perl(Test::Simple)
Requires:       perl(warnings)
%endif

%description tests
Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".

%prep
%setup -q -n generators-%{version}
# Help generators to recognize Perl scripts
for F in t/*.t; do
    perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
    chmod +x "$F"
done

%build
perl Makefile.PL INSTALLDIRS=vendor INSTALLVENDORSCRIPT=%{_rpmconfigdir} \
     NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}

%install
%{make_install}
%{_fixperms} %{buildroot}/*

mkdir -p %{buildroot}%{_rpmconfigdir}/fileattrs/
install -p -m 644 fileattrs/* '%{buildroot}%{_rpmconfigdir}/fileattrs'

# Install tests
mkdir -p %{buildroot}%{_libexecdir}/%{name}
cp -a t %{buildroot}%{_libexecdir}/%{name}
perl -i -pe "s{bin/perl}{%{_rpmconfigdir}/perl}" %{buildroot}%{_libexecdir}/%{name}/t/lib/PerlNS.pm
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
#!/bin/sh
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
EOF
chmod +x %{buildroot}%{_libexecdir}/%{name}/test

%check
make test

%files
%doc Changes TODO
%{_rpmconfigdir}/perl*
%{_rpmconfigdir}/fileattrs/perl*.attr

%files tests
%{_libexecdir}/%{name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 77 |14mr|perl-Locale-gettext-1.07-39
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# This package should be renamed into perl-Locale-gettext
%global tarname Locale-gettext

Name:           perl-Locale-gettext
Version:        1.07
Release:        39
Summary:        Interface to gettext family of functions

License:        GPL-1.0-or-later OR Artistic-1.0-Perl
URL:            https://metacpan.org/release/gettext
Source0:        https://cpan.metacpan.org/authors/id/P/PV/PVANDRY/%{tarname}-%{version}.tar.gz

BuildRequires:  perl-devel
BuildRequires:  perl-generators
BuildRequires:  perl-macros
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  gettext
# Run-time:
BuildRequires:  perl(Carp)
BuildRequires:  perl(Exporter)
BuildRequires:  perl(DynaLoader)
BuildRequires:  perl(POSIX)

# Optional
BuildRequires:  perl(Encode)

%description
The gettext module permits access from perl to the gettext() family of
functions for retrieving message strings from databases constructed to
internationalize software.


%prep
%setup -q -n %{tarname}-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}


%install
%{make_install}
%{_fixperms} %{buildroot}

%files
%doc README
%{perl_vendorarch}/auto/Locale
%{perl_vendorarch}/Locale
%{_mandir}/man3/*.3*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 78 |14mr|plasma6-aurorae-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname aurorae

Summary:	Plasma 6 Aurorae window decoration
Name:		plasma6-aurorae
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	kf6config-devel
BuildRequires:	kf6colorscheme-devel
BuildRequires:	kf6coreaddons-devel
BuildRequires:	kf6decoration-devel
BuildRequires:	kf6i18n-devel
BuildRequires:	kf6kcmutils-devel
BuildRequires:	kf6newstuff-devel
BuildRequires:	kf6package-devel
BuildRequires:	kf6svg-devel
BuildRequires:	kf6windowsystem-devel
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6DBus)
BuildRequires:	pkgconfig(Qt6Quick)
BuildRequires:	pkgconfig(Qt6UiPlugin)
BuildRequires:	pkgconfig(Qt6UiTools)
BuildRequires:	pkgconfig(Qt6Widgets)
BuildRequires:	qt6-qtdeclarative-devel
Conflicts:	plasma6-kwin < 6.3.6
Obsoletes:	plasma6-kwin < 6.3.6
Conflicts:	plasma6-decoration-aurorae < 6.3.6
Obsoletes:	plasma6-decoration-aurorae < 6.3.6

%description
Plasma 6 Aurorae window decoration.

%files -f %{oname}.lang
%{_kde6_qmldir}/org/kde/kwin/decoration
%{_kde6_qmldir}/org/kde/kwin/decorations
%{_kde6_datadir}/knsrcfiles/aurorae.knsrc
%{_kde6_datadir}/kwin/aurorae
%{_kde6_datadir}/kwin/decorations/kwin4_decoration_qml_plastik
%{_kde6_libexecdir}/plasma-apply-aurorae
%{_qt6_plugindir}/org.kde.kdecoration3.kcm/kcm_auroraedecoration.so
%{_qt6_plugindir}/org.kde.kdecoration3/org.kde.kwin.aurorae.so
%{_qt6_plugindir}/org.kde.kdecoration3/org.kde.kwin.aurorae.v2.so

#----------------------------------------------------------------------------

%define devkfaurorae %mklibname kf6aurorae -d

%package -n %{devkfaurorae}
Summary:	Development files for %{name}
Group:		Development/KDE and Qt
Provides:	%{name}-devel = %{EVRD}
Provides:	kf6aurorae-devel = %{EVRD}

%description -n %{devkfaurorae}
This package contains header files needed if you wish to build applications
based on %{name}.

%files -n %{devkfaurorae}
%{_kde6_libdir}/cmake/Aurorae

#----------------------------------------------------------------------------

%prep
%setup -qn %{oname}-%{version}

%build
%cmake_kde6
%make_build

%install
%make_install -C build

%find_lang %{oname}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 79 |14mr|plasma6-drkonqi-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname drkonqi

Summary:	DrKonqi crash handler for Plasma 6
Name:		plasma6-drkonqi
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	kf6completion-devel
BuildRequires:	kf6configwidgets-devel
BuildRequires:	kf6coreaddons-devel
BuildRequires:	kf6crash-devel
BuildRequires:	kf6declarative-devel
BuildRequires:	kf6i18n-devel
BuildRequires:	kf6idletime-devel
BuildRequires:	kf6itemmodels-devel
BuildRequires:	kf6jobwidgets-devel
BuildRequires:	kf6kio-devel
BuildRequires:	kf6notifications-devel
BuildRequires:	kf6service-devel
BuildRequires:	kf6statusnotifieritem-devel
BuildRequires:	kf6syntaxhighlighting-devel
BuildRequires:	kf6wallet-devel
BuildRequires:	kf6widgetsaddons-devel
BuildRequires:	kf6windowsystem-devel
BuildRequires:	pkgconfig(Qt6Concurrent)
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6DBus)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6Quick)
BuildRequires:	pkgconfig(Qt6Test)
BuildRequires:	pkgconfig(Qt6Widgets)
BuildRequires:	pkgconfig(systemd)
BuildRequires:	polkit-qt6-1-devel
BuildRequires:	qt6-qtdeclarative-devel
Requires:	python3dist(psutil)
Requires:	python3dist(pygdbmi)
Requires:	python3dist(sentry-sdk)
Requires:	elfutils

%description
DrKonqi crash handler for Plasma 6.

%files -f %{oname}.lang
%{_kde6_applicationsdir}/org.kde.drkonqi.desktop
%dir %{_kde6_datadir}/drkonqi/
%{_kde6_bindir}/drkonqi-sentry-data
%{_kde6_datadir}/drkonqi/*
%{_kde6_datadir}/qlogging-categories6/drkonqi.categories
%{_kde6_libexecdir}/drkonqi
%{_kde6_applicationsdir}/org.kde.drkonqi.coredump.gui.desktop
%{_kde6_bindir}/drkonqi-coredump-gui
%{_kde6_libexecdir}/drkonqi-coredump-cleanup
%{_kde6_libexecdir}/drkonqi-coredump-launcher
%{_kde6_libexecdir}/drkonqi-coredump-processor
%{_kde6_libexecdir}/drkonqi-sentry-postman
%{_kde6_libexecdir}/kf6/drkonqi-polkit-helper
%{_kde6_datadir}/dbus-1/system-services/org.kde.drkonqi.service
%{_kde6_datadir}/dbus-1/system.d/org.kde.drkonqi.conf
%{_kde6_datadir}/polkit-1/actions/org.kde.drkonqi.policy
%{_kde6_notificationsdir}/drkonqi-coredump-launcher.notifyrc
%{_unitdir}/drkonqi-coredump-processor@.service
%{_unitdir}/systemd-coredump@.service.wants/drkonqi-coredump-processor@.service
%{_userunitdir}/drkonqi-coredump-cleanup.service
%{_userunitdir}/drkonqi-coredump-cleanup.timer
%{_userunitdir}/drkonqi-coredump-launcher.socket
%{_userunitdir}/drkonqi-coredump-launcher@.service
%{_userunitdir}/default.target.wants/drkonqi-coredump-cleanup.service
%{_userunitdir}/drkonqi-coredump-pickup.service
%{_userunitdir}/plasma-core.target.wants/drkonqi-coredump-pickup.service
%{_userunitdir}/sockets.target.wants/drkonqi-coredump-launcher.socket
%{_userunitdir}/timers.target.wants/drkonqi-coredump-cleanup.timer
%{_userunitdir}/drkonqi-sentry-postman.path
%{_userunitdir}/drkonqi-sentry-postman.service
%{_userunitdir}/drkonqi-sentry-postman.timer
%{_userunitdir}/default.target.wants/drkonqi-sentry-postman.path
%{_userunitdir}/plasma-core.target.wants/drkonqi-sentry-postman.path
%{_userunitdir}/plasma-core.target.wants/drkonqi-sentry-postman.timer
%{_userunitdir}/timers.target.wants/drkonqi-sentry-postman.timer

#----------------------------------------------------------------------------

%prep
%setup -qn %{oname}-%{version}

%build
%cmake_kde6 \
	-DWITH_PYTHON_VENDORING:BOOL=OFF
%make_build

%install
%make_install -C build

%find_lang %{oname}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 80 |14mr|plasma6-kactivities-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname plasma-activities

Summary:	Plasma 6 user work in separate activities organization module
Name:		plasma6-kactivities
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	kf6configwidgets-devel
BuildRequires:	kf6coreaddons-devel
BuildRequires:	kf6kio-devel
BuildRequires:	kf6windowsystem-devel
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6DBus)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6Network)
BuildRequires:	pkgconfig(Qt6Qml)
BuildRequires:	pkgconfig(Qt6Quick)
BuildRequires:	pkgconfig(Qt6Sql)
BuildRequires:	pkgconfig(Qt6Test)
BuildRequires:	pkgconfig(Qt6Widgets)
BuildRequires:	qt6-qtdeclarative-devel

%description
Plasma 6 user work in separate activities organization module.

KActivities provides the infrastructure needed to manage a user's activites,
allowing them to switch between tasks, and for applications to update their
state to match the user's current activity. This includes a daemon, a library
for interacting with that daemon, and plugins for integration with other
frameworks.

%files
%{_kde6_bindir}/plasma-activities-cli6
%{_kde6_datadir}/qlogging-categories6/plasma-activities.categories
%{_kde6_datadir}/qlogging-categories6/plasma-activities.renamecategories

#----------------------------------------------------------------------------

%define qmlplasmaactivities %mklibname plasmaactivities-qml

%package -n %{qmlplasmaactivities}
Summary:	QML plugin for Plasma 6 KActivities
Group:		System/Libraries
Provides:	plasmaactivities-qml
Requires:	%{name}

%description -n %{qmlplasmaactivities}
QML plugin for Plasma 6 KActivities.

%files -n %{qmlplasmaactivities}
%dir %{_kde6_qmldir}/org/kde/activities/
%{_kde6_qmldir}/org/kde/activities/*

#----------------------------------------------------------------------------

%define plasmaactivities_major 7
%define libplasmaactivities %mklibname plasmaactivities %{plasmaactivities_major}

%package -n %{libplasmaactivities}
Summary:	Plasma 6 separate activities shared library
Group:		System/Libraries
Requires:	%{qmlplasmaactivities}
Requires:	%{name}
Conflicts:	%{_lib}plasmaactivities6 < 6.5.0
Obsoletes:	%{_lib}plasmaactivities6 < 6.5.0

%description -n %{libplasmaactivities}
Plasma 6 separate activities shared library.

%files -n %{libplasmaactivities}
%{_kde6_libdir}/libPlasmaActivities.so.%{plasmaactivities_major}*
%{_kde6_libdir}/libPlasmaActivities.so.%{version}

#----------------------------------------------------------------------------

%define devplasmaactivities %mklibname plasmaactivities -d

%package -n %{devplasmaactivities}
Summary:	Development files for Plasma 6 separate activities module
Group:		Development/KDE and Qt
Requires:	%{libplasmaactivities} = %{EVRD}
Provides:	%{name}-devel = %{EVRD}
Provides:	plasmaactivities-devel = %{EVRD}

%description -n %{devplasmaactivities}
This package contains header files needed if you wish to build applications
based on %{name}.

%files -n %{devplasmaactivities}
%{_kde6_includedir}/PlasmaActivities
%{_kde6_libdir}/cmake/PlasmaActivities
%{_kde6_libdir}/pkgconfig/PlasmaActivities.pc
%{_kde6_libdir}/libPlasmaActivities.so

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{oname}-%{version}

%build
%cmake_kde6
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 81 |14mr|plasma6-kdecoration-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname kdecoration

Summary:	Plasma 6 plugin based library to create window decorations
Name:		plasma6-kdecoration
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	kf6coreaddons-devel
BuildRequires:	kf6i18n-devel
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6Test)

%description
Plasma 6 plugin based library to create window decorations.

KDecoration3 is a library to create window decorations. These window
decorations can be used by for example an X11 based window manager which
re-parents a Client window to a window decoration frame.

#----------------------------------------------------------------------------

%package i18n
Summary:	Plasma 6 window decorations library translations
Group:		System/Internationalization
BuildArch:	noarch

%description i18n
Plasma 6 KDE System Guard library translations.

%files i18n -f %{oname}.lang

#----------------------------------------------------------------------------

%define kdecorations3_major 6
%define libkdecorations3 %mklibname kf6decorations3_ %{kdecorations3_major}

%package -n %{libkdecorations3}
Summary:	Plasma 6 window decorations shared library
Group:		System/Libraries
Requires:	%{name}-i18n

%description -n %{libkdecorations3}
Plasma 6 window decorations shared library.

%files -n %{libkdecorations3}
%{_kde6_libdir}/libkdecorations3.so.%{kdecorations3_major}*

#----------------------------------------------------------------------------

%define kdecorations3private_major 2
%define libkdecorations3private %mklibname kf6decorations3private %{kdecorations3private_major}

%package -n %{libkdecorations3private}
Summary:	Plasma 6 window decorations shared library
Group:		System/Libraries
Conflicts:	%{_lib}kf6decorations3private1 < 6.3.1-3
Obsoletes:	%{_lib}kf6decorations3private1 < 6.3.1-3

%description -n %{libkdecorations3private}
Plasma 6 window decorations shared library.

%files -n %{libkdecorations3private}
%{_kde6_libdir}/libkdecorations3private.so.%{kdecorations3private_major}
%{_kde6_libdir}/libkdecorations3private.so.%{version}

#----------------------------------------------------------------------------

%define devkf6decoration %mklibname kf6decoration -d

%package -n %{devkf6decoration}
Summary:	Development files for Plasma 6 window decorations library
Group:		Development/KDE and Qt
Requires:	%{libkdecorations3} >= %{EVRD}
Requires:	%{libkdecorations3private} >= %{EVRD}
Provides:	%{name}-devel = %{EVRD}
Provides:	kdecoration3-devel = %{version}
Provides:	kf6decoration-devel = %{version}

%description -n %{devkf6decoration}
This package contains header files needed if you wish to build applications
based on %{name}.

%files -n %{devkf6decoration}
%{_kde6_includedir}/KDecoration3
%{_kde6_includedir}/KF6/kdecoration3_version.h
%{_kde6_libdir}/cmake/KDecoration3
%{_kde6_libdir}/libkdecorations3.so
%{_kde6_libdir}/libkdecorations3private.so

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{oname}-%{version}

%build
%cmake_kde6
%make_build

%install
%make_install -C build

%find_lang %{oname}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 82 |14mr|plasma6-keyboard-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname plasma-keyboard

Summary:	Plasma 6 virtual keyboard based on QT Virtual Keyboard
Name:		plasma6-keyboard
Version:	6.7.5
Release:	1
Epoch:		1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
Source10:	plasma6-keyboard.rpmlintrc
BuildRequires:	extra-cmake-modules6
BuildRequires:	kf6config-devel
BuildRequires:	kf6coreaddons-devel
BuildRequires:	kf6crash-devel
BuildRequires:	kf6i18n-devel
BuildRequires:	kf6kcmutils-devel
BuildRequires:	kf6plasma-devel
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6VirtualKeyboard)
BuildRequires:	pkgconfig(Qt6WaylandClient)
BuildRequires:	pkgconfig(wayland-protocols)
BuildRequires:	qt6-qtdeclarative-devel
BuildRequires:	qt6-qtwayland-devel
BuildRequires:	wayland-devel

%description
Plasma 6 virtual keyboard based on QT Virtual Keyboard.

%files -f %{oname}.lang
%{_kde6_bindir}/plasma-keyboard
%{_kde6_applicationsdir}/kcm_plasmakeyboard.desktop
%{_kde6_applicationsdir}/org.kde.plasma.keyboard.desktop
%{_kde6_qmldir}/org/kde/plasma/keyboard/lib
%{_kde6_qmldir}/QtQuick/VirtualKeyboard/Styles/
%{_qt6_plugindir}/plasma/kcms/systemsettings/kcm_plasmakeyboard.so
%dir %{_kde6_datadir}/plasma/keyboard/layouts
%{_kde6_datadir}/plasma/keyboard/diacritics/*
%{_kde6_datadir}/plasma/keyboard/layouts/*
%{_appdatadir}/org.kde.plasma.keyboard.metainfo.xml

#------------------------------------------------------

%prep
%autosetup -p1 -n %{oname}-%{version}

%build
%cmake_kde6
%make

%install
%makeinstall_std -C build

%find_lang %{oname} --all-name

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 83 |14mr|plasma6-kmenuedit-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname kmenuedit

Summary:	Plasma 6 menu editor
Name:		plasma6-%{oname}
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	kf6dbusaddons-devel
BuildRequires:	kf6doctools-devel
BuildRequires:	kf6i18n-devel
BuildRequires:	kf6iconthemes-devel
BuildRequires:	kf6kio-devel
BuildRequires:	kf6sonnet-devel
BuildRequires:	kf6xmlgui-devel
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6DBus)
BuildRequires:	pkgconfig(Qt6Xml)
BuildRequires:	qt6-qtdeclarative-devel

%description
Plasma 6 menu editor.

%files -f %{oname}.lang
%{_kde6_applicationsdir}/org.kde.kmenuedit.desktop
%{_kde6_bindir}/kmenuedit
%{_kde6_datadir}/kmenuedit/icons/hicolor/*
%{_kde6_datadir}/qlogging-categories6/kmenuedit.categories
%{_kde6_iconsdir}/hicolor/*/apps/kmenuedit.*
%{_appdatadir}/org.kde.kmenuedit.appdata.xml
%{_kde6_docdir}/HTML/*/kmenuedit

#----------------------------------------------------------------------------

%prep
%setup -qn %{oname}-%{version}

%build
%cmake_kde6
%make_build

%install
%make_install -C build

%find_lang %{oname} --with-html --with-kde

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 84 |14mr|plasma6-knighttime-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname knighttime

Summary:	Helpers for scheduling the dark-light cycle
Name:		plasma6-knighttime
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	kf6config-devel
BuildRequires:	kf6coreaddons-devel
BuildRequires:	kf6dbusaddons-devel
BuildRequires:	kf6holidays-devel
BuildRequires:	kf6i18n-devel
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6DBus)
BuildRequires:	pkgconfig(Qt6Positioning)
BuildRequires:	pkgconfig(Qt6Test)
BuildRequires:	qt6-qtdeclarative-devel

%description
The KNightTime provides helpers for scheduiling
the dark-light cycle. It can be used to implement
features such as adjusting the screen color
temperature based on time of day, etc.

%files
%{_kde6_applicationsdir}/org.kde.knighttimed.desktop
%{_kde6_datadir}/qlogging-categories6/knighttime.categories
%{_kde6_libexecdir}/knighttimed
%{_datadir}/dbus-1/interfaces/org.kde.NightTime.xml
%{_datadir}/dbus-1/services/org.kde.NightTime.service
%{_userunitdir}/plasma-knighttimed.service

#----------------------------------------------------------------------------

%define kf6nighttime_major 0
%define libkf6nighttime %mklibname kf6nighttime %{kf6nighttime_major}

%package -n %{libkf6nighttime}
Summary:	The KNightTime shared library
Group:		System/Libraries
Requires:	%{name} >= %{EVRD}

%description -n %{libkf6nighttime}
The KNightTime shared library.

%files -n %{libkf6nighttime}
%{_kde6_libdir}/libKNightTime.so.%{kf6nighttime_major}
%{_kde6_libdir}/libKNightTime.so.%{version}

#----------------------------------------------------------------------------

%define devkfknighttime %mklibname kf6knighttime -d

%package -n %{devkfknighttime}
Summary:	Development files for %{name}
Group:		Development/KDE and Qt
Requires:	%{libkf6nighttime} >= %{EVRD}
Provides:	%{name}-devel = %{EVRD}
Provides:	kf6knighttime-devel = %{EVRD}

%description -n %{devkfknighttime}
This package contains header files needed if you wish to build applications
based on %{name}.

%files -n %{devkfknighttime}
%{_kde6_includedir}/KNightTime/*
%{_kde6_libdir}/cmake/KNightTime
%{_kde6_libdir}/libKNightTime.so

#----------------------------------------------------------------------------

%prep
%setup -qn %{oname}-%{version}

%build
%cmake_kde6
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 85 |14mr|plasma6-kwrited-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname kwrited

Summary:	Plasma 6 write daemon
Name:		plasma6-kwrited
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	kf6coreaddons-devel
BuildRequires:	kf6dbusaddons-devel
BuildRequires:	kf6i18n-devel
BuildRequires:	kf6notifications-devel
BuildRequires:	kf6pty-devel
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6Widgets)

%description
Plasma 6 write daemon. It's used to watch for messages from local users sent
with write(1) or wall(1).

%files
%{_kde6_notificationsdir}/kwrited.notifyrc
%{_qt6_plugindir}/kf6/kded/kwrited.so

#----------------------------------------------------------------------------

%prep
%setup -qn %{oname}-%{version}

%build
%cmake_kde6
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 86 |14mr|plasma6-layer-shell-qt-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname layer-shell-qt

Summary: 	KDE Library for integration with the Wayland display server
Name: 		plasma6-layer-shell-qt
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url: 		http://kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	wayland-tools
BuildRequires:	kf6wayland-devel
BuildRequires:	plasma-wayland-protocols-devel
BuildRequires:	pkgconfig(Qt6Concurrent)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6WaylandClient)
BuildRequires:	pkgconfig(Qt6Test)
BuildRequires:	pkgconfig(wayland-protocols)
BuildRequires:	pkgconfig(wayland-client)
BuildRequires:	pkgconfig(wayland-scanner)
BuildRequires:	pkgconfig(wayland-server)
BuildRequires:	qt6-qtdeclarative-devel

Requires: %{_lib}layershellqt6 >= %{EVRD}

%description
This component is meant for applications to be able
to easily use clients based on wlr-layer-shell

%files
%{_qt6_plugindir}/wayland-shell-integration/liblayer-shell.so
%{_kde6_qmldir}/org/kde/layershell

#----------------------------------------------------------------------------

%define major 6
%define liblayershellqt %mklibname layershellqt %{major}

%package -n %{liblayershellqt}
Summary:	KDE Library for working with the Wayland display server
Group:		System/Libraries

%description -n %{liblayershellqt}
This component is meant for applications to be able
to easily use clients based on wlr-layer-shell

%files -n %{liblayershellqt}
%{_libdir}/libLayerShellQtInterface.so.%{major}*

#----------------------------------------------------------------------------

%define devlayershellqt %mklibname kf6layershellqt -d

%package -n %{devlayershellqt}
Summary:	Development files for KDE Wayland display server integration
Group:		Development/KDE and Qt
Requires:	%{liblayershellqt} >= %{EVRD}
Provides:	%{name}-devel = %{EVRD}
Provides:	%{oname}6-devel = %{EVRD}
Provides:	layershellqt6-devel = %{EVRD}
Provides:	kf6layershellqt-devel = %{EVRD}

%description -n %{devlayershellqt}
Development files for KDE Wayland display server integration

%files -n %{devlayershellqt}
%{_includedir}/LayerShellQt
%{_libdir}/cmake/LayerShellQt
%{_libdir}/libLayerShellQtInterface.so

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{oname}-%{version}

%build
%cmake_kde6
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 87 |14mr|plasma6-libkscreen-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname libkscreen

# filter qml/plugins provides
%global __provides_exclude_from ^(%{_kde6_qmldir}/.*\\.so|%{_kde6_plugindir}/.*\\.so)$

Summary:	KDE Frameworks 6 display configuration library
Name:		plasma6-libkscreen
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	kf6config-devel
BuildRequires:	kf6wayland-devel
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6DBus)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6Test)
BuildRequires:	pkgconfig(Qt6WaylandClient)
BuildRequires:	pkgconfig(x11)
BuildRequires:	pkgconfig(xcb)
BuildRequires:	pkgconfig(xcb-randr)
BuildRequires:	pkgconfig(xext)
BuildRequires:	pkgconfig(xrandr)
BuildRequires:	pkgconfig(wayland-cursor)
BuildRequires:	pkgconfig(wayland-client)
BuildRequires:	pkgconfig(wayland-egl)
BuildRequires:	pkgconfig(wayland-scanner)
BuildRequires: 	pkgconfig(wayland-protocols)
BuildRequires:	plasma-wayland-protocols-devel
BuildRequires:	qt6-linguist-tools
Requires: %{_lib}kf6screen8 >= %{EVRD}
Requires: %{_lib}kf6screendpms8 >= %{EVRD}

%description
KDE Frameworks 6 display configuration library. It provides access to current
configuration of connected displays and ways to change the configuration.

%files -f %{name}.lang
%{_kde6_bindir}/kscreen-doctor
%{_kde6_datadir}/qlogging-categories6/libkscreen.categories
%{_kde6_datadir}/zsh/site-functions/_kscreen-doctor
%{_kde6_libexecdir}/kf6/kscreen_backend_launcher
%{_kde6_plugindir}/kscreen/*.so
%{_datadir}/dbus-1/services/org.kde.kscreen.service
%{_prefix}/lib/systemd/user/plasma-kscreen.service

#----------------------------------------------------------------------------

%define kfscreen_major 8
%define libkfscreen %mklibname kf6screen %{kfscreen_major}

%package -n %{libkfscreen}
Summary:	KDE Frameworks 6 display configuration shared library
Group:		System/Libraries
Requires:	%{name} >= %{EVRD}
Requires:	%{_lib}kf6screendpms8 >= %{EVRD}

%description -n %{libkfscreen}
KDE Frameworks 6 display configuration shared library.

%files -n %{libkfscreen}
%{_kde6_libdir}/libKF6Screen.so.%{kfscreen_major}
%{_kde6_libdir}/libKF6Screen.so.%{version}

#----------------------------------------------------------------------------

%define kfscreendpms_major 8
%define libkfscreendpms %mklibname kf6screendpms %{kfscreendpms_major}

%package -n %{libkfscreendpms}
Summary:	KDE Frameworks 6 display configuration shared library
Group:		System/Libraries
Requires:	%{name} >= %{EVRD}
Requires:	%{_lib}kf6screen8 >= %{EVRD}

%description -n %{libkfscreendpms}
KDE Frameworks 6 display configuration shared library.

%files -n %{libkfscreendpms}
%{_kde6_libdir}/libKF6ScreenDpms.so.%{kfscreen_major}
%{_kde6_libdir}/libKF6ScreenDpms.so.%{version}

#----------------------------------------------------------------------------

%define devkfscreen %mklibname kf6screen -d

%package -n %{devkfscreen}
Summary:	Development files for KDE Frameworks 6 display configuration library
Group:		Development/KDE and Qt
Requires:	%{libkfscreen} >= %{EVRD}
Requires:	%{libkfscreendpms} >= %{EVRD}
Provides:	%{name}-devel = %{EVRD}
Provides:	kf6screen-devel = %{EVRD}

%description -n %{devkfscreen}
This package contains header files needed if you wish to build applications
based on %{name}.

%files -n %{devkfscreen}
%{_kde6_includedir}/KF6/KScreen
%{_kde6_includedir}/KF6/kscreen_version.h
%{_kde6_libdir}/cmake/KF6Screen
%{_kde6_libdir}/pkgconfig/KF6Screen.pc
%{_kde6_libdir}/libKF6Screen.so
%{_kde6_libdir}/libKF6ScreenDpms.so

#----------------------------------------------------------------------------

%prep
%setup -qn %{oname}-%{version}

%build
%cmake_kde6
%make_build

%install
%make_install -C build

%find_lang %{name} --all-name --with-qt

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 88 |14mr|plasma6-libplasma-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname libplasma

Summary:	Plasma 6 plugin based UI runtime module
Name:		plasma6-libplasma
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
Source1:	libplasma6.po
# Custom configuration for plasmoid applets
# Add feature to set custom config (xml) in XDG data dirs for applets, like:
# `/usr/share/applets.kcfg/org.kde.plasma.kickoff.kcfg`
# Bug: https://bugs.kde.org/show_bug.cgi?id=506804
Patch1:		custom-applet-config.patch
# Related MR:
# https://invent.kde.org/plasma/libplasma/-/merge_requests/1574
Patch2:     fix-missing-wallpaper-plugin.patch
BuildRequires:	extra-cmake-modules6
BuildRequires:	qt6-linguist-tools
BuildRequires:	plasmaactivities-devel
BuildRequires:	kf6archive-devel
BuildRequires:	kf6config-devel
BuildRequires:	kf6configwidgets-devel
BuildRequires:	kf6coreaddons-devel
BuildRequires:	kf6dbusaddons-devel
BuildRequires:	kf6declarative-devel
BuildRequires:	kf6doctools-devel
BuildRequires:	kf6globalaccel-devel
BuildRequires:	kf6guiaddons-devel
BuildRequires:	kf6i18n-devel
BuildRequires:	kf6iconthemes-devel
BuildRequires:	kf6kcmutils-devel
BuildRequires:	kf6kio-devel
BuildRequires:	kf6kirigamiplatform-devel
BuildRequires:	kf6notifications-devel
BuildRequires:	kf6package-devel
BuildRequires:	kf6service-devel
BuildRequires:	kf6svg-devel
BuildRequires:	kf6wayland-devel
BuildRequires:	kf6windowsystem-devel
BuildRequires:	kf6xmlgui-devel
BuildRequires:	pkgconfig(egl)
BuildRequires:	pkgconfig(gl)
BuildRequires:	pkgconfig(Qt6Core)
BuildRequires:	pkgconfig(Qt6Gui)
BuildRequires:	pkgconfig(Qt6Network)
BuildRequires:	pkgconfig(Qt6Qml)
BuildRequires:	pkgconfig(Qt6Quick)
BuildRequires:	pkgconfig(Qt6QuickTest)
BuildRequires:	pkgconfig(Qt6QuickControls2)
BuildRequires:	pkgconfig(Qt6Sql)
BuildRequires:	pkgconfig(Qt6Svg)
BuildRequires:	pkgconfig(Qt6Test)
BuildRequires:	pkgconfig(Qt6Widgets)
BuildRequires:	pkgconfig(x11)
BuildRequires:	pkgconfig(xcb)
BuildRequires:	pkgconfig(xcb-composite)
BuildRequires:	pkgconfig(xcb-damage)
BuildRequires:	pkgconfig(xcb-render)
BuildRequires:	pkgconfig(xcb-shape)
BuildRequires:	pkgconfig(xcb-xfixes)
BuildRequires:	pkgconfig(wayland-client)
BuildRequires:	pkgconfig(wayland-protocols)
BuildRequires:	plasma-wayland-protocols-devel
BuildRequires:	qt6-qtdeclarative-devel
BuildRequires:	qt6-qttools-devel
Requires:	plasma6-desktoptheme-breeze >= %{EVRD}
Requires:	plasma6-desktoptheme-breeze-dark >= %{EVRD}
Requires:	plasma6-desktoptheme-breeze-light >= %{EVRD}
Recommends:	plasma6-desktoptheme-oxygen >= %{EVRD}
Requires:	plasma6-scriptengine-declarative >= %{EVRD}
Requires:	%{_lib}plasma >= %{version}
Requires:	%{_lib}plasmaquick >= %{version}
Conflicts:	%{name}-i18n < 6.3.3-2
Obsoletes:	%{name}-i18n < 6.3.3-2

%description
Plasma 6 plugin based UI runtime module.

The plasma framework provides the foundations that can be used to build
a primary user interface, from graphical to logical components.

%files -f %{name}.lang
%{_kde6_datadir}/qlogging-categories6/plasma-framework.categories
%{_kde6_datadir}/qlogging-categories6/plasma-framework.renamecategories
%{_kde6_qmldir}/org/kde/kirigami/styles
%{_kde6_plugindir}/packagestructure
%{_kde6_plugindir}/kirigami/platform/KirigamiPlasmaStyle.so

#----------------------------------------------------------------------------

%package -n plasma6-desktoptheme-breeze
Summary:	Breeze plasma desktop theme
Group:		Graphical desktop/KDE
BuildArch:	noarch

%description -n plasma6-desktoptheme-breeze
Breeze plasma desktop theme.

%files -n plasma6-desktoptheme-breeze
%dir %{_kde6_datadir}/plasma/desktoptheme/default/
%{_kde6_datadir}/plasma/desktoptheme/default/*

#----------------------------------------------------------------------------

%package -n plasma6-desktoptheme-breeze-dark
Summary:	Breeze Dark plasma desktop theme
Group:		Graphical desktop/KDE
BuildArch:	noarch

%description -n plasma6-desktoptheme-breeze-dark
Breeze Dark plasma desktop theme.

%files -n plasma6-desktoptheme-breeze-dark
%dir %{_kde6_datadir}/plasma/desktoptheme/breeze-dark/
%{_kde6_datadir}/plasma/desktoptheme/breeze-dark/*

#----------------------------------------------------------------------------

%package -n plasma6-desktoptheme-breeze-light
Summary:	Breeze Light plasma desktop theme
Group:		Graphical desktop/KDE
BuildArch:	noarch

%description -n plasma6-desktoptheme-breeze-light
Breeze Light plasma desktop theme.

%files -n plasma6-desktoptheme-breeze-light
%dir %{_kde6_datadir}/plasma/desktoptheme/breeze-light/
%{_kde6_datadir}/plasma/desktoptheme/breeze-light/*

#----------------------------------------------------------------------------

%package -n plasma6-scriptengine-declarative
Summary:	Support for QML and JavaScript plasma applets
Group:		Graphical desktop/KDE
Requires:	%{name}

%description -n plasma6-scriptengine-declarative
Support for QML and JavaScript plasma applets.

%files -n plasma6-scriptengine-declarative

#----------------------------------------------------------------------------

%define qmlplasma %mklibname plasma-qml

%package -n %{qmlplasma}
Summary:	QML plugin for Plasma 6 Plasma Framework
Group:		System/Libraries
Provides:	plasma-qml

%description -n %{qmlplasma}
QML plugin for Plasma 6 Plasma Framework.

%files -n %{qmlplasma}
%dir %{_kde6_qmldir}/org/kde/plasma/
%{_kde6_qmldir}/org/kde/plasma/*

#----------------------------------------------------------------------------

%define plasma_major 7
%define libplasma %mklibname plasma %{plasma_major}

%package -n %{libplasma}
Summary:	Plasma 6 plugin based UI runtime shared library
Group:		System/Libraries
Requires:	%{qmlplasma}
Provides:	%{_lib}plasma
Conflicts:	%{_lib}plasma6 < 6.6.1
Obsoletes:	%{_lib}plasma6 < 6.6.1

%description -n %{libplasma}
Plasma 6 plugin based UI runtime shared library.

%files -n %{libplasma}
%{_kde6_libdir}/libPlasma.so.%{plasma_major}
%{_kde6_libdir}/libPlasma.so.%{version}

#----------------------------------------------------------------------------

%define plasmaquick_major 7
%define libplasmaquick %mklibname plasmaquick %{plasmaquick_major}

%package -n %{libplasmaquick}
Summary:	Plasma 6 plugin based UI runtime shared library
Group:		System/Libraries
Requires:	%{qmlplasma}
Provides:	%{_lib}plasmaquick
Conflicts:	%{_lib}plasmaquick6 < 6.6.1
Obsoletes:	%{_lib}plasmaquick6 < 6.6.1

%description -n %{libplasmaquick}
Plasma 6 plugin based UI runtime shared library.

%files -n %{libplasmaquick}
%{_kde6_libdir}/libPlasmaQuick.so.%{plasmaquick_major}
%{_kde6_libdir}/libPlasmaQuick.so.%{version}

#----------------------------------------------------------------------------

%define devplasma %mklibname plasma -d

%package -n %{devplasma}
Summary:	Development files for Plasma 6 plugin based UI runtime module
Group:		Development/KDE and Qt
Requires:	%{libplasma} >= %{EVRD}
Requires:	%{libplasmaquick} >= %{EVRD}
Requires:	%{name} >= %{EVRD}
Provides:	%{name}-devel = %{EVRD}
Provides:	plasma6-devel = %{version}
Provides:	kf6plasma-devel = %{version}
Provides:	plasmaquick6-devel = %{version}
Provides:	kf6plasmaquick-devel = %{version}

%description -n %{devplasma}
This package contains header files needed if you wish to build applications
based on %{name}.

%files -n %{devplasma}
%{_kde6_datadir}/kdevappwizard/templates/*
%{_kde6_includedir}/Plasma/
%{_kde6_includedir}/PlasmaQuick/
%{_kde6_libdir}/cmake/Plasma
%{_kde6_libdir}/cmake/PlasmaQuick
%{_kde6_libdir}/libPlasma.so
%{_kde6_libdir}/libPlasmaQuick.so

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{oname}-%{version}

# update ru translation
cp -f %{SOURCE1} po/ru/

%build
%cmake_kde6
%make_build

%install
%make_install -C build

%find_lang %{name} --all-name --with-man

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 89 |14mr|plasma6-ocean-sounds-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname ocean-sound-theme

Summary:	Ocean Sound Theme for Plasma
Name:		plasma6-ocean-sounds
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildArch:	noarch

%description
Ocean Sound Theme for Plasma.

%files
%dir %{_kde6_datadir}/sounds/ocean/
%{_kde6_datadir}/sounds/ocean/*

%prep
%setup -n %{oname}-%{version}

%build
%cmake_kde6
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 90 |14mr|plasma6-oxygen-sounds-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname oxygen-sounds

Summary:	Sounds for the Oxygen Plasma theme
Name:		plasma6-oxygen-sounds
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildArch:	noarch

%description
Sounds for the Oxygen Plasma theme.

%files
%{_kde6_datadir}/sounds/Oxygen-*.ogg
%{_kde6_datadir}/sounds/oxygen

%prep
%setup -n %{oname}-%{version}

%build
%cmake_kde6 \
	-DBUILD_WITH_QT6:BOOL=ON
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 91 |14mr|plasma6-workspace-wallpapers-6.7.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname plasma-workspace-wallpapers

Summary:	Plasma 6 wallpapers
Name:		plasma6-workspace-wallpapers
Version:	6.7.5
Release:	1
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/plasma/%{version}/%{oname}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	pkgconfig(Qt6Core)
Recommends:	plasma6-wallpaper-coast
Recommends:	plasma6-wallpaper-kay
Recommends:	plasma6-wallpaper-mountain
Recommends:	plasma6-wallpaper-nexus
Recommends:	plasma6-wallpaper-nuvole
Recommends:	plasma6-wallpaper-orionids
Recommends:	plasma6-wallpaper-patak
Recommends:	plasma6-wallpaper-scarlettree
Recommends:	plasma6-wallpaper-sub-arctic
BuildArch:	noarch

%description
Plasma 6 wallpapers.

%files

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-altai
Summary:	Plasma 6 Altai wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-altai
Plasma 6 Altai wallpaper.

%files -n plasma6-wallpaper-altai
%dir %{_kde6_datadir}/wallpapers/Altai/
%{_kde6_datadir}/wallpapers/Altai/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-autumn
Summary:	Plasma 6 Autumn wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-autumn
Plasma 6 Autumn wallpaper.

%files -n plasma6-wallpaper-autumn
%dir %{_kde6_datadir}/wallpapers/Autumn/
%{_kde6_datadir}/wallpapers/Autumn/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-bythewater
Summary:	Plasma 6 Bythe Water wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-bythewater
Plasma 6 Bythe Water wallpaper.

%files -n plasma6-wallpaper-bythewater
%dir %{_kde6_datadir}/wallpapers/BytheWater/
%{_kde6_datadir}/wallpapers/BytheWater/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-canopee
Summary:	Plasma 6 Canopee wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-canopee
Plasma 6 Canopee wallpaper.

%files -n plasma6-wallpaper-canopee
%dir %{_kde6_datadir}/wallpapers/Canopee/
%{_kde6_datadir}/wallpapers/Canopee/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-cascade
Summary:	Plasma 6 Cascade wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-cascade
Plasma 6 Cascade wallpaper.

%files -n plasma6-wallpaper-cascade
%dir %{_kde6_datadir}/wallpapers/Cascade/
%{_kde6_datadir}/wallpapers/Cascade/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-cluster
Summary:	Plasma 6 Cluster wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-cluster
Plasma 6 Cluster wallpaper.

%files -n plasma6-wallpaper-cluster
%dir %{_kde6_datadir}/wallpapers/Cluster/
%{_kde6_datadir}/wallpapers/Cluster/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-coast
Summary:	Plasma 6 Cold Ripple wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-coast
Plasma 6 Cold Ripple wallpaper.

%files -n plasma6-wallpaper-coast
%dir %{_kde6_datadir}/wallpapers/Coast/
%{_kde6_datadir}/wallpapers/Coast/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-coldripple
Summary:	Plasma 6 Cold Ripple wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-coldripple
Plasma 6 Cold Ripple wallpaper.

%files -n plasma6-wallpaper-coldripple
%dir %{_kde6_datadir}/wallpapers/ColdRipple/
%{_kde6_datadir}/wallpapers/ColdRipple/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-elarun
Summary:	Plasma 6 Elarun wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-elarun
Plasma 6 Elarun wallpaper.

%files -n plasma6-wallpaper-elarun
%dir %{_kde6_datadir}/wallpapers/Elarun/
%{_kde6_datadir}/wallpapers/Elarun/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-eveningglow
Summary:	Plasma 6 Evening Glow wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-eveningglow
Plasma 6 Evening Glow wallpaper.

%files -n plasma6-wallpaper-eveningglow
%dir %{_kde6_datadir}/wallpapers/EveningGlow/
%{_kde6_datadir}/wallpapers/EveningGlow/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-colorfulcups
Summary:	Plasma 6 Colorful Cups wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-colorfulcups
Plasma 6 Colorful Cups wallpaper.

%files -n plasma6-wallpaper-colorfulcups
%dir %{_kde6_datadir}/wallpapers/ColorfulCups/
%{_kde6_datadir}/wallpapers/ColorfulCups/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-darkesthour
Summary:	Plasma 6 Darkest Hour wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-darkesthour
Plasma 6 Darkest Hour wallpaper.

%files -n plasma6-wallpaper-darkesthour
%dir %{_kde6_datadir}/wallpapers/DarkestHour/
%{_kde6_datadir}/wallpapers/DarkestHour/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-fallenleaf
Summary:	Plasma 6 Fallen Leaf wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-fallenleaf
Plasma 6 Fallen Leaf wallpaper.

%files -n plasma6-wallpaper-fallenleaf
%dir %{_kde6_datadir}/wallpapers/FallenLeaf/
%{_kde6_datadir}/wallpapers/FallenLeaf/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-flyingkonqui
Summary:	Plasma 6 Flying Konqui wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-flyingkonqui
Plasma 6 Flying Konqui wallpaper.

%files -n plasma6-wallpaper-flyingkonqui
%dir %{_kde6_datadir}/wallpapers/FlyingKonqui/
%{_kde6_datadir}/wallpapers/FlyingKonqui/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-grey
Summary:	Plasma 6 Grey wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-grey
Plasma 6 Grey wallpaper.

%files -n plasma6-wallpaper-grey
%dir %{_kde6_datadir}/wallpapers/Grey/
%{_kde6_datadir}/wallpapers/Grey/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-honeywave
Summary:	Plasma 6 Honeywave wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-honeywave
Plasma 6 Honeywave wallpaper.

%files -n plasma6-wallpaper-honeywave
%dir %{_kde6_datadir}/wallpapers/Honeywave/
%{_kde6_datadir}/wallpapers/Honeywave/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-icecold
Summary:	Plasma 6 IceCold wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-icecold
Plasma 6 IceCold wallpaper.

%files -n plasma6-wallpaper-icecold
%dir %{_kde6_datadir}/wallpapers/IceCold/
%{_kde6_datadir}/wallpapers/IceCold/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-kay
Summary:	Plasma 6 Kay wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-kay
Plasma 6 Kay wallpaper.

%files -n plasma6-wallpaper-kay
%dir %{_kde6_datadir}/wallpapers/Kay/
%{_kde6_datadir}/wallpapers/Kay/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-kite
Summary:	Plasma 6 Kite wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-kite
Plasma 6 Kite wallpaper.

%files -n plasma6-wallpaper-kite
%dir %{_kde6_datadir}/wallpapers/Kite/
%{_kde6_datadir}/wallpapers/Kite/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-kokkini
Summary:	Plasma 6 Kokkini wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-kokkini
Plasma 6 Kokkini wallpaper.

%files -n plasma6-wallpaper-kokkini
%dir %{_kde6_datadir}/wallpapers/Kokkini/
%{_kde6_datadir}/wallpapers/Kokkini/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-milkyway
Summary:	Plasma 6 MilkyWay wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-milkyway
Plasma 6 MilkyWay wallpaper.

%files -n plasma6-wallpaper-milkyway
%dir %{_kde6_datadir}/wallpapers/MilkyWay/
%{_kde6_datadir}/wallpapers/MilkyWay/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-mountain
Summary:	Plasma 6 Mountain wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-mountain
Plasma 6 Mountain wallpaper.

%files -n plasma6-wallpaper-mountain
%dir %{_kde6_datadir}/wallpapers/Mountain/
%{_kde6_datadir}/wallpapers/Mountain/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-nexus
Summary:	Plasma 6 Nexus wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-nexus
Plasma 6 Nexus wallpaper.

%files -n plasma6-wallpaper-nexus
%dir %{_kde6_datadir}/wallpapers/Nexus/
%{_kde6_datadir}/wallpapers/Nexus/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-nuvole
Summary:	Plasma 6 Nuvole wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-nuvole
Plasma 6 Nuvole wallpaper.

%files -n plasma6-wallpaper-nuvole
%dir %{_kde6_datadir}/wallpapers/Nuvole/
%{_kde6_datadir}/wallpapers/Nuvole/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-onestandsout
Summary:	Plasma 6 One Stands Out wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-onestandsout
Plasma 6 One Stands Out wallpaper.

%files -n plasma6-wallpaper-onestandsout
%dir %{_kde6_datadir}/wallpapers/OneStandsOut/
%{_kde6_datadir}/wallpapers/OneStandsOut/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-opal
Summary:	Plasma 6 Opal wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-opal
Plasma 6 Opal wallpaper.

%files -n plasma6-wallpaper-opal
%dir %{_kde6_datadir}/wallpapers/Opal/
%{_kde6_datadir}/wallpapers/Opal/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-orionids
Summary:	Plasma 6 Orionids wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-orionids
Plasma 6 Orionids wallpaper.

%files -n plasma6-wallpaper-orionids
%dir %{_kde6_datadir}/wallpapers/Orionids/
%{_kde6_datadir}/wallpapers/Orionids/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-pastelhills
Summary:	Plasma 6 Pastel Hills wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-pastelhills
Plasma 6 Pastel Hills wallpaper.

%files -n plasma6-wallpaper-pastelhills
%dir %{_kde6_datadir}/wallpapers/PastelHills/
%{_kde6_datadir}/wallpapers/PastelHills/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-path
Summary:	Plasma 6 Path wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-path
Plasma 6 Path wallpaper.

%files -n plasma6-wallpaper-path
%dir %{_kde6_datadir}/wallpapers/Path/
%{_kde6_datadir}/wallpapers/Path/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-patak
Summary:	Plasma 6 Patak wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-patak
Plasma 6 Patak wallpaper.

%files -n plasma6-wallpaper-patak
%dir %{_kde6_datadir}/wallpapers/Patak/
%{_kde6_datadir}/wallpapers/Patak/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-summer_1am
Summary:	Plasma 6 Summer 1AM wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-summer_1am
Plasma 6 Summer 1AM wallpaper.

%files -n plasma6-wallpaper-summer_1am
%dir %{_kde6_datadir}/wallpapers/summer_1am/
%{_kde6_datadir}/wallpapers/summer_1am/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-volna
Summary:	Plasma 6 Volna wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-volna
Plasma 6 Volna wallpaper.

%files -n plasma6-wallpaper-volna
%dir %{_kde6_datadir}/wallpapers/Volna/
%{_kde6_datadir}/wallpapers/Volna/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-flow
Summary:	Plasma 6 Flow wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-flow
Plasma 6 Flow wallpaper.

%files -n plasma6-wallpaper-flow
%dir %{_kde6_datadir}/wallpapers/Flow/
%{_kde6_datadir}/wallpapers/Flow/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-shell
Summary:	Plasma 6 Shell wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-shell
Plasma 6 Shell wallpaper.

%files -n plasma6-wallpaper-shell
%dir %{_kde6_datadir}/wallpapers/Shell/
%{_kde6_datadir}/wallpapers/Shell/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-safelanding
Summary:	Plasma 6 SafeLanding wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-safelanding
Plasma 6 Shell wallpaper.

%files -n plasma6-wallpaper-safelanding
%dir %{_kde6_datadir}/wallpapers/SafeLanding/
%{_kde6_datadir}/wallpapers/SafeLanding/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-scarlettree
Summary:	Plasma 6 ScarletTree wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-scarlettree
Plasma 6 Shell wallpaper.

%files -n plasma6-wallpaper-scarlettree
%dir %{_kde6_datadir}/wallpapers/ScarletTree/
%{_kde6_datadir}/wallpapers/ScarletTree/*

#----------------------------------------------------------------------------

%package -n plasma6-wallpaper-sub-arctic
Summary:	Plasma 6 Sub-Arctic wallpaper
Group:		Graphical desktop/KDE

%description -n plasma6-wallpaper-sub-arctic
Plasma 6 Shell wallpaper.

%files -n plasma6-wallpaper-sub-arctic
%dir %{_kde6_datadir}/wallpapers/Sub-Arctic/
%{_kde6_datadir}/wallpapers/Sub-Arctic/*

#----------------------------------------------------------------------------

%prep
%autosetup -n %{oname}-%{version}

%build
%cmake_kde6 \
	-DBUILD_WITH_QT6:BOOL=ON
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 92 |14mr|plasma-wayland-protocols-1.23.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define _enable_debug_packages %{nil}
%define  debug_package %{nil}

Summary:	Plasma Wayland Protocols that adds functionality
Name:		plasma-wayland-protocols
Version:	1.23.0
Release:	1
License:	GPLv2+
Group:		System/Libraries
Url:		https://www.kde.org/
Source0:	https://download.kde.org/stable/%{name}/%{version}/%{name}-%{version}.tar.xz
BuildRequires:	extra-cmake-modules6
BuildRequires:	pkgconfig(wayland-cursor)
BuildRequires:	pkgconfig(wayland-client)
BuildRequires:	pkgconfig(wayland-egl)
BuildRequires:	pkgconfig(wayland-scanner)
BuildRequires: 	pkgconfig(wayland-protocols)

%description
This project should be installing only the xml files of the
non-standard wayland protocols we use in Plasma.

%files
%dir %{_datadir}/plasma-wayland-protocols
%{_datadir}/plasma-wayland-protocols/*.xml

#----------------------------------------------------------------------------

%package devel
Summary:	Plasma Wayland Protocols that adds functionality
Group:		Development/KDE and Qt
Requires:	%{name}

%description devel
This project should be installing only the xml files of the
non-standard wayland protocols we use in Plasma.

%files devel
%{_datadir}/cmake/PlasmaWaylandProtocols/PlasmaWaylandProtocolsConfig.cmake
%{_datadir}/cmake/PlasmaWaylandProtocols/PlasmaWaylandProtocolsConfigVersion.cmake

#----------------------------------------------------------------------------

%prep
%autosetup -p1

%build
%cmake
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 93 |14mr|pyproject-rpm-macros-1.23.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           pyproject-rpm-macros
Summary:        RPM macros for PEP 517 Python packages
# SPDX
License:        MIT
Group:		System/Base

%bcond tests 0
# pytest-xdist and tox are not desired in RHEL
%bcond pytest_xdist 0
%bcond tox_tests 0

# The idea is to follow the spirit of semver
# Given version X.Y.Z:
#   Increment X and reset Y.Z when there is a *major* incompatibility
#   Increment Y and reset Z when new macros or features are added
#   Increment Z when this is a bugfix or a cosmetic change
# Dropping support for EOL Fedoras is *not* considered a breaking change
Version:        1.23.2
Release:        1

# Macro files
Source:         macros.pyproject
Source:         macros.aaa-pyproject-srpm

# Implementation files, Python
Source:         pyproject_buildrequires.py
Source:         pyproject_convert.py
Source:         pyproject_dependency_overrides.py
Source:         pyproject_patch_metadata.py
Source:         pyproject_preprocess_record.py
Source:         pyproject_requirements_txt.py
Source:         pyproject_save_files.py
Source:         pyproject_wheel.py

# Implementation files, Lua
Source:         pyproject_getopt.lua

# Tests
Source:         compare_mandata.py
Source:         test_dependency_overrides.py
Source:         test_pyproject_buildrequires.py
Source:         test_pyproject_getopt.lua
Source:         test_pyproject_getopt_consistency.py
Source:         test_pyproject_getopt_parser.py
Source:         test_pyproject_requirements_txt.py
Source:         test_pyproject_save_files.py

# Test data
Source:         pyproject_buildrequires_testcases.yaml
Source:         pyproject_save_files_test_data.yaml
Source:         test_RECORD

# Metadata
Source:         README.md
Source:         LICENSE

URL:            https://src.fedoraproject.org/rpms/pyproject-rpm-macros

BuildArch:      noarch

%if %{with tests}
BuildRequires:  python3dist(pytest)
%if %{with pytest_xdist}
BuildRequires:  python3dist(pytest-xdist)
%endif
BuildRequires:  python3dist(pyyaml)
BuildRequires:  python3dist(packaging)
BuildRequires:  python3dist(pip)
BuildRequires:  python3dist(setuptools)
%if %{with tox_tests}
BuildRequires:  python3dist(tox-current-env) >= 0.0.16
%endif
BuildRequires:  (python3dist(wheel) if python3dist(setuptools) < 71)
BuildRequires:  (python3dist(tomli) if python3 < 3.11)
%endif

# We build on top of those:
BuildRequires:  python-rpm-macros
BuildRequires:  python-srpm-macros
BuildRequires:  python3-rpm-macros
Requires:       python-rpm-macros
Requires:       python-srpm-macros
Requires:       python3-rpm-macros
Requires:       pyproject-srpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}

# We use the following tools outside of coreutils
Requires:       /usr/bin/find
Requires:       /usr/bin/sed

# This package requires the %%generate_buildrequires functionality.
# It has been introduced in RPM 4.15 (4.14.90 is the alpha of 4.15).
# What we need is rpmlib(DynamicBuildRequires), but that is impossible to (Build)Require.
# Also, we need to avoid 4.19.90..4.19.91-7 due to rhbz#2284187
Requires:       ((rpm-build >= 4.14.90 with (rpm-build < 4.19.90 or rpm-build >= 4.19.91-8)) if rpm-build)
BuildRequires:  rpm-build >= 4.14.90

%description
These macros allow projects that follow the Python packaging specifications
to be packaged as RPMs.

They work for:

* traditional Setuptools-based projects that use the setup.py file,
* newer Setuptools-based projects that have a setup.cfg file,
* general Python projects that use the PEP 517 pyproject.toml file
  (which allows using any build system, such as setuptools, flit or poetry).

These macros replace %%py3_build and %%py3_install,
which only work with setup.py.


%package -n pyproject-srpm-macros
Summary:        Minimal implementation of %%pyproject_buildrequires
Requires:       (pyproject-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} if pyproject-rpm-macros)
Requires:       (rpm-build >= 4.14.90 if rpm-build)

%description -n pyproject-srpm-macros
This package contains a minimal implementation of %%pyproject_buildrequires.
When used in %%generate_buildrequires, it will generate BuildRequires
for pyproject-rpm-macros. When both packages are installed, the full version
takes precedence.


%prep
# Allows working on file names, as sources have no meaningful numbers
%setup -c -T
cp -p %{sources} .

%generate_buildrequires
# nothing to do, this is here just to assert we have that functionality

%build
# nothing to do, sources are not buildable

%install
mkdir -p %{buildroot}%{_rpmmacrodir}
mkdir -p %{buildroot}%{_rpmconfigdir}/redhat
mkdir -p %{buildroot}%{_rpmluadir}/fedora/rpm
install -pm 644 macros.pyproject %{buildroot}%{_rpmmacrodir}/
install -pm 644 macros.aaa-pyproject-srpm %{buildroot}%{_rpmmacrodir}/
install -pm 644 pyproject_getopt.lua %{buildroot}%{_rpmluadir}/fedora/rpm/
install -pm 644 pyproject_buildrequires.py %{buildroot}%{_rpmconfigdir}/redhat/
install -pm 644 pyproject_convert.py %{buildroot}%{_rpmconfigdir}/redhat/
install -pm 644 pyproject_save_files.py  %{buildroot}%{_rpmconfigdir}/redhat/
install -pm 644 pyproject_preprocess_record.py %{buildroot}%{_rpmconfigdir}/redhat/
install -pm 644 pyproject_requirements_txt.py %{buildroot}%{_rpmconfigdir}/redhat/
install -pm 644 pyproject_wheel.py %{buildroot}%{_rpmconfigdir}/redhat/
install -pm 644 pyproject_patch_metadata.py %{buildroot}%{_rpmconfigdir}/redhat/
install -pm 644 pyproject_dependency_overrides.py %{buildroot}%{_rpmconfigdir}/redhat/


%if %{with tests}
%check
export HOSTNAME="rpmbuild"  # to speedup tox in network-less mock, see rhbz#1856356
%pytest -vv --doctest-modules %{?with_pytest_xdist:-n auto} %{!?with_tox_tests:-k "not tox"}

# brp-compress is provided as an argument to get the right directory macro expansion
%{python3} compare_mandata.py -f %{_rpmconfigdir}/brp-compress
%endif


%files
%{_rpmmacrodir}/macros.pyproject
%{_rpmconfigdir}/redhat/pyproject_buildrequires.py
%{_rpmconfigdir}/redhat/pyproject_convert.py
%{_rpmconfigdir}/redhat/pyproject_save_files.py
%{_rpmconfigdir}/redhat/pyproject_preprocess_record.py
%{_rpmconfigdir}/redhat/pyproject_requirements_txt.py
%{_rpmconfigdir}/redhat/pyproject_wheel.py
%{_rpmconfigdir}/redhat/pyproject_patch_metadata.py
%{_rpmconfigdir}/redhat/pyproject_dependency_overrides.py
%{_rpmluadir}/fedora/rpm/pyproject_getopt.lua

%doc README.md
%license LICENSE

%files -n pyproject-srpm-macros
%{_rpmmacrodir}/macros.aaa-pyproject-srpm
%license LICENSE

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 94 |14mr|python-aeidon-1.13-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define url_ver %(echo %{version}|cut -d. -f1,2)
%define srcname	aeidon

Summary:	Python package for reading, writing and manipulating text-based subtitle files
Name:		python-%{srcname}
Version:	1.13
Release:	1
License:	GPLv3+
Group:		Development/Python
Url:		http://download.gna.org/gaupol/doc/api/aeidon.html
Source0:	%{pypi_source}
Patch1:		aeidon-setup.patch
BuildArch:	noarch
BuildRequires:	intltool
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
Recommends:	iso-codes
Recommends:	python3-chardet
Recommends:	python3-enchant >= 1.4.0

%description
aeidon is a Python package that provides classes and functions for dealing
with text-based subtitle files of many different formats. Functions exist
for reading and writing subtitle files as well as manipulating subtitle data,
i.e. positions (times or frames) and texts.

#----------------------------------------------------------------------------
%package -n python3-%{srcname}
Summary:	Python package for reading, writing and manipulating text-based subtitle files
Group:		Development/Python

%description -n python3-%{srcname}
aeidon is a Python package that provides classes and functions for dealing
with text-based subtitle files of many different formats. Functions exist
for reading and writing subtitle files as well as manipulating subtitle data,
i.e. positions (times or frames) and texts.

%files -n python3-%{srcname}
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{srcname}-%{version}
sed -i 's/get_aeidon_version()/"%{version}"/' setup-aeidon.py

%build
%{__python3} setup-aeidon.py build '--executable=%{__python3} -s'

%install
%{__python3} setup-aeidon.py install -O1 --skip-build --root %{buildroot}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 95 |14mr|python-aiohappyeyeballs-2.7.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name aiohappyeyeballs

Name:           python-aiohappyeyeballs
Version:        2.7.1
Release:        1
Summary:        Happy Eyeballs for asyncio
Group:          Development/Python
License:        PSF-2.0
URL:            https://github.com/aio-libs/aiohappyeyeballs
# The GitHub archive contains CHANGELOG.md and other ancillary files that the
# PyPI sdist lacks.
Source:         %{url}/archive/v%{version}/aiohappyeyeballs-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-devel

BuildRequires:  python3-pytest
BuildRequires:  python3-pytest-asyncio

%global common_description %{expand:
This library exists to allow connecting with Happy Eyeballs (RFC 8305) when you
already have a list of addrinfo and not a DNS name.

The stdlib version of loop.create_connection() will only work when you pass in
an unresolved name which is not a good fit when using DNS caching or resolving
names via another method such as zeroconf.}

%description %{common_description}


%package -n     python3-aiohappyeyeballs
Summary:        %{summary}
Group:          Development/Python

%description -n python3-aiohappyeyeballs %{common_description}


%prep
%autosetup -n aiohappyeyeballs-%{version} -p1


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files %{pypi_name}


%files -n python3-aiohappyeyeballs -f %{pyproject_files}
%license LICENSE
%doc CHANGELOG.md
%doc README.md

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 96 |14mr|python-aiohttp-3.14.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond tests 0
# Build dependencies gunicorn and uvloop are required only for integration
# tests, which can be omitted if they are not available.
%bcond gunicorn 1
# The python-uvloop package was retired for Fedora 43.
%bcond uvloop 0

Name:           python-aiohttp
Version:        3.14.3
Release:        1
Summary:        Python HTTP client/server for asyncio

License:        Apache-2.0
URL:            https://github.com/aio-libs/aiohttp
# We use requirements/*.txt to generate test dependencies; these files are not
# present in the PyPI sdist, so we must use the GitHub archive.
Source:         %{url}/archive/v%{version}/aiohttp-%{version}.tar.gz

# Fix Cython 3.3.0 compiler crash when compiling the WebSocket reader
# https://github.com/aio-libs/aiohttp/commit/fdebfa2b81c7f85c6dccddcbf4ab45d311970b03
# Cherry-picked on v3.14.3.
#Patch:          0001-Fix-Cython-3.3.0-compiler-crash-when-compiling-the-W.patch

BuildRequires:  make
BuildRequires:  gcc
# Explicit BR needed for %%{py3_shebang_fix} in %%prep, before generated BR’s
BuildRequires:  python3-devel

# CVE-2024-27982 requires >= 9.2.1. The actual lower bound is based on the
# version that upstream bundles/vendors.
BuildRequires:  llhttp-devel >= 9.4.2

%global common_description %{expand:
Python HTTP client/server for asyncio which supports both the client and the
server side of the HTTP protocol, client and server websocket, and webservers
with middlewares and pluggable routing.}

%description %{common_description}


%package -n python3-aiohttp
Summary:        %{summary}

Recommends:     python3-aiohttp+speedups

%description -n python3-aiohttp %{common_description}

%pyproject_extras_subpkg --name python3-aiohttp speedups


%prep
%autosetup -p1 -n aiohttp-%{version}
# Remove bundled llhttp
rm --recursive --verbose vendor/llhttp

%if %{without gunicorn}
%pyproject_patch_dependency gunicorn:ignore
%endif

%if %{without uvloop}
%pyproject_patch_dependency uvloop:ignore
%endif

# Omit optional test dependencies that are not yet packaged or are useless
# here; for blockbuster, see https://github.com/cbornet/blockbuster/issues/46
# for why we would prefer not to package it.
%pyproject_patch_dependency blockbuster:ignore
%pyproject_patch_dependency proxy.py:ignore
%pyproject_patch_dependency python-on-whales:ignore
%pyproject_patch_dependency setuptools-git:ignore
%pyproject_patch_dependency wait-for-it:ignore
%if 0%{?__isa_bits} == 32
# The isal dependency is not available on 32-bit architectures; see Patch1000,
# which keeps the tests from trying to use it on these architectures.
%pyproject_patch_dependency isal:ignore
%endif
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
%pyproject_patch_dependency coverage:ignore
%pyproject_patch_dependency pytest-cov:ignore
%pyproject_patch_dependency pytest_codspeed:ignore
%pyproject_patch_dependency mypy:ignore
# Since we patched out coverage, we must also remove warning filters for it.
sed --regexp-extended --in-place \
    's/^([[:blank:]]*)(ignore:.*:coverage\.)/\1# \2/' setup.cfg

# Make sure the source archive does not include any files generated by Cython
grep --recursive --files-with-matches '/\* Generated by Cython' |
    xargs --no-run-if-empty rm --verbose

# don't treat DeprecationWarnings as errors in subprocess based tests
sed --in-place \
    's/"-W", "error"/"-W", "error", "-W", "ignore::DeprecationWarning"/' \
    tests/test_circular_imports.py

%py3_shebang_fix tools/gen.py

%generate_buildrequires
export AIOHTTP_USE_SYSTEM_DEPS=1
%pyproject_buildrequires requirements/cython.in %{?with_tests:requirements/test.in}

%build
export AIOHTTP_USE_SYSTEM_DEPS=1
%make_build cythonize-nodeps
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files aiohttp

%check
%if %{without tests}
# - aiohttp.worker requires gunicorn (a test dependency)
# - aiohttp.pytest_plugin requires pytest (a test dependency)
%pyproject_check_import --exclude aiohttp.worker --exclude aiohttp.pytest_plugin
%elif %{without gunicorn}
%pyproject_check_import --exclude aiohttp.worker
%endif

%files -n python3-aiohttp -f %{pyproject_files}
%doc CHANGES.rst
%doc README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 97 |14mr|python-aiosignal-1.4.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name aiosignal

Summary:	List of registered asynchronous callbacks
Name:		python-%{pypi_name}
Version:	1.4.0
Release:	1
License:	ASL 2.0
Group:		Development/Python
Url:		https://github.com/aio-libs/aiohttp
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildArch:      noarch

%description
A project to manage callbacks in asyncio projects.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	List of registered asynchronous callbacks
Group:		Development/Python
# python3 files were packaged to main package by mistake
Obsoletes:	python-%{pypi_name} < 1.3.1

%description -n python3-%{pypi_name}
A project to manage callbacks in asyncio projects.

%files -n python3-%{pypi_name}
%doc CHANGES.rst CONTRIBUTORS.txt README.rst LICENSE
%{python3_sitelib}/*

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 98 |14mr|python-annotated-types-0.7.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name annotated_types

Summary:	Reusable constraint types to use with typing.Annotated
Name:		python-annotated-types
Version:	0.7.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://pypi.org/project/pydantic
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
This package provides metadata objects which can be used to represent common
constraints such as upper and lower bounds on scalar values and collection sizes,
a Predicate marker for runtime checks, and descriptions of how we intend these
metadata to be interpreted. In some cases, we also note alternative representations
which do not require this package.

#----------------------------------------------------------------------------

%package -n python3-annotated-types
Summary:	Reusable constraint types to use with typing.Annotated
Group:		Development/Python

%description -n python3-annotated-types
This package provides metadata objects which can be used to represent common
constraints such as upper and lower bounds on scalar values and collection sizes,
a Predicate marker for runtime checks, and descriptions of how we intend these
metadata to be interpreted. In some cases, we also note alternative representations
which do not require this package.

%files -n python3-annotated-types -f %{pyproject_files}
%doc README*
%license LICENSE

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 99 |14mr|python-apipkg-3.0.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname apipkg
%global sum A Python namespace control and lazy-import mechanism

Name:		python-%{srcname}
Version:	3.0.2
Release:	1
Summary:	%{sum}
Group:		Development/Python
License:	MIT
URL:		https://pypi.org/project/apipkg/
Source0:	%{pypi_source}
BuildArch:	noarch
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros

%description
With apipkg you can control the exported namespace of a python package and
greatly reduce the number of imports for your users. It is a small python
module that works on virtually all Python versions, including CPython2.3 to
Python3.1, Jython and PyPy. It co-operates well with Python's help() system,
custom importers (PEP302) and common command line completion tools.

#--------------------------------------------------------------------------
%package -n python3-%{srcname}
Summary:	%{sum}
Group:		Development/Python

%description -n python3-%{srcname}
With apipkg you can control the exported namespace of a python package and
greatly reduce the number of imports for your users. It is a small python
module that works on virtually all Python versions, including CPython2.3 to
Python3.1, Jython and PyPy. It co-operates well with Python's help() system,
custom importers (PEP302) and common command line completion tools.

%files -n python3-%{srcname} -f %{pyproject_files}
%doc README.rst

#--------------------------------------------------------------------------

%prep
%autosetup -n %{srcname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_wheel

%install
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_install
%pyproject_save_files %{srcname}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 100 |14mr|python-appdirs-1.4.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:          python-appdirs
Version:       1.4.4
Release:       1
Summary:       Python module for determining platform-specific directories

# https://spdx.org/licenses/MIT.html
License:       MIT
URL:           https://github.com/ActiveState/appdirs
Source:        %{pypi_source appdirs}

BuildArch:     noarch

BuildRequires: python3-devel

%description
A small Python module for determining appropriate " + " platform-specific
directories, e.g. a "user data dir".


%package -n python3-appdirs
Summary:        %{summary}

%description -n python3-appdirs
A small Python 3 module for determining appropriate " + " platform-specific
directories, e.g. a "user data dir".


%prep
%autosetup -n appdirs-%{version}
sed -i -e '1{\@^#!/usr/bin/env python@d}' appdirs.py


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files appdirs


%check
# upstream's tox.ini just wraps this command with no extra deps
# see https://github.com/ActiveState/appdirs/pull/134
# we don't use %%tox here to avoid a dependency loop: tox->platformdirs->appdirs
%{py3_test_envvars} %{python3} -m unittest discover


%files -n python3-appdirs -f %{pyproject_files}
%doc README.rst CHANGES.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 101 |14mr|python-asn1crypto-1.5.1-19
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Created by pyp2rpm-3.2.2
%global pypi_name asn1crypto

%{!?python3_pkgversion:%global python3_pkgversion 3}

Name:           python-%{pypi_name}
Version:        1.5.1
Release:        19
Summary:        Fast Python ASN.1 parser and serializer

License:        MIT
URL:            https://github.com/wbond/asn1crypto
Source0:        https://files.pythonhosted.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-devel

%generate_buildrequires
%pyproject_buildrequires

%description
Fast ASN.1 parser and serializer with definitions for private keys,
public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
PKCS#12, PKCS#5, X.509 and TSP.

%package -n     python%{python3_pkgversion}-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}

%description -n python%{python3_pkgversion}-%{pypi_name}
Fast ASN.1 parser and serializer with definitions for private keys,
public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
PKCS#12, PKCS#5, X.509 and TSP.

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install


%files -n python%{python3_pkgversion}-%{pypi_name}
%doc
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 102 |14mr|python-attrdict-2.0.1-10
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Created by pyp2rpm-3.3.7
%global pypi_name attrdict

Name:           python-%{pypi_name}
Version:        2.0.1
Release:        10
Summary:        A dict with attribute-style access
Group:          Development/Python
License:        MIT License
URL:            https://github.com/bcj/AttrDict
Source0:        %{pypi_source}
Patch1:		attrdict-collections.abc.patch
BuildArch:      noarch

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3-devel

%description
AttrDict is a library that provides mapping objects that allow their elements
to be accessed both as keys and as attributes.

%package -n     python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}

Requires:       python3dist(six)

%description -n python3-%{pypi_name}
AttrDict is a library that provides mapping objects that allow their elements
to be accessed both as keys and as attributes.

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE.txt
%doc README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 103 |14mr|python-authres-1.2.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name authres
%define mod_name %{pypi_name}
%define oname authres

Summary:        authres - Authentication Results Header Module
Name:           python-%{oname}
Version:        1.2.0
Release:        1
License:        Apache-2.0
Group:          Development/Python
Url:            https://launchpad.net/authentication-results-python
Source0:        %{pypi_source}

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3dist(wheel)
BuildRequires:  python3dist(pip)
BuildArch:      noarch

%description
%{summary}.

#------------------------------------------------------------------

%package -n python3-%{oname}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{oname}
%{summary}.

%files -n python3-%{oname} -f %{pyproject_files}

#------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{mod_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 104 |14mr|python-autocommand-2.2.2-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name autocommand

Summary:	Automatically generate and run simple argparse parsers from function signatures
Name:		python-%{pypi_name}
Version:	2.2.2
Release:	2
License:	LGPLv3
Group:		Development/Python
Url:		https://github.com/Lucretiel/autocommand
Source0:	%{pypi_source}
Patch0:		autocommand-2.2.2-license.patch
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
A library to automatically generate and run simple argparse parsers
from function signatures.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Automatically generate and run simple argparse parsers from function signatures
Group:		Development/Python

%description -n python3-%{pypi_name}
A library to automatically generate and run simple argparse parsers
from function signatures.

%files -n python3-%{pypi_name}
%doc README*
%{python3_sitelib}/*

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 105 |14mr|python-automat-22.10.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module automat
%define pypi_name Automat

Summary:	Python library for finite-state machines
Name:		python-%{module}
Version:	22.10.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/glyph/Automat
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(setuptools)
BuildRequires:	python3egg(setuptools-scm)
BuildRequires:	python3egg(docutils)
BuildRequires:	python3-pip
BuildRequires:	python3-wheel
BuildArch:	noarch

%description
Python library for finite-state machines.

#------------------------------------------------------

%package -n python3-%{module}
Summary:	Python library for finite-state machines
Group:		Development/Python

%description -n python3-%{module}
Python library for finite-state machines.

%files -n python3-%{module}
%doc README.md LICENSE docs/*
%{_bindir}/python-automat-visualize
%{python3_sitelib}/%{module}/
%{python3_sitelib}/Automat-%{version}-py%{python3_version}.egg-info/

#------------------------------------------------------

%prep
%setup -qn Automat-%{version}

# Remove bundled egg-info
rm -rf Automat.egg-info

%build
%py3_build

%install
%py3_install
mv %{buildroot}%{_bindir}/automat-visualize %{buildroot}%{_bindir}/python-automat-visualize

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 106 |14mr|python-backcall-0.2.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name backcall

Summary:	Specifications for callback functions passed in to an API
Name:		python-%{pypi_name}
Version:	0.2.0
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://github.com/takluyver/backcall
Source0:	http://pypi.python.org/packages/source/b/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:	noarch

%description
If your code lets other people supply callback functions, it’s important to
specify the function signature you expect, and check that functions support
that. Adding extra parameters later would break other peoples code unless
you’re careful.
backcall provides a way of specifying the callback signature using a prototype
function.
If the callback takes fewer parameters than your prototype, backcall will wrap
it in a function that discards the extra arguments. If the callback expects
more arguments, a TypeError is thrown when it is registered.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Specifications for callback functions passed in to an API
Group:		Development/Python
BuildRequires:	pkgconfig(python3)

%description -n python3-%{pypi_name}
If your code lets other people supply callback functions, it’s important to
specify the function signature you expect, and check that functions support
that. Adding extra parameters later would break other peoples code unless
you’re careful.
backcall provides a way of specifying the callback signature using a prototype
function.
If the callback takes fewer parameters than your prototype, backcall will wrap
it in a function that discards the extra arguments. If the callback expects
more arguments, a TypeError is thrown when it is registered.

%files -n python3-%{pypi_name}
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 107 |14mr|python-bcrypt-4.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define debug_package %{nil}

%global pypi_name bcrypt

Name:		python-%{pypi_name}
Version:	4.3.0
Release:	1
Summary:	Modern password hashing for your software and your servers
Group:		Development/Python
#crypt_blowfish code is in Public domain and all other code in ASL 2.0
License:	ASL 2.0 and Public Domain and BSD
URL:		https://github.com/pyca/bcrypt/
Source0:	%{pypi_source}
# Regenerate with ./make-vendor.sh (runs cargo vendor in src/_bcrypt)
Source1:	bcrypt-vendor-%{version}.tar.xz
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(cffi) >= 1.1
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(setuptools-rust)
BuildRequires:	python3dist(six) >= 1.4.1
BuildRequires:	python3dist(wheel)
BuildRequires:	python3dist(pip)
BuildRequires:	rust
BuildRequires:	cargo

%description
Modern password hashing for your software and your servers
#---------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name}
Modern password hashing for your software and your servers

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitearch}/%{pypi_name}/
%{python3_sitearch}/%{pypi_name}-%{version}*-info/

%prep
%autosetup -n %{pypi_name}-%{version} -a1

mkdir -p .cargo
cat >> .cargo/config << EOF

[source.crates-io]
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "vendor"
EOF

%build
# pyo3 0.23 does not know python 3.15 yet, build with the stable ABI
export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 108 |14mr|python-beautifulsoup4-4.12.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define srcname beautifulsoup4

Summary:	The Screen-Scraper's Friend
Name:		python-%{srcname}
Version:	4.12.2
Release:	1
Group:		Development/Python
License:	MIT
Url:		http://www.crummy.com/software/BeautifulSoup
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:  python3dist(hatchling)
BuildRequires:  python3dist(soupsieve)
BuildArch:	noarch
%generate_buildrequires
%pyproject_buildrequires

%global _description \
The BeautifulSoup class turns arbitrarily bad HTML into a tree-like \
nested tag-soup list of Tag objects and text snippets. A Tag object \
corresponds to an HTML tag.  It knows about the HTML tag's attributes, \
and contains a representation of everything contained between the \
original tag and its closing tag (if any). It's easy to extract Tags \
that meet certain criteria.

%description
%{_description}

#------------------------------------------------------------------

%package -n python3-%{srcname}
Summary:	The Screen-Scraper's Friend
Group:		Development/Python
Requires:	python3-lxml
Provides:	python3-beautifulsoup = %{version}-%{release}

%description -n python3-%{srcname}
%{_description}

%files -n python3-%{srcname}
%doc *.txt
%{python3_sitelib}/beautifulsoup4-%{version}.dist-info/
%{python3_sitelib}/bs4

#------------------------------------------------------------------

%prep
%setup -q -n %{srcname}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install

%check
python3 -m unittest discover -s bs4 || :

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 109 |14mr|python-beniget-0.4.2.post1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name beniget

Name:           python-%{pypi_name}
Version:        0.4.2.post1
Release:        1
Summary:        Extract semantic information about static Python code
Group:          Development/Python
License:        BSD 3-Clause
URL:            https://github.com/serge-sans-paille/beniget/
Source0:        %{pypi_source}
BuildArch:      noarch

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)

%description
A static analyzer for Python3 code. Beniget provides a static over-
approximation of the global and local definitions inside Python
Module/Class/Function. It can also compute def-use chains from each definition.

#-----------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name}
A static analyzer for Python3 code.Beniget provides a static over-
approximation of the global and local definitions inside Python
Module/Class/Function. It can also compute def-use chains from each definition.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst

#-----------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}




@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 110 |14mr|python-betamax-0.8.1-12
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname betamax

Name:           python-%{srcname}
Version:        0.8.1
Release:        12
Summary:        VCR imitation for python-requests
Group:		Development/Python
License:        ASL 2.0
URL:            https://github.com/sigmavirus24/%{srcname}
Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz

BuildArch:      noarch

%global _description \
Betamax is a VCR_ imitation for requests. This will make mocking out requests\
much easier.

%description %{_description}

%package -n python3-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{srcname}}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
%if %{with tests}
BuildRequires:  python3-pytest
BuildRequires:  python3-requests >= 2.0
%endif
Requires:       python3-requests >= 2.0

%description -n python3-%{srcname} %{_description}

Python 3 version.

%prep
%autosetup -n %{srcname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%files -n python3-%{srcname}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/%{srcname}-*.dist-info/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 111 |14mr|python-blinker-1.7.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name blinker

Summary:	Fast, simple object-to-object and broadcast signaling
Name:		python-%{pypi_name}
Version:	1.7.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://pythonhosted.org/blinker/
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Blinker provides a fast dispatching system that allows any number of
interested parties to subscribe to events, or "signals".

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Fast, simple object-to-object and broadcast signaling
Group:		Development/Python

%description -n python3-%{pypi_name}
Blinker provides a fast dispatching system that allows any number of
interested parties to subscribe to events, or "signals".

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE.rst
%doc CHANGES.rst README.rst

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files blinker

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 112 |14mr|python-boto3-1.35.32-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name boto3

Summary:	The AWS SDK for Python
Name:		python-%{pypi_name}
Version:	1.35.32
Release:	1
License:	ASL 2.0
Group:		Development/Python
Url:		https://github.com/boto/boto3
Source0:	%{pypi_source}
BuildArch:	noarch

%description
Boto3 is the Amazon Web Services (AWS) Software Development
Kit (SDK) for Python, which allows Python developers to
write software that makes use of services like Amazon S3
and Amazon EC2.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	The AWS SDK for Python
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-setuptools

%description -n python3-%{pypi_name}
Boto3 is the Amazon Web Services (AWS) Software Development
Kit (SDK) for Python, which allows Python developers to
write software that makes use of services like Amazon S3
and Amazon EC2.

%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-*.egg-info/

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info
# Remove online tests
rm -rf tests/integration

%build
%py3_build

%install
%py3_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 113 |14mr|python-breathe-4.35.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:        Adds support for Doxygen xml output to reStructuredText and Sphinx
Name:           python-breathe
License:        BSD
Group:          Development/Python
Version:        4.35.0
Release:        1
URL:            https://github.com/michaeljones/breathe
Source0:        https://github.com/michaeljones/breathe/archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
BuildRequires:  doxygen
BuildRequires:  which
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-six
# NOTE: git is only needed because part of the build process checks if it's in a git repo
BuildRequires:  %{_bindir}/git
BuildArch:      noarch

%define _description \
Breathe is an extension to reStructuredText and Sphinx to be able to read and \
render the Doxygen xml output.

%description %_description

#------------------------------------------------------------------------------

%package -n python3-breathe
Summary:        %{summary}
Group:          Development/Python
Requires:       python3-six
Requires:       doxygen

%description -n python3-breathe
%_description

%files -n python3-breathe
%license LICENSE
%doc README.rst
%{_bindir}/breathe-apidoc
%{python3_sitelib}/*

#------------------------------------------------------------------------------
%prep
%autosetup -n breathe-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 114 |14mr|python-cachecontrol-0.14.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name cachecontrol

Summary:	Port of the caching algorithms in httplib2
Name:		python-cachecontrol
Version:	0.14.0
Release:	1
License:	ASL
Group:		Development/Python
Url:		https://github.com/ionrock/cachecontrol
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(flit-core)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
CacheControl is a port of the caching algorithms in httplib2 for use with
requests session object.
It was written because httplib2’s better support for caching is often
mitigated by its lack of thread safety. The same is true of requests in terms of caching.

#----------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Port of the caching algorithms in httplib2
Group:		Development/Python

%description -n python3-%{pypi_name}
CacheControl is a port of the caching algorithms in httplib2 for use with
requests session object.
It was written because httplib2’s better support for caching is often
mitigated by its lack of thread safety. The same is true of requests in terms of caching.

%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE.txt
%{_bindir}/doesitcache
%{python3_sitelib}/*

#----------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

rm -rf *.egg-info

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 115 |14mr|python-cachetools-5.5.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name cachetools

Summary:	Extensible memoizing collections and decorators
Name:		python-cachetools
Version:	5.5.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/tkem/cachetools
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
This module provides various memoizing collections and decorators,
including a variant of the Python 3 Standard Library `@lru_cache`_
function decorator.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Extensible memoizing collections and decorators
Group:		Development/Python

%description -n python3-%{pypi_name}
This module provides various memoizing collections and decorators,
including a variant of the Python 3 Standard Library `@lru_cache`_
function decorator.

%files -n python3-%{pypi_name}
%doc README.rst
%doc LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 116 |14mr|python-cairocffi-1.7.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name cairocffi
%global pypi_oname cairocffi

Summary:	cffi-based cairo bindings for Python
Name:		python-%{pypi_name}
Version:	1.7.1
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://pypi.python.org/pypi/%{pypi_name}
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(cffi)
BuildRequires:	python3dist(pytest-runner)
BuildArch:	noarch

%description
cffi-based cairo bindings for Python.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	cffi-based cairo bindings for Python
Group:		Development/Python

%description -n python3-%{pypi_name}
cffi-based cairo bindings for Python.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc LICENSE README.rst

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_oname}-%{version}
%autopatch -p1

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files cairocffi

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 117 |14mr|python-caja-1.28.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define url_ver %(echo %{version}|cut -d. -f1,2)

Summary:	Python bindings for MATE's caja
Summary(ru_RU.UTF-8):	Привязки Python для caja от MATE
Name:		python-caja
Version:	1.28.0
Release:	1
License:	GPLv2+ and LGPLv2+
Group:		Development/Python
Url:		http://mate-desktop.org
Source0:	http://pub.mate-desktop.org/releases/%{url_ver}/%{name}-%{version}.tar.xz
BuildRequires:	mate-common
BuildRequires:	pkgconfig(libcaja-extension)
BuildRequires:	pkgconfig(pygobject-3.0)
BuildRequires:	pkgconfig(python3)

%description
These are bindings for the caja extension library introduced in MATE.

%description -l ru_RU.UTF-8
Это привязки для библиотеки расширений caja, представленной в MATE.

#----------------------------------------------------------------------------
%package -n python3-caja
Summary:	Python3 bindings for MATE's caja
Summary(ru_RU.UTF-8):	Привязки Python3 для caja от MATE
Obsoletes:	python-caja < 1.22.0-2

%description -n python3-caja
These are bindings for the caja extension library introduced in MATE.

%description -n python3-caja -l ru_RU.UTF-8
Это привязки для библиотеки расширений caja, представленной в MATE.

%files -n python3-caja -f %{name}.lang
%doc AUTHORS ChangeLog NEWS
%{_libdir}/caja/extensions-2.0/*
%{_datadir}/caja/extensions/*

#----------------------------------------------------------------------------

%package -n python3-caja-devel
Summary:	Pkgconfig file and examples for %{name}
Summary(ru_RU.UTF-8):	Файл Pkgconfig и примеры для %{name}
Group:		Development/Python
Requires:	python3-caja = %{EVRD}

%description -n python3-caja-devel
This package contains Pkgconfig file for %{name}.

%description -n python3-caja-devel -l ru_RU.UTF-8
Этот пакет содержит файл Pkgconfig для %{name}.

%files -n python3-caja-devel
%doc AUTHORS ChangeLog NEWS
%{_libdir}/pkgconfig/caja-python.pc
%{_docdir}/python-caja

#----------------------------------------------------------------------------

%prep
%autosetup -p1

%build
%configure

%make_build

%install
%make_install

%find_lang %{name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 118 |14mr|python-calver-2022.6.26-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-calver
Version:        2022.6.26
Release:        1
Summary:        Setuptools extension for CalVer package versions

# Check if the automatically generated License and its spelling is correct for Fedora
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
License:        ASL
URL:            https://github.com/di/calver
Source:         %{pypi_source calver}
Group:          Development/Python
BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros


# Fill in the actual package description to submit package to Fedora
%global _description %{expand:
The calver package is a setuptools extension for automatically defining your
Python package version as a calendar version.}


%description %_description
#-----------------------------------------------------
%package -n     python3-calver
Summary:        %{summary}
Group:          Development/Python

%description -n python3-calver %_description

%files -n python3-calver -f %{pyproject_files}

#-----------------------------------------------------

%prep
%autosetup -p1 -n calver-%{version}


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files calver


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 119 |14mr|python-cargo2rpm-0.3.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module	cargo2rpm

Summary:	Translation layer between cargo and RPM
Group:		Development/Python
Name:		python-cargo2rpm
Version:	0.3.3
Release:	1
License:	MIT
Url:		https://codeberg.org/rust2rpm/cargo2rpm
Source0:	https://codeberg.org/rust2rpm/cargo2rpm/archive/v%{version}.tar.gz#/%{module}-%{version}.tar.gz

BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(wheel)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Translation layer between cargo and RPM

#---------------------------------------------------
%package -n python3-%{module}
Summary:	Translation layer between cargo and RPM
Group:		Development/Python

%description -n python3-%{module}
Translation layer between cargo and RPM

%files -n python3-%{module}
%doc *.md
%license LICENSE
%{_bindir}/cargo2rpm
%{python3_sitelib}/cargo2rpm
%{python3_sitelib}/cargo2rpm-%{version}*-info

#-----------------------------------------------------

%prep
%autosetup -p1 -n %{module}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 120 |14mr|python-cattrs-24.1.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name cattrs

%global _description %{expand:
cattrs is an open source Python library for structuring and
unstructuring data. cattrs works best with attrs classes and the usual
Python collections, but other kinds of classes are supported by
manually registering converters.}

Name:           python-cattrs
Version:	24.1.2
Release:	1
Summary:        Python library for structuring and unstructuring data
Group:          Development/Python
License:        MIT
URL:            https://github.com/python-attrs/cattrs
BuildArch:      noarch
# The GitHub archive contains tests and docs, which the PyPI sdist lacks
#Source0:	%{pypi_source}
Source0:	%{pypi_source}


BuildRequires:  python3-devel

# [tool.poetry.dev-dependencies]
# We can’t easily generate the “dev” dependencies from Poetry, so we maintain
# them manually:

%description %_description

%package -n python3-%{pypi_name}
Group:          Development/Python
Summary:        %{summary}

%description -n python3-%{pypi_name} %_description

%prep
%autosetup -n %{pypi_name}-%{version}

# loosen requirement
sed -i 's/poetry-core.*"/poetry-core"/' pyproject.toml
# Don’t run benchmarks, either.
sed -r -i 's/ --benchmark[^[:blank:]"]*//g' pyproject.toml

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files cattrs cattr

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 121 |14mr|python-cffi-2.1.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-cffi
Version:        2.1.1
Release:        1
Summary:        Foreign Function Interface for Python to call C code
# cffi is MIT
# cffi/_imp_emulation.py has bits copied from CPython (PSF-2.0)
License:        MIT AND PSF-2.0
URL:            https://github.com/python-cffi/cffi
Source:         %{url}/archive/v%{version}/cffi-%{version}.tar.gz

BuildRequires:  python3-devel
BuildRequires:  pkgconfig(libffi)

# For tests:
BuildRequires:  gcc-c++

%description
Foreign Function Interface for Python, providing a convenient and
reliable way of calling existing C code from Python. The interface is
based on LuaJIT’s FFI.


%package -n python3-cffi
Summary:        %{summary}

%description -n python3-cffi
Foreign Function Interface for Python, providing a convenient and
reliable way of calling existing C code from Python. The interface is
based on LuaJIT’s FFI.


%prep
%autosetup -p1 -n cffi-%{version}


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files _cffi_backend cffi

%files -n python3-cffi -f %{pyproject_files}
%doc README.md
%{_bindir}/cffi-gen-src

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 122 |14mr|python-chardet-7.6.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name chardet

Summary:	Character encoding auto-detection in Python
Name:		python-%{pypi_name}
Version:	7.6.0
Release:	1
License:	LGPLv2+
Group:		Development/Python
Url:		http://chardet.feedparser.org/
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Character encoding auto-detection in Python. As smart as your browser.

#----------------------------------------------------------------------------

%package -n python3-chardet
Summary:	Character encoding auto-detection in Python
Group:		Development/Python

%description -n python3-chardet
Character encoding auto-detection in Python. As smart as your browser.

%files -n python3-chardet -f %{pyproject_files}
%license LICENSE
%{_bindir}/chardetect

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files chardet

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 123 |14mr|python-cheroot-10.0.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global _python_no_extras_requires 1

%global pypi_name cheroot
# sphinx-tabs not available in fedora for docs build
%bcond_with docs

Name:		python-%{pypi_name}
Version:	10.0.1
Release:	1
Summary:	Highly-optimized, pure-python HTTP server
Group:		Development/Python
License:	BSD
URL:		https://github.com/cherrypy/cheroot
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros
BuildArch:	noarch

%description
Cheroot is the high performance, pure Python HTTP server used by CherryPy.Status
The test suite currently relies on pytest. It's being run via Travis
CI.Contribute Cheroot.

#----------------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name}
Cheroot is the high performance, pure Python HTTP server used by CherryPy.Status
The test suite currently relies on pytest. It's being run via Travis
CI.Contribute Cheroot.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE.md
%doc README.rst
%{_bindir}/cheroot

#----------------------------------------------------------------------------
%if %{with docs}
%package -n python-%{pypi_name}-doc
Summary:	cheroot documentation
Group:		Documentation
BuildRequires:	python3dist(sphinx)
BuildRequires:	python3dist(jaraco-packaging)
BuildRequires:	python3dist(docutils)

%description -n python-%{pypi_name}-doc
Documentation for cheroot

%files -n python-%{pypi_name}-doc
%license LICENSE.md
%doc html

%endif

#----------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%if %{with docs}
sphinx-build -vvv docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%endif

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 124 |14mr|python-cherrypy-18.9.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name CherryPy

Summary:	A Python-based framework for web application development
Name:		python-cherrypy
Version:	18.9.0
Release:	1
License:	BSD
Group:		Development/Python
URL:		http://www.cherrypy.org
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-nose
BuildRequires:	python3egg(setuptools)
BuildRequires:	python3egg(setuptools-scm)
BuildArch:	noarch

%description
A Python-based framework for web application development.

CheryPy allows you to write and easyly deploy web applications, thanks
to a bundled webserver. It features a automated way to map an url to a
mathod, allowing you to describe your site as a python class.

#----------------------------------------------

%package -n python3-cherrypy
Summary:        A Python-based framework for web application development
Group:          Development/Python
Requires:       python3

%description -n python3-cherrypy
A Python-based framework for web application development.

CheryPy allows you to write and easyly deploy web applications, thanks
to a bundled webserver. It features a automated way to map an url to a
mathod, allowing you to describe your site as a python class.

%files -n python3-cherrypy
%doc cherrypy/tutorial/*
%{python3_sitelib}/cherrypy/*
%{python3_sitelib}/*.egg-info
%{_bindir}/cherryd

#----------------------------------------------
%prep
%setup -q -n %{pypi_name}-%{version}

%build
cat > tutorial.conf << EOF
[server]
socketPort = 8080
threadPool = 10

[session]
storageType=ram
EOF

%py3_build


%install
%py3_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 125 |14mr|python-cleo-2.1.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name cleo

%global common_description %{expand:
Create beautiful and testable command-line interfaces.

Cleo is mostly a higher level wrapper for CliKit, so a lot of the
components and utilities comes from it. Refer to its documentation for
more information.}

Name:           python-%{pypi_name}
Summary:        Create beautiful and testable command-line interfaces
Group:          Development/Python
Version:        2.1.0
Release:        1
License:        MIT

URL:            https://github.com/sdispater/cleo
Source0:        https://github.com/python-poetry/cleo/archive/refs/tags/%{version}.tar.gz?/%{pypi_name}-%{version}.tar.gz
Patch0:         cleo-requirements.patch
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3dist(setuptools)

%description %{common_description}

#-------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name} %{common_description}

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README*

#-------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%check
%pyproject_check_import

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 126 |14mr|python-click-8.1.7-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name click

Summary:	A simple wrapper around optparse for powerful command line utilities
Name:		python-%{pypi_name}
Version:	8.1.7
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://palletsprojects.com/p/click/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
Click is a Python package for creating beautiful command line interfaces
in a composable way with as little code as necessary.  It's the "Command
Line Interface Creation Kit".  It's highly configurable but comes with
sensible defaults out of the box.

It aims to make the process of writing command line tools quick and fun
while also preventing any frustration caused by the inability to
implement an intended CLI API.

#-----------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A simple wrapper around optparse for powerful command line utilities
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(setuptools)

%description -n python3-%{pypi_name}
Click is a Python package for creating beautiful command line interfaces
in a composable way with as little code as necessary.  It's the "Command
Line Interface Creation Kit".  It's highly configurable but comes with
sensible defaults out of the box.

It aims to make the process of writing command line tools quick and fun
while also preventing any frustration caused by the inability to
implement an intended CLI API.

%files -n python3-%{pypi_name}
%doc *.rst
%{python3_sitelib}/click/*.py*
%{python3_sitelib}/click/py.typed
%{python3_sitelib}/click/__pycache__
%{python3_sitelib}/click*.egg-info
#----------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 127 |14mr|python-cmd2-2.4.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name cmd2

Summary:	Extra features for standard library's cmd module
Name:		python-%{pypi_name}
Version:	2.4.3
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://pypi.python.org/pypi/cmd2
Source0:	%{pypi_source}
BuildArch:	noarch

%description
Enhancements for standard library's cmd module.

Drop-in replacement adds several features for command-prompt tools:

 * Searchable command history (commands: "hi", "li", "run")
 * Load commands from file, save to file, edit commands in file
 * Multi-line commands
 * Case-insensitive commands
 * Special-character shortcut commands (beyond cmd's "@" and "!")
 * Settable environment parameters
 * Parsing commands with flags
 * > (filename), >> (filename) redirect output to file
 * < (filename) gets input from file
 * bare >, >>, < redirect to/from paste buffer
 * accepts abbreviated commands when unambiguous
 * `py` enters interactive Python console
 * test apps against sample session transcript (see example/example.py)

Usable without modification anywhere cmd is used; simply import cmd2.Cmd
in place of cmd.Cmd.

See docs at http://packages.python.org/cmd2/

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Extra features for standard library's cmd module
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-setuptools
BuildRequires:	python3-setuptools_scm
BuildRequires:	dos2unix
Requires:	python3-pyparsing
Requires:	python3-pyperclip
Requires:	python3-six
Requires:	python3-wcwidth
Requires:	/usr/bin/which

%description -n python3-%{pypi_name}
Enhancements for standard library's cmd module.

Drop-in replacement adds several features for command-prompt tools:

 * Searchable command history (commands: "hi", "li", "run")
 * Load commands from file, save to file, edit commands in file
 * Multi-line commands
 * Case-insensitive commands
 * Special-character shortcut commands (beyond cmd's "@" and "!")
 * Settable environment parameters
 * Parsing commands with flags
 * > (filename), >> (filename) redirect output to file
 * < (filename) gets input from file
 * bare >, >>, < redirect to/from paste buffer
 * accepts abbreviated commands when unambiguous
 * `py` enters interactive Python console
 * test apps against sample session transcript (see example/example.py)

Usable without modification anywhere cmd is used; simply import cmd2.Cmd
in place of cmd.Cmd.

See docs at http://packages.python.org/cmd2/

%files -n python3-%{pypi_name}
%license LICENSE
%doc CHANGELOG.md README.md
%{python3_sitelib}/cmd2
%{python3_sitelib}/%{pypi_name}-%{version}*

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 128 |14mr|python-colorama-0.4.6-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name colorama

Summary:	Cross-platform colored terminal text
Name:		python-%{pypi_name}
Version:	0.4.6
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://github.com/tartley/colorama
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Makes ANSI escape character sequences (for producing colored
terminal text and cursor positioning) work under MS Windows.

ANSI escape character sequences have long been used to produce
colored terminal text and cursor positioning on Unix and Macs.
Colorama makes this work on Windows, too, by wrapping stdout,
stripping ANSI sequences it finds (which would appear as gobbledygook
in the output), and converting them into the appropriate win32 calls
to modify the state of the terminal.
On other platforms, Colorama does nothing.

#---------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Cross-platform colored terminal text
Group:		Development/Python

%description -n python3-%{pypi_name}
Makes ANSI escape character sequences (for producing colored
terminal text and cursor positioning) work under MS Windows.
ANSI escape character sequences have long been used to produce
colored terminal text and cursor positioning on Unix and Macs.
Colorama makes this work on Windows, too, by wrapping stdout,
stripping ANSI sequences it finds (which would appear as gobbledygook
in the output), and converting them into the appropriate win32 calls
to modify the state of the terminal.
On other platforms, Colorama does nothing.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc CHANGELOG.rst LICENSE.txt README.rst

#---------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files colorama

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 129 |14mr|python-colorlog-6.12.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name colorlog
%global desc "colorlog.ColoredFormatter is a formatter for use with Python's logging module that outputs records using terminal colors."

Name:           python-%{pypi_name}
Version:        6.12.0
Release:        1
Summary:        Colored formatter for the Python logging module

License:        MIT
URL:            https://github.com/borntyping/python-colorlog
Source0:        %{pypi_source}
BuildArch:      noarch

BuildRequires:  python3-devel

%generate_buildrequires
%pyproject_buildrequires

%description
%{desc}

%package -n python3-%{pypi_name}
Summary:        %{summary}

%description -n python3-%{pypi_name}
%{desc}

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install

%files -n python3-%{pypi_name}
%doc README.md
%license LICENSE
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}*.dist-info/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 130 |14mr|python-configparser-6.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name configparser

Summary:        Configparser module
Name:           python-%{pypi_name}
Version:        6.0.0
Release:        1
Group:          Development/Python
License:        MIT
URL:            https://pypi.org/project/%{pypi_name}
Source0:        %{pypi_source}
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(setuptools-scm)
BuildRequires:  python3dist(toml)
BuildRequires:  python3dist(wheel)
BuildRequires:  python3dist(pip)
Requires:       python3dist(setuptools)
Provides:       python3-%{pypi_name} = %{EVRD}
BuildArch:      noarch

%description
The ancient ConfigParser module available in the standard library 2.x
has seen a major update in Python 3.2. This package is a backport of
those changes so that they can be used directly in Python 2.6 - 3.5.
#--------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:      Configparser module
Group:        Development/Python
Obsoletes:    python3-backports-common < %{EVRD}

%description -n python3-%{pypi_name}
The ancient ConfigParser module available in the standard library 2.x
has seen a major update in Python 3.2. This package is a backport of
those changes so that they can be used directly in Python 2.6 - 3.5.

%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/backports/%{pypi_name}
%{python3_sitelib}/%{pypi_name}/__init__.py
%{python3_sitelib}/%{pypi_name}-%{version}*-info
%{python3_sitelib}/%{pypi_name}/__pycache__
#--------------------------------------------------------------------

%prep
%setup -q -n  %{pypi_name}-%{version}

%build
%pyproject_wheel


%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 131 |14mr|python-construct-2.10.70-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name construct

Summary:	A powerful declarative parser/builder for binary data
Name:		python-%{pypi_name}
Version:	2.10.70
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://construct.readthedocs.org
Source0:	%{pypi_source}
BuildArch:	noarch

%description
Construct is a powerful declarative parser (and builder) for binary
data.

Instead of writing imperative code to parse a piece of data, you
declaratively define a data structure that describes your data. As
this data structure is not code, you can use it in one direction to
parse data into Pythonic objects, and in the other direction, convert
(build) objects into binary data.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A powerful declarative parser/builder for binary data
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(setuptools)

%description -n python3-%{pypi_name}
Construct is a powerful declarative parser (and builder) for binary
data.

Instead of writing imperative code to parse a piece of data, you
declaratively define a data structure that describes your data. As
this data structure is not code, you can use it in one direction to
parse data into Pythonic objects, and in the other direction, convert
(build) objects into binary data.

This is the Python 3 version of the package.

%files -n python3-%{pypi_name}
%doc README.rst LICENSE
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-*.egg-info

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py3_build

%install
%py3_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 132 |14mr|python-coverage-7.6.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name coverage

Summary:	Code coverage measurement for Python
Name:		python-%{pypi_name}
Version:	7.6.1
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://nedbatchelder.com/code/coverage/
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)

%description
Coverage measures code coverage, typically during test execution. It
uses the code analysis tools and tracing hooks provided in the Python
standard library to determine which lines are executable, and which
have been executed.

#----------------------------------------------------------------------------

%package -n python3-coverage
Summary:	Code coverage measurement for Python
Group:		Development/Python

%description -n python3-coverage
Coverage measures code coverage, typically during test execution. It
uses the code analysis tools and tracing hooks provided in the Python
standard library to determine which lines are executable, and which
have been executed.

%files -n python3-coverage
%{_bindir}/coverage
%{_bindir}/coverage3
%{_bindir}/coverage-%{python3_version}
%{python3_sitearch}/coverage
%{python3_sitearch}/coverage-*.dist-info

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 133 |14mr|python-cparser-3.00-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-cparser
Summary:        C parser and AST generator written in Python
Version:        3.00
Release:        1
License:        BSD-3-Clause

URL:            https://github.com/eliben/pycparser
Source0:        %{url}/archive/release_v%{version}/pycparser-release_v%{version}.tar.gz
Source1:        pycparser-3.00-remove-relative-sys-path.py

# Drop redundant BuildRequires for python3-wheel
# https://github.com/fedora-eln/eln/issues/284
Patch:          https://github.com/eliben/pycparser/commit/8c219ec6.patch

BuildArch:      noarch
BuildRequires:  python3-devel

%description
pycparser is a complete parser for the C language, written in pure Python.
It is a module designed to be easily integrated into applications that
need to parse C source code.

%package -n python3-cparser
Summary:        %{summary}

%description -n python3-cparser
pycparser is a complete parser for the C language, written in pure Python.
It is a module designed to be easily integrated into applications that
need to parse C source code.

%prep
%autosetup -p1 -n pycparser-release_v%{version}

# Remove relative sys.path from the examples
%{python3} %{SOURCE1} examples

%generate_buildrequires
%pyproject_buildrequires

%build
pushd pycparser
%{python3} _ast_gen.py
popd
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files -l pycparser

%files -n python3-cparser -f %{pyproject_files}
%doc README.rst
%doc examples

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 134 |14mr|python-crashtest-0.4.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name crashtest

%global common_description %{expand:
Crashtest is a Python library that makes exceptions handling and
inspection easier.}

Name:           python-%{pypi_name}
Version:        0.4.1
Release:        1
Summary:        Manage Python errors with ease
Group:          Development/Python
License:        MIT

URL:            https://github.com/sdispater/crashtest
Source0:        %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-pytest
BuildRequires:  pyproject-rpm-macros

%description %{common_description}

#---------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name} %{common_description}

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.md

#---------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1


%generate_buildrequires
%pyproject_buildrequires -r


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files %{pypi_name}


%check
%pytest

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 135 |14mr|python-cryptography-50.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# see https://github.com/pyca/cryptography/issues/9023
%global _disable_lto 1

%global	debug_package %{nil}

%global pypi_name cryptography

Summary:	PyCA's cryptography library
Name:		python-%{pypi_name}
Version:	50.0.0
Release:	1
License:	ASL 2.0 or BSD
Group:		Development/Python
Url:		https://cryptography.io/en/latest
Source0:	%pypi_source
# use upd.sh for create vendor archive
Source1:	cryptography-vendor-%{version}.tar.xz
Source10:	upd.sh
BuildRequires:	pyproject-rpm-macros
BuildRequires:	cargo
BuildRequires:	rust
BuildRequires:	python3dist(bcrypt)
BuildRequires:	python3dist(pretend)
BuildRequires:	python3dist(certifi)
BuildRequires:	pkgconfig(openssl)
BuildRequires:	pkgconfig(python3)

%description
cryptography is a package designed to expose cryptographic primitives and
recipes to Python developers.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	PyCA's cryptography library
Group:		Development/Python
Requires:	openssl
Requires:	python3dist(cffi)
Requires:	python3dist(six)

%description -n python3-%{pypi_name}
cryptography is a package designed to expose cryptographic primitives and
recipes to Python developers.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst docs
%license LICENSE LICENSE.APACHE LICENSE.BSD
# Humm may be wrong place?

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version} -a1
mkdir .cargo
cat >.cargo/config.toml <<EOF
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
cd %{buildroot}%{python3_sitearch} && mkdir .keep && mv cryptography cryptography-*.dist-info .keep/ && rm -rf * && mv .keep/* . && rmdir .keep
cd -
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 136 |14mr|python-curl-7.47.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module pycurl
# we don't want to provide private python extension libs
%global __provides_exclude_from ^(%{python3_sitearch}/.*\\.so)$

Summary:       A Python interface to libcurl
Name:          python-curl
Version:       7.47.0
Release:       1
Group:         Development/Python
License:       LGPLv2+
URL:           http://pycurl.sourceforge.net
Source0:       https://pypi.io/packages/source/p/pycurl/%{module}-%{version}.tar.gz
BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(libcurl) >= 7.21.5
BuildRequires: pkgconfig(openssl)
BuildRequires: python3dist(setuptools)

%description
PycURL is a Python interface to libcurl. PycURL can be used to fetch
objects identified by a URL from a Python program, similar to the
urllib Python module. PycURL is mature, very fast, and supports a lot
of features.

#--------------------------------------------------------------------

%package -n python3-curl
Summary:       A Python 3 interface to libcurl
Group:         Development/Python
Provides:      python3-pycurl = %{EVRD}

%description -n python3-curl
PycURL is a Python3 interface to libcurl. PycURL can be used to fetch
objects identified by a URL from a Python program, similar to the
urllib Python module. PycURL is mature, very fast, and supports a lot
of features.

%files -n python3-curl
%doc COPYING-LGPL COPYING-MIT ChangeLog README.rst examples doc
%{python3_sitearch}/*

#--------------------------------------------------------------------
%prep
%setup -qn %{module}-%{version}
%autopatch -p1

%generate_buildrequires
%pyproject_buildrequires

%build
export PYCURL_SSL_LIBRARY=openssl
%pyproject_wheel

%check

%install
%pyproject_install
%pyproject_save_files -l curl pycurl
rm -rf %{buildroot}%{_datadir}/doc/pycurl

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 137 |14mr|python-cwcwidth-0.1.10-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name cwcwidth

Name:           python-%{pypi_name}
Version:        0.1.10
Release:        2
Summary:        Python bindings for wc(s)width
Group:          Development/Python
License:        MIT
URL:            https://github.com/sebastinas/cwcwidth
Source0:        %{pypi_source}

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(cython)

%description
Python bindings for wc(s)widthcwcwidth provides Python bindings for wcwidth and
wcswidth functions defined in POSIX.1-2001 and POSIX.1-2008 based on Cython.
These functions compute the printable length of a unicode character/string on a
terminal. The module provides the same functions as wcwidth and its behavior is
compatible.

%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name}
Python bindings for wc(s)widthcwcwidth provides Python bindings for wcwidth and
wcswidth functions defined in POSIX.1-2001 and POSIX.1-2008 based on Cython.
These functions compute the printable length of a unicode character/string on a
terminal. The module provides the same functions as wcwidth and its behavior is
compatible.

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%check
(cd tests ; PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m unittest -v)

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 138 |14mr|python-cycler-0.12.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name cycler

Summary:	Composable cycles Python module
Name:		python-%{pypi_name}
Version:	0.12.1
Release:	1
License:	LGPLv2+
Group:		Development/Python
Url:		https://github.com/matplotlib/cycler
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Composable cycles Python pypi_name.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Composable cycles Python 3 module
Group:		Development/Python

%description -n python3-%{pypi_name}
Composable cycles Python 3 module.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc LICENSE README.rst

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files cycler

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 139 |14mr|python-cython-3.2.8-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond tests 1

# This bcond allows to ship a non-compiled version
# Slower, but sometimes necessary with alpha Python versions
# ENABLE ME
%bcond cython_compile 0

Name:           python-cython
Version:        3.2.8
Release:        1
Summary:        Language for writing Python extension modules

License:        Apache-2.0
URL:            http://www.cython.org
Source:         https://github.com/cython/cython/archive/%{version}/Cython-%{version}.tar.gz

# Fix issues with the ipython tests
# Resolved upstream: https://github.com/cython/cython/pull/7553
Patch:          fix-ipython-tests.patch

BuildRequires:  python3-devel

%if %{with cython_compile}
BuildRequires:  gcc
%else
BuildArch:      noarch
%endif

%global _description %{expand:
The Cython language makes writing C extensions for the Python language as easy
as Python itself. Cython is a source code translator based on Pyrex,
but supports more cutting edge functionality and optimizations.

The Cython language is a superset of the Python language (almost all Python
code is also valid Cython code), but Cython additionally supports optional
static typing to natively call C functions, operate with C++ classes and
declare fast C types on variables and class attributes.
This allows the compiler to generate very efficient C code from Cython code.

This makes Cython the ideal language for writing glue code for external C/C++
libraries, and for fast C modules that speed up the execution of Python code.}

%description %{_description}


%package -n python3-cython
Summary:        %{summary}
Provides:       Cython = %{?epoch:%{epoch}:}%{version}-%{release}
Provides:       Cython%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides:       cython = %{?epoch:%{epoch}:}%{version}-%{release}
Provides:       cython%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

# A small templating library is bundled in Cython/Tempita
# Upstream version 0.5.2 is available from https://pypi.org/project/Tempita
# but the bundled copy is patched and reorganized.
# Upstream homepage is inaccessible.
Provides:       bundled(python3dist(tempita))

%description -n python3-cython %{_description}


%prep
%autosetup -n cython-%{version} -p1


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel %{!?with_cython_compile:-C--global-option=--no-cython-compile}


%install
%pyproject_install
%pyproject_save_files Cython cython pyximport

%files -n python3-cython -f %{pyproject_files}
%doc README.rst CHANGES.rst USAGE.txt Demos Doc Tools
%{_bindir}/cython
%{_bindir}/cygdb
%{_bindir}/cythonize

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 140 |14mr|python-dacite-1.8.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define srcname dacite

Name:		python-dacite
Version:	1.8.1
Release:	1
Summary:	Simple creation of data classes from dictionaries
Group:		Development/Python
License:	MIT
URL:		https://github.com/konradhalas/dacite
Source0:	https://github.com/konradhalas/dacite/archive/refs/tags/v%{version}.tar.gz?/%{srcname}-%{version}.tar.gz
BuildRequires:	python3-pip
BuildRequires:	python3-setuptools
BuildRequires:	python3-wheel
BuildRequires:	python3-devel
BuildRequires:	unzip
BuildRequires:	fdupes
BuildArch:	noarch

%description
Simplifies creating type-hinted data transfer objects (DTOs)
from dictionaries, useful for data from HTTP requests or databases.
It complements Python's dataclasses and isn't a validation library.
For validation, combine it with other libraries.

#----------------------------------------------
%package -n python3-%{srcname}
Summary:	Simple creation of data classes from dictionaries
Group:		Development/Python

%description -n python3-%{srcname}
Simplifies creating type-hinted data transfer objects (DTOs)
from dictionaries, useful for data from HTTP requests or databases.
It complements Python's dataclasses and isn't a validation library.
For validation, combine it with other libraries.

%files -n python3-%{srcname}
%{python3_sitelib}/dacite
%{python3_sitelib}/dacite-%{version}.dist-info

#----------------------------------------------
%prep
%autosetup -p1 -n dacite-%{version}
sed -ri 's/--benchmark-[^ "]+//g' pyproject.toml

%build
%pyproject_wheel

%install
%pyproject_install
%fdupes %{buildroot}%{python3_sitelib}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 141 |14mr|python-dateutil-2.8.2-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define fname dateutil

Name:		python-dateutil
Version:	2.8.2
Release:	2
License:	Python
Summary:	Provides powerful extensions to the standard datetime module
Group:		Development/Python
Url:		https://dateutil.readthedocs.io/en/stable/
Source0:	https://pypi.python.org/packages/source/p/python-dateutil/python-%{fname}-%{version}.tar.gz
BuildArch:	noarch
BuildRequires:	python3-setuptools >= 3.0
BuildRequires:	python3dist(setuptools-scm)
BuildRequires:	pkgconfig(python3)

%description
The dateutil module provides powerful extensions to the standard
datetime module available in Python. Features include:

* Computing of relative deltas (next month, next year, next monday,
  last week of month, etc);
* Computing of relative deltas between two given date and/or datetime
  objects;
* Computing of dates based on very flexible recurrence rules, using a
  superset of the iCalendar specification. Parsing of RFC strings is
  supported as well;
* Generic parsing of dates in almost any string format;
* Timezone (tzinfo) implementations for tzfile(5) format files
  (/etc/localtime, /usr/share/zoneinfo, etc), TZ environment string
  (in all known formats), iCalendar format files, given ranges (with
  help from relative deltas), local machine timezone, fixed offset
  timezone, UTC timezone, and Windows registry-based time zones;
* Internal up-to-date world timezone information based on Olson's
  database;
* Computing of Easter Sunday dates for any given year, using Western,
  Orthodox or Julian algorithms;
* More than 400 test cases.

#----------------------------------------------------------------
%package -n python3-dateutil
Summary:	Provides powerful extensions to the standard datetime module
Group:		Development/Python
Requires:	python3 >= 3.0
Requires:	timezone
#Provides:	python3-dateutil
#Provides:	python3dist(dateutil)

%description -n python3-dateutil
The dateutil module provides powerful extensions to the standard
datetime module available in Python. Features include:

* Computing of relative deltas (next month, next year, next monday,
  last week of month, etc);
* Computing of relative deltas between two given date and/or datetime
  objects;
* Computing of dates based on very flexible recurrence rules, using a
  superset of the iCalendar specification. Parsing of RFC strings is
  supported as well;
* Generic parsing of dates in almost any string format;
* Timezone (tzinfo) implementations for tzfile(5) format files
  (/etc/localtime, /usr/share/zoneinfo, etc), TZ environment string
  (in all known formats), iCalendar format files, given ranges (with
  help from relative deltas), local machine timezone, fixed offset
  timezone, UTC timezone, and Windows registry-based time zones;
* Internal up-to-date world timezone information based on Olson's
  database;
* Computing of Easter Sunday dates for any given year, using Western,
  Orthodox or Julian algorithms;
* More than 400 test cases.


%files -n python3-dateutil
%doc LICENSE NEWS
%{python3_sitelib}/%{fname}
%{python3_sitelib}/python_%{fname}-*.dist-info

#----------------------------------------------------------------
%prep
%setup -q -n python-%{fname}-%{version}
rm -rf python_dateutil.egg-info/

iconv --from=ISO-8859-1 --to=UTF-8 NEWS > NEWS.new
mv NEWS.new NEWS

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 142 |14mr|python-dbusmock-0.29.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name	dbusmock

Name:		python-%{pypi_name}
Version:	0.29.1
Release:	1
Summary:	Mock D-Bus objects
Group:		Development/Python
License:	LGPLv3+
URL:		http://pypi.python.org/pypi/python-dbusmock
# http://pypi.io/packages/source/p/%%{name}/%%{name}-%%{version}.tar.gz
Source0:	https://github.com/martinpitt/python-dbusmock/releases/download/%{version}/dist.%{name}-%{version}.tar.gz
BuildArch:	noarch
BuildRequires:	dbus-x11
BuildRequires:	upower

BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(nose)
BuildRequires:	python3dist(dbus-python)
BuildRequires:	python3-gobject3

%description
With this program/Python library you can easily create mock objects on
D-Bus. This is useful for writing tests for software which talks to
D-Bus services such as upower, systemd, ConsoleKit, gnome-session or
others, and it is hard (or impossible without root privileges) to set
the state of the real services to what you expect in your tests.

#------------------------------------------------
%package -n	python3-%{pypi_name}
Summary:	Mock D-Bus objects (in Python3)
Group:		Development/Python
Requires:	dbus-x11
Requires:	python3dist(dbus-python)
Requires:	python3dist(pygobject)

%description -n	python3-%{pypi_name}
With this program/Python3 library you can easily create mock objects on
D-Bus. This is useful for writing tests for software which talks to
D-Bus services such as upower, systemd, ConsoleKit, gnome-session or
others, and it is hard (or impossible without root privileges) to set
the state of the real services to what you expect in your tests.

This is the Python 3 version of the package.

%files -n python3-%{pypi_name}
%doc README* COPYING
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/python_%{pypi_name}-*.dist-info

#------------------------------------------------

%prep
%setup -q

# Remove bundled egg-info
rm -rf *.dist-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%check
%define enable_tests_python3 0
%if %{enable_tests_python3}
python3 setup.py test
%endif


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 143 |14mr|python-decorator-5.1.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name    decorator

Summary:        Python decorator utilities
Name:           python-%{pypi_name}
Version:	5.1.1
Release:	1
Url:            http://pypi.python.org/pypi/decorator/
Source0:	%{pypi_source}
License:        BSD
Group:          Development/Python
BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description
The aim of the decorator module it to simplify the usage of decorators
for the average programmer, and to popularize decorators by showing
various non-trivial examples. Of course, as all techniques, decorators
can be abused and you should not try to solve every problem with a
decorator, just because you can.

#-------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        Python decorator utilities
Group:          Development/Python

%description -n python3-%{pypi_name}
The aim of the decorator module it to simplify the usage of decorators
for the average programmer, and to popularize decorators by showing
various non-trivial examples. Of course, as all techniques, decorators
can be abused and you should not try to solve every problem with a
decorator, just because you can.

%files -n python3-%{pypi_name}
%doc LICENSE.txt README.rst
%{python3_sitelib}/%{pypi_name}*
%{python3_sitelib}/__pycache__/*

#-------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 144 |14mr|python-dill-0.3.9-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name dill

Name:		python-dill
Version:	0.3.9
Release:	1
Source0:	%{pypi_source}
Summary:	serialize all of python
URL:		https://pypi.org/project/dill/
License:	3-clause BSD
Group:		Development/Python
BuildRequires:	python3dist(wheel)
BuildArch:	noarch

%description
serialize all of python

#----------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	serialize all of python
Group:		Development/Python

%description -n python3-%{pypi_name}
serialize all of python

%files -n python3-%{pypi_name}
%{_bindir}/*
%{python3_sitelib}/dill
%{python3_sitelib}/dill-*.egg-info

#----------------------------------------------------

%prep
%autosetup -p1 -n dill-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 145 |14mr|python-distro-1.9.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name distro

Name:		python-%{pypi_name}
Version:	1.9.0
Release:	1
Summary:	Linux Distribution - a Linux OS platform information API
Group:		Development/Python
License:	ASL 2.0
URL:		https://github.com/nir0s/distro
Source0:	%{pypi_source}
BuildArch:	noarch

%global _description \
The distro (for: Linux Distribution) package provides information about the\
Linux distribution it runs on, such as a reliable machine-readable ID, or\
version information.\
\
It is a renewed alternative implementation for Python's original\
platform.linux_distribution function, but it also provides much more\
functionality. An alternative implementation became necessary because\
Python 3.5 deprecated this function, and Python 3.7 is expected to remove it\
altogether. Its predecessor function platform.dist was already deprecated since\
Python 2.6 and is also expected to be removed in Python 3.7. Still, there are\
many cases in which access to that information is needed. See Python issue 1322\
for more information.

%description %{_description}

#--------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
Recommends:	lsb-release

%description -n python3-%{pypi_name} %{_description}

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc *.md
%license LICENSE

#--------------------------------------------------------------

%package cli
Summary:	%{summary}
Group:		Development/Python
Requires:	python3-%{pypi_name} = %{EVRD}

%description cli %{_description}

This package provides the %{_bindir}/distro CLI utility.

%files cli
%{_bindir}/distro

#--------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 146 |14mr|python-docutils-0.20.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name docutils
%define enable_tests 1

Name:		python-%{pypi_name}
Summary:	Python Documentation Utilities
Version:	0.20.1
Release:	1
URL:		http://docutils.sourceforge.net/
License:	Public Domain and BSD and Python and GPLv3+
Group:		Development/Python
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
The Docutils project specifies a plaintext markup language, reStructuredText,
which is easy to read and quick to write.  The project includes a python
library to parse rST files and transform them into other useful formats such
as HTML, XML, and TeX as well as commandline tools that give the enduser
access to this functionality.

Currently, the library supports parsing rST that is in standalone files and
PEPs (Python Enhancement Proposals).  Work is underway to parse rST from
Python inline documentation modules and packages.

#------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	System for processing plaintext documentation for python3
Group:		Development/Python
Recommends:	python3dist(pillow)
Conflicts:	python2-docutils < 0.14-3
Provides:	rst2html = %{version}-%{release}
Provides:	rst2man = %{version}-%{release}

%description -n python3-%{pypi_name}
The Docutils project specifies a plaintext markup language, reStructuredText,
which is easy to read and quick to write.  The project includes a python
library to parse rST files and transform them into other useful formats such
as HTML, XML, and TeX as well as commandline tools that give the enduser
access to this functionality.

Currently, the library supports parsing rST that is in standalone files and
PEPs (Python Enhancement Proposals).  Work is underway to parse rST from
Python inline documentation modules and packages.

This package contains the module, ported to run under python3.

#------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

# Remove shebang from library files
for file in docutils/utils/{code_analyzer.py,punctuation_chars.py,error_reporting.py} docutils/utils/math/{latex2mathml.py,math2html.py} docutils/writers/xetex/__init__.py; do
sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $file
done

iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp
mv tmp tools/editors/emacs/IDEAS.rst

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

# docutils setup.py runs 2to3 on a copy of the tests and puts it in sitelib.
rm -rf %{buildroot}%{python3_sitelib}/test


for file in %{buildroot}%_bindir/*.py; do
  mv $file %{buildroot}%_bindir/`basename $file .py`
done

# We want the licenses but don't need this build file
rm -f licenses/docutils.conf

%files -n python3-%{pypi_name}
%doc BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
%doc THANKS.txt licenses docs tools/editors
%{python3_sitelib}/*
%{_bindir}/docutils
%{_bindir}/rst2html
%{_bindir}/rst2html4
%{_bindir}/rst2html5
%{_bindir}/rst2latex
%{_bindir}/rst2man
%{_bindir}/rst2odt
%{_bindir}/rst2odt_prepstyles
%{_bindir}/rst2pseudoxml
%{_bindir}/rst2s5
%{_bindir}/rst2xetex
%{_bindir}/rst2xml
%{_bindir}/rstpep2html

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 147 |14mr|python-doxyqml-0.5.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name doxyqml

Summary:	Doxyqml lets you use Doxygen to document your QML classes
Name:		python-%{pypi_name}
Version:	0.5.3
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://agateau.com/projects/doxyqml/
Source0:	%{pypi_source}
BuildRequires:	python3-setuptools
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Doxyqml lets you use Doxygen to document your QML classes. It integrates
as a Doxygen input filter to turn .qml files into pseudo-C++ which Doxygen
can then use to generate documentation.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Doxyqml lets you use Doxygen to document your QML classes
Group:		Development/Python

%description -n python3-%{pypi_name}
Doxyqml lets you use Doxygen to document your QML classes. It integrates
as a Doxygen input filter to turn .qml files into pseudo-C++ which Doxygen
can then use to generate documentation.

%files -n python3-%{pypi_name}
%{_bindir}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}*.dist-info
%{python3_sitelib}/%{pypi_name}

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 148 |14mr|python-dulwich-1.2.15-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname dulwich
%global __provides_exclude_from ^(%{python3_sitearch}/.*\\.so)$
# rust/cargo build does not produce usable debugsource files
%global debug_package %nil

Name:           python-%{srcname}
Version:        1.2.15
Release:        1
Summary:        Python implementation of the Git file formats and protocols

License:        GPL-2.0-or-later OR Apache-2.0
URL:            https://www.dulwich.io/
Source0:        %{pypi_source}
# Generated with: cargo vendor && tar cfJ dulwich-vendor-1.2.15.tar.xz vendor
# .cargo/config.toml pointing to the vendor dir is generated on the fly by %%cargo_prep -v vendor
Source1:        dulwich-vendor-%{version}.tar.xz

BuildRequires:  python3-devel
BuildRequires:  cargo-rpm-macros

%description
Dulwich is a Python implementation of the Git file formats and
protocols. The project is named after the village in which Mr. and
Mrs. Git live in the Monty Python sketch.

%package -n python3-%{srcname}
Summary:        %{summary}

# Apache-2.0
# MIT OR Apache-2.0
# Unlicense OR MIT
License:        (GPL-2.0-or-later OR Apache-2.0) AND Apache-2.0 AND (MIT OR Apache-2.0) AND (Unlicense OR MIT)

%description -n python3-%{srcname}
Dulwich is a Python implementation of the Git file formats and
protocols. The project is named after the village in which Mr. and
Mrs. Git live in the Monty Python sketch.

# Unpackaged extras due to missing dependencies:
#  fuzzing: atheris
#  fastimport: fastimport
%global extras https,pgp,paramiko,colordiff,merge,patiencediff,aiohttp
%pyproject_extras_subpkg -n python3-%{srcname} %{extras}

%prep
%autosetup -n %{srcname}-%{version} -p1
tar -xf %{SOURCE1}
%cargo_prep -v vendor

%generate_buildrequires
%pyproject_buildrequires -x %{extras}

%build
%pyproject_wheel
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
rm -rf html/.{doctrees,buildinfo}

%install
%pyproject_install
%pyproject_save_files %{srcname}
# Remove extra copy of text docs
rm -rf %{buildroot}%{python3_sitearch}/docs/tutorial/

%files -n python3-%{srcname} -f %{pyproject_files}
%doc README.rst
%license COPYING
%license LICENSE.dependencies
%{_bindir}/dul-*
%{_bindir}/%{srcname}
%exclude %{python3_sitearch}/%{srcname}/tests*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 149 |14mr|python-durationpy-0.9-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Name:           python-durationpy
Version:        0.9
Release:        1
Summary:        Module for converting between datetime.timedelta and Go's Duration strings
Group:          Development/Python
License:        MIT
URL:            https://github.com/icholy/durationpy
Source0:        %{url}/archive/refs/tags/%{version}.tar.gz?/%{name}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3-pytest

%global _description %{expand:
Module for converting between datetime.timedelta and Go's Duration strings}

%description %_description

%package -n python3-durationpy
Summary:        %{summary}
Group:          Development/Python

%description -n python3-durationpy %_description

%prep
%autosetup -p1 -n durationpy-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%pyproject_save_files durationpy

%check
%pytest test.py

%files -n python3-durationpy -f %{pyproject_files}
%doc README.md
%license LICENSE


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 150 |14mr|python-ecdsa-0.19.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name ecdsa

Summary:	ECDSA cryptographic signature library (pure python)
Name:		python-ecdsa
Version:	0.19.0
Release:	3
License:	MIT
Group:		Development/Python
Url:		http://github.com/warner/python-ecdsa
Source0:	https://github.com/warner/python-ecdsa/archive/python-ecdsa-%{version}.tar.gz?/python-ecdsa-python-ecdsa-%{version}.tar.gz
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
This is an easy-to-use implementation of ECDSA cryptography
(Elliptic Curve Digital Signature Algorithm), implemented purely in Python,
released under the MIT license. With this library, you can quickly create
keypairs (signing key and verifying key), sign messages, and verify the
signatures. The keys and signatures are very short, making them easy to
handle and incorporate into other protocols.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	ECDSA cryptographic signature library (pure python)
Group:		Development/Python

%description -n python3-%{pypi_name}
This is an easy-to-use implementation of ECDSA cryptography
(Elliptic Curve Digital Signature Algorithm), implemented purely in Python,
released under the MIT license. With this library, you can quickly create
keypairs (signing key and verifying key), sign messages, and verify the
signatures. The keys and signatures are very short, making them easy to
handle and incorporate into other protocols.

%files -n python3-%{pypi_name}
%doc README.md LICENSE
%{python3_sitelib}/%{pypi_name}*

#----------------------------------------------------------------------------

%prep
%setup -q -n python-ecdsa-python-ecdsa-%{version}

# Remove extraneous #!
find . -name \*.py | xargs sed -ie '/\/usr\/bin\/env/d'

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 151 |14mr|python-enchant-3.2.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyenchant

Summary:	Python bindings for Enchant spellchecking library
Name:		python-enchant
Version:	3.2.2
Release:	1
License:	LGPL
Group:		Development/Python
Url:		https://pyenchant.github.io/pyenchant/
Source0:	%{pypi_source}
BuildRequires:	python3dist(setuptools)
BuildRequires:  pkgconfig(python3)
BuildArch:	noarch

%define _description %{expand:
PyEnchant is a spellchecking library for Python, based on the excellent Enchant
library.
PyEnchant combines all the functionality of the underlying Enchant library with
the flexibility of Python and a nice "Pythonic" object-oriented interface.
}

%description
%{_description}

#------------------------------------------------------------------------------

%package -n python3-enchant
Summary:	%{summary}
Provides:	PyEnchant = %{EVRD}
Provides:	python3-pyenchant = %{EVRD}
Requires:	enchant2

%description -n python3-enchant
%{_description}

%files -n python3-enchant
%doc README.rst Changelog
%license LICENSE.txt
%{python3_sitelib}/enchant
%{python3_sitelib}/*.egg-info

#------------------------------------------------------------------------------

%prep
%autosetup -p1 -n pyenchant-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 152 |14mr|python-et_xmlfile-1.1.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name et_xmlfile

Summary:	An implementation of lxml.xmlfile for the standard library
Name:		python-%{pypi_name}
Version:	1.1.0
Release:	2
License:	MIT
Group:		Development/Python
Url:		https://pypi.python.org/pypi/%{pypi_name}
Source0:	%{pypi_source}
BuildArch:	noarch

%description
et_xmlfile is a low memory library for creating large XML files. It is based
upon the xmlfile module from lxml with the aim of allowing code to be developed
that will work with both libraries. It was developed initially for the openpyxl
project but is now a standalone module.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	An implementation of lxml.xmlfile for the standard library
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
Requires:	python3-jdcal

%description -n python3-%{pypi_name}
et_xmlfile is a low memory library for creating large XML files. It is based
upon the xmlfile module from lxml with the aim of allowing code to be developed
that will work with both libraries. It was developed initially for the openpyxl
project but is now a standalone module.

%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/%{pypi_name}-*.dist-info/
%{python3_sitelib}/%{pypi_name}/

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
rm -rf *.dist-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 153 |14mr|python-evdev-1.7.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	pypi_name	evdev

Name:		python-%{pypi_name}
Version:	1.7.1
Release:	2
Summary:	Bindings to the Linux input handling subsystem
Group:		Development/Python
Url:		https://github.com/gvalkov/python-evdev
Source0:	%{pypi_source}
License:	Revised BSD License
BuildRequires:	python3-devel

%description
*evdev*
-------

This package provides bindings to the generic input event interface in
Linux. The *evdev* interface serves the purpose of passing events
generated in the kernel directly to userspace through character
devices that are typically located in ``/dev/input/``.

This package also comes with bindings to *uinput*, the userspace input
subsystem. *Uinput* allows userspace programs to create and handle
input devices that can inject events directly into the input
subsystem.

Documentation:
    http://python-evdev.readthedocs.io/en/latest/

Development:
    https://github.com/gvalkov/python-evdev

Package:
    http://pypi.python.org/pypi/evdev

Changelog:
    http://python-evdev.readthedocs.io/en/latest/changelog.html
#---------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	Bindings to the Linux input handling subsystem
Group:		Development/Python

%description -n python3-%{pypi_name}
*evdev*
-------

This package provides bindings to the generic input event interface in
Linux. The *evdev* interface serves the purpose of passing events
generated in the kernel directly to userspace through character
devices that are typically located in ``/dev/input/``.

This package also comes with bindings to *uinput*, the userspace input
subsystem. *Uinput* allows userspace programs to create and handle
input devices that can inject events directly into the input
subsystem.

Documentation:
    http://python-evdev.readthedocs.io/en/latest/

Development:
    https://github.com/gvalkov/python-evdev

Package:
    http://pypi.python.org/pypi/evdev

Changelog:
    http://python-evdev.readthedocs.io/en/latest/changelog.html

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc LICENSE
%doc README.md

#---------------------------------------------------------------


%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 154 |14mr|python-executing-2.1.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name executing

Summary:	Get the currently executing AST node of a frame, and other information
Name:		python-%{pypi_name}
Version:	2.1.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/alexmojaki/executing
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(asttokens)
BuildRequires:	python3egg(setuptools)
BuildRequires:	python3egg(setuptools-scm)
BuildRequires:	python3egg(toml)
BuildArch:	noarch

%description
This mini-package lets you get information about what a frame is currently
doing, particularly the AST node being executed.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Get the currently executing AST node of a frame, and other information
Group:		Development/Python

%description -n python3-%{pypi_name}
This mini-package lets you get information about what a frame is currently
doing, particularly the AST node being executed.

%files -n python3-%{pypi_name}
%license LICENSE*
%doc README*
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}*

#----------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%build
%py3_build

%install
%py3_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 155 |14mr|python-expandvars-0.12.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name expandvars

Name:           python-%{pypi_name}
Version:        0.12.0
Release:        1
Summary:        Expand system variables Unix style
Group:          Development/Python
License:        MIT
URL:            https://pypi.python.org/pypi/expandvars
Source0:        %{pypi_source}
BuildRequires:  pkgconfig(python3)
BuildArch:      noarch

%description
This module is inspired by GNU bash's variable expansion features. It can be
used as an alternative to Python's os.path.expandvars function.

#-----------------------------------------------------
%package -n python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name}
This module is inspired by GNU bash's variable expansion features. It can be
used as an alternative to Python's os.path.expandvars function.
#-----------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md
%license LICENSE



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 156 |14mr|python-fasteners-0.19-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name fasteners

Summary:	A python package that provides useful locks
Name:		python-%{pypi_name}
Version:	0.19
Release:	2
License:	ASL 2.0
Group:		Development/Python
Url:		https://github.com/harlowja/fasteners
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(wheel)
BuildRequires:	python3dist(pip)
BuildArch:	noarch

%description
Python standard library provides a lock for threads (both a reentrant one,
and a non-reentrant one, see below). Fasteners extends this, and provides a
lock for processes, as well as Reader Writer locks for both threads and
processes.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A python package that provides useful locks
Group:		Development/Python

%description -n python3-%{pypi_name}
Python standard library provides a lock for threads (both a reentrant one,
and a non-reentrant one, see below). Fasteners extends this, and provides a
lock for processes, as well as Reader Writer locks for both threads and
processes.

%files -n python3-%{pypi_name}
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}*-info/

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 157 |14mr|python-filelock-3.15.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name filelock

Name:		python-%{pypi_name}
Version:	3.15.4
Release:	1
Summary:	A platform independent file lock
Group:		Development/Python
License:	Unlicense
URL:		https://github.com/benediktschmitt/py-filelock
Source0:	%{pypi_source}
BuildArch:	noarch
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros

%description
This package contains a single module, which implements a platform independent
file locking mechanism for Python.

The lock includes a lock counter and is thread safe. This means, when locking
the same lock object twice, it will not block.

#-----------------------------------------------
%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name}
This package contains a single module, which implements a platform independent
file locking mechanism for Python.

The lock includes a lock counter and is thread safe. This means, when locking
the same lock object twice, it will not block.

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{python3_sitelib}/%{pypi_name}/*
%{python3_sitelib}/%{pypi_name}-%{version}*-info

#-----------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 158 |14mr|python-flask-3.0.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	pypi_name	flask

Name:		python-%{pypi_name}
Version:	3.0.3
Release:	1
Summary:	A microframework based on Werkzeug, Jinja2 and good intentions
Group:		Development/Python
License:	BSD
Url:		http://github.com/mitsuhiko/flask/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
Flask
-----
Flask is a microframework for Python based on Werkzeug, Jinja 2 and good
intentions.

#-------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	A microframework based on Werkzeug, Jinja2 and good intentions
Group:		Development/Python

BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(click)
BuildRequires:	python3dist(itsdangerous) >= 2.0.0
BuildRequires:	python3dist(jinja2) >= 3.0
BuildRequires:	python3dist(werkzeug) >= 2.2
Requires:	python3dist(itsdangerous) >= 2.0.0
Requires:	python3dist(jinja2) >= 3.0
Requires:	python3dist(werkzeug) >= 2.0

%description -n python3-%{pypi_name}
Flask
-----
Flask is a microframework for Python based on Werkzeug, Jinja 2 and good
intentions.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc docs examples
%{_bindir}/flask
#-------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 159 |14mr|python-flit-3.12.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# circular build dependency on requests-download and testpath
%bcond_with tests

%global srcname flit

Name:		python-%{srcname}
Version:	3.12.0
Release:	1
Summary:	Simplified packaging of Python modules
Group:		Development/Python
# ./flit/log.py under ASL 2.0 license
# ./flit/upload.py under PSF license
License:	BSD and ASL 2.0 and Python

URL:		https://flit.readthedocs.io/en/latest/
Source0:	https://github.com/takluyver/flit/archive/%{version}/%{srcname}-%{version}.tar.gz

# For the tests
Source1:	https://pypi.org/pypi?%3Aaction=list_classifiers#/classifiers.lst

BuildArch:	noarch
BuildRequires:	python3-devel
BuildRequires:	pyproject-rpm-macros >= 0-40
BuildRequires:	python3-pip

# Runtime deps needed to build self
BuildRequires:	python3-tomli

%if %{with tests}
# Runtime deps, others
BuildRequires:	python3-requests
BuildRequires:	python3-docutils
BuildRequires:	python3-pygments
BuildRequires:	python3-tomli-w

# Test deps
BuildRequires:	/usr/bin/python
BuildRequires:	python3-pytest
BuildRequires:	python3-responses

# Test deps that require flit to build:
BuildRequires:	python3-testpath
BuildRequires:	python3-requests-download
%endif

%global _description %{expand:
Flit is a simple way to put Python packages and modules on PyPI.

Flit only creates packages in the new 'wheel' format. People using older
versions of pip (<1.5) or easy_install will not be able to install them.

Flit packages a single importable module or package at a time, using the import
name as the name on PyPI. All sub-packages and data files within a package are
included automatically.

Flit requires Python 3, but you can use it to distribute modules for Python 2,
so long as they can be imported on Python 3.}

%description %_description

#------------------------------------------------------------------------------

%package -n python3-%{srcname}
Summary:	%{summary}
Group:		Development/Python
Requires:	python3-%{srcname}-core = %{version}-%{release}

# https://pypi.python.org/pypi/tornado
# ./flit/log.py unknown version
Provides:	bundled(python3dist(tornado))

# soft dependency: (WARNING) Cannot analyze code. Pygments package not found.
Recommends:	python3-pygments

%description -n python3-%{srcname} %_description

%files -n python3-%{srcname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/flit-*.dist-info/
%{python3_sitelib}/flit/
%{_bindir}/flit

#------------------------------------------------------------------------------

%package -n python3-%{srcname}-core
Summary:	PEP 517 build backend for packages using Flit
Group:		Development/Python
Conflicts:	python3-%{srcname} < 2.1.0-2
# We manually specify this, because it's bundled upstream and not in the metadata
Requires:       python3-tomli

%description -n python3-%{srcname}-core
This provides a PEP 517 build backend for packages using Flit.
The only public interface is the API specified by PEP 517,
at flit_core.buildapi.

%files -n python3-%{srcname}-core
%license LICENSE
%doc flit_core/README.rst
%{python3_sitelib}/flit_core-*.dist-info/
%{python3_sitelib}/flit_core/

#------------------------------------------------------------------------------
%prep
%autosetup -p1 -n %{srcname}-%{version}

# Remove vendored tomli that flit_core includes to solve the circular dependency.
# (flit_core requires tomli, but flit_core is needed to build tomli).
# We don't use this, as python3-tomli already has its own bootstrap bcond
# to build without flit_core.
#
# flit's tests already require tomli, so we're pulling it in at buildtime anyways.
# Удаляем проблемные glob patterns из pyproject.toml
sed -i "/^license-files/c\license-files = ['LICENSE']" flit_core/pyproject.toml
sed -i 's|from \.vendor import tomli|import tomli|' flit_core/flit_core/config.py
rm -rf flit_core/flit_core/vendor
# Копируем основной LICENSE файл на место
cp LICENSE flit_core/

%build
export FLIT_NO_NETWORK=1

# first, build flit_core with self
cd flit_core
%pyproject_wheel
cd -

# build of the main flit (needs flit_core)
export PYTHONPATH=$PWD:$PWD/flit_core
%pyproject_wheel

%install
%pyproject_install

# don't ship tests in flit_core package
# if upstream decides to change the installation, it can be removed:
# https://github.com/takluyver/flit/issues/403
# rm -r %{buildroot}%{python3_sitelib}/flit_core/tests/

%if %{with tests}
%check
# flit attempts to download list of classifiers from PyPI, but not if it's cached
# test_invalid_classifier fails without the list
mkdir -p fake_cache/flit
cp %{SOURCE1} fake_cache/flit
export XDG_CACHE_HOME=$PWD/fake_cache

%pytest
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 160 |14mr|python-frozenlist-1.8.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name frozenlist
%global debug_package %nil

Summary:	A list-like structure which implements collections.abc.MutableSequence
Name:		python-%{pypi_name}
Version:	1.8.0
Release:	1
License:	ASL 2.0
Group:		Development/Python
Url:		https://github.com/aio-libs/frozenlist
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-setuptools

%description
A list-like structure which implements collections.abc.MutableSequence.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A list-like structure which implements collections.abc.MutableSequence
Group:		Development/Python

%description -n python3-%{pypi_name}
A list-like structure which implements collections.abc.MutableSequence.

%files -n python3-%{pypi_name}
%doc CHANGES.rst CONTRIBUTORS.txt README.rst LICENSE
%{python3_sitearch}/*

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

# Remove Cython-generated sources; we must ensure they are regenerated.
find . -type f -name '*.c' -print -delete
 
# Patch out coverage-related pytest options:
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
sed --regexp-extended --in-place \
    's/^([[:blank:]]*)(.*[-_]cov)/\1# \2/' pytest.ini

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 161 |14mr|python-funcsigs-1.0.2-6
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name funcsigs

Name:           python-funcsigs
Version:        1.0.2
Release:        6
Summary:        Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+
Group:          Development/Python
License:        ASL
URL:            http://funcsigs.readthedocs.org/
Source0:        http://pypi.python.org/packages/source/f/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3-setuptools

%description
funcsigs is a backport of the PEP 362 function signature features from
Python 3.3’s inspect pypi_name.

#-----------------------------------------------------
%package -n python3-funcsigs
Summary:        Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+
Group:          Development/Python

%description -n python3-funcsigs
funcsigs is a backport of the PEP 362 function signature features from
Python 3.3’s inspect module.

%files -n python3-funcsigs
%doc docs/ README.rst PKG-INFO
%{python3_sitelib}/*

#-----------------------------------------------------
%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 162 |14mr|python-future-1.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name future

Summary:	Clean single-source support for Python 3 and 2
Name:		python-future
Version:	1.0.0
Release:	1
License:	MIT
Group:		Development/Python
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
Easy, safe support for Python 3/2 compatibility.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Clean single-source support for Python 3 and 2
Group:		Development/Python

%description -n python3-%{pypi_name}
Easy, safe support for Python 3/2 compatibility.

%files -n python3-%{pypi_name}
%doc README.rst docs/_themes/LICENSE LICENSE.txt
%{_bindir}/futurize
%{_bindir}/pasteurize
%{python3_sitelib}/%{pypi_name}-*.dist-info
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/past
%{python3_sitelib}/libfuturize
%{python3_sitelib}/libpasteurize

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 163 |14mr|python-gast-0.6.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name gast

Name:           python-%{pypi_name}
Version:	0.6.0
Release:	1
Summary:        Python AST that abstracts the underlying Python version
Group:          Development/Python
License:        BSD 3-Clause
URL:            https://github.com/serge-sans-paille/gast/
Source0:	%{pypi_source}
BuildArch:      noarch

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)

%description
A generic AST to represent Python3's Abstract Syntax Tree(AST). GAST provides a
compatibility layer between the AST of various Python versions, as produced by
ast.parse from the standard ast module.
#---------------------------------------------------

%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name}
A generic AST to represent Python3's Abstract Syntax Tree(AST). GAST provides a
compatibility layer between the AST of various Python versions, as produced by
ast.parse from the standard ast module.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst

#---------------------------------------------------
%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}




@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 164 |14mr|python-gettext-5.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module gettext

Summary:	Python Gettext po to mo file compiler
Name:		python-%{module}
Version:	5.0
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://pypi.org/project/python-gettext
Source0:	https://pypi.io/packages/source/p/python-gettext/%{name}-%{version}.tar.gz
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
This implementation of Gettext for Python includes a Msgfmt class which can be
used to generate compiled mo files from Gettext po files and includes support
for the newer msgctxt keyword.

#------------------------------------------------------------------

%package -n python3-%{module}
Summary:	Python 3 Gettext po to mo file compiler
Group:		Development/Python
BuildArch:	noarch

%description -n	python3-%{module}
This implementation of Gettext for Python 3 includes a Msgfmt class which can
be used to generate compiled mo files from Gettext po files and includes
support for the newer msgctxt keyword.

%files -n python3-%{module}
%doc CHANGES.rst README.rst
%license LICENSE.rst
%{python3_sitelib}/pythongettext/
%{python3_sitelib}/python_gettext-*.dist-info/

#------------------------------------------------------------------

%prep
%autosetup -p1

# Remove bundled egg-info
rm -rf python_gettext.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 165 |14mr|python-gitdb-4.0.12-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name gitdb
%define debug_package	%{nil}

Name:		python-%{pypi_name}
Version:	4.0.12
Release:	1
Summary:	Git Object Database
License:	BSD
Group:		Development/Python
Url:		https://pypi.python.org/pypi/gitdb
Source0:	%{pypi_source}

%description
GitDB is a Python git object database.

#-----------------------------------------------------------

%package -n python3-gitdb
Summary:	A pure-Python 3 git object database
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(nose)
BuildRequires:	python3dist(async)
BuildRequires:	python3dist(smmap)
#gitdb2 project its a mirror if gitdb
Provides:	python3dist(gitdb2) = %{EVRD}
Provides:	python3-gitdb2 = %{EVRD}
Requires:	python3dist(async)
BuildArch:	noarch

%description -n python3-gitdb
GitDB allows you to access bare git repositories for reading and writing. It
aims at allowing full access to loose objects as well as packs with performance
and scalability in mind. It operates exclusively on streams, allowing to
operate on large objects with a small memory footprint.

This is the Python 3 version of the package.

%files -n python3-gitdb
%doc AUTHORS LICENSE
%{python3_sitelib}/gitdb*

#-----------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 166 |14mr|python-glad-2.0.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name glad

Name:		python-%{pypi_name}
Version:	2.0.4
Release:	1
Summary:	Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator
Group:		Development/Python
License:	MIT and ASL 2.0
Url:		https://github.com/Dav1dde/glad
Source0:	https://github.com/Dav1dde/glad/archive/refs/tags/v%{version}/glad-%{version}.tar.gz
Source1:	python-glad.rpmlintrc
BuildRequires:	python3-setuptools
Requires:	python3-setuptools_scm
BuildArch:	noarch

%description
Glad uses the official Khronos-XML specs to generate a GL/GLES/EGL/GLX/WGL
Loader made for your needs.

#---------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator

%description -n python3-%{pypi_name}
Glad uses the official Khronos-XML specs to generate a GL/GLES/EGL/GLX/WGL
Loader made for your needs.

%files -n python3-%{pypi_name}
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/glad2-%{version}-py*.*.egg-info/

#---------------------------------------------------------------------------

%package -n %{pypi_name}
Summary:	Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator
Requires:	python3-%{pypi_name} = %{EVRD}

%description -n %{pypi_name}
Glad uses the official Khronos-XML specs to generate a GL/GLES/EGL/GLX/WGL
Loader made for your needs.

%files -n %{pypi_name}
%{_bindir}/glad

#---------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

# Fix shebang
sed -i -e '/^#!\//, 1d' %{pypi_name}/__main__.py

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 167 |14mr|python-gnupg-0.5.3-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name python-gnupg
%define module_name gnupg

Summary:	A Python wrapper for GnuPG
Name:		python-%{module_name}
Version:	0.5.3
Release:	3
Epoch:		2
License:	BSD
Group:		Development/Python
Url:		https://github.com/vsajip/python-gnupg
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3-pip
BuildRequires:	python3-tomli
BuildRequires:	python3-psutil
BuildRequires:	python3-devel
BuildRequires:	python3-wheel

Requires:	gnupg2
BuildArch:	noarch

%description
This module implements a Python library which takes care of the internal
details and allows its users to generate and manage keys, encrypt and
decrypt data, and sign and verify messages.

#----------------------------------------------------------------------------
%package -n python3-%{module_name}
Summary:	A Python wrapper for GnuPG
Group:		Development/Python

%description -n python3-%{module_name}
This module implements a Python3 library which takes care of the internal
details and allows its users to generate and manage keys, encrypt and
decrypt data, and sign and verify messages.

%files -n python3-%{module_name}  -f %{pyproject_files}
%doc LICENSE.txt README.rst

#---------------------------------------------------------------------------

%generate_buildrequires
%pyproject_buildrequires -r

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{module_name}
# rm -f %{buildroot}/%{_bindir}/versioneer.py

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 168 |14mr|python-gobject3-3.58.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname pygobject
%define pycapi_commit 22811c3f0e69908894d2bd724f572b32667f2141

%define api 3.0
%define major 0

%global __provides_exclude_from ^%{py2_platsitedir}/gi/_gobject/__init__.py
# Disable useless provides ('_gi.so' and similar)
%global __provides_exclude .*_.*\.so
%global __requires_exclude typelib.*GIMarshallingTests.*|typelib.*Vte.*|typelib.*Gst.*|typelib.*WebKit.*|typelib.*namespace.*|typelib.*GioWin32.*
%global __provides_exclude_from ^(%{python3_sitearch})/(pygtkcompat|gi/pygtkcompat.py|gi/_gobject/__init__.py|gi/module.py|gi/__init__.py|gi/overrides/GIMarshallingTests.py)
%global __requires_exclude_from ^(%{python3_sitearch})/(pygtkcompat|gi/pygtkcompat.py|gi/_gobject/__init__.py|gi/module.py|gi/__init__.py|gi/overrides/GIMarshallingTests.py)

%bcond_without python3
%bcond_without webkit

Summary:	Python bindings for GObject Introspection
Name:		python-gobject3
Version:	3.58.0
Release:	1
License:	LGPLv2+ and MIT
Group:		Development/Python
Url:		https://download.gnome.org/sources/pygobject
Source0:	https://github.com/GNOME/pygobject/archive/%{version}.tar.gz?/%{oname}-%{version}.tar.gz
Source1:	https://github.com/python/pythoncapi-compat/archive/%{pycapi_commit}.tar.gz?/pythoncapi-compat-%{pycapi_commit}.tar.gz
BuildRequires:	meson
BuildRequires:	pkgconfig(glib-2.0)
BuildRequires:	pkgconfig(gobject-introspection-1.0)
BuildRequires:	pkgconfig(libffi)
BuildRequires:	pkgconfig(py3cairo)
BuildRequires:	pkgconfig(python3)

%description
The %{name} package provides a convenient wrapper for the GObject
library for use in Python programs.

#----------------------------------------------------------------------------

%package -n python3-gi
Summary:	Python 3 bindings for GObject Introspection
Group:		Development/Python
Provides:	python3-gobject-introspection = %{EVRD}
Provides:	python3-gobject3-introspection = %{EVRD}
Provides:	python3-gobject3 = %{EVRD}
Requires:	gobject-introspection
Requires:	typelib(Vte)
%if %{with webkit}
Requires:	typelib(WebKit2)
%endif

%description -n python3-gi
This package contains the Python 3 GObject Introspection bindings.

%files -n python3-gi
%{python3_sitearch}/gi
%exclude %{python3_sitearch}/gi/_gi_cairo*.so

#----------------------------------------------------------------------------

%package -n python3-gi-cairo
Summary:	Python3-gi bindings for Cairo
Group:		Development/Python
Requires:	python3-gi = %{EVRD}
Requires:	typelib(PangoCairo)
Requires:	python3-cairo
Provides:	python3-gobject-cairo = %{EVRD}

%description -n python3-gi-cairo
This package contains the Python-gi Cairo bindings.

%files -n python3-gi-cairo
%{python3_sitearch}/gi/_gi_cairo*.so
%{python3_sitearch}/PyGObject-%{version}*.dist-info

#----------------------------------------------------------------------------

%package -n python3-gobject3-devel
Summary:	Python-gobject development files
Group:		Development/C
Requires:	python3-gi-cairo = %{EVRD}
Provides:	python3-gobject3-devel = %{EVRD}
Provides:	python3-gobject-devel = %{EVRD}

%description -n python3-gobject3-devel
This contains the python2-gobject development files, including C
header, pkg-config file.

%files -n python3-gobject3-devel
%{_libdir}/pkgconfig/%{oname}-%{api}.pc
%{_includedir}/%{oname}-%{api}/%{oname}*.h

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{oname}-%{version} -a1
mkdir -p subprojects/pythoncapi-compat
cp -r pythoncapi-compat-%{pycapi_commit}/* subprojects/pythoncapi-compat

%generate_buildrequires
%pyproject_buildrequires

%build
export CFLAGS="%{optflags} -lpython%{python3_version}"
export LDFLAGS="%{optflags} -lpython%{python3_version}"
%meson -Dtests=false
%meson_build

%install
%meson_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 169 |14mr|python-google-auth-2.29.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name google-auth

Summary:	Google Authentication Library
Name:		python-google-auth
Version:	2.29.0
Release:	1
License:	ASLv2
Group:		Development/Python
Url:		https://github.com/googleapis/google-auth-library-python
Source0:	%{pypi_source}
BuildArch:	noarch
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(cachetools) >= 2.0.0
BuildRequires:	python3dist(mock)
BuildRequires:	python3dist(pyasn1-modules) >= 0.2.1
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(rsa) >= 3.1.4
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(six) >= 1.9.0
Requires:	python3dist(cachetools) >= 2.0.0
Requires:	python3dist(pyasn1-modules) >= 0.2.1
Requires:	python3dist(rsa) >= 3.1.4

%description
Google Auth Python Library simplifies using Google's various server-to-server
authentication mechanisms to access Google.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Google Authentication Library
Group:		Development/Python

%description -n python3-%{pypi_name}
Google Auth Python Library simplifies using Google's various server-to-server
authentication mechanisms to access Google.

%files -n python3-%{pypi_name}
%doc LICENSE
%doc README.rst
%{python3_sitelib}/google
%{python3_sitelib}/google_auth-*.dist-info

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 170 |14mr|python-gssapi-1.8.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name gssapi

Summary:	Python Bindings for GSSAPI (RFC 2743/2744 and extensions)
Name:		python-%{pypi_name}
Version:	1.8.3
Release:	1
License:	ISC
Group:		Development/Python
Url:		https://github.com/pythongssapi/python-gssapi
Source0:	https://github.com/pythongssapi/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(krb5)
BuildRequires:	python3dist(cython)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pyproject-rpm-macros

%description
A set of Python bindings to the GSSAPI C library providing both
a high-level pythonic interfaces and a low-level interfaces
which more closely matches RFC 2743.  Includes support for
RFC 2743, as well as multiple extensions.

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python Bindings for GSSAPI (RFC 2743/2744 and extensions)
Group:		Development/Python
Requires:	krb5-libs
Requires:	python3-decorator
Requires:	python3-six

%description -n python3-%{pypi_name}
A set of Python bindings to the GSSAPI C library providing both
a high-level pythonic interfaces and a low-level interfaces
which more closely matches RFC 2743.  Includes support for
RFC 2743, as well as multiple extensions.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc LICENSE.txt README.txt

#------------------------------------------------------------------

%prep
%autosetup -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%pyproject_save_files gssapi


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 171 |14mr|python-h2-4.1.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name h2

Name:       python-%{pypi_name}
Version:    4.1.0
Release:    1
Summary:    HTTP/2 State-Machine based protocol implementation
Group:      Development/Python
License:    MIT
URL:        https://pypi.python.org/pypi/h2
Source0:    https://pypi.io/packages/source/h/h2/%{pypi_name}-%{version}.tar.gz
BuildArch:  noarch

%description
This module contains a pure-Python implementation of a HTTP/2 protocol stack.
It’s written from the ground up to be embeddable in whatever program
you choose to use, ensuring that you can speak HTTP/2 regardless of
your programming paradigm.

%package -n python3-%{pypi_name}
Summary:        HTTP/2 State-Machine based protocol implementation
Group:          Development/Python
BuildArch:      noarch
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(setuptools)

%description -n python3-%{pypi_name}
This module contains a pure-Python implementation of a HTTP/2 protocol stack.
It’s written from the ground up to be embeddable in whatever program
you choose to use, ensuring that you can speak HTTP/2 regardless of
your programming paradigm.

This is the Python 3 version of the package.

%prep
%setup -q -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%files -n python3-%{pypi_name}
%doc LICENSE README.rst
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}*-info/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 172 |14mr|python-hamcrest-2.0.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global modname hamcrest
%global pypi_name pyhamcrest

Name:           python-%{modname}
Version:        2.0.4
Release:        1
Summary:        Hamcrest matchers for Python
Group:          Development/Python
License:        BSD
URL:            https://github.com/hamcrest/PyHamcrest
Source0:        %{pypi_source}

# https://github.com/hamcrest/PyHamcrest/commit/37a4d0dbeb9a92b959edfb9b1aceba4eaacf9f78
Patch0001:      0001-Add-boolean-matchers.patch

BuildArch:      noarch

%global _description \
PyHamcrest is a framework for writing matcher objects, allowing you to\
declaratively define "match" rules. There are a number of situations where\
matchers are invaluable, such as UI validation, or data filtering, but it is\
in the area of writing flexible tests that matchers are most commonly used.

%description %{_description}

#-----------------------------------------------------
%package -n python3-%{modname}
Summary:        %{summary}
BuildRequires:  python3-devel
Requires:       python3-six

%description -n python3-%{modname} %{_description}

Python 3 version.

%files -n python3-%{modname}
%{python3_sitelib}/%{pypi_name}-%{version}*info/
%{python3_sitelib}/%{modname}/

#-----------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 173 |14mr|python-hatch-fancy-pypi-readme-23.2.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-hatch-fancy-pypi-readme
Version:        23.2.0
Release:        1
Summary:        Hatch plugin for writing fancy PyPI readmes
Group:          Development/Python
License:        MIT
URL:            https://github.com/hynek/hatch-fancy-pypi-readme
Source0:        %{pypi_source hatch_fancy_pypi_readme}

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros

%global common_description %{expand:
This provides a Hatch metadata plugin for everyone who cares about the
first impression of their project’s PyPI landing page. It allows you to
define your PyPI project description in terms of concatenated fragments
that are based on static strings, files, and most importantly: parts of
files defined using cut-off points or regular expressions.}

%description %{common_description}

#---------------------------------------------------------------
%package -n python3-hatch-fancy-pypi-readme
Summary:        %{summary}
Group:          Development/Python

%description -n python3-hatch-fancy-pypi-readme %{common_description}

%files -n python3-hatch-fancy-pypi-readme -f %{pyproject_files}
%license LICENSE.txt
%doc README.md
%{_bindir}/hatch-fancy-pypi-readme

#---------------------------------------------------------------
%prep
%autosetup -n hatch_fancy_pypi_readme-%{version} -p1

# https://github.com/hynek/hatch-fancy-pypi-readme/commit/6c06d7244183c5b71aed905c9950e3206e5f0a9e
# Drop unwanted build dependencies that upstream already dropped
sed -i 's/ \"pytest-icdiff\", \"coverage\[toml\]\", //g' pyproject.toml

%generate_buildrequires
%pyproject_buildrequires -x tests

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files hatch_fancy_pypi_readme

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 174 |14mr|python-hatch-vcs-0.4.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Let’s try to build this as early as we can, since it’s a dependency for
# python-userpath.
%bcond_without bootstrap
%if %{without bootstrap}
%bcond_without tests
%else
%bcond_with tests
%endif

Name:           python-hatch-vcs
Version:        0.4.0
Release:        1
Summary:        Hatch plugin for versioning with your preferred VCS
Group:          Development/Python
License:        MIT
URL:            https://github.com/ofek/hatch-vcs
Source0:        %{pypi_source hatch_vcs}
BuildArch:      noarch

BuildRequires:  python3-devel
# RHBZ#1985340, RHBZ#2076994
BuildRequires:  pyproject-rpm-macros >= 1.2.0
BuildRequires:	python3-pip
BuildRequires:	python3-setuptools
BuildRequires:	python3-setuptools_scm

%if %{with tests}
BuildRequires:  python3dist(pytest)
BuildRequires:  git-core
%endif

%global common_description %{expand:
This provides a plugin for Hatch that uses your preferred version control
system (like Git) to determine project versions.}

%description %{common_description}

#--------------------------------------------------------------
%package -n python3-hatch-vcs
Summary:        %{summary}
Group:          Development/Python

%description -n python3-hatch-vcs %{common_description}

%files -n python3-hatch-vcs -f %{pyproject_files}
%license LICENSE.txt
%doc HISTORY.md
%doc README.md

#--------------------------------------------------------------
%prep
%autosetup -n hatch_vcs-%{version} -p1


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files hatch_vcs


%check
%if %{with tests}
%pytest
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 175 |14mr|python-hiq-1.1.12-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name hiq-python

Summary:	HiQ is a declarative, non-intrusive, dynamic and transparent tracking system
Name:		python-hiq
Version:	1.1.12
Release:	1
License:	GPL
Group:		Development/Python
Url:		https://github.com/oracle/hiq
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
HiQ is a declarative, non-intrusive, dynamic and transparent
tracking system for both monolithic application and distributed system.
It brings the runtime information tracking and optimization to a new
level without compromising with speed and system performance,
or hiding any tracking overhead information. HiQ applies for
both I/O bound and CPU bound applications. In addition to latency
tracking, HiQ provides memory, disk I/O and Network I/O tracking
out of the box. The output can be saved in form of normal
line by line log file, or HiQ tree, or span graph.

#------------------------------------------------------------------

%package -n python3-hiq
Summary:	%{summary}
Group:		Development/Python

%description -n python3-hiq
HiQ is a declarative, non-intrusive, dynamic and transparent
tracking system for both monolithic application and distributed system.
It brings the runtime information tracking and optimization to a new
level without compromising with speed and system performance,
or hiding any tracking overhead information. HiQ applies for
both I/O bound and CPU bound applications. In addition to latency
tracking, HiQ provides memory, disk I/O and Network I/O tracking
out of the box. The output can be saved in form of normal
line by line log file, or HiQ tree, or span graph.

%files -n python3-hiq
%doc README.md
%{python3_sitelib}/hiq
%{python3_sitelib}/hiq_python-%{version}-py*.egg-info

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 176 |14mr|python-hyperframe-6.0.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module hyperframe

Name:       python-%{module}
Version:	6.0.1
Release:	2
Summary:    HTTP/2 framing layer for Python
Group:      Development/Python
License:    MIT
URL:        http://hyper.rtfd.org/
Source0:	https://files.pythonhosted.org/packages/5a/2a/4747bff0a17f7281abe73e955d60d80aae537a5d203f417fa1c2e7578ebb/hyperframe-6.0.1.tar.gz
BuildArch:  noarch

%description
This library contains the HTTP/2 framing code used in the hyper project.
It provides a pure-Python codebase that is capable of decoding a binary
stream into HTTP/2 frames.

This library is used directly by hyper and a number of other projects
to provide HTTP/2 frame decoding logic.

%package -n python3-%{module}
Summary:        HTTP/2 framing layer for Python 3
Group:          Development/Python
BuildArch:      noarch
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(setuptools)

%description -n    python3-%{module}
This library contains the HTTP/2 framing code used in the hyper project.
It provides a pure-Python codebase that is capable of decoding a binary
stream into HTTP/2 frames.

This library is used directly by hyper and a number of other projects
to provide HTTP/2 frame decoding logic.

This is the Python 3 version of the package.

%prep
%setup -q -n %{module}-%{version}

# Remove bundled egg-info
rm -rf %{module}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%files -n python3-%{module}
%doc CONTRIBUTORS.rst LICENSE README.rst
%{python3_sitelib}/%{module}/
%{python3_sitelib}/%{module}-*.dist-info/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 177 |14mr|python-hyperlink-21.0.0-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name hyperlink

Summary:	A featureful, immutable, and correct URL for Python
Name:		python-%{pypi_name}
Version:	21.0.0
Release:	4
License:	BSD
Group:		Development/Python
Url:		https://pypi.org/project/hyperlink/
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
Hyperlink is a featureful, pure-Python implementation of the URL,
with an emphasis on correctness.

#------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A featureful, correct URL for Python
Group:		Development/Python
BuildArch:	noarch

%description -n python3-%{pypi_name}
Hyperlink is a featureful, pure-Python implementation of the URL,
with an emphasis on correctness.

%files -n python3-%{pypi_name}
%doc CHANGELOG.md LICENSE README.md
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-*.dist-info/

#------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 178 |14mr|python-hypothesis-6.151.9-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name hypothesis

Summary:	A library for property based testing
Name:		python-%{pypi_name}
Version:	6.151.9
Release:	1
License:	MPLv2.0
Group:		Development/Python
Url:		https://github.com/DRMacIver/hypothesis
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-setuptools
BuildArch:	noarch

%description
Hypothesis is a library for testing your Python code against a much
larger range of examples than you would ever want to write by
hand. It’s based on the Haskell library, Quickcheck, and is designed
to integrate seamlessly into your existing Python unit testing work
flow.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A library for property based testing
Group:		Development/Python
Recommends:	python3-numpy
Recommends:	python3-pytz

%description -n python3-%{pypi_name}
Hypothesis is a library for testing your Python code against a much
larger range of examples than you would ever want to write by
hand. It’s based on the Haskell library, Quickcheck, and is designed
to integrate seamlessly into your existing Python unit testing work
flow.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%{_bindir}/hypothesis
#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}
%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files -l hypothesis '_hypothesis_*'

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 179 |14mr|python-idna-3.19-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname idna

Name:           python-%{srcname}
Version:        3.19
Release:        1
Summary:        Internationalized Domain Names in Applications (IDNA)

License:        BSD-3-Clause
URL:            https://github.com/kjd/idna
Source:         https://pypi.io/packages/source/i/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python3-devel

%description
A library to support the Internationalised Domain Names in Applications (IDNA)
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>.  This
version of the protocol is often referred to as "IDNA2008" and can produce
different results from the earlier standard from 2003.

The library is also intended to act as a suitable drop-in replacement for the
"encodings.idna" module that comes with the Python standard library but
currently only supports the older 2003 specification.

%package -n python3-%{srcname}
Summary:        Internationalized Domain Names in Applications (IDNA)

%description -n python3-%{srcname}
A library to support the Internationalised Domain Names in Applications (IDNA)
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>.  This
version of the protocol is often referred to as "IDNA2008" and can produce
different results from the earlier standard from 2003.

The library is also intended to act as a suitable drop-in replacement for the
"encodings.idna" module that comes with the Python standard library but
currently only supports the older 2003 specification.

%prep
%autosetup -p1 -n %{srcname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{srcname}

%files -n python3-%{srcname} -f %pyproject_files
%license LICENSE.md
%doc README.md
%{_bindir}/%{srcname}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 180 |14mr|python-ifaddr-0.2.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name ifaddr
%global _description \
ifaddr is a small Python library that allows you to find all the IP addresses\
of the computer.

Name:		python-%{pypi_name}
Version:	0.2.0
Release:	2
Summary:	Python library that allows you to find all the IP addresses of the computer
Group:		Development/Python
License:	MIT
URL:		https://pypi.org/project/ifaddr/
Source:		%{pypi_source}
BuildArch:      noarch

%description %{_description}

#------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools

%description -n python3-%{pypi_name} %{_description}

Python 3 version.

%files -n python3-%{pypi_name}
%license LICENSE.txt
%doc README.rst
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-*.dist-info/

#------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 181 |14mr|python-imagesize-2.0.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_with tests

%global pypi_name imagesize
%global sum  Python module for analyzing image file headers and returning image sizes

Name:           python-%{pypi_name}
Version:        2.0.0
Release:        3
Summary:        %{sum}

License:        MIT
URL:            https://github.com/shibukawa/imagesize_py
Source0:        https://files.pythonhosted.org/packages/source/i/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-setuptools
BuildRequires:  python%{python3_pkgversion}-devel
%if %{with tests}
BuildRequires:  python%{python3_pkgversion}-pytest
%endif

%description
The imagesize package parses image file headers and returns the image sizes.

* PNG
* JPEG
* JPEG2000
* GIF

This is a pure Python library.

%package -n     python%{python3_pkgversion}-%{pypi_name}
Summary:        %{sum}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}

%description -n python%{python3_pkgversion}-%{pypi_name}
The imagesize package parses image file headers and returns the image sizes.

* PNG
* JPEG
* JPEG2000
* GIF

This is a pure Python library.

%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

# Allow building with Python 3.15
sed -E -i 's/,<3\.15//' setup.py

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files -l %{pypi_name}

%check
%pyproject_check_import
%if %{with tests}
# test_get_filelike requires internet connection, hence we disable it
%pytest -v -k 'not test_get_filelike'
%endif

%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
%doc README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 182 |14mr|python-incremental-22.10.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name incremental

Summary:	Library for versioning Python projects
Name:		python-incremental
Version:	22.10.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://pypi.org/project/incremental/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
Library for versioning Python projects.

#----------------------------------------------------------------------------

%package -n python3-incremental
Summary:	Library for versioning Python 3 projects
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(typing)
BuildArch:	noarch

%description -n python3-incremental
Library for versioning Python 3 projects.

%files -n python3-incremental
%{python3_sitelib}/incremental
%{python3_sitelib}/incremental-*.dist-info/

#----------------------------------------------------------------------------

%prep
%setup -qn incremental-%{version}
%autopatch -p1


%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 183 |14mr|python-iniconfig-2.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name iniconfig

Name:		python-iniconfig
Version:	2.0.0
Release:	1
Summary:	Brain-dead simple parsing of ini files
Group:		Development/Python
License:	MIT
URL:		http://github.com/RonnyPfannschmidt/iniconfig
Source0:	https://pypi.io/packages/source/i/iniconfig/iniconfig-%{version}.tar.gz
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
BuildRequires:	python3-wheel
BuildRequires:	python3-hatchling
BuildRequires:	python3-hatch-vcs
BuildArch:	noarch

%global _description %{expand:
iniconfig is a small and simple INI-file parser module
having a unique set of features:

* tested against Python2.4 across to Python3.2, Jython, PyPy
* maintains order of sections and entries
* supports multi-line values with or without line-continuations
* supports "#" comments everywhere
* raises errors with proper line-numbers
* no bells and whistles like automatic substitutions
* iniconfig raises an Error if two sections have the same name.}
%description %_description

#----------------------------------------------------------------
%package -n python3-iniconfig
Summary:            %{summary}
Group:		Development/Python

%description -n python3-iniconfig %_description

%files -n python3-iniconfig
%doc README.*
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}*-info

#---------------------------------------------------------------
%prep
%autosetup -n iniconfig-%{version} -p1

%build
%pyproject_wheel


%install
%pyproject_install



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 184 |14mr|python-iniparse-0.5-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name iniparse

Summary:	INI parser for python
Name:		python-%{pypi_name}
Version:	0.5
Release:	3
Group:		Development/Python
License:	MIT
Url:		http://code.google.com/p/iniparse/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
iniparse is a INI parser for Python which is:

 * Compatiable with ConfigParser: Backward compatible implementations of
   ConfigParser, RawConfigParser, and SafeConfigParser are included that
   are API-compatible with the Python standard library. They pass all the
   unit tests in Python-2.4.4.
 * Preserves structure of INI files: Order of sections & options, indentation,
   comments, and blank lines are preserved as far as possible when data is
   updated.
 * More convenient: Values can be accessed using dotted notation
   (cfg.user.name), or using container syntax (cfg['user']['name']).

It is very useful for config files that are updated both by users and by
programs, since it is very disorienting for a user to have her config
file completely rearranged whenever a program changes it. iniparse also
allows making the order of entries in a config file significant, which is
desirable in applications like image galleries.

#--------------------------------------------------
%package -n python3-%pypi_name
Summary:	INI parser for python
Group:		Development/Python
BuildRequires:	python3-devel
BuildRequires:	python3egg(setuptools)

%description -n python3-%pypi_name
iniparse is a INI parser for Python which is:

 * Compatiable with ConfigParser: Backward compatible implementations of
   ConfigParser, RawConfigParser, and SafeConfigParser are included that
   are API-compatible with the Python standard library.
 * Preserves structure of INI files: Order of sections & options, indentation,
   comments, and blank lines are preserved as far as possible when data is
   updated.
 * More convenient: Values can be accessed using dotted notation
   (cfg.user.name), or using container syntax (cfg['user']['name']).

It is very useful for config files that are updated both by users and by
programs, since it is very disorienting for a user to have her config
file completely rearranged whenever a program changes it. iniparse also
allows making the order of entries in a config file significant, which is
desirable in applications like image galleries.

%files -n python3-%pypi_name
%doc Changelog LICENSE LICENSE-PSF README.md html/*
%{python3_sitelib}/%{pypi_name}*

#--------------------------------------------------
%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install
rm -Rf %{buildroot}/%{_docdir}/*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 185 |14mr|python-installer-0.7.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name installer

Name:		python-installer
Version:	0.7.0
Release:	1
Summary:	A library for installing Python wheels
Group:		Development/Python
License:	MIT
URL:		https://pypi.org/project/installer/
Source0:	https://files.pythonhosted.org/packages/source/i/installer/installer-%{version}.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros
BuildArch:	noarch

%description
A library for installing Python wheels.

#----------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	A library for installing Python wheels
Group:		Development/Python

%description -n python3-%{pypi_name}
A library for installing Python wheels.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README*

#----------------------------------------------------

%prep
%autosetup -p1 -n installer-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files installer

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 186 |14mr|python-isort-5.12.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name isort

Name:          python-%{pypi_name}
Version:       5.12.0
Release:       1
Summary:       Python utility / library to sort Python imports
Group:         Development/Python
License:       MIT
URL:           https://github.com/timothycrosley/%{pypi_name}
Source0:       %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
BuildRequires: pkgconfig(python3)
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(mock)
BuildArch:     noarch

%description
%{summary}.

%files
%{_bindir}/isort-identify-imports

# -----------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:            %{summary}
Group:         Development/Python

%description -n python3-%{pypi_name}
%{summary}.

Python 3 version.

%files -n python3-%{pypi_name}
%doc *.md LICENSE
%{_bindir}/%{pypi_name}
%{_bindir}/%{pypi_name}-3
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}*-info/

# -----------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

# Drop shebang
sed -i -e '1{\@^#!.*@d}' %{pypi_name}/main.py

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

ln -s %{pypi_name} %{buildroot}%{_bindir}/%{pypi_name}-3

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 187 |14mr|python-jaraco.collections-4.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name jaraco.collections

Name:           python-%{pypi_name}
Version:	4.3.0
Release:	1
Summary:        jaraco.collections
Group:          Development/Python
License:        MIT License
Url:            https://github.com/jaraco/jaraco.collections
Source0:	%{pypi_source}
Patch0:         jaraco.collections-requirements.patch
BuildRequires:  python3dist(setuptools)
BuildRequires:  pyproject-rpm-macros
BuildArch:      noarch

%description
Models and classes to supplement the stdlib 'collections' module.

%generate_buildrequires
%pyproject_buildrequires -R
#-----------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:    jaraco.collections
Group:        Development/Python

%description -n python3-%{pypi_name}
Models and classes to supplement the stdlib 'collections' module.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README*

#-----------------------------------------------------------------
%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files jaraco


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 188 |14mr|python-jaraco.context-4.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global _python_no_extras_requires 1

%define    pypi_name    jaraco.context

Name:           python-%{pypi_name}
Version:        4.3.0
Release:        1
Summary:        Context managers by jaraco
Group:          Development/Python
License:        MIT License
Url:            https://github.com/jaraco/jaraco.text
Source0:        %{pypi_source}
BuildArch:      noarch
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(setuptools-scm)
BuildRequires:  python3dist(toml)
BuildRequires:  pyproject-rpm-macros

%description
jaraco.text

#---------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:    Context managers by jaraco
Group:      Development/Python

%description -n python3-%{pypi_name}
jaraco.text

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README*

#---------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files jaraco

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 189 |14mr|python-jaraco.text-3.11.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global _python_no_extras_requires 1

%define    pypi_name    jaraco.text

Name:           python-%{pypi_name}
Version:        3.11.1
Release:        1
Summary:        jaraco.text
Group:          Development/Python
License:        MIT License
Url:            https://github.com/jaraco/jaraco.text
Source0:        %{pypi_source}
BuildArch:      noarch
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(setuptools-scm)
BuildRequires:  python3dist(jaraco.context)
BuildRequires:  python3dist(jaraco.functools)
BuildRequires:  python3dist(toml)
BuildRequires:  python3dist(wheel)
BuildRequires:  python3dist(pip)
BuildRequires:  pyproject-rpm-macros

%description
jaraco.text

#---------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:    jaraco.text
Group:      Development/Python

%description -n python3-%{pypi_name}
jaraco.text

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst

#---------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

#generate_buildrequires
#pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files jaraco

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 190 |14mr|python-jdcal-1.4.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global module jdcal

Summary:	Julian dates from proleptic Gregorian and Julian calendars
Name:		python-%{module}
Version:	1.4.1
Release:	2
License:	BSD
Group:		Development/Python
Url:		https://github.com/phn/jdcal
Source0:	https://github.com/phn/jdcal/archive/v%{version}/%{module}-%{version}.tar.gz
BuildArch:	noarch

%description
This module contains functions for converting between Julian dates and calendar
dates.

A function for converting Gregorian calendar dates to Julian dates, and another
function for converting Julian calendar dates to Julian dates are defined.
Two functions for the reverse calculations are also defined.

#----------------------------------------------------------------------------

%package -n python3-%{module}
Summary:	Julian dates from proleptic Gregorian and Julian calendars
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)

%description -n python3-%{module}
This module contains functions for converting between Julian dates and calendar
dates.

A function for converting Gregorian calendar dates to Julian dates, and another
function for converting Julian calendar dates to Julian dates are defined.
Two functions for the reverse calculations are also defined.

%files -n python3-%{module}
%doc README.rst
%{python3_sitelib}/%{module}*
%{python3_sitelib}/__pycache__/

#----------------------------------------------------------------------------

%prep
%setup -qn %{module}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 191 |14mr|python-jedi-0.19.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name jedi

Summary:	An auto completion tool for Python that can be used for text editors
Name:		python-%{pypi_name}
Version:	0.19.1
Release:	1
License:	LGPLv3
Group:		Development/Python
Url:		https://jedi.readthedocs.org/en/latest/index.html
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(typing)
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(parso)
BuildArch:	noarch

%description
Jedi is an auto completion tool for Python. It works. With and without
syntax errors. Sometimes it sucks, but that's normal in dynamic languages.
But it sucks less than other tools. It understands almost all of the basic
Python syntax elements including many built-ins.

Jedi uses a very simple interface to connect with IDE's. As an reference,
there is a VIM implementation, which uses Jedi's auto completion. However,
I encourage you to use Jedi in your IDEs. Start writing plugins! If there are
problems with licensing, just contact me.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	An auto completion tool for Python 3 that can be used for text editors
Group:		Development/Python

#----------------------------------------------------------------------

%description -n python3-%{pypi_name}
Jedi is an auto completion tool for Python 3. It works. With and without
syntax errors. Sometimes it sucks, but that's normal in dynamic languages.
But it sucks less than other tools. It understands almost all of the basic
Python syntax elements including many built-ins.

Jedi uses a very simple interface to connect with IDE's. As an reference,
there is a VIM implementation, which uses Jedi's auto completion. However,
I encourage you to use Jedi in your IDEs. Start writing plugins! If there are
problems with licensing, just contact me.

%files -n python3-%{pypi_name}
%doc *.rst *.txt
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

find %{buildroot} -type f -empty -delete


%ifarch %{x86_64} %{ix86}
%check
# fail on py3.8
skiptests="test_integration"
skiptests+=" or test_sys_path"

export LANG="en_US.UTF-8"
export PYTHONPATH=%{buildroot}%{python3_sitelib}
pytest-3  -k "not ($skiptests)"

%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 192 |14mr|python-jsonpatch-1.33-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name jsonpatch

Name:           python-jsonpatch
Version:	1.33
Release:	1
Group:          Development/Python
Summary:        Apply JSON-Patches (RFC 6902)
License:        Modified BSD License
URL:            https://github.com/stefankoegl/python-json-patch
Source0:	%{pypi_source}
BuildArch:      noarch
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(setuptools)

%description
Library to apply JSON Patches according to RFC 6902.

#-----------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        Apply JSON-Patches (RFC 6902)
Group:          Development/Python

%description -n python3-%{pypi_name}
Library to apply JSON Patches according to RFC 6902.

%files -n python3-%{pypi_name}
%doc README.md
%{_bindir}/jsondiff
%{_bindir}/jsonpatch
%{python3_sitelib}/

#-----------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
#%autopatch -p1

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

# fix shebangs
sed -i 's#usr/bin/env python#usr/bin/python3#' %{buildroot}%{_bindir}/jsondiff %{buildroot}%{_bindir}/jsonpatch

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 193 |14mr|python-jsonpointer-3.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name jsonpointer
%global github_name python-json-pointer

Summary:    Resolve JSON Pointers in Python
Name:       python-%{pypi_name}
Version:	3.0.0
Release:	1
License:    BSD
Group:      Development/Python
Url:        https://github.com/stefankoegl/%{github_name}
Source0:	%{pypi_source}
BuildArch:  noarch

%description
Library to resolve JSON Pointers according to RFC 6901.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:        Resolve JSON Pointers in Python
Group:          Development/Python
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3-setuptools
Conflicts:      python-%{pypi_name} < 1.10-20
Obsoletes:      python-%{pypi_name} < 1.10-20

%description -n python3-%{pypi_name}
Library to resolve JSON Pointers according to RFC 6901.

%files -n python3-%{pypi_name}
%doc README.md AUTHORS
%{_bindir}/jsonpointer
%{_bindir}/jsonpointer-3*
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/%{pypi_name}.py*
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install
mv %{buildroot}%{_bindir}/jsonpointer %{buildroot}%{_bindir}/jsonpointer-%{python3_version}
ln -s ./jsonpointer-%{python3_version} %{buildroot}%{_bindir}/jsonpointer-3
ln -s ./jsonpointer-%{python3_version} %{buildroot}%{_bindir}/jsonpointer

%check
%__python3 tests.py

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 194 |14mr|python-jwcrypto-1.5.6-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define debug_package %{nil}
%define module	jwcrypto

Summary:	Implements JWK,JWS,JWE specifications using python-cryptography
Name:		python-%{module}
Version:	1.5.6
Release:	1
License:	LGPLv3+
Group:		Development/Python
Url:		https://github.com/latchset/
Source0:	https://github.com/latchset/jwcrypto/archive/v%{version}.tar.gz?/%{module}-%{version}.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(cryptography)
BuildRequires:	python3egg(pytest)
BuildRequires:	python3egg(setuptools)

%description
Implements JWK,JWS,JWE specifications using python-cryptography.

#------------------------------------------------------------------
%package -n python3-%{module}
Summary:	Implements JWK,JWS,JWE specifications using python-cryptography
Group:		Development/Python

%description -n python3-%{module}
Implements JWK,JWS,JWE specifications using python-cryptography.

%files -n python3-%{module}
%doc LICENSE README.md
%{python3_sitelib}/%{module}
%{python3_sitelib}/%{module}-*.egg-info

#------------------------------------------------------------------

%prep
%setup -qn %{module}-%{version}

%build

%install
PYTHONDONTWRITEBYTECODE=1 python3 setup.py install --root=%{buildroot}
rm -rf %{buildroot}%{_docdir}/%{module}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 195 |14mr|python-kdcproxy-1.0.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name kdcproxy

Summary:	MS-KKDCP (kerberos proxy) WSGI module
Name:		python-%{pypi_name}
Version:	1.0.0
Release:	2
License:	MIT
Group:		Development/Python
Url:		https://github.com/npmccallum/kdcproxy
Source0:	https://github.com/npmccallum/kdcproxy/archive/v%{version}.tar.gz?/%{pypi_name}-%{version}.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(pyasn1)
BuildRequires:	python3egg(dnspython)
BuildRequires:	python3egg(setuptools)
BuildArch:	noarch

%description
This package contains a Python 2.x WSGI module for proxying KDC requests over
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
minimal configuration.

#-----------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	MS-KKDCP (kerberos proxy) WSGI module
Group:		Development/Python
Requires:	python3egg(pyasn1)
Requires:	python3egg(dnspython)

%description -n python3-%{pypi_name}
This package contains a Python 2.x WSGI module for proxying KDC requests over
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
minimal configuration.

%files -n python3-%{pypi_name}
%doc COPYING README
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-*.egg-info

#-----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}


%build
%py3_build

%install
%py3_install
find %{buildroot}%{python3_sitelib}/%{pypi_name}/ -name '*.py' -exec chmod 755 '{}' \;

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 196 |14mr|python-kmod-0.9.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Python module to work with kernel modules
Name:		python-kmod
Group:		Development/Python
Version:	0.9.2
Release:	1
License:	LGPL-2.0-or-later
Url:		https://github.com/maurizio-lombardi/python-kmod
Source0:	https://github.com/maurizio-lombardi/python-kmod/archive/refs/tags/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
BuildRequires:	gcc
BuildRequires:	python3-cython
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	pkgconfig(libkmod)

%define _description %{expand:
Python module to allow listing, loading, and unloading
Linux Kernel modules, using libkmod.
}

%description %{_description}

#--------------------------------------------------------

%package -n python3-kmod
Summary:	Python module to work with kernel modules

%description -n python3-kmod
%{_description}

%files -n python3-kmod
%license COPYING.LESSER
%{python3_sitearch}/kmod/
%{python3_sitearch}/*.dist-info

#--------------------------------------------------------

%prep
%autosetup -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 197 |14mr|python-kubernetes-31.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global py3 python3
%global py3dev python3

%global library kubernetes
%global basehash a66f8df1dfc0e4f4a17093c7da273b9e485a55a0

Name:       python-%{library}
Version:	31.0.0
Release:	1
Summary:    Python client for the kubernetes API
License:    ASL 2.0
URL:        https://pypi.python.org/pypi/kubernetes
Group:      Development/Python
Source0:    https://github.com/kubernetes-client/python/archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
Source1:    https://github.com/kubernetes-client/python-base/archive/%{basehash}.tar.gz
BuildArch:  noarch

#-----------------------------------------------------
%package -n %{py3}-%{library}
Summary:    Kubernetes Python Client
BuildRequires:  git
BuildRequires:  %{py3dev}-devel
BuildRequires:  %{py3}-setuptools
Requires:  %{py3}-certifi
Requires:  %{py3}-six
Requires:  %{py3}-dateutil
Requires:  %{py3}-setuptools
Requires:  %{py3}-urllib3
Requires:  %{py3}-PyYAML
Requires:  %{py3}-google-auth
Requires:  %{py3}-websocket-client

%description -n %{py3}-%{library}
Python client for the kubernetes API.

%files -n %{py3}-%{library}
%license LICENSE
%doc README.md
%{python3_sitelib}/%{library}
%{python3_sitelib}/%{library}-*.dist-info
%exclude %{python3_sitelib}/%{library}/test
%exclude %{python3_sitelib}/%{library}/e2e_test

#-----------------------------------------------------

%package -n %{py3}-%{library}-tests
Summary:    Tests python-kubernetes library

Requires:  %{py3}-nose
Requires:  %{py3}-py
Requires:  %{py3}-mock
Requires:  %{py3}-%{library} = %{version}-%{release}

%description -n %{py3}-%{library}-tests
Tests python-kubernetes library

%description
Python client for the kubernetes API.

%files -n %{py3}-%{library}-tests
%license LICENSE
%{python3_sitelib}/%{library}/test
%{python3_sitelib}/%{library}/e2e_test

#-----------------------------------------------------

%prep
%autosetup -n python-%{version} -S git

sed -i 's/websocket-client.*/websocket-client>=0.43.0/g' requirements.txt

pushd kubernetes
rm -rf base
tar zxvf %{SOURCE1}
mv python-base-%{basehash} base
popd

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
cp -pr kubernetes/test %{buildroot}%{python3_sitelib}/%{library}/
cp -pr kubernetes/e2e_test %{buildroot}%{python3_sitelib}/%{library}/



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 198 |14mr|python-lazy-object-proxy-1.10.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global	debug_package %{nil}
%global _python_no_extras_requires 1

%define pypi_name	lazy-object-proxy

Name:		python-%{pypi_name}
Summary:	A fast and thorough lazy object proxy
Version:	1.10.0
Release:	1
Url:		https://pypi.python.org/pypi/lazy-object-proxy
Source0:	%{pypi_source}
License:	GPLv2+
Group:		Development/Python
BuildRequires:	python3-devel
BuildRequires:	pyproject-rpm-macros

%description
A fast and thorough lazy object proxy
#-----------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A fast and thorough lazy object proxy
Group:		Development/Python
Requires:	python3-logilab-common

%description -n python3-%{pypi_name}
A fast and thorough lazy object proxy

%files -n python3-%{pypi_name}
%{python3_sitearch}/*
#-----------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

# for autoinstall BuildRequires
%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 199 |14mr|python-ldap3-2.9.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module	ldap3

Name:		python-%{module}
Version:	2.9.1
Release:	2
Summary:	Strictly RFC 4510 conforming LDAP V3 pure Python client
Group:		Development/Python
License:	LGPLv2+
URL:		https://pypi.python.org/pypi/%{module}/%{version}
Source0:	https://files.pythonhosted.org/packages/43/ac/96bd5464e3edbc61595d0d69989f5d9969ae411866427b2500a8e5b812c0/ldap3-2.9.1.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
dap3 is a strictly RFC 4510 conforming LDAP V3 pure Python client library.
The same codebase runs in Python 2, Python 3, PyPy and PyPy3.
#=========================================================================
%package -n python3-%{module}
Summary:	Strictly RFC 4510 conforming LDAP V3 pure Python client
Group:		Development/Python

%description -n python3-%{module}
dap3 is a strictly RFC 4510 conforming LDAP V3 pure Python client library.
The same codebase runs in Python 2, Python 3, PyPy and PyPy3.

%files -n python3-%{module}
%doc README.rst _version.json
%doc COPYING.txt COPYING.LESSER.txt LICENSE.txt
%{python3_sitelib}/%{module}/
%{python3_sitelib}/%{module}-*.dist-info
#=========================================================================
%prep
%setup -q -n %{module}-%{version}
%autopatch -p1

# Remove bundled egg-info
rm -r %{module}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 200 |14mr|python-ldap-3.4.5-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module	ldap

Summary:	Various LDAP-related Python modules
Name:		python-%{module}
Version:	3.4.5
Release:	3
Source0:	https://github.com/python-ldap/python-ldap/archive/%{name}-%{version}.tar.gz?/%{name}-%{name}-%{version}.tar.gz
Patch0:		python-ldap-3.4.3-dirs.patch
License:	Modified CNRI Open Source License
Group:		Development/Python
Url:		http://python-ldap.sourceforge.net/
BuildRequires:	openldap-devel
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	sasl-devel
BuildRequires:	pkgconfig(openssl)

%description
python2-ldap provides an object-oriented API to access LDAP directory
servers from Python programs. Mainly it wraps the OpenLDAP 2.x libs
for that purpose.

Additionally the package contains modules for other LDAP-related stuff
(e.g. processing LDIF, LDAPURLs, LDAPv3 schema, etc.).

#------------------------------------------------------------------

%package -n python3-%{module}
Summary:	Various LDAP-related Python3 modules
Group:		Development/Python

%description -n python3-%{module}
python2-ldap provides an object-oriented API to access LDAP directory
servers from Python programs. Mainly it wraps the OpenLDAP 2.x libs
for that purpose.

Additionally the package contains modules for other LDAP-related stuff
(e.g. processing LDIF, LDAPURLs, LDAPv3 schema, etc.).

%files -n python3-%{module}
%doc CHANGES README TODO Demo/
%{python3_sitearch}/*

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{name}-%{name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 201 |14mr|python-lit-18.1.8-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name lit

Summary:	A Software Testing Tool
Name:		python-%{pypi_name}
Version:	18.1.8
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://llvm.org
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
*lit* is a portable tool for executing LLVM and Clang style test suites,
summarizing their results, and providing indication of failures. *lit* is
designed to be a lightweight testing tool with as simple a user interface as
possible.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A Software Testing Tool
Group:		Development/Python

%description -n python3-%{pypi_name}
*lit* is a portable tool for executing LLVM and Clang style test suites,
summarizing their results, and providing indication of failures. *lit* is
designed to be a lightweight testing tool with as simple a user interface as
possible.

%files -n python3-%{pypi_name}
%{_bindir}/lit
%{python3_sitelib}/lit
%{python3_sitelib}/lit*.dist-info

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

# Strip out #!/usr/bin/env python
#sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/%{pypi_name}/*.py


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 202 |14mr|python-looseversion-1.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name looseversion

Name:           python-%{pypi_name}
Version:        1.3.0
Release:        1
Summary:        Version numbering for anarchists and software realists
License:        PSF-2.0
Group:          Development/Python
URL:            https://pypi.org/pypi/looseversion
Source0:        %{pypi_source}
BuildArch:      noarch
BuildRequires:  pyproject-rpm-macros
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3-pytest

%description
A backwards/forwards-compatible fork of distutils.version.LooseVersion, for
times when PEP-440 isnt what you need.

The goal of this package is to be a drop-in replacement for the original
LooseVersion. It implements an identical interface and comparison logic to
LooseVersion. The only major change is that a looseversion.LooseVersion is
comparable to a distutils.version.LooseVersion, which means tools should not
need to worry whether all dependencies that use LooseVersion have migrated.

If you are simply comparing versions of Python packages, consider moving to
packaging.version.Version, which follows PEP-440. LooseVersion is better suited
to interacting with heterogeneous version schemes that do not follow PEP-440.

#--------------------------------------------------------
%package -n python3-looseversion
Summary:        %{summary}
Group:          Development/Python

%description -n python3-looseversion
A backwards/forwards-compatible fork of distutils.version.LooseVersion, for
times when PEP-440 isnt what you need.

The goal of this package is to be a drop-in replacement for the original
LooseVersion. It implements an identical interface and comparison logic to
LooseVersion. The only major change is that a looseversion.LooseVersion is
comparable to a distutils.version.LooseVersion, which means tools should not
need to worry whether all dependencies that use LooseVersion have migrated.

If you are simply comparing versions of Python packages, consider moving to
packaging.version.Version, which follows PEP-440. LooseVersion is better suited
to interacting with heterogeneous version schemes that do not follow PEP-440.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md CHANGES.md

#--------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%check
%pytest -v tests.py



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 203 |14mr|python-lz4-4.4.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname lz4

Name:           python-%{srcname}
Version:        4.4.4
Release:        1
URL:            https://github.com/%{name}/%{name}
Summary:        LZ4 Bindings for Python
# Automatically converted from old format: BSD - review is highly recommended.
License:        LicenseRef-Callaway-BSD
Source:         https://files.pythonhosted.org/packages/source/l/%{srcname}/%{srcname}-%{version}.tar.gz
# Reduce setuptools_scm dep to >= 6
Patch:          python-lz4-deps.patch
# Support Python 3.14
Patch:          https://github.com/python-lz4/python-lz4/pull/303.patch

BuildRequires:  lz4-devel
BuildRequires:  python3-devel

%description
Python bindings for the lz4 compression library.


%package -n python3-lz4
Summary:        LZ4 Bindings for Python 3
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-lz4
Python 3 bindings for the lz4 compression library.


%prep
%autosetup -n %{srcname}-%{version} -p1
sed -i -e '/pytest-cov/d' setup.py
sed -i -e 's/--cov=lz4\/block --cov=lz4\/frame//' tox.ini

rm lz4libs/lz4*.[ch]

%generate_buildrequires
%pyproject_buildrequires -t

%build
%pyproject_wheel


%install
%pyproject_install

%pyproject_save_files lz4
# Fix permissions on shared objects
find %{buildroot}%{python3_sitearch} -name 'lz4*.so' \
    -exec chmod 0755 {} \;

%files -n python3-lz4 -f %{pyproject_files}
%license LICENSE
%doc README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 204 |14mr|python-markdown-3.10.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name markdown

Summary:        Python implementation of Markdown text-to-HTML convertor
Name:           python-%{pypi_name}
Version:        3.10.0
Release:        2
License:        BSD-3-Clause
Group:          Development/Python
Url:            https://github.com/Python-Markdown/markdown
Source0:        https://github.com/Python-Markdown/markdown/archive/%{version}/%{pypi_name}-%{version}.tar.gz
Patch0:		    0001-fix-license.patch
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3-wheel
BuildRequires:	python3-pip
BuildArch:	noarch

%define _description %{expand:
This is a Python implementation of John Gruber's Markdown. 
It is almost completely compliant with the reference implementation, 
though there are a few known issues. See Features for information 
on what exactly is supported and what is not. 
Additional features are supported by the Available Extensions.
}

%description
%{_description}

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python implementation of Markdown text-to-HTML convertor

%description -n python3-%{pypi_name}
%{_description}

%files -n python3-%{pypi_name}
%license LICENSE*
%doc README*
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/markdown-*.dist-info

#------------------------------------------------------------------

%package -n %{pypi_name}
Summary:	Python implementation of Markdown text-to-HTML convertor
Requires:	python3-%{pypi_name}
# /usr/bin/markdown_py was in python3-markdown
Obsoletes:	python3-%{pypi_name} < 3.10.0
Conflicts:	python3-%{pypi_name} < 3.10.0

%description -n %{pypi_name}
%{_description}

%files -n %{pypi_name}
%{_bindir}/markdown_py

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 205 |14mr|python-markdown-it-py-4.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name markdown-it-py

Name:		python-%{pypi_name}
Version:	4.0.0
Release:	1
Summary:	Python port of markdown-it
Group:		Development/Python
License:	MIT
URL:		https://github.com/executablebooks/markdown-it-py
Source0:	%{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz

BuildArch:	noarch

BuildRequires:	python3-devel
BuildRequires:	pyproject-rpm-macros


%global _description %{expand:
Markdown parser done right. Its features:
Follows the CommonMark spec for baseline parsing.
Has configurable syntax: you can add new rules and even replace existing ones.
Pluggable: Adds syntax extensions to extend the parser.
High speed & safe by default
}

%description %_description

#----------------------------------------------------

%package -n     python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name} %_description

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md
%license LICENSE*
%{_bindir}/markdown-it
#----------------------------------------------------
%prep
%autosetup -p1 -n %{pypi_name}-%{version}

# Remove unnecessary shebang
sed -i '1{\@^#!/usr/bin/env python@d}' markdown_it/cli/parse.py
# Remove coverage (it resides in testing extra which we want to use)
# Upstream issue to move those to another extra:
# https://github.com/executablebooks/markdown-it-py/issues/195
sed -i '/"coverage",/d' pyproject.toml
sed -i '/"pytest-cov",/d' pyproject.toml

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files markdown_it


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 206 |14mr|python-matplotlib-inline-0.1.6-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name matplotlib-inline

Name:           python-matplotlib-inline
Version:        0.1.6
Release:        4
Summary:        Inline Matplotlib backend for Jupyter
Group:          Development/Python
License:        BSD
URL:            https://github.com/ipython/matplotlib-inline
Source0:        %{pypi_source matplotlib-inline}
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros

%description
Inline Matplotlib backend for Jupyter

#-------------------------------------------------------
%package -n     python3-matplotlib-inline
Summary:        %{summary}
Group:          Development/Python

%description -n python3-matplotlib-inline
Inline Matplotlib backend for Jupyter

%files -n python3-matplotlib-inline -f %{pyproject_files}
%license LICENSE
%doc README.md

#-------------------------------------------------------
%prep
%autosetup -n matplotlib-inline-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files matplotlib_inline

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 207 |14mr|python-maturin-1.15.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global _disable_lto 1
%global debug_package %{nil}

%global pypi_name maturin

Summary:	Build and publish crates with pyo3, rust-cpython and cffi bindings
Name:		python-%{pypi_name}
Version:	1.15.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://pypi.org/project/maturin
Source0:	%{pypi_source}
# cd maturin-%%{version}
# mkdir .cargo
# cat >cargo-home/config.toml <<EOF
# [source.crates-io]
# registry = 'https://github.com/rust-lang/crates.io-index'
# replace-with = 'vendored-sources'
# [source.vendored-sources]
# directory = './vendor'
# EOF
# export CARGO_HOME=$(pwd)/cargo-home
# cargo vendor
# tar -cpJf ../vendor-%%{version}.tar.xz vendor
# or use upd.sh
Source1:	maturin-vendor-%{version}.tar.xz
Source10:	upd.sh
# rosa13 have old setuptools
Patch0:		maturin-pyproject.patch
BuildRequires:	pyproject-rpm-macros
BuildRequires:	cargo-rpm-macros
BuildRequires:	pkgconfig(bzip2)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(setuptools-rust)
BuildRequires:	python3dist(tomli)
BuildRequires:	python3dist(wheel)
BuildRequires:	pkgconfig(python3)

%description
Build and publish crates with pyo3, rust-cpython, cffi and uniffi bindings
as well as rust binaries as python packages.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Build and publish crates with pyo3, rust-cpython and cffi bindings
Group:		Development/Python

%description -n python3-%{pypi_name}
Build and publish crates with pyo3, rust-cpython, cffi and uniffi bindings
as well as rust binaries as python packages.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md
%license license-*
%{_bindir}/%{pypi_name}

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version} -a1
%cargo_prep -v vendor

%build
%cargo_build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 208 |14mr|python-mccabe-0.7.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	oname	mccabe

Name:		python-%{oname}
Version:	0.7.0
Release:	3
Summary:	McCabe checker, plugin for flake8
Source0:	%{pypi_source mccabe}
License:	MIT
Group:		Development/Python
Url:		https://github.com/pycqa/mccabe
Patch0:		mccabe-test.patch
BuildArch:	noarch

%description
McCabe complexity checker
=========================
Ned's script to check McCabe complexity.
This module provides a plugin for ``flake8``,
the Python code checker.

#------------------------------------------------------------
%package -n python3-%{oname}

Group:          Development/Python
Summary:        McCabe checker, plugin for flake8
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(pytest)
BuildRequires:  python3-pytest-runner
BuildArch:      noarch

%description -n python3-%{oname}
McCabe complexity checker
=========================
Ned's script to check McCabe complexity.
This module provides a plugin for ``flake8``,
the Python code checker.

%files -n python3-%{oname}
%{python3_sitelib}/mccabe.py*
%{python3_sitelib}/mccabe*.dist-info
%{python3_sitelib}/__pycache__/*

#------------------------------------------------------------
%prep
%autosetup -p1 -n %{oname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%check
%if %{mdvver} >= 201610
%pytest
%else
python3 setup.py test
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 209 |14mr|python-mdurl-0.1.2-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name mdurl

Name:           python-mdurl
Version:        0.1.2
Release:        2
Summary:        Markdown URL utilities
Group:          Development/Python
License:        MIT
URL:            https://github.com/hukkin/mdurl
Source0:        %{url}/archive/%{version}/mdurl-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros


%global _description %{expand:
URL utilities for markdown-it parser.}


%description %_description

#---------------------------------------------------
%package -n     python3-mdurl
Summary:        %{summary}
Group:          Development/Python

%description -n python3-mdurl %_description

%files -n python3-mdurl -f %{pyproject_files}
%doc README.md
%license LICENSE

#---------------------------------------------------
%prep
%autosetup -p1 -n mdurl-%{version}

# Remove coverage from the test requirements
sed -i "s/pytest-cov//" tests/requirements.txt


%generate_buildrequires
%pyproject_buildrequires 
#tests/requirements.txt


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files mdurl


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 210 |14mr|python-meh-0.52-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	A python library for handling exceptions
Name:		python-meh
Version:	0.52
Release:	1
License:	GPLv2+
Group:		System/Libraries
Url:		https://github.com/rhinstaller/python-meh
Source0:	https://github.com/rhinstaller/python-meh/archive/%{name}-%{version}.tar.gz
Source1:	locale.zip
BuildRequires:	pkgconfig(python3)
BuildRequires:	gettext
BuildRequires:	intltool
BuildRequires:	python3-dbus
BuildRequires:	python3-setuptools
BuildRequires:	libreport-gtk
BuildRequires:	libreport-cli
BuildArch:	noarch

%description
The python-meh package is a python library for handling, saving, and reporting
exceptions.

#------------------------------------------------------------------------------

%package -n python3-meh
Summary:	A python library for handling exceptions
Requires:	python3
Requires:	python3-dbus
Requires:	openssh-clients
Requires:	python3-rpm
Requires:	libreport-cli

%description -n python3-meh
The python-meh package is a python library for handling, saving, and reporting
exceptions.

%files -n python3-meh -f %{name}.lang
%doc COPYING
%{python3_sitelib}/*
%exclude %{python3_sitelib}/meh/ui/gui.py*

#------------------------------------------------------------------------------

%package -n python3-meh-gui
Summary:	Graphical user interface for the python-meh library
Requires:	python3-meh = %{EVRD}
Requires:	libreport-gtk

%description -n python3-meh-gui
The python-meh-gui package provides a GUI for the python-meh library.

%files -n python3-meh-gui
%{python3_sitelib}/meh/ui/gui.py*
%{_datadir}/python-meh

#------------------------------------------------------------------------------

%prep
%setup -qn %{name}-%{name}-%{version}

%build
%make_build

%install
%make_install

unzip %{SOURCE1} -d %{buildroot}%{_datadir}

%find_lang %{name}

# TODO: python-pocketlint is needed
#%%check
#make check

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 211 |14mr|python-merge3-0.0.16-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-merge3
Version:        0.0.16
Release:        1
Summary:        Python implementation of 3-way merge

License:        GPL-2.0-or-later
URL:            https://github.com/breezy-team/merge3
Source0:        %{url}/archive/v%{version}/merge3-%{version}.tar.gz
# Man page hand-written for Fedora in groff_man(7) format based on --help text
# and on README.rst.
Source1:        merge3.1

# tox: allow passing positional arguments through to unittest
# https://github.com/breezy-team/merge3/pull/130
Patch:          %{url}/pull/130.patch

BuildSystem:    pyproject
BuildOption(generate_buildrequires): --tox
BuildOption(install): --assert-license merge3

BuildArch:      noarch

%global common_description %{expand:
A Python implementation of 3-way merge of texts.

Given BASE, OTHER, THIS, tries to produce a combined text incorporating the
changes from both BASE->OTHER and BASE->THIS. All three will typically be
sequences of lines.}

%description %{common_description}


%package -n python3-merge3
Summary:        %{summary}

%description -n python3-merge3 %{common_description}


%install -a
install -D --target='%{buildroot}%{_mandir}/man1' \
    --preserve-timestamps --mode=0644 '%{SOURCE1}'


%check -a
%tox -- -- --verbose


%files -n python3-merge3 -f %{pyproject_files}
%doc README.rst

%{_bindir}/merge3
%{_mandir}/man1/merge3.1*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 212 |14mr|python-meson-python-0.22.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name meson_python

Summary:	Meson Python build backend
Name:		python-meson-python
Version:	0.22.0
Release:	1
License:	MIT
Group:		Development/Python
URL:		https://pypi.org/project/meson-python/
Source:         %{pypi_source meson_python}
BuildRequires:	python3dist(meson)
# the build backend itself (self-hosted; first build bootstrapped via venv)
BuildRequires:	python3dist(meson-python)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(wheel)
BuildRequires:	python3dist(pyproject-metadata)
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(typing-extensions)
BuildRequires:	python3dist(tomli)

BuildArch:	noarch

%description
meson-python is a Python build backend built on top of the Meson build-system.
It enables you to use Meson for your Python packages.

#-------------------------------------------------------
%package -n python3-meson-python
Summary:	Meson Python build backend
Group:		Development/Python

%description -n python3-meson-python
meson-python is a Python build backend built on top of the Meson build-system.
It enables you to use Meson for your Python packages.

%files -n python3-meson-python
%{python3_sitelib}/mesonpy
%{python3_sitelib}/meson_python-%{version}*.*-info

#---------------------------------------------------------------------------
%prep
%autosetup -p1 -n meson_python-%{version}

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 213 |14mr|python-mock-5.1.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name mock

Summary:	A Python Mocking and Patching Library for Testing
Name:		python-%{pypi_name}
Version:	5.1.0
Release:	2
License:	BSD
Group:		Development/Python
Url:		http://www.voidspace.org.uk/python/mock
Source0:	%{pypi_source}
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Mock is a Python module that provides a core mock class. It removes the need
to create a host of stubs throughout your test suite. After performing an
action, you can make assertions about which methods / attributes were used and
arguments they were called with. You can also specify return values and set
needed attributes in the normal way.

#------------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	A Python Mocking and Patching Library for Testing
Group:		Development/Python
Requires:	python3dist(six)

%description -n python3-%{pypi_name}
Mock is a Python module that provides a core mock class. It removes the need
to create a host of stubs throughout your test suite. After performing an
action, you can make assertions about which methods / attributes were used and
arguments they were called with. You can also specify return values and set
needed attributes in the normal way.

%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE.txt
%{python3_sitelib}/*.dist-info/
%{python3_sitelib}/%{pypi_name}

#------------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 214 |14mr|python-multidict-6.1.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name  multidict

Name:		python-%{pypi_name}
Version:	6.1.0
Release:	1
Summary:	multidict implementation
Group:		Development/Python
License:	ASL 2.0
Url:		https://github.com/aio-libs/multidict/
Source0:	https://github.com/aio-libs/multidict/archive/v%{version}.tar.gz?/%{pypi_name}-%{version}.tar.gz

%description
Multidicts are useful for working with HTTP headers, URL query args etc.

The code was extracted from aiohttp library.

#-------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	multidict implementation
Group:		Development/Python

BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)

%description -n python3-%{pypi_name}
Multidicts are useful for working with HTTP headers, URL query args etc.

The code was extracted from aiohttp library.

%files -n python3-%{pypi_name}
%{python3_sitearch}/%{pypi_name}
%{python3_sitearch}/%{pypi_name}-*.dist-info

#-------------------------------------------------------------------------
%prep
%setup -q -n  multidict-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 215 |14mr|python-mypy_extensions-1.0.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module  mypy_extensions

Summary:        Experimental type system extensions for programs checked with the mypy typechecker
Name:           python-%{module}
Version:        1.0.0
Release:        2
License:        MIT
Group:          Development/Python
Url:            https://pypi.org/project/%{module}
Source0:        %{pypi_source %{module} %{version}}
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3egg(setuptools)
BuildArch:      noarch

%description
Experimental type system extensions for programs checked with the mypy typechecker.

The “mypy_extensions” module defines experimental extensions to the standard
“typing” module that are supported by the mypy typechecker.

#------------------------------------------------------------------

%package -n python3-%{module}
Summary:      %{summary}
Group:        Development/Python

%description -n python3-%{module}
Experimental type system extensions for programs checked with the mypy typechecker.

The “mypy_extensions” module defines experimental extensions to the standard
“typing” module that are supported by the mypy typechecker.

%files -n python3-%{module}
%{python3_sitelib}/%{module}.py
%{python3_sitelib}/__pycache__/%{module}*.py*
%{python3_sitelib}/%{module}-%{version}-py*.egg-info/

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{module}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 216 |14mr|python-nacl-1.6.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	oname	pynacl
%define module	nacl

Name:		python-%{module}
Version:	1.6.0
Release:	1
Summary:	Python binding to the Networking and Cryptography (NaCl) library
Url:		https://github.com/pyca/%{module}
Source0:	https://github.com/pyca/pynacl/archive/%{version}.tar.gz?/pynacl-%{version}.tar.gz
License:	Apache License
Group:		Development/Python

%description
PyNaCl is a Python binding to libsodium,
which is a fork of the Networking and Cryptography library.
These libraries have a stated goal of improving usability, security and speed.

#-----------------------------------------------------------
%package -n python3-%{module}
Summary:        Python binding to the Networking and Cryptography (NaCl) library
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(cffi)
Requires:	python3-cffi >= 1.4.1
Requires:	python3-six

%description -n python3-%{module}
PyNaCl is a Python binding to libsodium,
which is a fork of the Networking and Cryptography library.
These libraries have a stated goal of improving usability, security and speed.

%files -n python3-%{module}
%doc CHANGELOG.rst LICENSE README.rst
%{python3_sitearch}/%{module}
%{python3_sitearch}/%{oname}-%{version}*.dist-info

#-----------------------------------------------------------------
%prep
%setup -q -n pynacl-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
rm --recursive --force %{buildroot}%{_lib}/debug
rm --recursive --force %{buildroot}%{_usrsrc}/debug/%{module}-%{version}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 217 |14mr|python-nox-2024.4.15-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global debug_package %{nil}
%global pypi_name nox

Summary:	Flexible test automation with Python
Name:		python-%{pypi_name}
Version:	2024.4.15
Release:	1
License:	ASL 2.0
Group:		Development/Python
Url:		https://pypi.org/project/nox
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(argcomplete)
BuildRequires:	python3dist(colorlog)
BuildRequires:	python3dist(hatchling)
BuildRequires:	python3dist(jinja2)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(tox)
BuildRequires:	pkgconfig(python3)

%description
Command-line tool that automates testing in multiple Python environments,
similar to tox.

#----------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Flexible test automation with Python
Group:		Development/Python

%description -n python3-%{pypi_name}
Command-line tool that automates testing in multiple Python environments,
similar to tox.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md
%license LICENSE
%{_bindir}/%{pypi_name}
%{_bindir}/tox-to-%{pypi_name}

#----------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 218 |14mr|python-numpy-2.5.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#test fail: pytest.PytestAssertRewriteWarning: Module already imported so cannot be rewritten
%bcond_with tests

# meson build does not produce mappable debugsource files
%define debug_package %{nil}

%define enable_atlas 0
%{?_with_atlas: %global enable_atlas 1}

%define module	numpy

# disable this for bootstrapping nose and sphinx
%define enable_doc 0

Summary:	A fast multidimensional array facility for Python

Name:		python-%{module}
Epoch:		1
Version:	2.5.3
Release:	1
License:	BSD
Group:		Development/Python
Url: 		http://numpy.scipy.org
Source0:	https://github.com/%{module}/%{module}/releases/download/v%{version}/%{module}-%{version}%{?relc}.tar.gz

%rename	f2py
%if %enable_atlas
BuildRequires:	libatlas-devel
%else
BuildRequires:	blas-devel
%endif
BuildRequires:	lapack-devel
BuildRequires:	gcc-gfortran >= 4.0
%if %enable_doc
BuildRequires:	python3-sphinx >= 1.0
BuildRequires:	python3-matplotlib
%endif
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-cython
BuildRequires:	python3-pytest
BuildRequires:	python3-setuptools
%if %{with tests}
BuildRequires:	python3-hypothesis
%endif
%description
Numpy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays. Numpy is built on the Numeric code base and adds features
introduced by numarray as well as an extended C-API and the ability to
create arrays of arbitrary type.

Numpy also provides facilities for basic linear algebra routines,
basic Fourier transforms, and random number generation.

#----------------------------------------------------------------------
%package -n python3-numpy
Summary:        A fast multidimensional array facility for Python3
Provides:	python3-numpy-devel = %{version}-%{release}
Group:          Development/Python
License:        BSD

%description -n python3-numpy
Numpy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays. Numpy is built on the Numeric code base and adds features
introduced by numarray as well as an extended C-API and the ability to
create arrays of arbitrary type.

Numpy also provides facilities for basic linear algebra routines,
basic Fourier transforms, and random number generation.

%files -n python3-numpy
%license LICENSE.txt
%doc THANKS.txt
%{python3_sitearch}/%{module}/__pycache__
%{_bindir}/numpy-config
%dir %{python3_sitearch}/%{module}
%{python3_sitearch}/%{module}/*.py*
%{python3_sitearch}/%{module}/__init__*.pxd
%{python3_sitearch}/%{module}/py.typed
%{python3_sitearch}/%{module}/char
%{python3_sitearch}/%{module}/ctypeslib
%{python3_sitearch}/%{module}/core
%{python3_sitearch}/%{module}/doc
%{python3_sitearch}/%{module}/fft
%{python3_sitearch}/%{module}/lib
%{python3_sitearch}/%{module}/linalg
%{python3_sitearch}/%{module}/ma
%{python3_sitearch}/%{module}/matrixlib
%{python3_sitearch}/%{module}/polynomial
%{python3_sitearch}/%{module}/random
%{python3_sitearch}/%{module}/rec
%{python3_sitearch}/%{module}/strings
%{python3_sitearch}/%{module}/testing
%{python3_sitearch}/%{module}/tests
%{python3_sitearch}/%{module}/typing
%{python3_sitearch}/%{module}/_core
%{python3_sitearch}/%{module}/_pyinstaller
%{python3_sitearch}/%{module}/_typing
%{python3_sitearch}/%{module}/_utils
%{python3_sitearch}/%{module}-*.dist-info
%{_includedir}/numpy

#----------------------------------------------------------------------

%package -n python3-numpy-f2py
Summary:        f2py for numpy
Requires:       python3-numpy = %{epoch}:%{version}-%{release}
Requires:       python3-devel
Provides:       python3-f2py = %{version}-%{release}
Obsoletes:      python3-f2py <= 2.45.241_1927

%description -n python3-numpy-f2py
This package includes a version of f2py that works properly with NumPy.

%files -n python3-numpy-f2py
%{_bindir}/f2py
%{_bindir}/f2py3
%{_bindir}/f2py.numpy
%{_bindir}/f2py%{python3_version}
%{python3_sitearch}/%{module}/f2py

#----------------------------------------------------------------------

%prep
%setup -qn numpy-%{version}
%autopatch -p1

%generate_buildrequires
# meson-python backend cannot provide metadata before build
%pyproject_buildrequires -R -Csetup-args=-Dblas=blas -Csetup-args=-Dlapack=lapack

%build
%pyproject_wheel -Csetup-args=-Dcpu-baseline="none" -Csetup-args=-Dblas=blas -Csetup-args=-Dlapack=lapack

%install
%pyproject_install

pushd %{buildroot}%{_bindir} &> /dev/null
ln -s f2py f2py3
ln -s f2py f2py%{python3_version}
ln -s f2py3 f2py.numpy
popd &> /dev/null

#symlink for includes, BZ 185079
mkdir -p %{buildroot}%{_includedir}
ln -s %{python3_sitearch}/%{module}/_core/include/numpy/ %{buildroot}%{_includedir}/numpy

%check
%if %{with tests}
%ifarch ppc64le
# https://github.com/numpy/numpy/issues/14357
python3 runtests.py -- -k 'not test_einsum_sums_cfloat64'
%else
python3 runtests.py
%endif
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 219 |14mr|python-oauthlib-3.2.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	pypi_name	oauthlib

Name:		python-%{pypi_name}
Version:	3.2.2
Release:	1
Summary:	Spec-compliant, thorough OAuth request-signing logic
Group:		Development/Python
License:	BSD
Url:		https://github.com/idan/oauthlib
Source0:	%{pypi_source}
BuildArch:	noarch

%description
OAuthLib is a generic utility which implements the logic of OAuth without
assuming a specific HTTP request object or web framework. Use it to graft OAuth
client support onto your favorite HTTP library, or provider support onto your
favorite web framework. If you're a maintainer of such a library, write a thin
veneer on top of OAuthLib and get OAuth support for very little effort.

#------------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Spec-compliant, thorough OAuth request-signing logic
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)

%description -n python3-%{pypi_name}
OAuthLib is a generic utility which implements the logic of OAuth without
assuming a specific HTTP request object or web framework. Use it to graft OAuth
client support onto your favorite HTTP library, or provider support onto your
favorite web framework. If you're a maintainer of such a library, write a thin
veneer on top of OAuthLib and get OAuth support for very little effort.

%files -n python3-%{pypi_name}
%doc LICENSE
%doc README.rst
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}*-info

#------------------------------------------------------------------------------
%prep
%setup -q -n %{pypi_name}-%{version}
find . -type f -exec chmod 644 {} \;

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 220 |14mr|python-odfpy-1.4.2-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Used by https://hub.mos.ru/mos/pkgs/mos-attestat-print

%define pypi_name	odfpy

Summary:	Python API and tools to manipulate OpenDocument files
Summary(ru_RU.UTF-8):	API и утилиты для работы с документами формата OpenDocument на Python
Name:		python-%{pypi_name}
Version:	1.4.2
Release:	2
License:	GPL
Group:		Development/Python
Url:		https://github.com/eea/odfpy
Source0:	https://github.com/eea/%{pypi_name}/archive/refs/tags/release-%{version}.tar.gz
BuildRequires:	python3-pkg-resources
BuildRequires:	python3-setuptools
BuildArch:	noarch

%description
Python API and tools to manipulate OpenDocument files

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python API to manipulate OpenDocument files
Summary(ru_RU.UTF-8):	API для работы с документами формата OpenDocument на Python
Group:		Development/Python

%description -n python3-%{pypi_name}
Python API to manipulate OpenDocument files

%description -l ru_RU.UTF-8 -n python3-%{pypi_name}
API для работы с документами формата OpenDocument на Python

%files -n python3-%{pypi_name}
%{python3_sitelib}/odf
%{python3_sitelib}/%{pypi_name}*

#------------------------------------------------------------------

%package -n %{pypi_name}
Summary:	Tools to manipulate OpenDocument files
Summary(ru_RU.UTF-8):	Утилиты для работы с документами формата OpenDocument на Python
Group:	Office
Requires:	python3-%{pypi_name} = %{EVRD}

%description -n %{pypi_name}
Tools to manipulate OpenDocument files

%description -l ru_RU.UTF-8 -n %{pypi_name}
Утилиты для работы с документами формата OpenDocument на Python

%files -n %{pypi_name}
%{_bindir}/csv2ods
%{_bindir}/mailodf
%{_bindir}/odf2mht
%{_bindir}/odf2xhtml
%{_bindir}/odf2xml
%{_bindir}/odfimgimport
%{_bindir}/odflint
%{_bindir}/odfmeta
%{_bindir}/odfoutline
%{_bindir}/odfuserfield
%{_bindir}/xml2odf
%{_mandir}/man1/*.1*

#------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-release-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 221 |14mr|python-openpyxl-3.1.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name openpyxl

Summary:	Python library to read/write Excel 2010 xlsx/xlsm files
Name:		python-%{pypi_name}
Version:	3.1.5
Release:	1
License:	MIT and Python
Group:		Development/Python
Url:		https://openpyxl.readthedocs.io/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm
files. It was born from lack of existing library to read/write natively
from Python the Office Open XML format.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python library to read/write Excel 2010 xlsx/xlsm files
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
Requires:	python3-et_xmlfile
Requires:	python3-jdcal

%description -n python3-%{pypi_name}
openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm
files. It was born from lack of existing library to read/write natively
from Python the Office Open XML format.

%files -n python3-%{pypi_name}
%doc LICENCE.rst
%doc README.rst AUTHORS.rst
%{python3_sitelib}/%{pypi_name}-*.dist-info/
%{python3_sitelib}/%{pypi_name}/

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
rm -rf *.dist-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 222 |14mr|python-ordered-set-4.1.0-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name ordered-set
%global module ordered_set

Summary:	A Custom MutableSet that remembers its order
Name:		python-%{pypi_name}
Version:	4.1.0
Release:	4
License:	MIT
Group:		Development/Python
Url:		https://github.com/LuminosoInsight/ordered-set
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
An OrderedSet is a mutable data structure that is a hybrid of a list and a set.
It remembers the order of its entries, and every entry has an index number
that can be looked up.

#----------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	A Custom MutableSet that remembers its order
Group:		Development/Python

%description -n python3-%{pypi_name}
An OrderedSet is a mutable data structure that is a hybrid of a list and a set.
It remembers the order of its entries, and every entry has an index number
that can be looked up.

This package contains python3 bindings.

%files -n python3-%{pypi_name}
%license MIT-LICENSE
%doc README.md
%dir %{python3_sitelib}/%{module}
%{python3_sitelib}/%{module}/*.py
%{python3_sitelib}/%{module}-*.dist-info/
%dir %{python3_sitelib}/%{module}/__pycache__
%{python3_sitelib}/%{module}/__pycache__/*.pyc
%{python3_sitelib}/%{module}/py.typed

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 223 |14mr|python-packaging-26.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module packaging

Name:		python-%{module}
Version:	26.2
Release:	1
Summary:	Core utilities for Python packages
License:	BSD or ASL 2.0
Group:		Development/Python
Url:		https://github.com/pypa/packaging
Source0:	https://github.com/pypa/packaging/archive/%{version}.tar.gz?/%{name}-%{version}.tar.gz
BuildArch:	noarch

%global _description \
python-packaging provides core utilities for Python \
packages like utilities for dealing with versions, \
specifiers, markers etc.

%description
%{_description}

#---------------------------------------------------------

%package -n python3-%{module}
Summary:	%{summary}
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros
Requires:	python3egg(six)
Requires:	python3-parsing

%description -n python3-%{module}
%{_description}

%files -n python3-%{module} -f %{pyproject_files}
%doc README.rst

#---------------------------------------------------------

%prep
%setup -n %{module}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{module}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 224 |14mr|python-parameterized-0.9.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name parameterized

Name:           python-%{pypi_name}
Version:	0.9.0
Release:	1
Summary:        Parameterized testing with any Python test framework
Group:		Development/Python

License:        BSD
URL:            https://pypi.python.org/pypi/parameterized
Source0:	%{pypi_source}
BuildRequires:  python3-devel

BuildArch:      noarch

%description
%{summary}.

#---------------------------------------------------

%package -n python3-%{pypi_name}
Summary:        %{summary}
Group:		Development/Python

%description -n python3-%{pypi_name}
%{summary}.

Python 3 version.

%files -n python3-%{pypi_name}
%license LICENSE.txt
%doc README.rst
%{python3_sitelib}/%{pypi_name}-%{version}*-info/
%{python3_sitelib}/%{pypi_name}/

#---------------------------------------------------
%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 225 |14mr|python-paramiko-3.5.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name paramiko

Summary:	SSH2 protocol for Python
Name:		python-paramiko
Version:	3.5.0
Release:	1
License:	LGPLv2+
Group:		Development/Python
Url:		https://github.com/ploxiln/paramiko-ng/
Source0:	%{pypi_source}

BuildArch:	noarch

%description
Paramiko is a module for python that implements the SSH2 protocol for secure
(encrypted and authenticated) connections to remote machines.  the module works
by taking a socket-like object that you pass in, negotiating with the remote
server, authenticating (using a password or a given private key), and opening
flow-controled "channels" to the server, which are returned as socket-like
objects. you are responsible for verifying that the server's host key is the
one you expected to see, and you have control over which kinds of encryption
or hashing you prefer (if you care), but all of the heavy lifting is done by
the paramiko module.

#---------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	SSH2 protocol for Python
Group:		Development/Python
BuildRequires:	python3dist(pycrypto)
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
Requires:	python3-ecdsa
Requires:	python3-pycrypto
Provides:	%{pypi_name} = %{EVRD}
Provides:	paramiko = %{EVRD}

%description -n python3-%{pypi_name}
Paramiko is a module for python that implements the SSH2 protocol for secure
(encrypted and authenticated) connections to remote machines.  the module works
by taking a socket-like object that you pass in, negotiating with the remote
server, authenticating (using a password or a given private key), and opening
flow-controled "channels" to the server, which are returned as socket-like
objects. you are responsible for verifying that the server's host key is the
one you expected to see, and you have control over which kinds of encryption
or hashing you prefer (if you care), but all of the heavy lifting is done by
the paramiko module.

%files -n python3-%{pypi_name}
%doc PKG-INFO tests demo*
%{python3_sitelib}/paramiko-%{version}*.dist-info/
%{python3_sitelib}/paramiko/

#---------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
export PARAMIKO_REPLACE=1
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 226 |14mr|python-paste-3.7.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name Paste

Summary:	Tools for using a Web Server Gateway Interface stack
Name:		python-paste
Version:	3.7.1
Release:	1
# Most of the code is MIT
# paste/exceptions/collector.py is ZPLv2.0
# paste/evalexception/media/MochiKit.packed.js AFL (2.1) or MIT
# paste/lint.py MIT or Apache v2
# PySourceColor.py, Python
License:	MIT and ZPLv2.0 and Python and (AFL or MIT) and (MIT or ASL 2.0)
Group:		Development/Python
Url:		https://github.com/cdent/paste
Source0:	%{pypi_source}
BuildRequires:	python3dist(nose)
BuildRequires:	python3dist(pyopenssl)
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(six)
BuildRequires:	python3dist(tempita)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
These provide several pieces of "middleware" (or filters) that can be nested
to build web applications. Each piece of middleware uses the WSGI (PEP 333)
interface, and should be compatible with other middleware based on those
interfaces.

#--------------------------------------------------------------------

%package -n python3-paste
Summary:	Tools for using a Web Server Gateway Interface stack
Group:		Development/Python
Requires:	python3dist(pyopenssl)
Requires:	python3dist(setuptools)
Requires:	python3dist(six)
Requires:	python3dist(tempita)

%description -n python3-paste
These provide several pieces of "middleware" (or filters) that can be nested
to build web applications. Each piece of middleware uses the WSGI (PEP 333)
interface, and should be compatible with other middleware based on those
interfaces.

%files -n python3-paste
%doc docs/*
%license docs/license.txt
%{python3_sitelib}/paste
%{python3_sitelib}/Paste-%{version}-py%{python3_version}.egg-info
%{python3_sitelib}/Paste-%{version}-py%{python3_version}-nspkg.pth

#--------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1

# Paste-2.0.3 seems to have a few .py.orig files that don't appear in upstream scm. Let's drop them.
find . -name "*.orig" -delete

# Strip #! lines that make these seem like scripts
sed -i -e '/^#!.*/,1 d' paste/util/scgiserver.py paste/debug/doctest_webapp.py

# clean docs directory
pushd docs
rm StyleGuide.txt
popd

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 227 |14mr|python-pathlib2-2.3.6-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pathlib2

Name:           python-pathlib2
Version:	2.3.6
Release:	2
Group:          Development/Python
Summary:        Object-oriented filesystem paths

License:        MIT
URL:            https://pypi.python.org/pypi/pathlib2
Source0:	https://files.pythonhosted.org/packages/df/16/e9d6bcf1aed52a55bc1696324ab22586716053b3e97b85266e0f3ad36bae/pathlib2-2.3.6.tar.gz
BuildArch:      noarch

%description
The goal of pathlib2 is to provide a backport of
`standard pathlib <http://docs.python.org/dev/library/pathlib.html>`_
module which tracks the standard library module,
so all the newest features of the standard pathlib can be
used also on older Python versions.

#-------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:        Object-oriented filesystem paths
BuildRequires: pkgconfig(python3)
BuildRequires: python3dist(setuptools)

%description -n python3-%{pypi_name}
The goal of pathlib2 is to provide a backport of standard pathlib module which
tracks the standard library module, so all the newest features of the standard
pathlib can be used also on older Python versions.


%files -n python3-%{pypi_name}
%doc README.rst LICENSE.rst
%{python3_sitelib}/

#-------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 228 |14mr|python-pathspec-1.1.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-pathspec
Version:        1.1.1
Release:        1
Summary:        Utility library for gitignore style pattern matching of file paths

License:        MPL-2.0
URL:            https://github.com/cpburnz/python-path-specification
Source:         %{pypi_source pathspec}

BuildArch:      noarch
BuildRequires:  python3-devel

%description
Path Specification (pathspec) is a utility library for pattern matching of file
paths. So far this only includes Git's wildmatch pattern matching which itself
is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files.


%package -n     python3-pathspec
Summary:        %{summary}

%description -n python3-pathspec
Path Specification (pathspec) is a utility library for pattern matching of file
paths. So far this only includes Git's wildmatch pattern matching which itself
is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files.


%prep
%autosetup -n pathspec-%{version}


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files pathspec


%files -n python3-pathspec -f %{pyproject_files}
%doc README.rst
%license LICENSE

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 229 |14mr|python-patiencediff-0.2.15-11
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name patiencediff
Name:           python-patiencediff
Version:        0.2.15
Release:        11
Summary:        Python implementation of the patiencediff algorithm

License:        GPL-2.0-or-later
URL:            https://www.breezy-vcs.org/
Source:         %{pypi_source}

BuildRequires:  gcc
BuildRequires:  python3-devel

%global _description %{expand:
This package contains the implementation of the patiencediff algorithm, as
first described by Bram Cohen. Like Python's difflib, this module provides
both a convenience unified_diff function for the generation of unified diffs of
text files as well as a SequenceMatcher that can be used on arbitrary
lists. Patiencediff provides a good balance of performance, nice output for
humans, and implementation simplicity.}

%description %_description

%package -n     python3-patiencediff
Summary:        %{summary}

%description -n python3-patiencediff %_description


%prep
%autosetup -p1 -n patiencediff-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%pyproject_save_files patiencediff

%check
%py3_test_envvars %{python3} -m unittest patiencediff.test_patiencediff

%files -n python3-patiencediff -f %{pyproject_files}
%doc README.rst
%{_bindir}/patiencediff

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 230 |14mr|python-pexpect-4.9.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name  pexpect

Summary:	An efficient, pure Python replacement for Expect
Name:		python-%{pypi_name}
Version:	4.9.0
Release:	1
Source0:	%{pypi_source}
License:	MIT
Group:		Development/Python
Url:		http://pexpect.sourceforge.net/
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(ptyprocess)
BuildArch:	noarch

%description
Pexpect is a pure Python module for spawning child applications,
controlling them, and responding to expected patterns in their
output. Pexpect works like Don Libes' Expect. Pexpect allows your
script to spawn a child application and control it as if a human were
typing commands.

Pexpect can be used for automating interactive applications such as
ssh, ftp, passwd, telnet, etc. It can be used to a automate setup
scripts for duplicating software package installations on different
servers. It can be used for automated software testing. Pexpect is in
the spirit of Don Libes' Expect, but Pexpect is pure Python. Unlike
other Expect-like modules for Python, Pexpect does not require TCL or
Expect, nor does it require C extensions to be compiled. It should work
on any platform that supports the standard Python pty module. The
Pexpect interface was designed to be easy to use.

#---------------------------------------------------
%package -n python3-pexpect
Summary:	Unicode-aware Pure Python Expect-like module for Python 3
Group:		Development/Python
Requires:	python3-ptyprocess

%description -n python3-pexpect
Pexpect is a pure Python module for spawning child applications,
controlling them, and responding to expected patterns in their
output. Pexpect works like Don Libes' Expect. Pexpect allows your
script to spawn a child application and control it as if a human were
typing commands.

Pexpect can be used for automating interactive applications such as
ssh, ftp, passwd, telnet, etc. It can be used to a automate setup
scripts for duplicating software package installations on different
servers. It can be used for automated software testing. Pexpect is in
the spirit of Don Libes' Expect, but Pexpect is pure Python. Unlike
other Expect-like modules for Python, Pexpect does not require TCL or
Expect, nor does it require C extensions to be compiled. It should work
on any platform that supports the standard Python pty module. The
Pexpect interface was designed to be easy to use.

%files -n python3-pexpect
%doc doc examples LICENSE
%{python3_sitelib}/*

#---------------------------------------------------
%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%py3_shebang_fix %{buildroot}%{python3_sitelib}/*


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 231 |14mr|python-pid-3.0.4-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pid

Summary:	PID file management library
Name:		python-%{pypi_name}
Version:	3.0.4
Release:	4
License:	Apache License
Group:		Development/Python
Url:		https://pypi.org/project/pid/
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(setuptools)
BuildRequires:	python3egg(nose)
BuildArch:	noarch

%global _description \
pid provides a PidFile class that manages PID files. PidFile features: \
  - stale detection \
  - locking using fcntl \
  - chmod (default is 0o644) \
  - chown \
  - custom exceptions \
PidFile can also be used as a context manager or a decorator.

%description
%_description

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	PID file management library
Group:		Development/Python

%description -n python3-%{pypi_name}
%_description

%files -n python3-%{pypi_name}
%doc LICENSE AUTHORS CHANGELOG README.rst
%{python3_sitelib}/pid
%{python3_sitelib}/pid-*.egg-info

#------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}
rm -rf *.egg-info

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 232 |14mr|python-pkgconfig-1.5.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pkgconfig
%global _docdir_fmt %{name}

Name:		python-%{pypi_name}
Version:	1.5.5
Release:	1
Summary:	A Python interface to the pkg-config command line tool
Group:		Development/Python
License:	MIT
URL:		https://github.com/matze/%{pypi_name}
Source0:	%{pypi_source}
BuildArch:	noarch

%description
pkgconfig is a Python module to interface with the pkg-config command line
tool and supports Python 2.6+.

It can be used to

* check if a package exists
* check if a package meets certain version requirements
* query CFLAGS and LDFLAGS
* parse the output to build extensions with setup.py

If pkg-config is not on the path, raises EnvironmentError.

#--------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:        A Python3 interface to the pkg-config command line tool
Group:		Development/Python
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
# For tests
BuildRequires:  python3-nose

%description -n python3-%{pypi_name}
pkgconfig is a Python3 module to interface with the pkg-config command line
tool and supports Python 2.6+.

It can be used to

* check if a package exists
* check if a package meets certain version requirements
* query CFLAGS and LDFLAGS
* parse the output to build extensions with setup.py

If pkg-config is not on the path, raises EnvironmentError.

%files -n python3-%{pypi_name}
%{python3_sitelib}/*

#--------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
# Strip shbang
find -name \*.py | xargs sed -i '/^#!\/usr\/bin\/.*python/d'

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 233 |14mr|python-platformdirs-4.2.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name platformdirs

Summary:	Python module for determining appropriate platform-specific dirs
Name:		python-platformdirs
Version:	4.2.2
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/platformdirs/platformdirs
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildArch:	noarch

%description
A small Python package for determining appropriate platform-specific dirs
e.g. a `user data dir`.

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python module for determining appropriate platform-specific dirs
Group:		Development/Python

%description -n python3-%{pypi_name}
A small Python package for determining appropriate platform-specific dirs
e.g. a `user data dir`.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%license LICENSE

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 234 |14mr|python-pluggy-1.5.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module pluggy

Summary:	Plugin and hook calling mechanisms for python
Name:		python-%{module}
Version:	1.5.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/pytest-dev/pluggy
Source0:	%{url}/archive/%{version}/%{module}-%{version}.tar.gz
BuildRequires:	git
BuildRequires:	python3egg(setuptools)
BuildRequires:	python3egg(setuptools-scm)
BuildArch:	noarch

%description
This is the core framework used by the pytest, tox, and devpi projects.
Please read the docs to learn more - https://pluggy.readthedocs.io/en/latest/

#----------------------------------------------------------------------------

%package -n python3-%{module}
Summary:	Plugin and hook calling mechanisms for python
Group:		Development/Python

%description -n python3-%{module}
This is the core framework used by the pytest, tox, and devpi projects.
Please read the docs to learn more - https://pluggy.readthedocs.io/en/latest/

%files -n python3-%{module}
%doc LICENSE README.rst
%{python3_sitelib}/pluggy*

#----------------------------------------------------------------------------

%prep
%setup -qn %{module}-%{version}
git init -q
git config user.name "rpm-build"
git config user.email "<rpm-build>"
git add .
git commit -q -a\
        --author "rpm-build <rpm-build>" -m "%{name}-%{version} base"
git tag %{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 235 |14mr|python-ply-3.11-6
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name ply

Name:		python-ply
Version:	3.11
Release:	6
Group:		Development/Python
License:	BSD-like
Summary:	Python Lex-Yacc
Source0:	http://www.dabeaz.com/ply/ply-%{version}.tar.gz
URL:		http://www.dabeaz.com/ply/
BuildArch:	noarch
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(python3)

%description
PLY is an implementation of lex and yacc parsing tools for Python.

In a nutshell, PLY is nothing more than a straightforward lex/yacc
implementation. Here is a list of its essential features:

 * It's implemented entirely in Python.
 * It uses LR-parsing which is reasonably efficient and well suited
   for larger grammars.
 * PLY provides most of the standard lex/yacc features including support
   for empty productions, precedence rules, error recovery, and support
   for ambiguous grammars.
 * PLY is straightforward to use and provides very extensive error checking.
 * PLY doesn't try to do anything more or less than provide the basic
   lex/yacc functionality. In other words, it's not a large parsing
   framework or a component of some larger system.

The original version of PLY was developed in 2001 for use in an
Introduction to Compilers course where students used it to build a
compiler for a simple Pascal-like language. Because of its use in an
instructional setting, a lot of work went into providing extensive
error checking. In addition, this experience was used to sort out
common usability problems. Since then, a variety of incremental
improvements have been made to the system. PLY-3.0 adds support for
Python 3.0 and gives PLY's internals a much needed overhaul.

#--------------------------------------------------------------------
%package -n	python3-ply
Summary:	Python 3.x version of the PLY lex/yacc implementation
Group:		Development/Python

%description -n	python3-ply
Python 3.x version of ply.

PLY is an implementation of lex and yacc parsing tools for Python.

%files -n python3-ply
%doc CHANGES TODO doc example test
%{python3_sitelib}/ply
%{python3_sitelib}/*.dist-info

#--------------------------------------------------------------------

%prep
%setup -q -n ply-%{version}

# Use the right python...
sed -i -e 's,/usr/local/bin/python,%{_bindir}/python3,g' doc/makedoc.py example/yply/yply.py

rm -rf *.dist-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 236 |14mr|python-poetry-core-2.4.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Poetry PEP 517 Build Backend
Name:		python-poetry-core
Version:	2.4.1
Release:	1
License:	MIT and (ASL 2.0 or BSD)
Group:		Development/Python
Url:		https://github.com/python-poetry/poetry-core
Source0:	https://github.com/python-poetry/poetry-core/archive/%{version}/poetry-core-%{version}.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros
BuildArch:	noarch

%description
A PEP 517 build backend implementation developed for Poetry.
This project is intended to be a light weight, fully compliant, self-contained
package allowing PEP 517 compatible build frontends to build Poetry managed
projects.

#----------------------------------------------------------------------------

%package -n python3-poetry-core
Summary:	Poetry PEP 517 Build Backend
Group:		Development/Python
# The bundled versions are taken from poetry/core/_vendor/vendor.txt
Provides:	bundled(python3dist(attrs)) = 20.3
Provides:	bundled(python3dist(jsonschema)) = 3.2
Provides:	bundled(python3dist(lark-parser)) = 0.9
Provides:	bundled(python3dist(packaging)) = 20.9
Provides:	bundled(python3dist(pyparsing)) = 2.4.7
Provides:	bundled(python3dist(pyrsistent)) = 0.16.1
Provides:	bundled(python3dist(six)) = 1.15
Provides:	bundled(python3dist(tomlkit)) = 0.7
# Previous versions of poetry included poetry-core in it
Conflicts:	python%{python3_version}dist(poetry) < 1.1

%description -n python3-poetry-core
A PEP 517 build backend implementation developed for Poetry.
This project is intended to be a light weight, fully compliant, self-contained
package allowing PEP 517 compatible build frontends to build Poetry managed
projects.

%files -n python3-poetry-core -f %{pyproject_files}
%doc README.md
%license LICENSE

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n poetry-core-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files poetry

# /usr/share/spec-helper/clean_files removes files named core
# but they are listed in the files section
export DONT_CLEANUP=1

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 237 |14mr|python-pretend-1.0.9-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pretend

Name:		python-pretend
Version:	1.0.9
Release:	3
Summary:	A library for stubbing in Python
Group:		Development/Python
License:	BSD
URL:		https://github.com/alex/pretend
Source0:	https://pypi.io/packages/source/p/pretend/pretend-%{version}.tar.gz
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildArch:	noarch

%description
Pretend is a library to make stubbing with Python easier.

#----------------------------------------------------------------
%package -n python3-pretend
Summary:	A library for stubbing in Python
Group:		Development/Python

%description -n python3-pretend
Pretend is a library to make stubbing with Python3 easier.

%files -n python3-pretend
%doc PKG-INFO README.rst LICENSE.rst
%{python3_sitelib}/pretend.py*
%{python3_sitelib}/__pycache__/
%{python3_sitelib}/pretend-%{version}-py*.egg-info

#----------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

# Delete upstream supplied egg-info
rm -rf *.egg-info

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 238 |14mr|python-prettytable-3.11.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name prettytable

Summary:	Python library for displaying data in ASCII table format
Name:		python-prettytable
Version:	3.11.0
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://code.google.com/p/prettytable/
Source0:	%{pypi_source}
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(setuptools-scm)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
PrettyTable is a simple Python library designed to make
 it quick and easy to represent tabular data in visually
appealing ASCII tables. It was inspired by the ASCII
tables used in the PostgreSQL shell psql. PrettyTable
allows for selection of which columns are to be printed,
independent alignment of columns (left or right justified
or centred) and printing of "sub-tables" by specifying a
row range.

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python library for displaying data in ASCII table format
Group:		Development/Python

%description -n python3-%{pypi_name}
PrettyTable is a simple Python library designed to make
 it quick and easy to represent tabular data in visually
appealing ASCII tables. It was inspired by the ASCII
tables used in the PostgreSQL shell psql. PrettyTable
allows for selection of which columns are to be printed,
independent alignment of columns (left or right justified
or centred) and printing of "sub-tables" by specifying a
row range.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md
%license LICENSE

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 239 |14mr|python-priority-2.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name priority

Summary:	A pure-Python implementation of the HTTP/2 priority tree
Name:		python-%{pypi_name}
Version:	2.0.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://python-hyper.org/priority/
Source0:	%pypi_source
# Increase deadline for test_period_of_repetition
Patch1:		deadline.patch
BuildRequires:	python3dist(hypothesis)
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
A HTTP/2 Priority Implementation Priority is a pure-Python
implementation of the priority logic for HTTP/2, set out in RFC 7540 Section
5.3 (Stream Priority)_. This logic allows for clients to express a preference
for how the server allocates its (limited) resources to the many outstanding
HTTP requests that may be running over a single HTTP/2 connection.

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A pure-Python implementation of the HTTP/2 priority tree
Group:		Development/Python

%description -n python3-%{pypi_name}
A HTTP/2 Priority Implementation Priority is a pure-Python
implementation of the priority logic for HTTP/2, set out in RFC 7540 Section
5.3 (Stream Priority)_. This logic allows for clients to express a preference
for how the server allocates its (limited) resources to the many outstanding
HTTP requests that may be running over a single HTTP/2 connection.

%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%check
PYTHONPATH=%{buildroot}%{python3_sitelib}:$PYTHONPATH %{__python3} -m pytest

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 240 |14mr|python-prompt_toolkit-3.0.48-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name prompt_toolkit

Name:           python-%{pypi_name}
Version:	3.0.48
Release:	1
Group:          Development/Python
Summary:        Library for building powerful interactive command lines in Python
License:        BSD
URL:            https://github.com/jonathanslenders/python-prompt-toolkit
Source0:	%{pypi_source}
BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description
prompt_toolkit is a library for building powerful interactive command lines
and terminal applications in Python.

%package -n     python3-%{pypi_name}
Summary:        Library for building powerful interactive command lines in Python
Requires:       python3-pygments
Requires:       python3-six >= 1.9.0
Requires:       python3-wcwidth

%description -n python3-%{pypi_name}
prompt_toolkit is a library for building powerful interactive command lines
and terminal applications in Python.

%prep
%setup -q -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%files -n python3-%{pypi_name}
%doc README.rst AUTHORS.rst CHANGELOG LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 241 |14mr|python-propcache-0.5.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name propcache

Name:           python-%{pypi_name}
Version:        0.5.2
Release:        1
Summary:        Module for fast property caching

License:        Apache-2.0
URL:            https://github.com/aio-libs/propcache
Source:         https://github.com/aio-libs/propcache/archive/v%{version}/%{pypi_name}-%{version}.tar.gz

BuildRequires:  gcc
BuildRequires:  python3-devel
BuildRequires:  python3dist(cython)
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(pytest-xdist)

%global debug_package %{nil}

%global _description %{expand:
Module for fast property caching.}

%description %_description

%package -n python3-%{pypi_name}
Summary:        %{summary}

%description -n python3-%{pypi_name} %_description

%prep
%autosetup -n %{pypi_name}-%{version} -p1
# Disable coverage
sed -r -e 's/(-.*cov.*$)/#\1/g' -i pytest.ini
# Remove Cython's upper version pin
sed -i 's/Cython ~= 3\.1\.0/Cython >= 3.1.0/g' packaging/pep517_backend/_backend.py

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files -l %{pypi_name}

%check
%pytest

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc CHANGES.rst README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 242 |14mr|python-ptyprocess-0.7.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name ptyprocess

Name:		python-%{pypi_name}
Version:	0.7.0
Release:	3
Group:		Development/Python
Summary:	Run a subprocess in a pseudo terminal
License:	BSD
URL:		https://pypi.python.org/pypi/%{pypi_name}
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
Launch a subprocess in a pseudo terminal (pty), and interact with both
the process and its pty.

#----------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:	Run a subprocess in a pseudo terminal
Group:		Development/Python

%description -n python3-%{pypi_name}
Launch a subprocess in a pseudo terminal (pty), and interact with both
the process and its pty.

%files -n python3-%{pypi_name}
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#----------------------------------------------------------
%prep
%setup -qn %{pypi_name}-%{version}

find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 243 |14mr|python-py-1.11.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name  py

Name:		python-%{pypi_name}
Version:	1.11.0
Release:	1
Summary:	Library with cross-python path, ini-parsing, io, code, log facilities
Group:		Development/Python
Url:		http://py.readthedocs.org
License:	MIT
Source0:	https://pypi.io/packages/source/p/py/py-%{version}.tar.gz
BuildRequires:	python3-setuptools
BuildRequires:	python3-setuptools_scm
BuildRequires:	python3-apipkg
BuildArch:	noarch

%description
NOTE: this library is in maintenance mode and should not be used in new code.

The py lib is a development support library featuring these tools and
APIs:

* py.path: uniform local and svn path objects
* py.apipkg: explicit API control and lazy-importing
* py.iniconfig: easy parsing of .ini files
* py.code: dynamic code generation and introspection

NOTE: prior to the 1.4 release this distribution used
to contain py.test which is now its own package,
see http://pytest.org

#----------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	Library with cross-python path, ini-parsing, io, code, log facilities
Group:		Development/Python

%description -n python3-%{pypi_name}
NOTE: this library is in maintenance mode and should
not be used in new code.

The py lib is a development support library featuring
these tools and APIs:

* py.path: uniform local and svn path objects
* py.apipkg: explicit API control and lazy-importing
* py.iniconfig: easy parsing of .ini files
* py.code: dynamic code generation and introspection


NOTE: prior to the 1.4 release this distribution used
to contain py.test which is now its own package,
see http://pytest.org

%files -n python3-%{pypi_name}
%doc CHANGELOG.rst LICENSE README.rst
%{python3_sitelib}/py*

#----------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 244 |14mr|python-pyagentx-0.4.pcs.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define srcname pyagentx

Name:		python-%{srcname}
Version:	0.4.pcs.2
Release:	1
Summary:	Native Python AgentX client implementation to extend SNMP agents
Group:		Development/Python
License:	BSD-2
URL:		https://github.com/ondrejmular/pyagentx
Source0:	https://github.com/ondrejmular/pyagentx/archive/refs/tags/v%{version}.tar.gz?/%{srcname}-%{version}.tar.gz
BuildRequires:	python3-setuptools
BuildRequires:	python3-devel
BuildArch:	noarch

%description
"pyagentx" is pure Python implementation of AgentX protocol (RFC 2741),
it will allow you to extend SNMP agent (snmpd) by writing AgentX subagents,
without modifying your original SNMP agent.

[RFC 2741: Agent Extensibility (AgentX) Protocol Version 1]
(http://www.ietf.org/rfc/rfc2741.txt)

#----------------------------------------------
%package -n python3-%{srcname}
Summary:	Native Python AgentX client implementation to extend SNMP agents
Group:		Development/Python

%description -n python3-%{srcname}
"pyagentx" is pure Python implementation of AgentX protocol (RFC 2741),
it will allow you to extend SNMP agent (snmpd) by writing AgentX subagents,
without modifying your original SNMP agent.

[RFC 2741: Agent Extensibility (AgentX) Protocol Version 1]
(http://www.ietf.org/rfc/rfc2741.txt)

%files -n python3-%{srcname}
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-0.4.1*-info

#----------------------------------------------
%prep
%autosetup -p1 -n %{srcname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 245 |14mr|python-pybeam-0.7-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module	pybeam

Name:		python-%{module}
Version:	0.7
Release:	2
Summary:	Python module to parse Erlang BEAM files
License:	MIT
Group:		Development/Python
URL:		https://github.com/matwey/%{module}
Source0:	https://github.com/matwey/%{module}/archive/%{version}/%{module}-%{version}.tar.gz
BuildArch:	noarch

%description
Python module to parse Erlang BEAM files.
#----------------------------------------------------------

%package -n	python3-%{module}
Summary:	Python 3 module to parse Erlang BEAM files
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(construct)
BuildRequires:	python3dist(sphinx)
BuildArch:	noarch

%description -n python3-%{module}
Python 3 module to parse Erlang BEAM files.

%files -n python3-%{module}
%doc README.md LICENSE
%{python3_sitelib}/*

#----------------------------------------------------------

%prep
%setup -q -n %{module}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 246 |14mr|python-pycryptodomex-3.21.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pycryptodomex

Summary:	A self-contained cryptographic library for Python
Name:		python-%{pypi_name}
Version:	3.21.0
Release:	1
# PyCrypto-based code is public domain, further PyCryptodome contributions are
# BSD
License:	BSD and Public Domain
Group:		Development/Python
Url:		http://www.pycryptodome.org/
Source0:	%{pypi_source}
# Use external libtomcrypt library
Patch0:		%{name}-3.15.0-use_external_libtomcrypt.patch
# Fix documentation build with Sphinx <= 1.2, especially on EL
Patch1:		%{name}-3.7.0-sphinx.patch
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(pycrypto)
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(libtomcrypt)
BuildRequires:	pkgconfig(libtommath)
BuildRequires:	pkgconfig(python3)

%description
PyCryptodome is a self-contained Python package of low-level cryptographic
primitives. It's a fork of PyCrypto. It brings several enhancements with respect
to the last official version of PyCrypto (2.6.1).

#------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python
Requires:	gmp%{?_isa}

%description -n python3-%{pypi_name}
PyCryptodome is a self-contained Python package of low-level cryptographic
primitives. It's a fork of PyCrypto. It brings several enhancements with respect
to the last official version of PyCrypto (2.6.1), for instance:
\
 * Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
 * Accelerated AES on Intel platforms via AES-NI
 * Elliptic curves cryptography (NIST P-256 curve only)
 * Better and more compact API (nonce and iv attributes for ciphers, automatic
 generation of random nonces and IVs, simplified CTR cipher mode, and more)
 * SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
 * Salsa20 and ChaCha20 stream ciphers
 * scrypt and HKDF
 * Deterministic (EC)DSA
 * Password-protected PKCS#8 key containers
 * Shamir's Secret Sharing scheme
 * Random numbers get sourced directly from the OS (and not from a CSPRNG in
 userspace)
 * Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
 * Major clean ups and simplification of the code base

PyCryptodome is not a wrapper to a separate C library like OpenSSL. To the
largest possible extent, algorithms are implemented in pure Python. Only the
pieces that are extremely critical to performance (e.g. block ciphers) are
implemented as C extensions.

Note: all modules are installed under the Cryptodome package to avoid conflicts\
with the PyCrypto library.


%files -n python3-%{pypi_name}
%doc AUTHORS.rst Changelog.rst README.rst
%license LICENSE.rst
%{python3_sitearch}/Cryptodome
%exclude %{python3_sitearch}/Cryptodome/SelfTest
%{python3_sitearch}/%{pypi_name}-%{version}.dist-info

#------------------------------------------------

%package -n python3-%{pypi_name}-selftest
Summary:	PyCryptodome test suite module
Group:		Development/Python
Requires:	python3-%{pypi_name}%{?_isa}

%description -n python3-%{pypi_name}-selftest
This package provides the PyCryptodome test suite module (Cryptodome.SelfTest).

%files -n python3-%{pypi_name}-selftest
%{python3_sitearch}/Cryptodome/SelfTest

#------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

# Drop bundled libraries
rm -r src/libtom/

# Remove shebang
sed '1{\@^#! /usr/bin/env python@d}' lib/Cryptodome/SelfTest/__main__.py >lib/Cryptodome/SelfTest/__main__.py.new && \
touch -r lib/Cryptodome/SelfTest/__main__.py lib/Cryptodome/SelfTest/__main__.py.new && \
mv lib/Cryptodome/SelfTest/__main__.py.new lib/Cryptodome/SelfTest/__main__.py

%generate_buildrequires
%pyproject_buildrequires -r

%build
touch .separate_namespace
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 247 |14mr|python-pydbus-0.6.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pydbus

Name:           python-%{pypi_name}
Version:        0.6.0
Release:        3
Group:          Development/Python
Summary:        Pythonic DBus library

License:        LGPLv2+
URL:            https://pypi.python.org/pypi/pydbus
Source0:        %{pypi_source}

# upstream fix, not yet in release
# https://github.com/LEW21/pydbus/commit/ff792feb45bbdc0dd6a9ff7453825e34b6554865
Patch1: 0001-make-direction-attribute-conforming-to-introspect.dt.patch

# patch submitted for upstream inclusion, not yet merged
# https://github.com/LEW21/pydbus/pull/63
Patch2: 0002-Support-asynchronous-calls-58.patch

# patch submitted for upstream inclusion, not yet merged
# https://github.com/LEW21/pydbus/pull/64
Patch3: 0003-Support-transformation-between-D-Bus-errors-and-exce.patch

BuildArch:      noarch

%global _description \
The pydbus module provides pythonic DBUS bindings.\
It is based on PyGI, the Python GObject Introspection bindings,\
which is the recommended way to use GLib from Python.

%description %{_description}

%package -n python3-%{pypi_name}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
Requires:       python3-gi

%description -n python3-%{pypi_name} %{_description}

Python 3 version.

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%build
%py3_build

%install
%py3_install

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{pypi_name}-*.egg-info/
%{python3_sitelib}/%{pypi_name}/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 248 |14mr|python-pyflakes-3.2.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyflakes

Summary:	Simple program which checks Python source files for errors
Name:		python-%{pypi_name}
Version:	3.2.0
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://github.com/PyCQA/pyflakes
Source0:	%{pypi_source}
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(setuptools)
BuildArch:	noarch

%description
Pyflakes is a simple program which checks Python source files for errors. It is
similar to PyChecker in scope, but differs in that it does not execute the
modules to check them. This is both safer and faster, although it does not
perform as many checks.

Unlike PyLint, Pyflakes checks only for logical errors in programs; it does
not perform any checks on style.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:        Simple program which checks Python source files for errors
Provides:       py3flakes = %{EVRD}
Provides:	pyflakes = %{EVRD}
Obsoletes:	pyflakes < %{EVRD}

%description -n python3-%{pypi_name}
Pyflakes is a simple program which checks Python source files for errors. It is
similar to PyChecker in scope, but differs in that it does not execute the
modules to check them. This is both safer and faster, although it does not
perform as many checks.

Unlike PyLint, Pyflakes checks only for logical errors in programs; it does
not perform any checks on style.

%files -n python3-%{pypi_name}
%license LICENSE
%doc AUTHORS NEWS.rst README.rst
%{_bindir}/pyflakes-%{python3_version}
%{_bindir}/pyflakes-3
%{_bindir}/pyflakes
%{python3_sitelib}/pyflakes*
%exclude %{python3_sitelib}/pyflakes/test/
#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/pyflakes-%{python3_version}
ln -s pyflakes-%{python3_version} %{buildroot}%{_bindir}/pyflakes-3
ln -s pyflakes-3 %{buildroot}%{_bindir}/pyflakes

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 249 |14mr|python-pyglet-1.5.29-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name  pyglet

Summary:	A cross-platform windowing and multimedia library for Python
Name:		python-%{pypi_name}
Version:	1.5.29
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://pyglet.org
# repack with script pyglet-get-tarball.sh
Source0:	%{pypi_source %{pypi_name} %{version} zip}
Source1:	python-pyglet.rpmlintrc
BuildArch:	noarch

%description
Pyglet provides an object-oriented programming interface for
developing games and other visually-rich applications for Windows, Mac
OS X and Linux. Some of the features of pyglet are:

* No external dependencies or installation requirements. For most
  application and game requirements, pyglet needs nothing else besides
  Python, simplifying distribution and installation.

* Take advantage of multiple windows and multi-monitor
  desktops. pyglet allows you to use as many windows as you need,
  and is fully aware of multi-monitor setups for use with
  fullscreen games.

* Load images, sound, music and video in almost any format. pyglet can
  optionally use AVbin to play back audio formats such as MP3,
  OGG/Vorbis and WMA, and video formats such as DivX, MPEG-2, H.264,
  WMV and Xvid.

#---------------------------------------------------------------
%package -n python3-%{pypi_name}

Summary:	A cross-platform windowing and multimedia library for Python3
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
Requires:	libglvnd-GL
Requires:	libmesaglu
Requires:	libX11
Requires:	python3-pillow

%description -n python3-%{pypi_name}
Pyglet provides an object-oriented programming interface for
developing games and other visually-rich applications for Windows, Mac
OS X and Linux. Some of the features of pyglet are:

* No external dependencies or installation requirements. For most
  application and game requirements, pyglet needs nothing else besides
  Python, simplifying distribution and installation.

* Take advantage of multiple windows and multi-monitor
  desktops. pyglet allows you to use as many windows as you need,
  and is fully aware of multi-monitor setups for use with
  fullscreen games.

* Load images, sound, music and video in almost any format. pyglet can
  optionally use AVbin to play back audio formats such as MP3,
  OGG/Vorbis and WMA, and video formats such as DivX, MPEG-2, H.264,
  WMV and Xvid.

%files -n python3-%{pypi_name}
%doc README* LICENSE NOTICE
%{python3_sitelib}/*
#---------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

# Remove the bundled pypng library (python-pillow provides the same functionality)
rm pyglet/image/codecs/png.py
rm pyglet/extlibs/png.py

# Get rid of hashbang lines. This is a library, it has no executable scripts.
# Also remove Windows newlines
find . -name '*.py' | xargs sed --in-place -e's|#!/usr/bin/\(env \)\?python||;s/\r//'

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 250 |14mr|python-pygments-2.19.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pygments

Summary:	Syntax highlighting package written in Python
Name:		python-pygments
Version:	2.19.1
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://pygments.org/
Source0:	%pypi_source
Requires:	python-pkg-resources
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Pygments is a syntax highlighting package written in Python. It is a
generic syntax highlighter for general use in all kinds of software
such as forum systems, wikis or other applications that need to
prettify source code. Highlights are:

* a wide range of common languages and markup formats is supported
* special attention is paid to details, increasing quality by a fair amount
* support for new languages and formats are added easily
* a number of output formats, presently HTML, LaTeX, RTF, SVG and ANSI
 sequences
* it is usable as a command-line tool and as a library
* ... and it highlights even Brainf*ck!

#--------------------------------------------------------------------

%package -n python3-pygments
Summary:	Syntax highlighting package written in Python3
Group:		Development/Python

%description -n python3-pygments
Pygments is a syntax highlighting package written in Python. It is a
generic syntax highlighter for general use in all kinds of software
such as forum systems, wikis or other applications that need to
prettify source code.

%files -n python3-pygments
%doc AUTHORS CHANGES
%license LICENSE
%{_bindir}/pygmentize
%{_mandir}/man1/pygmentize.*
%{python3_sitelib}/*

#--------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 251 |14mr|python-pyinotify-0.9.6-5
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyinotify

Summary:	Python module for monitoring filesystems changes
Name:		python-%{pypi_name}
Version:	0.9.6
Release:	5
License:	MIT
Group:		Development/Python
Url:		http://github.com/seb-m/pyinotify
Source0:	%{pypi_source}
Provides:	%{pypi_name} = %{EVRD}
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Pyinotify is a pure Python module for monitoring filesystems changes.
Pyinotify relies on inotify, a Linux Kernel functionality (since
kernel 2.6.13). inotify is an event-driven notification mechanism, its
notifications are exported to user space through three system calls.
Pyinotify binds these system calls and provides an implementation on
top of them.

#----------------------------------------------------------------------------
%package -n python3-pyinotify
Summary:	Python module for monitoring filesystems changes
Group:		Development/Python
# Previous py3 subpackages were named in a wrong way
Obsoletes:	python3-pyinotify-0.9.4 < 0.9.5
Obsoletes:	python3-pyinotify-0.9.5 < 0.9.5-4

%description -n python3-pyinotify
Pyinotify is a pure Python module for monitoring filesystems changes.
Pyinotify relies on inotify, a Linux Kernel functionality (since
kernel 2.6.13). inotify is an event-driven notification mechanism, its
notifications are exported to user space through three system calls.
Pyinotify binds these system calls and provides an implementation on
top of them.

%files -n python3-pyinotify
%doc README* ACKS COPYING
%{python3_sitelib}/*

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 252 |14mr|python-pylsqpack-0.3.24-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pylsqpack

# -Wl,--as-needed flag breaks the link to `ls-qpack` library
%undefine _ld_as_needed

Name:           python-%{pypi_name}
Version:        0.3.24
Release:        1
Summary:        %{pypi_name} is a wrapper around the ls-qpack library
Group:          Development/Python
License:        BSD-3-Clause
URL:            https://github.com/aiortc/%{pypi_name}
Source0:        %{pypi_source}
Patch0:         %{name}-unbundle_vendor_libs.patch
Patch1:         pylsqpack-pyproject.patch
BuildRequires:  ls-qpack-devel
BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3-devel
BuildRequires:  python3-pytest

%description
It provides Python Decoder and Encoder objects
to read or write HTTP/3 headers compressed with QPACK.

%package -n python3-%{pypi_name}
Summary: %{pypi_name} is a wrapper around the ls-qpack library
Group:          Development/Python

%description -n python3-%{pypi_name}
It provides Python Decoder and Encoder objects
to read or write HTTP/3 headers compressed with QPACK.

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%check
%pytest -v

%files -n python3-%{pypi_name} -f %{pyproject_files}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 253 |14mr|python-pyproject-api-1.6.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Name:           python-pyproject-api
Version:        1.6.1
Release:        2
Epoch:          1
Summary:        API to interact with the python pyproject.toml based projects
Group:          Development/Python
License:        MIT
URL:            https://pyproject-api.readthedocs.org
Source0:        https://files.pythonhosted.org/packages/source/p/pyproject-api/pyproject_api-%{version}.tar.gz
Patch0:         pyproject-api-tests.patch
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros

%global _description %{expand:
API to interact with the python pyproject.toml based projects.}

%description %_description

#---------------------------------------------
%package -n     python3-pyproject-api
Summary:        %{summary}
Group:		Development/Python

%description -n python3-pyproject-api %_description

%files -n python3-pyproject-api -f %{pyproject_files}
%doc README.md

#---------------------------------------------

%prep
%autosetup -p1 -n pyproject_api-%{version}
# Remove unneeded testing deps
sed -i "/covdefaults/d;/pytest-cov/d" pyproject.toml

%generate_buildrequires
%pyproject_buildrequires -w -x testing

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files pyproject_api

%check
# We don't want to depend on Python 2
%pytest -k "not test_can_build_on_python_2"

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 254 |14mr|python-pyproject_metadata-0.9.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyproject_metadata

Summary:	PEP 621 metadata parsing
Name:		python-pyproject_metadata
Version:	0.9.0
Release:	1
License:	MIT
Group:		Development/Python
URL:		https://pypi.org/project/pyproject_metadata/
Source0:	%{pypi_source}
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(wheel)
BuildRequires:	pyproject-rpm-macros
BuildArch:	noarch

%description
Dataclass for PEP 621 metadata with support for core metadata generation

This project does not implement the parsing of pyproject.toml containing PEP
621 metadata.

Instead, given a Python data structure representing PEP 621 metadata (already
parsed), it will validate this input and generate a PEP 643-compliant metadata
file (e.g. PKG-INFO).

#----------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	PEP 621 metadata parsing
Group:		Development/Python

%description -n python3-%{pypi_name}
Dataclass for PEP 621 metadata with support for core metadata generation

This project does not implement the parsing of pyproject.toml containing PEP
621 metadata.

Instead, given a Python data structure representing PEP 621 metadata (already
parsed), it will validate this input and generate a PEP 643-compliant metadata
file (e.g. PKG-INFO).

%files -n python3-%{pypi_name}
%{python3_sitelib}/pyproject_metadata
%{python3_sitelib}/pyproject_metadata-%{version}*.*-info

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n pyproject_metadata-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 255 |14mr|python-pyspf-2.0.14-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyspf
%define mod_name %{pypi_name}
%define oname pyspf

Summary:        SPF (Sender Policy Framework) implemented in Python
Name:           python-%{oname}
Version:        2.0.14
Release:        1
License:        Python-2.0
Group:          Development/Python
Url:            https://github.com/sdgathman/pyspf/
Source0:        %{pypi_source}

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3dist(wheel)
BuildRequires:  python3dist(pip)
BuildArch:      noarch

%description
%{summary}.

#------------------------------------------------------------------

%package -n python3-%{oname}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{oname}
%{summary}.

%files -n python3-%{oname}
%{_bindir}/spfquery.py
%{_bindir}/type99.py
%artifact   %{python3_sitelib}/__pycache__
%{python3_sitelib}/pyspf-%{version}.dist-info
%{python3_sitelib}/spf.py

#------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 256 |14mr|python-pytesseract-0.3.13-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pytesseract
%define mod_name %{pypi_name}
%define oname pytesseract

Summary:        Python-tesseract is a python wrapper for Google's Tesseract-OCR
Name:           python-%{oname}
Version:        0.3.13
Release:        1
License:        Apache-2.0
Group:          Development/Python
Url:            https://github.com/madmaze/pytesseract
Source0:        %{pypi_source}

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3dist(wheel)
BuildRequires:  python3dist(pip)
BuildArch:      noarch

%description
%{summary}.

#------------------------------------------------------------------

%package -n python3-%{oname}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{oname}
%{summary}.

%files -n python3-%{oname} -f %{pyproject_files}
%{_bindir}/pytesseract

#------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{mod_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 257 |14mr|python-pytest-asyncio-0.26.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global _python_no_extras_requires 1

%global pypi_name pytest_asyncio
%global modname pytest-asyncio

Summary:	Pytest support for asyncio
Name:		python-%{modname}
Version:	0.26.0
Release:	1
License:	ASL 2.0
Group:		Development/Python
Url:		https://pypi.python.org/pypi/%{pypi_name}
Source0:	%pypi_source
Patch0:		pytest-asyncio-requirements.patch
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(setuptools-scm)
BuildRequires:	python3dist(wheel)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
pytest-asyncio is an Apache2 licensed library, written in Python, for testing
asyncio code with pytest.

asyncio code is usually written in the form of coroutines, which makes it
slightly more difficult to test using normal testing tools. pytest-asyncio
provides useful fixtures and markers to make testing easier.

#----------------------------------------------------------------------------

%package -n python3-%{modname}
Summary:	Pytest support for asyncio
Group:		Development/Python

%description -n python3-%{modname}
pytest-asyncio is an Apache2 licensed library, written in Python, for testing
asyncio code with pytest.

asyncio code is usually written in the form of coroutines, which makes it
slightly more difficult to test using normal testing tools. pytest-asyncio
provides useful fixtures and markers to make testing easier.

%files -n python3-%{modname} -f %{pyproject_files}
%license LICENSE
%doc README.rst

#-------------------------------------------------------------------------
%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files pytest_asyncio

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 258 |14mr|python-pytest-randomly-3.15.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pytest_randomly

Summary:	Pytest plugin to randomly order tests and control random
Name:		python-pytest-randomly
Version:	3.15.0
Release:	2
License:	BSD
Group:		Development/Python
Url:		https://pypi.org/project/pytest-randomly
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Pytest plugin to randomly order tests and control random.seed.

#----------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Pytest plugin to randomly order tests and control random
Group:		Development/Python
Requires:	python3dist(pytest)
Requires:	python3dist(setuptools)
Obsoletes:	python3-pytest-randomly < 3.15.0

%description -n python3-%{pypi_name}
Pytest plugin to randomly order tests and control random.seed.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%license LICENSE

#----------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 259 |14mr|python-pytest-rerunfailures-15.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname pytest-rerunfailures

Name:		python-%{srcname}
Version:	15.0
Release:	1
Summary:	A py.test plugin that re-runs failed tests to eliminate flakey failures
Group:		Development/Python
License:	MPLv2.0
URL:		https://github.com/pytest-dev/%{srcname}
Source0:	https://github.com/pytest-dev/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz

BuildArch:	noarch

%description
pytest-rerunfailures is a plugin for py.test that re-runs tests to eliminate
intermittent failures.

#------------------------------------------------------------------------
%package -n python3-%{srcname}
Summary:	%{summary}
BuildRequires:	python3-devel
BuildRequires:	python3-pytest >= 5.3
BuildRequires:	python3-setuptools >= 40.0

%description -n python3-%{srcname}
pytest-rerunfailures is a plugin for py.test that re-runs tests to eliminate
intermittent failures.

%files -n python3-%{srcname}
%license LICENSE
%doc CHANGES.rst README.rst
%{python3_sitelib}/pytest_rerunfailures.py
%{python3_sitelib}/__pycache__/pytest_rerunfailures.cpython-*
%{python3_sitelib}/pytest_rerunfailures-%{version}-py*.egg-info/

#--------------------------------------------------------------------------
%prep
%autosetup -n %{srcname}-%{version}


%build
%py3_build


%install
%py3_install


%check
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest tests/test_pytest_rerunfailures.py

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 260 |14mr|python-pytest-xdist-3.3.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pytest-xdist
%global _python_no_extras_requires 1

Summary:	Pytest xdist plugin
Name:		python-%{pypi_name}
Version:	3.3.1
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/pytest-dev/%{pypi_name}
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros
# for tests
BuildRequires:	python3-pexpect
BuildArch:	noarch

%description
pytest xdist plugin for distributed testing and loop-on-failing modes.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Pytest xdist plugin
Group:		Development/Python
# python3 files were in main package
Obsoletes:	python-%{pypi_name} < 3.2.1

%description -n python3-%{pypi_name}
pytest xdist plugin for distributed testing and loop-on-failing modes.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc *.rst

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -x testing,psutil,setproctitle

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files xdist

%check
%pytest -v

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 261 |14mr|python-pythran-0.16.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pythran

%bcond_with docs
%bcond_with check

Name:		python-%{pypi_name}
Version:	0.16.1
Release:	1
Summary:	Ahead of Time compiler for numeric kernels
Group:		Development/Python
License:	BSD 3-Clause
URL:		https://github.com/serge-sans-paille/pythran
Source0:	%{pypi_source}
Patch0:		pythran-requirements.patch
BuildArch:	noarch

BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3-devel
BuildRequires:	python3dist(toml)
BuildRequires:	python3dist(wheel)
BuildRequires:	python3dist(pip)
%if %{with docs}
BuildRequires:	python3dist(sphinx)
BuildRequires:	python3dist(numpy)
BuildRequires:	python3dist(beniget)
BuildRequires:	python3dist(gast)
%endif

%description
Pythran is an ahead of time compiler for a subset of the Python language, with
a focus on scientific computing. It takes a Python module annotated with a few
interface descriptions and turns it into a native Python module with the same
interface, but (hopefully) faster.

It is meant to efficiently compile scientific programs, and takes advantage of
multi-cores and SIMD instruction units.

#------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name}
Pythran is an ahead of time compiler for a subset of the Python language, with
a focus on scientific computing. It takes a Python module annotated with a few
interface descriptions and turns it into a native Python module with the same
interface, but (hopefully) faster.

It is meant to efficiently compile scientific programs, and takes advantage of
multi-cores and SIMD instruction units.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst
%if %{with docs}
%doc html
%endif
%{_bindir}/pythran
%{_bindir}/pythran-config

#------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

# clean unwanted files
find . -name "*.rej" -delete -print

%build
%pyproject_wheel

%if %{with docs}
# generate html docs
PYTHONPATH=${PWD} sphinx-build-3 docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%endif

%install
%pyproject_install
%pyproject_save_files %{pypi_name} omp

%if %{with check}
%check
%{__python3} setup.py test
%endif



%changelog
* Thu Sep 08 2022 wally <wally> 0.11.0-1.mga9
+ Revision: 1885842
- imported package python-pythran


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 262 |14mr|python-qrcode-7.4.2-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name qrcode

Summary:	Python QR Code image generator
Name:		python-%{pypi_name}
Version:	7.4.2
Release:	2
License:	BSD
Group:		Development/Python
Url:		https://github.com/lincolnloop/python-qrcode
Source0:	https://github.com/lincolnloop/python-qrcode/archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
BuildRequires:	python3dist(pillow)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(six)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
This module uses the Python Imaging Library (PIL) to allow for the
generation of QR Codes.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python QR Code image generator
Group:		Development/Python
Requires:	python3dist(pillow)
Requires:	python3-%{pypi_name}-core = %{EVRD}

%description -n python3-%{pypi_name}
This module uses the Python3 Imaging Library (PIL) to allow for the
generation of QR Codes

%files -n python3-%{pypi_name}
%{_bindir}/qr
%{_mandir}/man1/qr.1*
%{python3_sitelib}/%{pypi_name}/image/svg.py*
%{python3_sitelib}/%{pypi_name}/image/pil.py*

#----------------------------------------------------------------------------


%package -n python3-%{pypi_name}-core
Summary:	Python3 QR Code image generator (core library)
Group:		Development/Python
Requires:	python3dist(six)

%description -n python3-%{pypi_name}-core
Core Python3 module for QR code generation. Does not contain image rendering

%files -n python3-%{pypi_name}-core
%doc LICENSE README.rst CHANGES.rst
%dir %{python3_sitelib}/%{pypi_name}/
%dir %{python3_sitelib}/%{pypi_name}/image
%{python3_sitelib}/%{pypi_name}*.dist-info
%{python3_sitelib}/%{pypi_name}/*.py*
%{python3_sitelib}/%{pypi_name}/__pycache__/*
%{python3_sitelib}/%{pypi_name}/image/__init__.py*
%{python3_sitelib}/%{pypi_name}/image/base.py*
%{python3_sitelib}/%{pypi_name}/image/__pycache__/*
%{python3_sitelib}/%{pypi_name}/image/styles
%{python3_sitelib}/%{pypi_name}/image/styledpil.py
%{python3_sitelib}/%{pypi_name}/image/pure.py*
%{python3_sitelib}/%{pypi_name}/compat
#----------------------------------------------------------------------------


%prep
%autosetup -p1 -n %{name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
rm -Rf %{buildroot}%{python3_sitelib}/%{pypi_name}/tests

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 263 |14mr|python-random2-1.0.1-8
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	pypi_name	random2

Name:		python-%{pypi_name}
Version:	1.0.1
Release:	8
Summary:	Python 3 compatible Pytohn 2 `random` Module
Source0:	http://pypi.python.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.zip
License:	Python
Group:		Development/Python
Url:		http://pypi.python.org/pypi/random2
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
This package provides a Python 3 ported version of Python 2.7's ``random``
module. It has also been back-ported to work in Python 2.6.

In Python 3, the implementation of ``randrange()`` was changed, so that even
with the same seed you get different sequences in Python 2 and 3. Note that
several high-level functions such as ``randint()`` and ``choice()`` use
``randrange()``.

#------------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:	Python 3 compatible Pytohn 2 `random` Module
BuildArch:	noarch

%description -n python3-%{pypi_name}
This package provides a Python 3 ported version of Python 2.7's ``random``
module. It has also been back-ported to work in Python 2.6.

In Python 3, the implementation of ``randrange()`` was changed, so that even
with the same seed you get different sequences in Python 2 and 3. Note that
several high-level functions such as ``randint()`` and ``choice()`` use
``randrange()``.

%files -n python3-%{pypi_name}
%doc CHANGES.txt README.txt
%{python3_sitelib}/random2.py*
%{python3_sitelib}/random2*.dist-info
%{python3_sitelib}/__pycache__/*
#------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 264 |14mr|python-rapidfuzz-3.11.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global	debug_package %{nil}

%global	pypi_name rapidfuzz
%global	oname RapidFuzz

Summary:	RapidFuzz is a fast string matching library for Python and C++
Name:		python-%{pypi_name}
Version:	3.11.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/maxbachmann/RapidFuzz
Source0:	%{pypi_source}
BuildRequires:	cmake
BuildRequires:	jarowinkler-cpp
BuildRequires:	ninja
BuildRequires:	pyproject-rpm-macros
BuildRequires:  python3-pip
BuildRequires:  python3-tomli
BuildRequires:	rapidfuzz-cpp
BuildRequires:	taskflow
#BuildRequires:	python3dist(numpy)
#BuildRequires:	python3dist(rapidfuzz-capi)
BuildRequires:	python3dist(scikit-build)
#BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(wheel)
BuildRequires:	pkgconfig(python3)

%description
RapidFuzz is a fast string matching library for Python and C++,
which is using the string similarity calculations from FuzzyWuzzy.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	This package provides the C-API of RapidFuzz
Group:		Development/Python

%description -n python3-%{pypi_name}
RapidFuzz is a fast string matching library for Python and C++,
which is using the string similarity calculations from FuzzyWuzzy.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README*
%license LICENSE

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -R

%build
#FIXME: investigate C extensions build failure
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files %{pypi_name}



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 265 |14mr|python-rdflib-7.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	pypi_name rdflib

Summary:	Python library for working with RDF
Name:		python-%{pypi_name}
Version:	7.0.0
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://github.com/RDFLib/rdflib
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pyproject-rpm-macros
BuildArch:	noarch

%description
RDFLib is a Python library for working with RDF, a simple yet powerful
language for representing information. The library contains parsers and
serializers for RDF/XML, N3, NTriples, Turtle, TriX and RDFa . It presents
a Graph interface which can be backed by any one of a number of Store
implementations, including, Memory, MySQL, Redland, SQLite, Sleepycat and
SQLObject.

#-----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python 3 library for working with RDF
Group: 		Development/Python
Requires:	python3dist(requests)

%description -n python3-%{pypi_name}
RDFLib is a Python library for working with RDF, a simple yet powerful
language for representing information. The library contains parsers and
serializers for RDF/XML, N3, NTriples, Turtle, TriX and RDFa . It presents
a Graph interface which can be backed by any one of a number of Store
implementations, including, Memory, MySQL, Redland, SQLite, Sleepycat and
SQLObject.

%files -n python3-%{pypi_name}
%doc LICENSE
%{python3_sitelib}/*

#-----------------------------------------------------------------------------

# NOTE: While the library modules for both python versions could be installed
# together, the utility scripts have always the same names so that the ones for
# python 2 cannot be installed with the ones for python 3.
# Put those scripts in a separate sub-package and mark the package for
# python 3 as conflicting with the python 2 one.

%package -n python3-%{pypi_name}-tools
Summary:	Utility scripts for %{name}
Group:		File tools
Requires:	python3-%{pypi_name} = %{EVRD}
Conflicts:	%{name} < %{EVRD}
Conflicts:	python-%{pypi_name}-tools
BuildArch:	noarch

%description -n python3-%{pypi_name}-tools
Utility scripts for %{name}.

%files -n python3-%{pypi_name}-tools
%doc LICENSE
%{_bindir}/csv2rdf
%{_bindir}/rdf*

#-----------------------------------------------------------------------------


%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel


%install
%pyproject_install

# Drop the tests
rm -rf %{buildroot}%{python3_sitelib}/test

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 266 |14mr|python-referencing-0.35.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name referencing

Summary:	An implementation-agnostic implementation of JSON reference resolution
Name:		python-%{pypi_name}
Version:	0.35.1
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://pypi.python.org/pypi/%{pypi_name}
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
An implementation-agnostic implementation of JSON reference resolution.
In other words, a way for e.g. JSON Schema tooling to resolve the $ref
keyword across all drafts without needing to implement support themselves.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	An implementation-agnostic implementation of JSON reference resolution
Group:		Development/Python

%description -n python3-%{pypi_name}
An implementation-agnostic implementation of JSON reference resolution.
In other words, a way for e.g. JSON Schema tooling to resolve the $ref
keyword across all drafts without needing to implement support themselves.

%files -n python3-%{pypi_name} -f %{pyproject_files}

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 267 |14mr|python-remoto-1.2.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name remoto

Name:		python-%{pypi_name}
Version:	1.2.1
Release:	2
Summary:	Execute remote commands or processes
Group:		Development/Python
License:	MIT
URL:		https://github.com/alfredodeza/remoto
Source0:	https://files.pythonhosted.org/packages/42/02/a9e5b25538bd12d98c7ea6d277c33e472d1d1d4ec50a4d42be3ca73f6023/remoto-1.2.1.tar.gz
BuildRequires:	python3-devel
BuildRequires:	python3-pytest
BuildRequires:	python3-execnet >= 1.2.0
BuildRequires:	python3-mock
BuildRequires:	python3-setuptools
BuildArch:	noarch

%global _description\
Execute remote commands or processes.

%description %_description
#------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Execute remote commands or processes
Requires:	python3
Requires:	python3-execnet >= 1.2.0

%description -n python3-%{pypi_name} %_description

%files -n python3-%{pypi_name}
%{python3_sitelib}/*
%license LICENSE
%doc README.rst

#------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 268 |14mr|python-requests-2.34.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond tests    0
%bcond extras    0
%bcond extradeps 0

Name:           python-requests
Version:        2.34.2
Release:        1
Summary:        HTTP library, written in Python, for human beings

License:        Apache-2.0
URL:            https://pypi.io/project/requests
Source:         https://github.com/requests/requests/archive/v%{version}/requests-v%{version}.tar.gz

# Explicitly use the system certificates in ca-certificates.
# https://bugzilla.redhat.com/show_bug.cgi?id=904614
Patch:          system-certs.patch

# Add support for IPv6 CIDR in no_proxy setting
# This functionality is needed in Openshift and it has been
# proposed for upstream in 2021 but the PR unfortunately stalled.
# Upstream PR: https://github.com/psf/requests/pull/5953
# This change is backported also into RHEL 9.4 (via CS)
Patch:          support_IPv6_CIDR_in_no_proxy.patch

BuildArch:      noarch
BuildRequires:  python%{python3_pkgversion}-devel
%if %{with tests}
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(pytest-httpbin)
BuildRequires:  python3dist(pytest-mock)
BuildRequires:  python3dist(trustme)
%endif

%description
Most existing Python modules for sending HTTP requests are extremely verbose and
cumbersome. Python’s built-in urllib2 module provides most of the HTTP
capabilities you should need, but the API is thoroughly broken. This library is
designed to make HTTP requests easy for developers.


%package -n python%{python3_pkgversion}-requests
Summary:        %{summary}

%description -n python%{python3_pkgversion}-requests
Most existing Python modules for sending HTTP requests are extremely verbose and
cumbersome. Python’s built-in urllib2 module provides most of the HTTP
capabilities you should need, but the API is thoroughly broken. This library is
designed to make HTTP requests easy for developers.


%if %{with extras}
%pyproject_extras_subpkg -n python%{python3_pkgversion}-requests security socks use_chardet_on_py3
%endif


%generate_buildrequires
%pyproject_buildrequires %{?with_extradeps:-x security,socks,use_chardet_on_py3}


%prep
%autosetup -p1 -n requests-%{version}

# env shebang in nonexecutable file
sed -i '/#!\/usr\/.*python/d' src/requests/certs.py

# Some doctests use the internet and fail to pass in Koji. Since doctests don't have names, I don't
# know a way to skip them. We also don't want to patch them out, because patching them out will
# change the docs. Thus, we set pytest not to run doctests at all.
sed -i 's/ --doctest-modules//' pyproject.toml


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files -l requests


%check
%if %{with tests}
%pyproject_check_import
# test_unicode_header_name - reported: https://github.com/psf/requests/issues/6734
# test_use_proxy_from_environment needs pysocks
%pytest -v tests -k "not test_unicode_header_name %{!?with_extradeps:and not test_use_proxy_from_environment}"
%endif


%files -n python%{python3_pkgversion}-requests -f %{pyproject_files}
%doc README.md HISTORY.md

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 269 |14mr|python-requests-ftp-0.3.1-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname requests-ftp

Summary:	FTP transport adapter for python-requests
Name:		python-%{srcname}
Group:			Development/Python
Version:	0.3.1
Release:	4
License:	ASL 2.0
URL:		https://github.com/Lukasa/requests-ftp
Source0:	https://pypi.python.org/packages/source/r/%{srcname}/%{srcname}-%{version}.tar.gz
# from https://github.com/Lukasa/requests-ftp/pull/28, handle multi-line responses
# from 4090846
Patch1:		PR28-01-Adding-2-tests-and-updated-statud_code-build.patch
# from 4f6a9f5
Patch2:		PR28-02-Adding-code-3-to-retr4ieve-status_code.patch
# from 3fb2700
Patch3:		PR28-03-fix-warning-in-interpreting-ftp-status-codes-minor-d.patch
# 2caa427 is only test updates, tests not in pypi tarball
# from 7321ab3
Patch5:		PR28-05-Improve-logging-in-status-code-extraction.patch
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildArch:	noarch

%description
Requests-FTP is an implementation of a very stupid FTP transport adapter for
use with the awesome Requests Python library.

#----------------------------------------------------------------------------

%package -n python3-%{srcname}
Summary:	FTP transport adapter for python3-requests
Group:		Development/Python
Requires:	python3-requests

%description -n python3-requests-ftp
Requests-FTP is an implementation of a very stupid FTP transport adapter for
use with the awesome Requests Python library.

This is the Python 3 version of the transport adapter module.

%files -n python3-%{srcname}
%doc README.rst LICENSE
%{python3_sitelib}/requests_ftp/
%{python3_sitelib}/requests_ftp*.egg-info*

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{srcname}-%{version}

rm -rf requests_ftp.egg-info

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 270 |14mr|python-requests-oauthlib-2.0.0-10
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global distname requests-oauthlib
%global modname requests_oauthlib

Name:               python-requests-oauthlib
Version:            2.0.0
Release:            10
Summary:            OAuthlib authentication support for Requests.

License:            ISC
URL:                http://pypi.python.org/pypi/requests-oauthlib
Source0:            https://github.com/requests/requests-oauthlib/archive/v%{version}/requests-oauthlib-%{version}.tar.gz

BuildArch:          noarch

%description
This project provides first-class OAuth library support for python-request.

%package -n python3-%{distname}
%{?python_provide:%python_provide python3-%{distname}}
Summary:            OAuthlib authentication support for Requests.

BuildRequires:      python3-devel

%description -n python3-%{distname}
This project provides first-class OAuth library support for python-request.

%prep
%autosetup -n %{distname}-%{version} -p1
# Requires python-selenium fix from unmerged https://src.fedoraproject.org/rpms/python-selenium/pull-request/9
# Furthermore then throws error on insisting on only chrome-146 but fedora has 148
rm tests/examples/test_native_spa_pkce_auth0.py

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files -l %{modname}

%files -n python3-%{distname} -f %{pyproject_files}
%doc README.rst HISTORY.rst requirements.txt AUTHORS.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 271 |14mr|python-resolvelib-1.0.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-resolvelib
Version:        1.0.1
Release:        1
Summary:        Resolve abstract dependencies into concrete ones
Group:          Development/Python

License:        ISC
URL:            https://github.com/sarugaku/resolvelib
Source:         %{pypi_source resolvelib}

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros

%description
ResolveLib at the highest level provides a Resolver class that includes
dependency resolution logic. You give it some things, and a little information
on how it should interact with them, and it will spit out a resolution result.

%package -n     python3-resolvelib
Summary:        %{summary}

%description -n python3-resolvelib
ResolveLib at the highest level provides a Resolver class that includes
dependency resolution logic. You give it some things, and a little information
on how it should interact with them, and it will spit out a resolution result.

%prep
%autosetup -p1 -n resolvelib-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files resolvelib

%files -n python3-resolvelib -f %{pyproject_files}
%doc README.rst CHANGELOG.rst
%license LICENSE


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 272 |14mr|python-rich-13.9.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define debug_package %{nil}
%define pypi_name rich

Summary:	Rich is a Python library for rich text and beautiful formatting in the terminal
Name:		python-%{pypi_name}
Version:	13.9.1
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/Textualize/rich
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros

%define _description %{expand:
Rich is a Python library for rich text and beautiful formatting
in the terminal.
The Rich API makes it easy to add color and style to terminal output.
Rich can also render pretty tables, progress bars, markdown,
syntax highlighted source code, tracebacks, and more — out of the box.
}

%description
%{_description}

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name}
%{_description}

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README*

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 273 |14mr|python-rpm-generators-14-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-rpm-generators
Summary:        Dependency generators for Python RPMs
Version:        14
Release:        1
Group:		System/Base
Url:            https://src.fedoraproject.org/rpms/python-rpm-generators

# Originally the following files were part of RPM, so the license is inherited: GPL-2.0-or-later
# The COPYING file is grabbed from the last commit that changed the files
Source0:        https://raw.githubusercontent.com/rpm-software-management/rpm/102eab50b3d0d6546dfe082eac0ade21e6b3dbf1/COPYING
Source1:        python.attr
Source2:        pythondist.attr
# This was crafted in-place as a fork of python.attr, hence also GPL-2.0-or-later
Source3:        pythonname.attr
# This one is also originally from RPM, but it has its own license declaration: LGPL-2.1-or-later
Source4:        pythondistdeps.py
# This was crafted in-place with the following license declaration:
#  LicenseRef-Fedora-Public-Domain OR CC0-1.0 OR LGPL-2.1-or-later OR GPL-2.0-or-later
# Note that CC0-1.0 is not allowed for code in Fedora, so we skip it in the package License tag
Source5:        pythonbundles.py

# See individual licenses above Source declarations
# Originally, this was simplified to GPL-2.0-or-later, but "effective license" analysis is no longer allowed
License:        GPL-2.0-or-later AND LGPL-2.1-or-later AND (LicenseRef-Fedora-Public-Domain OR LGPL-2.1-or-later OR GPL-2.0-or-later)

BuildArch:      noarch

%description
%{summary}.

%package -n python3-rpm-generators
Summary:        %{summary}
Requires:       python3-packaging
# We have parametric macro generators, we need RPM 4.16 (4.15.90+ is 4.16 alpha)
Requires:       rpm > 4.15.90-0
# This contains the Lua functions we use:
Requires:       python-srpm-macros >= 3.10-15

%description -n python3-rpm-generators
%{summary}.

%prep
%autosetup -c -T
cp -a %{sources} .

%install
install -Dpm0644 -t %{buildroot}%{_fileattrsdir} *.attr
install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} *.py

%files -n python3-rpm-generators
%license COPYING
%{_fileattrsdir}/python.attr
%{_fileattrsdir}/pythondist.attr
%{_fileattrsdir}/pythonname.attr
%{_rpmconfigdir}/pythondistdeps.py
%{_rpmconfigdir}/pythonbundles.py

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 274 |14mr|python-rst2pdf-0.102-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Do not update to v.0.98, its need importlib_metadata no available in repo
# in next versions developer removed use importlib_metadata
%define pypi_name rst2pdf

Summary:	Convert restructured text to PDF via reportlab
Name:		python-%{pypi_name}
Version:	0.102
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://rst2pdf.org/
Source0:	https://github.com/rst2pdf/rst2pdf/archive/%{version}.tar.gz?/%{pypi_name}-%{version}.tar.gz
BuildArch:	noarch

%description
The usual way of creating PDF from reStructuredText is by going through LaTeX.
This tool provides an alternative by producing PDF directly using the ReportLab
library.

#-----------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Convert restructured text to PDF via reportlab
Group:		Development/Python
BuildRequires:	python3egg(setuptools)
BuildRequires:	pkgconfig(python3)
Requires:	python3egg(docutils)
Requires:	python3egg(pdfrw)
Requires:	python3egg(pygments)
Requires:	python3egg(reportlab)
Requires:	python3egg(setuptools)

%description -n python3-%{pypi_name}
The usual way of creating PDF from reStructuredText is by going through LaTeX.
This tool provides an alternative by producing PDF directly using the ReportLab
library.

%files -n python3-%{pypi_name}
%doc README.rst LICENSE.txt CHANGES.rst
%{_bindir}/rst2pdf
%{python3_sitelib}/rst2pdf
%{python3_sitelib}/rst2pdf*.egg-info

#-----------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 275 |14mr|python-rtslib-2.2.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname rtslib
%define pypi_name rtslib_fb

Summary:	API for RisingTide Systems generic SCSI target
Name:		python-%{oname}
Version:	2.2.4
Release:	1
License:	ASL 2.0
Group:		Development/Python
Url:		https://github.com/open-iscsi/rtslib-fb
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(hatchling)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
rtslib-fb is an object-based Python library for configuring the LIO generic
SCSI target, present in 3.x Linux kernel versions.

rtslib-fb is a fork of the "rtslib" code written by RisingTide Systems.
The "-fb" differentiates between the original and this version.
Please ensure to use either all "fb" versions of the targetcli components --
targetcli, rtslib, and configshell, or stick with all non-fb versions, since
they are no longer strictly compatible.

#----------------------------------------------------------------------------

%package -n python3-%{oname}
Summary:	API for RisingTide Systems generic SCSI target
Group:		Development/Python

%description -n python3-%{oname}
rtslib-fb is an object-based Python library for configuring the LIO generic
SCSI target, present in 3.x Linux kernel versions.

rtslib-fb is a fork of the "rtslib" code written by RisingTide Systems.
The "-fb" differentiates between the original and this version.
Please ensure to use either all "fb" versions of the targetcli components --
targetcli, rtslib, and configshell, or stick with all non-fb versions, since
they are no longer strictly compatible.

%files -n python3-%{oname}
%doc README.md
%license COPYING
%{_bindir}/targetctl
%{python3_sitelib}/%{oname}
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 276 |14mr|python-ruamel-yaml-0.18.10-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name ruamel.yaml
%global pname ruamel-yaml

Summary:	YAML 1.2 loader/dumper package for Python
Name:		python-%{pname}
Version:	0.18.10
Release:	2
License:	MIT
Group:		Development/Python
Url:		https://pypi.org/project/ruamel.yaml
Source0:	%{pypi_source}
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(wheel)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
ruamel.yaml is a YAML 1.2 loader/dumper package for Python.
It is a derivative of Kirill Simonov’s PyYAML 3.11

#----------------------------------------------------------------------------

%package -n python3-%{pname}
Summary:	YAML 1.2 loader/dumper package for Python
Group:		Development/Python
Requires:	python3dist(ruamel.yaml.clib)
Requires:	python3dist(setuptools)
Provides:	python3-%{pypi_name} = %{EVRD}

%description -n python3-%{pname}
ruamel.yaml is a YAML 1.2 loader/dumper package for Python.
It is a derivative of Kirill Simonov’s PyYAML 3.11

%files -n python3-%{pname}
%doc README.md
%license LICENSE
%{python3_sitelib}/ruamel
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info

#----------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 277 |14mr|python-s3transfer-0.10.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name s3transfer

Summary:	Amazon S3 Transfer Manager for Python
Name:		python-%{pypi_name}
Version:	0.10.2
Release:	1
License:	ASL 2.0
Group:		Development/Python
Url:		https://github.com/boto/botocore
Source0:	%{pypi_source}
BuildArch:	noarch

%description
S3transfer is a Python library for managing Amazon S3 transfers.

Note:
This project is not currently GA. If you are planning to use this code in
production, make sure to lock to a minor version as interfaces may break from
minor version to minor version. For a basic, stable interface of s3transfer,
try the interfaces exposed in boto3

#------------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Amazon S3 Transfer Manager for Python
Group:		Development/Python
BuildRequires:	python3egg(setuptools)

%description -n python3-%{pypi_name}
S3transfer is a Python library for managing Amazon S3 transfers.

%files -n python3-%{pypi_name}
%{python3_sitelib}/*

#------------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 278 |14mr|python-scikit-build-core-0.10.7-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_with tests

Name:		python-scikit-build-core
Version:	0.10.7
Release:	2
Summary:	Build backend for CMake based projects
Group:		Development/Python
License:	Apache-2.0
URL:		https://github.com/scikit-build/scikit-build-core
Source:		%{pypi_source scikit_build_core}
BuildArch:	noarch

BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(wheel)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(hatchling)
BuildRequires:	python3dist(hatch-vcs)
%if %{with tests}
# Testing dependencies
BuildRequires:	cmake
BuildRequires:	ninja
BuildRequires:	gcc-c++
BuildRequires:	git-core
%endif

%description
A next generation Python CMake adaptor and Python API for plugins.

#-----------------------------------------------
%package -n python3-scikit-build-core
Summary:	Build backend for CMake based projects
Group:		Development/Python
%if %{with tests}
# Testing dependencies
BuildRequires:	python3dist(build)
BuildRequires:	python3dist(build[virtualenv])
BuildRequires:	python3dist(cattrs)
BuildRequires:	python3dist(exceptiongroup)
BuildRequires:	python3dist(hatch-fancy-pypi-readme)
BuildRequires:	python3dist(pybind11)
BuildRequires:	python3dist(pyproject-metadata)
BuildRequires:	python3dist(pytest)
# TODO
#BuildRequires:  python3dist(pytest-subprocess)
%endif
Requires:	cmake
Recommends:	ninja
Requires:	python3dist(pyproject-metadata)
Requires:	python3dist(pathspec)

%description -n python3-scikit-build-core
A next generation Python CMake adaptor and Python API for plugins.

%files -n python3-scikit-build-core -f %{pyproject_files}
%license LICENSE
%doc README.md

#-----------------------------------------------
%prep
%autosetup -n scikit_build_core-%{version}

#generate_buildrequires
#pyproject_buildrequires -x test,test-meta,test-numpy

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files scikit_build_core

%if %{with tests}
%check
# different hash due to different build environment:
donttest="test_pep517_sdist_hash or test_pep518_sdist"
%pytest \
    -m "not network " \
    -k "not ($donttest)"
%endif



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 279 |14mr|python-semantic_version-2.10.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Break the dependency loop - this is needed by maturin through python-setuptools-rust
# while django requires cryptography which requires maturin
%bcond bootstrap 1

Name:           python-semantic_version
Version:        2.10.0
Release:        2
Summary:        Library implementing the 'SemVer' scheme

License:        BSD-2-Clause
URL:            https://github.com/rbarrois/python-semanticversion
Source:         %{url}/archive/%{version}/python-semanticversion-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel

%global _description %{expand:
This small python library provides a few tools to handle semantic versioning in
Python.}

%description %{_description}

%package -n     python3-semantic_version
Summary:        %{summary}

%description -n python3-semantic_version %{_description}

%prep
%autosetup -p1 -n python-semanticversion-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files -l semantic_version

%files -n python3-semantic_version -f %{pyproject_files}
%doc README.rst ChangeLog CREDITS

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 280 |14mr|python-sentry-sdk-1.39.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# test requires work dns resolve
%bcond_with tests

Name:           python-sentry-sdk
Version:        1.39.1
Release:        1
Summary:        Python SDK for Sentry.io
Group:          Development/Python
License:        BSD-2-Clause
URL:            https://github.com/getsentry/sentry-python
Source0:        https://github.com/getsentry/sentry-python/archive/%{version}/sentry-python-%{version}.tar.gz
BuildRequires:  python3egg(flask) >= 0.11
BuildRequires:  python3egg(sqlalchemy) >= 1.2
BuildRequires:  python3egg(aiohttp) >= 3.5
BuildRequires:  python3egg(asttokens)
BuildRequires:  python3egg(blinker) >= 1.1
BuildRequires:  python3egg(bottle) >= 0.12.13
BuildRequires:  python3egg(certifi)
BuildRequires:  python3egg(executing)
BuildRequires:  python3egg(setuptools)
BuildRequires:  python3egg(tornado) >= 5
BuildRequires:  python3egg(urllib3) >= 1.10.0
BuildRequires:  fdupes
%if %{with tests}
# SECTION test requirements
BuildRequires:  python3egg(werkzeug)
BuildRequires:  python3egg(eventlet)
BuildRequires:  python3egg(gevent)
BuildRequires:  python3egg(hypothesis)
BuildRequires:  python3egg(jsonschema) >= 3.2.0
BuildRequires:  python3egg(pyramid)
BuildRequires:  python3egg(pyrsistent) >= 0.16.0
BuildRequires:  python3egg(pytest-cov) >= 2.8.1
BuildRequires:  python3egg(pytest-forked) >= 1.1.3
BuildRequires:  python3egg(pytest-localserver) >= 0.5.0
BuildRequires:  python3egg(pytest)
BuildRequires:  python3egg(tox)
%endif
BuildArch:      noarch

%description
A Python SDK for Sentry.io.
https://sentry.io/for/python/

#----------------------------------------------------------------
%package -n python3-sentry-sdk
Summary:        Python SDK for Sentry.io
Group:          Development/Python

%description -n python3-sentry-sdk
A Python SDK for Sentry.io.
https://sentry.io/for/python/

%files -n python3-sentry-sdk
%doc README.md CHANGELOG.md
%license LICENSE
%{python3_sitelib}/*

#----------------------------------------------------------------

%prep
%setup -q -n sentry-python-%{version}

%build
%py3_build

%install
%py3_install


%check
%if %{with tests}
export PYTHONDONTWRITEBYTECODE=1
export PYTEST_ADDOPTS="-W ignore::DeprecationWarning"
# do not test integration:
rm -r tests/integrations
# test_transport_works / test_transport_infinite_loop / test_simple_rate_limits/ test_data_category_limits / test_complex_limits_without_data_category stucks

# test_auto_enabling_integrations_catches_import_error asert False where False = ..., not sure
%pytest -k 'not (test_transport_works or test_auto_enabling_integrations_catches_import_error or test_filename or test_transport_infinite_loop or test_simple_rate_limits or test_data_category_limits or test_complex_limits_without_data_category)'
%endif


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 281 |14mr|python-setuptools-84.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# used when bootstrapping new Python versions
%bcond bootstrap 1

# The original RHEL N+1 content set is defined by (build)dependencies
# of the packages in Fedora ELN. Hence we disable tests and documentation here
# to prevent pulling many unwanted packages in.
%bcond tests %[%{without bootstrap} && %{defined fedora}]

%global python_wheel_name setuptools-%{version}-py3-none-any.whl

Name:           python-setuptools
# When updating, update the bundled libraries versions bellow!
Version:        84.0.0
Epoch:		2
Release:        1
Summary:        Easily build and distribute Python packages
# setuptools is MIT
# autocommand is LGPL-3.0-only
# backports-tarfile is MIT
# importlib-metadata is Apache-2.0
# jaraco-context is MIT
# jaraco-functools is MIT
# jaraco-text is MIT
# more-itertools is MIT
# packaging is BSD-2-Clause OR Apache-2.0
# platformdirs is MIT
# tomli is MIT
# wheel is MIT
# zipp is MIT
# the setuptools logo is MIT
License:        MIT AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0) AND LGPL-3.0-only
URL:            https://pypi.python.org/pypi/setuptools
Source0:        %{pypi_source setuptools %{version}}

# Some test deps are optional and either not desired or not available in Fedora, thus this patch removes them.
Patch:          Remove-optional-or-unpackaged-test-deps.patch

# The `setup.py install` deprecation notice might be confusing for RPM packagers
# adjust it, but only when $RPM_BUILD_ROOT is set
Patch:          Adjust-the-setup.py-install-deprecation-message.patch

BuildArch:      noarch

BuildRequires:  python3-devel

%if %{with bootstrap}
BuildRequires:  unzip zip
%endif

%if %{with tests}
BuildRequires:  gcc
%endif

# python3 bootstrap: this is built before the final build of python3, which
# adds the dependency on python3-rpm-generators, so we require it manually
# The minimal version is for bundled provides verification script to accept multiple files as input
BuildRequires:  python3-rpm-generators >= 12-8
# we also use %%{_pyproject_wheeldir}, so an explicit requirement on the pyproject-macros is needed
BuildRequires:  pyproject-rpm-macros

%if %{without bootstrap}
# Not to use the pre-generated egg-info, we use setuptools from previous build to generate it
BuildRequires:  python3-setuptools
%endif

%description
Setuptools is a collection of enhancements to the Python distutils that allow
you to more easily build and distribute Python packages, especially ones that
have dependencies on other packages.

# Virtual provides for the packages bundled by setuptools.
# Bundled packages are defined in multiple files. Generate the list with:
# pip freeze --path setuptools/_vendor > vendored.txt
# %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%3dist' vendored.txt
%global bundled %{expand:
Provides: bundled(python3dist(autocommand)) = 2.2.2
Provides: bundled(python3dist(backports-tarfile)) = 1.2
Provides: bundled(python3dist(importlib-metadata)) = 8.7.1
Provides: bundled(python3dist(jaraco-context)) = 6.1
Provides: bundled(python3dist(jaraco-functools)) = 4.4
Provides: bundled(python3dist(jaraco-text)) = 4
Provides: bundled(python3dist(more-itertools)) = 10.8
Provides: bundled(python3dist(packaging)) = 26
Provides: bundled(python3dist(platformdirs)) = 4.4
Provides: bundled(python3dist(tomli)) = 2.4
Provides: bundled(python3dist(wheel)) = 0.46.3
Provides: bundled(python3dist(zipp)) = 3.23
}

%package -n python3-setuptools
Summary:        Easily build and distribute Python 3 packages
Provides:	python3dist(setuptools) = %{EVRD}
%{bundled}

%description -n python3-setuptools
Setuptools is a collection of enhancements to the Python 3 distutils that allow
you to more easily build and distribute Python 3 packages, especially ones that
have dependencies on other packages.


%package -n     %{python_wheel_pkg_prefix}-setuptools-wheel
Summary:        The setuptools wheel
%{bundled}

%description -n %{python_wheel_pkg_prefix}-setuptools-wheel
A Python wheel of setuptools to use with venv.


%prep
%autosetup -p1 -n setuptools-%{version}
%if %{without bootstrap}
# If we don't have setuptools installed yet, we use the pre-generated .egg-info
# See https://github.com/pypa/setuptools/pull/2543
# And https://github.com/pypa/setuptools/issues/2550
rm -r setuptools.egg-info
%endif

# Strip shbang
find setuptools -name \*.py | xargs sed -i -e '1 {/^#!\//d}'
# Remove bundled exes
rm -f setuptools/*.exe
# Don't ship these
rm -r docs/conf.py
# Remove a filter for coverage warning from pytest config
# In pytest < 9, such a warning filter triggers ImportError without coverage
sed -i '/:coverage/d' pytest.ini

%if %{without bootstrap}
%generate_buildrequires
%pyproject_buildrequires -r %{?with_tests:-x test}
%endif

%build
%if %{with bootstrap}
%{python3} setup.py bdist_wheel
mkdir -p %{_pyproject_wheeldir}
mv dist/%{python_wheel_name} %{_pyproject_wheeldir}
%else
%pyproject_wheel
%endif


%install
%if %{with bootstrap}
mkdir -p %{buildroot}%{python3_sitelib}
unzip %{_pyproject_wheeldir}/%{python_wheel_name} -d %{buildroot}%{python3_sitelib} -x setuptools-%{version}.dist-info/RECORD
echo rpm > %{buildroot}%{python3_sitelib}/setuptools-%{version}.dist-info/INSTALLER
%else
%pyproject_install
%pyproject_save_files -l setuptools _distutils_hack
sed -Ei '/\/tests\b/d' %{pyproject_files}
%endif

# Install the wheel for the python-setuptools-wheel package
# and inject SBOM into it (if the macro is available)
mkdir -p %{buildroot}%{python_wheel_dir}
install -pm0644 %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
%{?python_wheel_inject_sbom:%python_wheel_inject_sbom %{buildroot}%{python_wheel_dir}/%{python_wheel_name}}


%check
%if %{without bootstrap}
# Verify bundled provides are up to date
%{python3} -m pip freeze --path setuptools/_vendor > vendored.txt
%{_rpmconfigdir}/pythonbundles.py vendored.txt --namespace 'python3dist' --compare-with '%{bundled}'

# Regression test, the wheel should not be larger than 1300 kB
# https://bugzilla.redhat.com/show_bug.cgi?id=1914481#c3
test $(stat --format %%s %{_pyproject_wheeldir}/%{python_wheel_name}) -lt 1300000

%pyproject_check_import -e '*.tests' -e '*.tests.*'
%endif

# Regression test, the tests are not supposed to be installed
test ! -d %{buildroot}%{python3_sitelib}/setuptools/tests
test ! -d %{buildroot}%{python3_sitelib}/setuptools/_distutils/tests

%if %{with tests}
# Upstream tests
# PIP_NO_BUILD_ISOLATION allows us to run more tests offline with pip 25.3+,
# or else they fecth setuptools from the internet,
# see https://bugzilla.redhat.com/2417963.
# --ignore=setuptools/tests/integration/
# --ignore=setuptools/tests/config/test_apply_pyprojecttoml.py
# -k "not not test_equivalent_output"
#   the tests require internet connection
# --ignore=setuptools/tests/test_editable_install.py
#   the tests require pip-run which we don't have in Fedora
# -k "not test_wheel_includes_cli_scripts"
#   the test expects removed .exe files to be installed
# --ignore=tools
#   the tests test various upstream release tools we don't use/ship
PRE_BUILT_SETUPTOOLS_WHEEL=%{_pyproject_wheeldir}/%{python_wheel_name} \
PIP_NO_BUILD_ISOLATION=0 \
PYTHONPATH=$(pwd) %pytest \
 -n auto \
 --ignore=setuptools/tests/integration/ \
 --ignore=setuptools/tests/test_editable_install.py \
 --ignore=setuptools/tests/config/test_apply_pyprojecttoml.py \
 --ignore=tools \
 -k "not test_wheel_includes_cli_scripts and not test_equivalent_output and not test_pkg_info_roundtrip"
%endif # with tests


%files -n python3-setuptools %{?!with_bootstrap:-f %{pyproject_files}}
%doc docs/* NEWS.rst README.rst
%{python3_sitelib}/distutils-precedence.pth
%if %{with bootstrap}
%{python3_sitelib}/setuptools-%{version}.dist-info/
%{python3_sitelib}/setuptools/
%{python3_sitelib}/_distutils_hack/
%endif

%files -n %{python_wheel_pkg_prefix}-setuptools-wheel
# we own the dir for simplicity
%dir %{python_wheel_dir}/
%{python_wheel_dir}/%{python_wheel_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 282 |14mr|python-setuptools-rust-1.13.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name setuptools_rust
%define oname     setuptools-rust

Name:           python-%{oname}
Version:        1.13.0
Release:        1
Summary:        Compile and distribute Python extensions written in Rust as easily as if they were written in C
Url:            https://pypi.org/project/setuptools-rust/
Source0:        %{pypi_source}
License:        MIT
Group:          Development/Python
BuildArch:      noarch
BuildRequires:  pkgconfig(python3)
Obsoletes:      %{name} < %{EVRD}

%description
%{summary}.

# --------------------------------------------------------------------

%package -n     python3-%{oname}
Summary:        %{summary}
Provides:       python3-%{oname}
Obsoletes:      python3-%{oname} < %{EVRD}

%description -n python3-%{oname}
%{summary}.

%files  -n     python3-%{oname}
%{python3_sitelib}/%{pypi_name}-*.dist-info
%{python3_sitelib}/%{pypi_name}/__pycache__/*.pyc
%{python3_sitelib}/%{pypi_name}/*.py
%{python3_sitelib}/%{pypi_name}/py.typed
# --------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 283 |14mr|python-setuptools_scm-10.2.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond tests 0

Name:           python-setuptools_scm
Version:        10.2.1
Release:        1
Summary:        Blessed package to manage your versions by SCM tags

# SPDX
License:        MIT
URL:            https://github.com/pypa/setuptools_scm/
Source:         %{pypi_source setuptools_scm}

BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-devel
%if %{with tests}
BuildRequires:  git-core
%endif

%description
Setuptools_scm handles managing your Python package versions in SCM metadata.
It also handles file finders for the supported SCMs.


%package -n python%{python3_pkgversion}-setuptools_scm
Summary:        %{summary}
%py_provides    python%{python3_pkgversion}-setuptools-scm

%description -n python%{python3_pkgversion}-setuptools_scm
Setuptools_scm handles managing your Python package versions in SCM metadata.
It also handles file finders for the supported SCMs.


# We don't package the [rich] extra on RHELs, to avoid pulling rich into the buildroot
%pyproject_extras_subpkg -n python%{python3_pkgversion}-setuptools_scm simple,toml%{!?rhel:,rich}


%prep
%autosetup -p1 -n setuptools_scm-%{version}
# Remove flake8, mypy, ruff, … from the test dependencies
%pyproject_patch_dependency griffe:ignore
%pyproject_patch_dependency griffe-public-wildcard-imports:ignore
%pyproject_patch_dependency griffecli:ignore
%pyproject_patch_dependency mypy:ignore
%pyproject_patch_dependency ruff:ignore
%pyproject_patch_dependency flake8:ignore

%generate_buildrequires
# Note: We only pull in the [rich] extra when running tests.
# This is to make the new Python version bootstrapping simpler
# as setuptools_scm is an early package and rich is a late one.
%pyproject_buildrequires %{?with_tests:-g test} -x simple,toml


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files setuptools_scm

# Allow parallel-installable executable for alternate Python stacks (e.g. in RHEL)
mv %{buildroot}%{_bindir}/setuptools-scm %{buildroot}%{_bindir}/setuptools-scm-%{python3_version}
%if "%{python3_pkgversion}" == "3"
ln -s ./setuptools-scm-%{python3_version} %{buildroot}%{_bindir}/setuptools-scm
%endif


%if %{with tests}
%check
# test_pip_download, test_xmlsec_download_regression try to download from the internet
# test_get_version_blank_tag_regex, test_setuptools_version_keyword_ensures_regex fail because
# vcs-versioning 2.x added DeprecationWarnings for tag_regex that the tests don't expect;
# fixed upstream: https://github.com/pypa/setuptools-scm/commit/ba215a70a88bbd35ecf0961c8b1a1301c940629e
%pytest -v -n auto
%endif


%files -n python%{python3_pkgversion}-setuptools_scm -f %{pyproject_files}
%doc README.md
%{_bindir}/setuptools-scm-%{python3_version}
%if "%{python3_pkgversion}" == "3"
%{_bindir}/setuptools-scm
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 284 |14mr|python-setuptools-scm-git-archive-1.4.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name setuptools-scm-git-archive

Name:           python-%{pypi_name}
Version:        1.4.1
Release:        1
Summary:        Setuptools_scm plugin for git archives
License:        MIT
URL:            https://github.com/Changaco/setuptools_scm_git_archive/
Source0:        %{pypi_source setuptools_scm_git_archive}
# Drop pkg_resources usage (removed in setuptools 84) and setup_requires
# in favor of PEP 517 build-system metadata
Patch0:         modernize-build.patch

BuildArch:      noarch

BuildRequires:  python3-devel
# setuptools_scm >= 10 imports vcs_versioning, but the bootstrap build of
# python3-setuptools_scm does not declare this dependency yet
BuildRequires:  python3-setuptools_scm
BuildRequires:  python3-vcs-versioning

%global _description %{expand:
This is a setuptools_scm plugin that adds support for git archives (for
example the ones GitHub automatically generates). Note that it only works for
archives of tagged commits (because git currently lacks a format option
equivalent to git describe --tags).}

%description %_description


%package -n python3-%{pypi_name}
Summary:        %{summary}
Requires:       python3-setuptools_scm

%description -n python3-%{pypi_name} %_description


%prep
%autosetup -p1 -n setuptools_scm_git_archive-%{version}
# Remove bundled egg-info, the build regenerates it
rm -rf %{pypi_name}.egg-info


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files -L setuptools_scm_git_archive

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 285 |14mr|python-sgmllib3k-1.0.0-5
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name sgmllib3k

Name:           python-sgmllib3k
Version:        1.0.0
Release:        5
Group:          Development/Python
Summary:        Py3k port of sgmllib

License:        BSD License
URL:            http://hg.hardcoded.net/sgmllib
Source0:        %{pypi_source}
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description
 sgmllib3k -- Py3k port of the old stdlib module sgmllib was dropped in Python
3. For those depending on it, that's somewhat infortunate. This is a quick and
dirty port of this old module. I just ran 2to3 on it and published it. I don't
indend to maintain it, so it might be a good idea to eventually think about
finding another module to use.

#---------------------------------------------
%package -n python3-%{pypi_name}
Summary:        Py3k port of sgmllib
Group:          Development/Python

%description -n python3-%{pypi_name}
 sgmllib3k -- Py3k port of the old stdlib module sgmllib was dropped in Python
3. For those depending on it, that's somewhat infortunate. This is a quick and
dirty port of this old module. I just ran 2to3 on it and published it. I don't
indend to maintain it, so it might be a good idea to eventually think about
finding another module to use.

%files -n python3-%{pypi_name}
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/sgmllib.py*
%{python3_sitelib}/%{pypi_name}-%{version}-py*.egg-info

#---------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py3_build

%install
%py3_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 286 |14mr|python-sh-2.0.7-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name sh

Summary:	Subprocess replacement for python
Name:		python-%{pypi_name}
Version:	2.0.7
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://pypi.org/project/sh/
Source0:	%{pypi_source}
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
sh is a full-fledged subprocess replacement for Python 2.6 - 3.6,
PyPy and PyPy3 that allows you to call any program as if it were
a function:

.. code:: python

from sh import ifconfig
print ifconfig("eth0")

sh is *not* a collection of system commands implemented in Python.

#-----------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A Python command line parser inspired by optparse
Group:		Development/Python

%description -n python3-%{pypi_name}
sh is a full-fledged subprocess replacement for Python 2.6 - 3.6,
PyPy and PyPy3 that allows you to call any program as if it were
a function:

.. code:: python

from sh import ifconfig
print ifconfig("eth0")

sh is *not* a collection of system commands implemented in Python.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%license LICENSE.txt

#-----------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 287 |14mr|python-shellingham-1.5.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name shellingham

Summary:	Tool to detect surrounding Shell
Name:		python-%{pypi_name}
Version:	1.5.4
Release:	1
License:	ISC
Group:		Development/Python
Url:		https://github.com/sarugaku/shellingham
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Shellingham detects what shell the current Python executable is running in.

#-------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name}
Shellingham detects what shell the current Python executable is running in.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%license LICENSE

#-------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 288 |14mr|python-singledispatch-4.1.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name singledispatch

Summary:	This library brings functools.singledispatch
Name:		python-%{pypi_name}
Version:	4.1.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://docs.python.org/3/library/functools.html#functools.singledispatch
Source0:	%pypi_source
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
PEP 443 proposed to expose a mechanism in the functools standard library
module in Python 3.4 that provides a simple form of generic programming
known as single-dispatch generic functions.

This library is a backport of this functionality to Python 2.6 - 3.3.

#---------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	This library brings functools.singledispatch
Group:		Development/Python

%description -n python3-%{pypi_name}
PEP 443 proposed to expose a mechanism in the functools standard library
module in Python 3.4 that provides a simple form of generic programming
known as single-dispatch generic functions.

This library is a backport of this functionality to Python 2.6 - 3.3.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%license LICENSE

#---------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 289 |14mr|python-six-1.17.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# tests are enabled by default
%bcond_with tests

Name:           python-six
Version:        1.17.0
Release:        1
Summary:        Python 2 and 3 compatibility utilities

# SPDX
License:        MIT
URL:            https://github.com/benjaminp/six
Source0:        %{pypi_source six}

BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  pyproject-rpm-macros

%if %{with tests}
BuildRequires:  python%{python3_pkgversion}-pytest
BuildRequires:  python%{python3_pkgversion}-tkinter
%endif

%global _description %{expand:
Six is a Python 2 and 3 compatibility library. It provides utility functions
for smoothing over the differences between the Python versions with the goal
of writing Python code that is compatible on both Python versions.}

%description %{_description}


%package -n python%{python3_pkgversion}-six
Summary:        %{summary}
Provides:	python3egg(six) = %{EVRD}

%description -n python%{python3_pkgversion}-six %{_description}


%prep
%autosetup -p1 -n six-%{version}


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files -l six


%check
%pyproject_check_import
%if %{with tests}
%pytest
%endif


%files -n python%{python3_pkgversion}-six -f %{pyproject_files}
%doc README.rst documentation/index.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 290 |14mr|python-slip-0.6.5-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Miscellaneous convenience, extension and workaround code for Python
Name:		python-slip
Version:	0.6.5
Release:	2
License:	GPLv2+
Group:		Development/Python
Url:		https://github.com/nphilipp/python-slip
Source0:	https://github.com/nphilipp/python-slip/releases/download/python-slip-%{version}/python-slip-%{version}.tar.bz2
BuildRequires:	pkgconfig(python3)
Requires:	python3-six
BuildArch:	noarch

%description
The Simple Library for Python packages contain miscellaneous code for
convenience, extension and workaround purposes.

This package provides the "slip" and the "slip.util" modules.
#----------------------------------------------------------------------------

%package -n python3-slip
Summary:	Convenience, extension and workaround code for Python 3.x
Group:		Development/Python

%description -n python3-slip
The Simple Library for Python 3.x packages contain miscellaneous code for
convenience, extension and workaround purposes.

This package provides the "slip" and the "slip.util" modules.

%files -n python3-slip
%doc COPYING doc/dbus
%dir %{python3_sitelib}/slip/
%{python3_sitelib}/slip/__pycache__
%{python3_sitelib}/slip/__init__.py*
%{python3_sitelib}/slip/util
%{python3_sitelib}/slip/_wrappers
%{python3_sitelib}/slip-%{version}-py%{python3_version}.egg-info

#----------------------------------------------------------------------------

%package -n python3-slip-dbus
Summary:	Convenience functions for dbus services in Python 3.x
Group:		Development/Python
Requires:	python3-slip = %{EVRD}
Requires:	python3-dbus >= 0.80
# Don't require any of pygobject2/3 because slip.dbus works with either one. In
# theory users of slip.dbus should require one or the other anyway to use the
# main loop.
Requires:	python3-decorator
Requires:	python3-six

%description -n python3-slip-dbus
The Simple Library for Python 3.x packages contain miscellaneous code for
convenience, extension and workaround purposes.

This package provides slip.dbus.service.Object, which is a dbus.service.Object
derivative that ends itself after a certain time without being used and/or if
there are no clients anymore on the message bus, as well as convenience
functions and decorators for integrating a dbus service with PolicyKit.

%files -n python3-slip-dbus
%doc doc/dbus/*
%{python3_sitelib}/slip/dbus
%{python3_sitelib}/slip.dbus-%{version}-py%{python3_version}.egg-info

#----------------------------------------------------------------------------

%prep
%autosetup -p1
find . -name '*.py' -o -name '*.py.in' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'

%build
%make_build PYTHON=%__python3

%install
%make_install  PYTHON=%__python3

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 291 |14mr|python-smartypants-2.0.1-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname smartypants

Summary:	Smartypants is a Python fork of SmartyPants
Name:		python-%{oname}
Version:	2.0.1
Release:	4
License:	BSD
Group:		Development/Python
Url:		https://github.com/leohemsted/smartypants.py
Source0:	https://github.com/leohemsted/smartypants.py/archive/v%{version}.tar.gz?/%{oname}.py-%{version}.tar.gz
BuildRequires:	python3egg(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Smartypants is a Python fork of SmartyPants.
SmartyPants is a free web publishing plug-in for Movable Type, Blosxom,
and BBEdit that easily translates plain ASCII punctuation characters into
“smart” typographic punctuation HTML entities.

#--------------------------------------------------
%package -n python3-%{oname}
Summary:	Smartypants is a Python fork of SmartyPants
Group:		Development/Python

%description -n python3-%{oname}
Smartypants is a Python fork of SmartyPants.
SmartyPants is a free web publishing plug-in for Movable Type, Blosxom,
and BBEdit that easily translates plain ASCII punctuation characters into
“smart” typographic punctuation HTML entities.

%files -n python3-%{oname}
%doc README.rst COPYING CHANGES.rst
%{_bindir}/smartypants
%{python3_sitelib}/*.py*
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/smartypants-*.egg-info

#--------------------------------------------------
%prep
%setup -q -n %{oname}.py-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 292 |14mr|python-smbc-1.0.25.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module smbc
%define pypi_name py%{module}

Summary:	Python bindings for the libsmbclient API from Samba
Name:		python-%{module}
Version:	1.0.25.1
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://github.com/hamano/pysmbc
Source0:	%{pypi_source}
Patch0:		pysmbc-1.0.23-samba4.patch
BuildRequires:	pkgconfig(smbclient)
BuildRequires:	python3dist(setuptools)

%description
Python bindings for the libsmbclient API, known as pysmbc. It was written
for use with system-config-printer, but can be put to other uses as well.

#----------------------------------------------------------------------------

%package -n python3-%{module}
Summary:	Python bindings for the libsmbclient API from Samba
Group:		Development/Python
BuildRequires:	pkgconfig(python3)

%description -n python3-%{module}
Python bindings for the libsmbclient API, known as pysmbc. It was written
for use with system-config-printer, but can be put to other uses as well.

%files -n python3-%{module}
%{python3_sitearch}/*.dist-info
%{python3_sitearch}/smbc*
%{python3_sitearch}/*.so

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}
%autopatch -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 293 |14mr|python-smmap-5.0.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name smmap

Name:		python-%{pypi_name}
Version:	5.0.1
Release:	1
Summary:	A pure git implementation of a sliding window memory map manager
License:	BSD
Group:		Development/Python
Url:		https://pypi.python.org/pypi/smmap
Source0:	%{pypi_source}
BuildArch:	noarch

%description
When reading from many possibly large files in a fashion similar to random
access, it is usually the fastest and most efficient to use memory maps.

#--------------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	A pure git implementation of a sliding window memory map manager
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(setuptools)

%description -n python3-%{pypi_name}
When reading from many possibly large files in a fashion similar to random
access, it is usually the fastest and most efficient to use memory maps.

%files -n python3-%{pypi_name}
%doc PKG-INFO
%{python3_sitelib}/smmap
%{python3_sitelib}/smmap-%{version}-py*.egg-info

#--------------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 294 |14mr|python-snowballstemmer-2.2.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name snowballstemmer

Summary:	This package provides 16 stemmer algorithms
Name:		python-%{pypi_name}
Version:	2.2.0
Release:	1
License:	BSD-3-Clause
Group:		Development/Python
Url:		https://github.com/snowballstem/snowball
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(setuptools)
BuildArch:	noarch

%description
This package provides 16 stemmer algorithms (15 + Poerter English
stemmer) generated from Snowball algorithms.  It includes following
language algorithms: Danish, Dutch, English (Standard, Porter),
Finnish, French, German, Hungarian, Italian, Norwegian, Portuguese,
Romanian, Russian, Spanish, Swedish, Turkish. This is a pure Python
stemming library. If PyStemmer is available, this module uses it to
accelerate.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	This package provides 16 stemmer algorithms
Group:		Development/Python
# 2.1.0 was the last release with python2 support
Obsoletes:	python-%{pypi_name} < 2.2.0
Obsoletes:	python2-%{pypi_name} < 2.2.0

%description -n python3-%{pypi_name}
This package provides 16 stemmer algorithms (15 + Poerter English
stemmer) generated from Snowball algorithms.  It includes following
language algorithms: Danish, Dutch, English (Standard, Porter),
Finnish, French, German, Hungarian, Italian, Norwegian, Portuguese,
Romanian, Russian, Spanish, Swedish, Turkish. This is a pure Python
stemming library. If PyStemmer is available, this module uses it to
accelerate.

%files -n python3-%{pypi_name}
%license COPYING
%{python3_sitelib}/*
%doc README.rst

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 295 |14mr|python-sortedcontainers-2.4.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname sortedcontainers
%bcond_with docs
%bcond_with tests

Name:		python-%{srcname}
Version:	2.4.0
Release:	2
Summary:	Pure Python sorted container types
Group:		Development/Python
License:	ASL 2.0
URL:		https://pypi.python.org/pypi/%{srcname}
# PyPI tarball does not include docs or tests.
Source0:	https://github.com/grantjenks/python-sortedcontainers/archive/v%{version}/%{name}-%{version}.tar.gz

BuildArch:	noarch

%global _description \
SortedContainers is an Apache2 licensed sorted collections library, written in \
pure-Python, and fast as C-extensions.

%description %{_description}

#-----------------------------------------------------------------
%package -n python3-%{srcname}
Summary:	%{summary}
Group:		Development/Python

BuildRequires:	python3-devel
BuildRequires:	python3-setuptools

%if %{with tests}
BuildRequires:	python3-pytest
BuildRequires:	python3-matplotlib
BuildRequires:	python3-numpy
BuildRequires:	python3-scipy
%endif

%if %{with docs}
BuildRequires:	python3-sphinx
BuildRequires:	dvipng
BuildRequires:	tex(anyfontsize.sty)
BuildRequires:	tex(bm.sty)
%endif

%description -n python3-%{srcname} %{_description}

%files -n python3-%{srcname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/


#-----------------------------------------------------------------

%if %{with docs}
%package -n python-%{srcname}-doc
Summary:	%{summary}
Group:		Documentation

%description -n python-%{srcname}-doc
Documentation for %{srcname} package.

%files -n python-%{srcname}-doc
%license LICENSE
%doc README.rst docs/_build/html
%endif

#-----------------------------------------------------------------

%prep
%autosetup


%build
%py3_build

%if %{with docs}
pushd docs
make SPHINXBUILD=sphinx-build-%{python3_version} html
rm _build/html/.buildinfo
popd
%endif


%install
%py3_install


%if %{with tests}
%check
pushd tests
PYTHONPATH="%{buildroot}%{python3_sitelib}" \
    pytest-%{python3_version}
popd
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 296 |14mr|python-sphinxcontrib-applehelp-1.0.7-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name sphinxcontrib_applehelp

Summary:	Sphinx extension for Apple help books
Name:		python-sphinxcontrib-applehelp
Version:	1.0.7
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://pypi.org/project/sphinxcontrib-applehelp/
Source0:	%pypi_source
BuildRequires:	gettext
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books.

#-------------------------------------------------------

%package -n python3-sphinxcontrib-applehelp
Summary:	%{summary}
Group:		Development/Python

%description -n python3-sphinxcontrib-applehelp
sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books.

%files -n python3-sphinxcontrib-applehelp -f sphinxcontrib.applehelp.lang
%doc README.rst
%license LICENSE
%{python3_sitelib}/sphinxcontrib
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info

#-------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}
find -name '*.mo' -delete

%generate_buildrequires
%pyproject_buildrequires -r

%build
for po in $(find -name '*.po'); do
	msgfmt --output-file=${po%.po}.mo ${po}
done
%pyproject_wheel

%install
%pyproject_install

# Move language files to /usr/share
pushd %{buildroot}%{python3_sitelib}
for lang in `find sphinxcontrib/applehelp/locales -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
do
	test $lang == __pycache__ && continue
	install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
	mv sphinxcontrib/applehelp/locales/$lang/LC_MESSAGES/*.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
done
rm -rf sphinxcontrib/applehelp/locales
ln -s %{_datadir}/locale sphinxcontrib/applehelp/locales
popd

%find_lang sphinxcontrib.applehelp

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 297 |14mr|python-sphinxcontrib-devhelp-1.0.6-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name sphinxcontrib_devhelp

Summary:	Sphinx extension for Devhelp documents
Name:		python-sphinxcontrib-devhelp
Version:	1.0.6
Release:	2
License:	BSD
Group:		Development/Python
Url:		https://pypi.org/project/sphinxcontrib-devhelp
Source0:	%pypi_source
BuildRequires:	gettext
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document.

#-------------------------------------------------------

%package -n python3-sphinxcontrib-devhelp
Summary:	%{summary}
Group:		Development/Python

%description -n python3-sphinxcontrib-devhelp
sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document.

%files -n python3-sphinxcontrib-devhelp -f sphinxcontrib.devhelp.lang
%doc README.rst
%license LICENSE
%{python3_sitelib}/sphinxcontrib
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info

#-------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}
find -name '*.mo' -delete

%generate_buildrequires
%pyproject_buildrequires -r

%build
for po in $(find -name '*.po'); do
	msgfmt --output-file=${po%.po}.mo ${po}
done
%pyproject_wheel

%install
%pyproject_install

# Move language files to /usr/share
pushd %{buildroot}%{python3_sitelib}
for lang in `find sphinxcontrib/devhelp/locales -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
do
	test $lang == __pycache__ && continue
	install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
	mv sphinxcontrib/devhelp/locales/$lang/LC_MESSAGES/*.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
done
rm -rf sphinxcontrib/devhelp/locales
ln -s %{_datadir}/locale sphinxcontrib/devhelp/locales
popd

%find_lang sphinxcontrib.devhelp

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 298 |14mr|python-sphinxcontrib-htmlhelp-2.0.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name sphinxcontrib_htmlhelp

Summary:	Sphinx extension for HTML help files
Name:		python-sphinxcontrib-htmlhelp
Version:	2.0.5
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://pypi.org/project/sphinxcontrib-htmlhelp/
Source0:	%{pypi_source}
BuildRequires:	gettext
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files.

#-------------------------------------------------------

%package -n python3-sphinxcontrib-htmlhelp
Summary:	%{summary}
Group:		Development/Python

%description -n python3-sphinxcontrib-htmlhelp
sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files.

%files -n python3-sphinxcontrib-htmlhelp -f sphinxcontrib.htmlhelp.lang
%doc README.rst
%license LICENSE
%{python3_sitelib}/sphinxcontrib
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info

#-------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}
find -name '*.mo' -delete

%generate_buildrequires
%pyproject_buildrequires -r

%build
for po in $(find -name '*.po'); do
	msgfmt --output-file=${po%.po}.mo ${po}
done
%pyproject_wheel

%install
%pyproject_install

# Move language files to /usr/share
pushd %{buildroot}%{python3_sitelib}
for lang in `find sphinxcontrib/htmlhelp/locales -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
do
	test $lang == __pycache__ && continue
	install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
	mv sphinxcontrib/htmlhelp/locales/$lang/LC_MESSAGES/*.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
done
rm -rf sphinxcontrib/htmlhelp/locales
ln -s %{_datadir}/locale sphinxcontrib/htmlhelp/locales
popd

%find_lang sphinxcontrib.htmlhelp

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 299 |14mr|python-sphinxcontrib-jquery-4.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name sphinxcontrib-jquery

Summary:	Extension to include jQuery on newer Sphinx releases
Name:		python-%{pypi_name}
Version:	4.1
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://github.com/snide/sphinx_rtd_theme
Source0:	%pypi_source
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(flit-core)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(sphinx)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Sphinxcontrib-jquery ensures that jQuery is always installed
for use in Sphinx themes or extensions.

#--------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Extension to include jQuery on newer Sphinx releases
Group:		Development/Python

%description -n python3-%{pypi_name}
Sphinxcontrib-jquery ensures that jQuery is always installed
for use in Sphinx themes or extensions.

%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/sphinxcontrib
%{python3_sitelib}/sphinxcontrib_jquery-%{version}.dist-info

#--------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel
%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 300 |14mr|python-sphinxcontrib-qthelp-1.0.6-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name sphinxcontrib_qthelp

Summary:	Sphinx extension for QtHelp documents
Name:		python-sphinxcontrib-qthelp
Version:	1.0.6
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://sphinx-doc.org/
Source0:	%pypi_source
BuildRequires:	gettext
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document.

#-------------------------------------------------------

%package -n python3-sphinxcontrib-qthelp
Summary:	%{summary}
Group:		Development/Python

%description -n python3-sphinxcontrib-qthelp
sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document.

%files -n python3-sphinxcontrib-qthelp -f sphinxcontrib.qthelp.lang
%doc README.rst
%license LICENSE
%{python3_sitelib}/sphinxcontrib
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info

#-------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}
find -name '*.mo' -delete

%generate_buildrequires
%pyproject_buildrequires -r

%build
for po in $(find -name '*.po'); do
	msgfmt --output-file=${po%.po}.mo ${po}
done
%pyproject_wheel

%install
%pyproject_install

# Move language files to /usr/share
pushd %{buildroot}%{python3_sitelib}
for lang in `find sphinxcontrib/qthelp/locales -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
do
	test $lang == __pycache__ && continue
	install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
	mv sphinxcontrib/qthelp/locales/$lang/LC_MESSAGES/*.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
done
rm -rf sphinxcontrib/qthelp/locales
ln -s %{_datadir}/locale sphinxcontrib/qthelp/locales
popd

%find_lang sphinxcontrib.qthelp

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 301 |14mr|python-sphinxcontrib-serializinghtml-1.1.9-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name sphinxcontrib_serializinghtml
%global oname sphinxcontrib-serializinghtml

# when bootstrapping sphinx, we cannot run tests yet
%bcond_with check

Summary:	Sphinx extension for serialized HTML
Name:		python-%{oname}
Version:	1.1.9
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://sphinx-doc.org/
Source0:	%pypi_source
BuildArch:	noarch
BuildRequires:	gettext
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(flit-core)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(sphinx)
BuildRequires:	pkgconfig(python3)

%if %{with check}
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(sphinx)
%endif

%description
sphinxcontrib-serializinghtml is a sphinx extension which outputs "serialized"
HTML files (json and pickle).

#--------------------------------------------------------------------

%package -n python3-%{oname}
Summary:	%{summary}
Group:		Development/Python
%{?python_provide:%python_provide python3-%{oname}}

%description -n python3-%{oname}
sphinxcontrib-serializinghtml is a sphinx extension which outputs "serialized"
HTML files (json and pickle).

%files -n python3-%{oname} -f sphinxcontrib.serializinghtml.lang
%doc README.rst
%license LICENSE
%{python3_sitelib}/sphinxcontrib
%{python3_sitelib}/sphinxcontrib_serializinghtml-%{version}.dist-info

#--------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}
find -name '*.mo' -delete

%generate_buildrequires
%pyproject_buildrequires -r

%build
for po in $(find -name '*.po'); do
	msgfmt --output-file=${po%.po}.mo ${po}
done
%pyproject_wheel

%install
%pyproject_install

# Move language files to /usr/share
pushd %{buildroot}%{python3_sitelib}
for lang in `find sphinxcontrib/serializinghtml/locales -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
do
	test $lang == __pycache__ && continue
	install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
	mv sphinxcontrib/serializinghtml/locales/$lang/LC_MESSAGES/*.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
done
rm -rf sphinxcontrib/serializinghtml/locales
ln -s %{_datadir}/locale sphinxcontrib/serializinghtml/locales
popd

%find_lang sphinxcontrib.serializinghtml

%if %{with check}
%check
%{__python3} -m pytest
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 302 |14mr|python-sphinx_rtd_theme-1.3.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name sphinx_rtd_theme

Summary:	Sphinx theme for readthedocs.org
Name:		python-%{pypi_name}
Version:	1.3.0
Release:	2
License:	MIT
Group:		Development/Python
Url:		https://github.com/snide/sphinx_rtd_theme
Source0:	%pypi_source
# from upstream https://github.com/readthedocs/sphinx_rtd_theme/commit/5838e6aa545863fac10c08314f90feb6d7ac7757
Patch0:		sphinx_rtd_theme-requirements.patch
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
This is a prototype mobile-friendly sphinx theme for readthedocs.org.
It's currently in development and includes some rtd variable checks that
can be ignored if you're just trying to use it on your project outside
of that site.

#--------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Sphinx theme for readthedocs.org
Group:		Development/Python

%description -n python3-%{pypi_name}
This is a prototype mobile-friendly sphinx theme for readthedocs.org.
It's currently in development and includes some rtd variable checks that
can be ignored if you're just trying to use it on your project outside
of that site.

%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#--------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 303 |14mr|python-sphinx-theme-alabaster-0.7.16-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name alabaster
%global srcname sphinx-theme-%{pypi_name}

Name:           python-%{srcname}
Version:        0.7.16
Release:        2
Summary:        Configurable sidebar-enabled Sphinx theme
Group:          Development/Python
License:        BSD
URL:            https://pypi.python.org/pypi/alabaster
Source0:        https://pypi.io/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3dist(setuptools)
BuildRequires:	python3-pip
BuildRequires:	python3-flit-core

%description
This theme is a modified "Kr" Sphinx theme from @kennethreitz (especially as
used in his Requests project), which was itself originally based on @mitsuhiko's
theme used for Flask & related projects.

%package -n     python3-%{srcname}
Summary:        Configurable sidebar-enabled Sphinx theme
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
This theme is a modified "Kr" Sphinx theme from @kennethreitz (especially as
used in his Requests project), which was itself originally based on @mitsuhiko's
theme used for Flask & related projects.

%generate_buildrequires
%pyproject_buildrequires -r

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%files -n python3-%{srcname} -f %{pyproject_files}
%license LICENSE.rst
%doc README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 304 |14mr|python-sqlalchemy-2.0.20-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name SQLAlchemy

Summary:	SQL toolkit and object relational mapper for Python
Name:		python-sqlalchemy
Version:	2.0.20
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://www.sqlalchemy.org/
Source0:	%{pypi_source}
BuildRequires:	python3dist(mock)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(sqlite3)
BuildArch:	noarch

%description
SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible,
high-level interface to SQL databases.  Database and domain concepts are
decoupled, allowing both sides maximum flexibility and power. SQLAlchemy
provides a powerful mapping layer that can work as automatically or as manually
as you choose, determining relationships based on foreign keys or letting you
define the join conditions explicitly, to bridge the gap between database and
domain.

#------------------------------------------------------------------

%package -n python3-sqlalchemy
Summary:	Modular and flexible ORM library for python
Group:		Development/Python

%description -n python3-sqlalchemy
SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible,
high-level interface to SQL databases.  Database and domain concepts are
decoupled, allowing both sides maximum flexibility and power. SQLAlchemy
provides a powerful mapping layer that can work as automatically or as manually
as you choose, determining relationships based on foreign keys or letting you
define the join conditions explicitly, to bridge the gap between database and
domain.

%files -n python3-sqlalchemy
%doc README*.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}-%{version}*
%{python3_sitelib}/sqlalchemy

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 305 |14mr|python-sqlite3-0.5.4-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pysqlite3

Summary:	Python3 bindings for sqlite3
Name:		python-sqlite3
Version:	0.5.4
Release:	2
License:	zlib
Group:		Development/Python
Url:		https://github.com/coleifer/pysqlite3
Source0:	%pypi_source
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(sqlite3)

%description
This library takes the SQLite module from Python 3 and packages it as a
separately-installable module.
This may be useful for creating SQLite modules capable of working with other
versions of SQLite (via the amalgamation option).

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python3 bindings for sqlite3
Group:		Development/Python
# TODO What about autoprovides?
Provides:	python3dist(sqlite3) = %{version}
Provides:	python3dist(sqlite3) = %{version}
Provides:	python3dist(sqlite3) = %{version}
Provides:	python3-sqlite3 = %{version}

%description -n python3-%{pypi_name}
This library takes the SQLite module from Python 3 and packages it as a
separately-installable module.
This may be useful for creating SQLite modules capable of working with other
versions of SQLite (via the amalgamation option).

%files -n python3-%{pypi_name}
%doc README.md
%license LICENSE
%{python3_sitearch}/*.dist-info/*
%{python3_sitearch}/pysqlite3/*

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 306 |14mr|python-sqlparse-0.5.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global		pypi_name sqlparse

Name:		python-%{pypi_name}
Version:	0.5.1
Release:	1
Summary:	Non-validating SQL parser for Python
Group:		Development/Python
License:	BSD
Url:		https://github.com/andialbrecht/%{pypi_name}
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(py)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
sqlparse is a tool for parsing SQL strings. It can generate pretty-printed
renderings of SQL in various formats.

It is a python module, together with a command-line tool.

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Non-validating SQL parser for Python
Group:		Development/Python

%description -n python3-%{pypi_name}
sqlparse is a tool for parsing SQL strings. It can generate pretty-printed
renderings of SQL in various formats.

It is a python module, together with a command-line tool.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc AUTHORS CHANGELOG README.rst
%license LICENSE
%{_bindir}/sqlformat

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 307 |14mr|python-statmake-0.6.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name statmake

Name:           python-%{pypi_name}
Version:        0.6.0
Release:        1
Summary:        Applies STAT information from a Stylespace to a variable font
Group:          Development/Python
License:        None
URL:            https://github.com/daltonmaag/statmake
Source0:        https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)

%description
statmake takes a user-written Stylespace that defines OpenType STAT information
for an entire font family and then potentially subsets and applies it to a
specific variable font. This spares users from having to deal with raw TTX
dumps and juggling with nameIDs.

#----------------------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        Applies STAT information from a Stylespace to a variable font
Group:          Development/Python
Provides:	%{pypi_name} = %{version}-%{release}

%description -n python3-%{pypi_name}
statmake takes a user-written Stylespace that defines OpenType STAT information
for an entire font family and then potentially subsets and applies it to a
specific variable font. This spares users from having to deal with raw TTX
dumps and juggling with nameIDs.

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{_bindir}/statmake
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info

#----------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 308 |14mr|python-tempita-0.5.3dev-12
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name Tempita

Summary:	A very small text templating language
Name:		python-tempita
Version:	0.5.3dev
Release:	12
License:	MIT
Group:		Development/Python
Url:		http://pythonpaste.org/tempita/
Source0:	http://pypi.python.org/packages/source/T/Tempita/Tempita-%{version}.tar.gz
Patch0:		no-use_2to3.patch
Patch1:		tempita-python3.patch
BuildRequires:	python3-setuptools
BuildArch:	noarch

%description
Tempita is a small templating language for text substitution.

This isn't meant to be the Next Big Thing in templating; it's just a
handy little templating language for when your project outgrows
string.Template or % substitution. It's small, it embeds Python in
strings, and it doesn't do much else.

#----------------------------------------------------------------------------
%package -n python3-tempita
Summary:	A very small text templating language
Group:		Development/Python

%description -n python3-tempita
Tempita is a small templating language for text substitution.

This isn't meant to be the Next Big Thing in templating; it's just a
handy little templating language for when your project outgrows
string.Template or % substitution. It's small, it embeds Python in
strings, and it doesn't do much else.

This is a python3 package.

%files -n python3-tempita
%{python3_sitelib}/*

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%install
PYTHONDONTWRITEBYTECODE= %__python3 setup.py install --root=%{buildroot}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 309 |14mr|python-templated-dictionary-1.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name templated-dictionary

Summary:	Dictionary with Jinja2 expansion
Name:		python-%{pypi_name}
Version:	1.2
Release:	1
License:	GPLv2+
Group:		Development/Python
Url:		https://github.com/xsuchy/templated-dictionary
Source0:	%pypi_source
BuildRequires:	python3dist(jinja2)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Dictionary where __getitem__() is run through Jinja2 template.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Dictionary with Jinja2 expansion
Group:		Development/Python

%description -n python3-%{pypi_name}
Dictionary where __getitem__() is run through Jinja2 template.

%files -n python3-%{pypi_name}
%doc README.md
%license LICENSE
%{python3_sitelib}/*.dist-info
%{python3_sitelib}/templated_dictionary/

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%generate_buildrequires
%pyproject_buildrequires

%build
version="%version" %pyproject_wheel

%install
version=%version %pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 310 |14mr|python-termcolor-2.4.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name	termcolor

Name:		python-%{pypi_name}
Version:	2.4.0
Release:	2
Summary:	ANSII Color formatting for output in terminal
License:	MIT
Group:		Development/Python
Url:		https://github.com/dvarrazzo/py-setproctitle/
Source0:	%{pypi_source}
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(wheel)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
%{summary}.

#--------------------------------------------------------------------
%package -n	python3-%{pypi_name}
Summary:	A library allowing a process to change its title
Group:		Development/Python

%description -n	python3-%{pypi_name}
%{summary}.
This is the Python 3 version of the package.

%files -n python3-%{pypi_name}
%doc CHANGES.md README.md
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info
#--------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 311 |14mr|python-testpath-0.6.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name testpath

Summary:	Test utilities for code working with files and commands
Name:		python-testpath
Version:	0.6.0
Release:	3
License:	MIT
Group:		Development/Python
Url:		https://github.com/jupyter/testpath
Source0:	https://pypi.io/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Testpath is a collection of utilities for Python code working with files and
commands.

It contains functions to check things on the filesystem, and tools for
mocking system commands and recording calls to those.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Test utilities for code working with files and commands
Group:		Development/Python

%description -n python3-%{pypi_name}
Testpath is a collection of utilities for Python code working with files and
commands.

It contains functions to check things on the filesystem, and tools for
mocking system commands and recording calls to those.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%doc LICENSE

#----------------------------------------------------------------------------

%package doc
Summary:	%{name} documentation
Group:		Documentation

%description doc
Documentation for %{name}.

%files doc
%doc doc/*.rst

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

# The exe files are only needed on Microsoft Windows
rm -f %{pypi_name}/*.exe

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 312 |14mr|python-tomli-2.0.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# This package buildrequires flit_core to build the wheel, but flit_core requires tomli.
# To bootstrap, we copy the files to appropriate locations manually and create a minimal dist-info metadata.
# Note that as a pure Python package, the wheel contains no pre-built binary stuff.
# When bootstrap is enabled, we don't run tests either, just an import check.
%bcond_with bootstrap

Summary:	A little TOML parser for Python
Name:		python-tomli
Version:	2.0.2
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://pypi.org/project/tomli/
Source0:	https://github.com/hukkin/tomli/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Tomli is a Python library for parsing TOML.
Tomli is fully compatible with TOML v1.0.0.

#----------------------------------------------------------------------------

%package -n python3-tomli
Summary:	A little TOML parser for Python
Group:		Development/Python

%description -n python3-tomli
Tomli is a Python library for parsing TOML.
Tomli is fully compatible with TOML v1.0.0.

%files -n python3-tomli -f %{pyproject_files}
%doc README.md
%doc CHANGELOG.md
%license LICENSE

#----------------------------------------------------------------------------
%prep
%autosetup -p1 -n tomli-%{version}

%if %{without bootstrap}
%generate_buildrequires
%pyproject_buildrequires -r
%endif

%build
%if %{without bootstrap}
%pyproject_wheel
%else
%global distinfo tomli-%{version}+rpmbootstrap.dist-info
mkdir %{distinfo}
cat > %{distinfo}/METADATA << EOF
Metadata-Version:	2.0.2
Name: tomli
Version:	2.0.2
EOF
%endif

%install
%if %{without bootstrap}
%pyproject_install
%pyproject_save_files tomli
%else
mkdir -p %{buildroot}%{python3_sitelib}
cp -a src/tomli %{distinfo} %{buildroot}%{python3_sitelib}
echo '%{python3_sitelib}/tomli/' > %{pyproject_files}
echo '%{python3_sitelib}/%{distinfo}/' >> %{pyproject_files}
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 313 |14mr|python-tomli-w-1.2.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_with check

Name:           python-tomli-w
Version:        1.2.0
Release:        1
Summary:        A Python library for writing TOML

# SPDX
License:        MIT
URL:            https://github.com/hukkin/tomli-w
Source0:        %{url}/archive/%{version}/tomli-w-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel

%global _description %{expand:
Tomli-W is a Python library for writing TOML. It is a write-only counterpart
to Tomli, which is a read-only TOML parser. Tomli-W is fully compatible
with TOML v1.0.0.}

%description %_description

%package -n python3-tomli-w
Summary:        %{summary}

%description -n python3-tomli-w %_description


%prep
%autosetup -p1 -n tomli-w-%{version}
# Measuring coverage is discouraged in Python packaging guidelines:
sed -i '/pytest-cov/d' tests/requirements.txt
# We don't need tomli on Python 3.11+
sed -i '/tomli/d' tests/requirements.txt
sed -Ei 's/tomli(\.|$)/tomllib\1/' tests/*.py
# This testing dependency is optional and we don't have it in (EP)EL,
# it has many missing transitive dependencies that we don't want to maintain
%if 0%{?rhel}
sed -i '/pytest-randomly/d' tests/requirements.txt
%endif


%generate_buildrequires
# We intentionally don't use tox here to avoid a dependency on it in ELN/RHEL,
# the tox deps only list -r tests/requirements.txt anyway and sometimes
# did not run any tests at all.
%pyproject_buildrequires %{?with_check:tests/requirements.txt}


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files tomli_w


%check
%pyproject_check_import tomli_w
%if %{with check}
%pytest -v
%endif


%files -n python3-tomli-w -f %{pyproject_files}
%doc README.md
%doc CHANGELOG.md
%license LICENSE

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 314 |14mr|python-tomlkit-0.13.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name tomlkit

%global common_description %{expand:
TOML Kit is a 1.0.0-compliant TOML library.

It includes a parser that preserves all comments, indentations, whitespace and
internal element ordering, and makes them accessible and editable via an
intuitive API.

You can also create new TOML documents from scratch using the provided helpers.

Part of the implementation has been adapted, improved and fixed from Molten.}

Name:           python-%{pypi_name}
Summary:        Style preserving TOML library
Group:          Development/Python
Version:	0.13.2
Release:	1
License:        MIT

URL:            https://github.com/sdispater/tomlkit
Source0:	%{pypi_source}

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros

# test dependencies
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(pyyaml)

%description %{common_description}

#--------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name} %{common_description}

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.md

#--------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1


%generate_buildrequires
%pyproject_buildrequires -r


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files %{pypi_name}


%check
%pytest


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 315 |14mr|python-tox-4.15.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Tests requiring Internet connections are disabled by default
# pass --with internet to run them (e.g. when doing a local rebuild
# for sanity checks before committing)
%bcond_with internet

%define pypi_name tox

Name:		python-%{pypi_name}
Version:	4.15.1
Release:	1
Summary:	Virtualenv-based automation of test activities
Group:		Development/Python
# file toxbootstrap.py is licensed under MIT License
License:	MIT
URL:		https://tox.readthedocs.org/
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Tox as is a generic virtualenv management and test command line tool you
can use for:

 - checking your package installs correctly with different Python versions
   and interpreters
 - running your tests in each of the environments, configuring your test tool
   of choice
 - acting as a frontend to Continuous Integration servers, greatly reducing
   boilerplate and merging CI and shell-based testing.

#-----------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	Virtualenv-based automation of test activities
Group:		Development/Python
Requires:       python3-py
Requires:       python3-pluggy
# python3-virtualenv is rhbz#537246
Requires:       python3-virtualenv

%description -n python3-%{pypi_name}
Tox as is a generic virtualenv management and test command line tool you
can use for:

 - checking your package installs correctly with different Python versions
   and interpreters
 - running your tests in each of the environments, configuring your test tool
   of choice
 - acting as a frontend to Continuous Integration servers, greatly reducing
   boilerplate and merging CI and shell-based testing.

%files -n python3-%{pypi_name}
%{_bindir}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}*-info

#-----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

# if internet connection available, run tests
%if %{with internet}
%check
%__python3 setup.py test

%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 316 |14mr|python-tox-current-env-0.0.17-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name tox-current-env
%global pypi_under tox_current_env

Summary:	Tox plugin to run tests in current Python environment
Name:		python-%{pypi_name}
Version:	0.0.17
Release:	1
License:	MIT
Group:		Development/Python
URL:            https://github.com/fedora-python/tox-current-env
Source0:        %{pypi_source tox_current_env}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(packaging)
BuildArch:	noarch

%description
The tox-current-env plugin allows to run tests in current Python environment.

#---------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Tox plugin to run tests in current Python environment
Group:		Development/Python

%description -n python3-%{pypi_name}
The tox-current-env plugin allows to run tests in current Python environment.

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{pypi_under}/
%{python3_sitelib}/tox_current_env*.dist-info/

#---------------------------------------------------------------------------

%prep
%autosetup -n tox_current_env-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel


%install
%pyproject_install


#check
# the tests currently only work within actual tox and with various Python
# versions installed, so we skip them.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 317 |14mr|python-transliterate-1.10.2-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module transliterate

Name:		    python-%{module}
Version:	    1.10.2
Release:	    2
Summary:	    Bi-directional transliterator for Python
Url:		    https://github.com/barseghyanartur/%{module}
Source0:	    https://github.com/barseghyanartur/%{module}/archive/refs/tags/%{module}-%{version}.tar.gz
License:	    GPL2.0
Group:		    Development/Python
BuildArch:	    noarch
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pillow

%define _description \
Bi-directional transliterator for Python.\
Transliterates (unicode) strings according to the rules specified\
in the language packs (source script <-> target script)

%description
%_description

#--------------------------------------------------------------------

%package -n python3-%{module}
Summary:        Bi-directional transliterator for Python
Group:          Development/Python

%description -n python3-%{module}
%_description

%files -n python3-%{module}
%doc README.rst
%{python3_sitelib}/%{module}
%{python3_sitelib}/%{module}-*.dist-info

#--------------------------------------------------------------------

%prep
%autosetup -p1 -n %{module}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 318 |14mr|python-trove-classifiers-2026.6.1.19-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-trove-classifiers
Version:        2026.6.1.19
Release:        1
Summary:        Canonical source for classifiers on PyPI (pypi.org)

License:        Apache-2.0
URL:            https://github.com/pypa/trove-classifiers
Source:         %{pypi_source trove_classifiers}

# Drop dependency on calver which is not packaged in Fedora.
# This patch is rebased version of upstream PR:
# https://github.com/pypa/trove-classifiers/pull/126/commits/809156bb35852bcaa1c753e0165f1814f2bcedf6
Patch:          Move-to-PEP-621-declarative-metadata.patch

BuildArch:      noarch
BuildRequires:  python3-devel

%global _description %{expand:
Canonical source for classifiers on PyPI.
Classifiers categorize projects per PEP 301. Use this package to validate
classifiers in packages for PyPI upload or download.
}

%description %_description

%package -n python3-trove-classifiers
Summary:        %{summary}

%description -n python3-trove-classifiers %_description


%prep
%autosetup -p1 -n trove_classifiers-%{version}
# Replace @@VERSION@@ with %%version
%writevars -f pyproject.toml version

# Make the the CLI tests work in %%check
# https://github.com/pypa/trove-classifiers/issues/219
sed -i 's@{BINDIR}/@@' tests/test_cli.py


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files trove_classifiers


%files -n python3-trove-classifiers -f %{pyproject_files}
%doc README.*
%{_bindir}/trove-classifiers

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 319 |14mr|python-typing-extensions-4.15.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name typing-extensions
%global pypi_src typing_extensions

Summary:	Python Typing Extensions
Name:		python-%{pypi_name}
Version:	4.15.0
Release:	1
License:	Python
Group:		Development/Python
Url:		https://pypi.org/project/typing-extensions/
Source0:	%{pypi_source %{pypi_src}}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%global _description %{expand:
The `typing_extensions` module serves two related purposes:

- Enable use of new type system features on older Python versions. For example,
 `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows
 users on Python 3.6 through 3.9 to use it too.
- Enable experimentation with new type system PEPs before they are accepted and
 added to the `typing` module.

New features may be added to `typing_extensions` as soon as they are specified
in a PEP that has been added to the [python/peps](https://github.com/python/peps)
repository. If the PEP is accepted, the feature will then be added to `typing`
for the next CPython release. No typing PEP has been rejected so far, so we
haven't yet figured out how to deal with that possibility.

Starting with version 4.0.0, `typing_extensions` uses
[Semantic Versioning](https://semver.org/). The
major version is incremented for all backwards-incompatible changes.
Therefore, it's safe to depend
on `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,
where `x.y` is the first version that includes all features you need.

`typing_extensions` supports Python versions 3.7 and higher. In the future,
support for older Python versions will be dropped some time after that version
reaches end of life.}

%description %_description

#------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name} %_description

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc CHANGELOG.md README.md

#------------------------------------------------------

%prep
%autosetup -n %{pypi_src}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files typing_extensions

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 320 |14mr|python-typogrify-2.0.7-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module	typogrify

Summary:	Filters to enhance web typography, with support for Django & Jinja templates
Name:		python-%{module}
Version:	2.0.7
Release:	2
License:	BSD
Group:		Development/Python
URL:		https://github.com/mintchaos/typogrify
Source0:	https://github.com/mintchaos/typogrify/archive/refs/tags/%{version}.tar.gz?/%{module}-%{version}.tar.gz
BuildRequires:	python3-devel
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
Typogrify provides a set of custom filters that automatically apply various
transformations to plain text in order to yield typographically-improved HTML.
While often used in conjunction with Jinja_ and Django_ template systems, the
filters can be used in any environment.

#------------------------------------------------------------------

%package -n python3-%{module}
Summary:	Filters to enhance web typography, with support for Django & Jinja templates
Group:		Development/Python

%description -n python3-%{module}
Typogrify provides a set of custom filters that automatically apply various
transformations to plain text in order to yield typographically-improved HTML.
While often used in conjunction with Jinja_ and Django_ template systems, the
filters can be used in any environment.

%files -n python3-%{module}
%doc README.rst
%license LICENSE.txt
%{python3_sitelib}/%{module}
%{python3_sitelib}/%{module}-%{version}-*

#------------------------------------------------------------------

%prep
%setup -qn %{module}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 321 |14mr|python-ufo2ft-3.3.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name ufo2ft

%bcond_with tests

Name:		python-%{pypi_name}
Version:	3.3.1
Release:	1
Summary:	A bridge between UFOs and FontTools
Group:		Development/Python
License:	MIT
URL:		https://github.com/googlei18n/ufo2ft
Source0:	%{pypi_source}
BuildArch:	noarch

BuildRequires:	python3-devel
BuildRequires:	python3dist(booleanoperations) >= 0.9
BuildRequires:	python3dist(compreffor) >= 0.5.0
BuildRequires:	python3dist(cu2qu) >= 1.6.7
BuildRequires:	python3dist(fonttools) >= 4.2.0
BuildRequires:	python3dist(fs)
%if %{with tests}
BuildRequires:	python3dist(pytest) >= 2.8
%endif
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(setuptools-scm)
#BuildRequires:	python3dist(skia-pathops) >= 0.2.0

%description
ufo2ft ("UFO to FontTools") is a fork of ufo2fdk whose goal is to generate OpenType
font binaries from UFOs without the FDK dependency. The library provides two
functions, compileOTF and compileTTF, which work exactly the same way.

#-------------------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name}
ufo2ft ("UFO to FontTools") is a fork of ufo2fdk whose goal is to generate OpenType
font binaries from UFOs without the FDK dependency. The library provides two
functions, compileOTF and compileTTF, which work exactly the same way.

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info

#-------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf Lib/*.egg-info/

%build
%py3_build

%install
%py3_install

%if %{with tests}
%check
%{__python3} setup.py test
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 322 |14mr|python-unidecode-1.4.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name Unidecode

Summary:	US-ASCII transliterations of Unicode text
Name:		python-unidecode
Version:	1.4.0
Release:	2
License:	GPL+ or Artistic
Group:		Development/Python
Url:		https://pypi.python.org/pypi/%{pypi_name}/%{version}
Source0:	%{pypi_source}
BuildArch:	noarch

%description
This is a python port of Text::Unidecode Perl module. It provides a function,
'unidecode(...)' that takes Unicode data and tries to represent it in ASCII
characters.

#----------------------------------------------------------------------------

%package -n python3-unidecode
Summary:	US-ASCII transliterations of Unicode text
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)

%description -n python3-unidecode
This is a python port of Text::Unidecode Perl module. It provides a function,
'unidecode(...)' that takes Unicode data and tries to represent it in ASCII
characters.

%files -n python3-unidecode
%doc README.rst ChangeLog
%{python3_sitelib}/unidecode/
%{python3_sitelib}/*.dist-info

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

rm -f %{buildroot}%{_bindir}/unidecode


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 323 |14mr|python-uranium-5.6.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define debug_package %{nil}

# There are Python plugins in /usr/lib/uranium
# We need to byte-compile it with Python 3
%global __python %__python3

%define module uranium

Summary:	A Python framework for building desktop applications
Name:		python-%{module}
Version:	5.6.0
Release:	3
License:	LGPLv3+
Group:		Development/Python
Url:		https://github.com/Ultimaker/Uranium
Source0:	%{url}/archive/%{version}.tar.gz?/Uranium-%{version}.tar.gz
# missing file
Source1:	UraniumTranslationTools.cmake
Patch0:		uranium-install-files.patch
# https://github.com/Ultimaker/Uranium/pull/320
# Don't hardcode "lib", use sys.lib instead to fix x86_64 search path
BuildRequires:	cmake
BuildRequires:	doxygen
BuildRequires:	gettext
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-pip
%description
Uranium is a Python framework for building 3D printing related applications.

#----------------------------------------------------------------------------

%package -n python3-uranium
Summary:	A Python framework for building desktop applications
Group:		Development/Python
Requires:	python3-cryptography
Requires:	python3-numpy
Requires:	python3-qt5
Requires:	python3-scipy
Requires:	python3-twisted

%description -n python3-uranium
Uranium is a Python framework for building 3D printing related applications.

%files -n python3-uranium -f uranium.lang
%doc README.md
%{python3_sitelib}/UM
%{_prefix}/lib/%{module}
%{_datadir}/%{module}
%{_datadir}/cmake/Modules/UraniumTranslationTools.cmake

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n Uranium-%{version}

# empty file. appending to the end to make sure we are not overriding
# a non empty file in the future
echo '# empty' >> UM/Settings/ContainerRegistryInterface.py

mkdir ./cmake
cp %{SOURCE1} ./cmake/

%build
%cmake -DPython_SITELIB_LOCAL=%{python3_sitelib}
%make_build

%install
%make_install -C build

mkdir -p %{buildroot}%{_prefix}/lib/%{module}
mv -v plugins %{buildroot}%{_prefix}/lib/%{module}

%py_byte_compile %{__python3} %{buildroot}%{_prefix}/lib/%{module}

# Sanitize the location of locale files
pushd %{buildroot}%{_datadir}
mv uranium/resources/i18n locale
ln -s ../../locale uranium/resources/i18n
rm locale/uranium.pot
rm locale/*/uranium.po
popd

%find_lang uranium

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 324 |14mr|python-urlgrabber-4.1.0-5
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name urlgrabber


Name:		python-%{pypi_name}
Version:	4.1.0
Release:	5
Summary:	A high-level cross-protocol url-grabber
Group:		Development/Python
License: 	LGPLv2+
Url:		http://urlgrabber.baseurl.org/
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(pycurl)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
A high-level cross-protocol url-grabber.

Using urlgrabber, data can be fetched in three basic ways:

  urlgrab(url) copy the file to the local filesystem
  urlopen(url) open the remote file and return a file object (like
  urllib2.urlopen)
  urlread(url) return the contents of the file as a string

When using these functions (or methods), urlgrabber supports the following
features:

  * identical behavior for http://, ftp://, and file:// urls
  * http keepalive - faster downloads of many files by using only a single
    connection
  * byte ranges - fetch only a portion of the file
  * reget - for a urlgrab, resume a partial download
  * progress meters - the ability to report download progress automatically,
    even when using urlopen!
  * throttling - restrict bandwidth usage
  * retries - automatically retry a download if it fails. The number of retries
    and failure types are configurable.
  * authenticated server access for http and ftp
  * proxy support - support for authenticated http and ftp proxies
  * mirror groups - treat a list of mirrors as a single source, automatically
    switching mirrors if there is a failure.

#-----------------------------------------------------------

%package -n python3-%{pypi_name}
Summary: A high-level cross-protocol url-grabber
Group:		Development/Python
Requires: 	python3dist(pycurl)

%description -n python3-%{pypi_name}
A high-level cross-protocol url-grabber.

Using urlgrabber, data can be fetched in three basic ways:

  urlgrab(url) copy the file to the local filesystem
  urlopen(url) open the remote file and return a file object (like
  urllib2.urlopen)
  urlread(url) return the contents of the file as a string

When using these functions (or methods), urlgrabber supports the following
features:

  * identical behavior for http://, ftp://, and file:// urls
  * http keepalive - faster downloads of many files by using only a single
    connection
  * byte ranges - fetch only a portion of the file
  * reget - for a urlgrab, resume a partial download
  * progress meters - the ability to report download progress automatically,
    even when using urlopen!
  * throttling - restrict bandwidth usage
  * retries - automatically retry a download if it fails. The number of retries
    and failure types are configurable.
  * authenticated server access for http and ftp
  * proxy support - support for authenticated http and ftp proxies
  * mirror groups - treat a list of mirrors as a single source, automatically
    switching mirrors if there is a failure.

%files -n python3-%{pypi_name}
%doc README LICENSE ChangeLog TODO
%{_bindir}/%{pypi_name}
%{_libexecdir}/*
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/*.dist-info

#-----------------------------------------------------------
%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
rm -Rf %{buildroot}/usr/share/doc/*

#set python shebang
sed '1 s,^.*$,#!%{__python3},' -i %{buildroot}%{_libexecdir}/urlgrabber-ext-down

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 325 |14mr|python-urllib3-2.2.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	pypi_name urllib3

Summary:	Python 2 HTTP library
Name:		python-%{pypi_name}
Version:	2.2.3
Release:	1
Epoch:		1
License:	MIT
Group:		Development/Python
Url:		http://urllib3.readthedocs.org/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
The urllib3 pypi_name is a powerful, sanity-friendly HTTP client for Python. It
offers some features that are missing from the Python standard libraries
(urllib and urllib2):
* Thread safety.
* Connection pooling.
* Client-side SSL/TLS verification.
* File uploads with multipart encoding.
* Helpers for retrying requests and dealing with HTTP redirects.
* Support for gzip and deflate encoding.
* Proxy support for HTTP and SOCKS.
The Python standard libraries  have little to do with each other. They were
designed to be independent and standalone, each solving a different scope of
problems, and urllib3 follows in a similar vein.
This package contains the python2 files.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python 3 HTTP library
Group:		Development/Python
BuildRequires:	python3-setuptools
BuildRequires:	python3-six
BuildRequires:	pkgconfig(python3)
Requires:	python3-six
Requires:	rootcerts

%description -n python3-%{pypi_name}
The urllib3 pypi_name is a powerful, sanity-friendly HTTP client for Python. It
offers some features that are missing from the Python standard libraries
(urllib and urllib2):
* Thread safety.
* Connection pooling.
* Client-side SSL/TLS verification.
* File uploads with multipart encoding.
* Helpers for retrying requests and dealing with HTTP redirects.
* Support for gzip and deflate encoding.
* Proxy support for HTTP and SOCKS.
The Python standard libraries  have little to do with each other. They were
designed to be independent and standalone, each solving a different scope of
problems, and urllib3 follows in a similar vein.
This package contains the python3 files.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc CHANGES.rst

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
%generate_buildrequires
# Generate BR’s from packaged extras even when tests are disabled, to ensure
# the extras metapackages are installable if the build succeeds.
%pyproject_buildrequires -x brotli,socks


%build
%pyproject_wheel

%install
%pyproject_install

# Unbundle the Python 3 build
#rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
#rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/six.*
#mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/

%pyproject_save_files urllib3

%pretrans -p <lua>
path = "%{py2_puresitedir}/urllib3/packages/ssl_match_hostname"
st = posix.stat(path)
if st and st.type == "directory" then
  status = os.rename(path, path .. ".rpmmoved")
  if not status then
    suffix = 0
    while not status do
      suffix = suffix + 1
      status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
    end
    os.rename(path, path .. ".rpmmoved")
  end
end

%pretrans -p <lua> -n python3-%{pypi_name}
path = "%{python3_sitelib}/urllib3/packages/ssl_match_hostname"
st = posix.stat(path)
if st and st.type == "directory" then
  status = os.rename(path, path .. ".rpmmoved")
  if not status then
    suffix = 0
    while not status do
      suffix = suffix + 1
      status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
    end
    os.rename(path, path .. ".rpmmoved")
  end
end

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 326 |14mr|python-uv-build-0.12.19-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond check 0

Name:           python-uv-build
Version:        0.12.19
Release:        1
Summary:        The uv build backend

# The license of the uv project is (MIT OR Apache-2.0), except:
#
# Apache-2.0 OR BSD-2-Clause:
#   - crates/uv-pep440/ is vendored and forked from crate(pep440_rs)
#   - crates/uv-pep508/ is vendored and forked from crate(pep508_rs)
#
# Rust crates compiled into the executable contribute additional license terms.
# To obtain the following list of licenses, build the package and note the
# output of %%{cargo_license_summary}.
#
# (Apache-2.0 OR MIT) AND BSD-3-Clause
# (MIT OR Apache-2.0) AND Apache-2.0 AND CC0-1.0
# (MIT OR Apache-2.0) AND Unicode-3.0
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# 0BSD
# 0BSD OR MIT OR Apache-2.0
# Apache-2.0 OR BSD-2-Clause
# Apache-2.0 OR BSL-1.0
# Apache-2.0 OR MIT
# Apache-2.0 OR MIT OR Zlib
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# BSD-2-Clause OR Apache-2.0 OR MIT
# MIT
# MIT OR Apache-2.0
# MIT OR Zlib OR Apache-2.0
# MIT-0 OR Apache-2.0
# MPL-2.0
# Unicode-3.0
# Unlicense OR MIT
# Zlib
License:        %{shrink:
    (Apache-2.0 OR MIT) AND
    (Apache-2.0 OR BSD-2-Clause) AND
    MPL-2.0
    }
%global extra_crate_licenses %{shrink:
    0BSD AND
    (0BSD OR Apache-2.0 OR MIT) AND
    (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND
    (Apache-2.0 OR BSD-2-Clause OR MIT) AND
    (Apache-2.0 OR BSL-1.0) AND
    (Apache-2.0 OR MIT OR Zlib) AND
    (Apache-2.0 OR MIT-0) AND
    BSD-3-Clause AND
    CC0-1.0 AND
    MIT AND
    (MIT OR Unlicense) AND
    Unicode-3.0 AND
    Unicode-DFS-2016 AND
    Zlib
    }
URL:            https://pypi.org/project/uv-build
Source:         %{pypi_source uv_build}
# generated with make-vendor.sh
Source1:        uv_build-vendor-%{version}.tar.xz

# This package is ultimately built from the same source tree as uv, i.e.
# https://github.com/astral-sh/uv, and belongs to the same cargo workspace.
#
# The PyPI sdist includes a small subset of the same workspace crates as uv.
# (Note that these are not published on crates.io, and are neither intended for
# separate distribution nor suitable for separate packaging.)
#
# We choose not to build uv-build from the uv source package because this spec
# file can be much simpler than the one for uv, because the separation helps to
# keep track of which patches, licenses, additional sources, etc. apply to
# uv-build, and because – while it normally makes sense to synchronize updates
# of this package with uv updates – there will likely be times when we want to
# keep updating uv (primarily a developer tool) while holding uv-build
# (primarily used for building packages) at an older version for compatibility.

BuildSystem:    pyproject
BuildOption(install): --assert-license uv_build

# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
# Also, there are a couple of test failures on 32-bit platforms.
ExcludeArch:   %{ix86}

BuildRequires:  tomcli
BuildRequires:  cargo-rpm-macros

%global common_description %{expand:
This package is a slimmed down version of uv containing only the build
backend.}

%description
%{common_description}


%package -n     python3-uv-build
Summary:        %{summary}
License:        %{license} AND %{extra_crate_licenses}
# LICENSE.dependencies contains a full license breakdown

# In https://github.com/astral-sh/uv/issues/5588#issuecomment-2257823242,
# upstream writes “These have diverged significantly and the upstream versions
# are only passively maintained, uv requires these custom versions and can't
# use a system copy.”
#
# crates/uv-pep440/
# Version number from Cargo.toml:
Provides:       bundled(crate(pep440_rs)) = 0.7.0
# crates/uv-pep508/
# Cargo.toml has 0.6.0, but Changelog.md shows 0.7.0, and the source reflects
# the changes for 0.7.0:
Provides:       bundled(crate(pep508_rs)) = 0.7.0

%description -n python3-uv-build
%{common_description}


%prep
%autosetup -n uv_build-%{version} -p1 -a1

# Collect license files of vendored dependencies in the main source archive
install -D --preserve-timestamps --mode=0644 \
    --target=LICENSE.bundled/pep440_rs crates/uv-pep440/License-*
install -D --preserve-timestamps --mode=0644 \
    --target=LICENSE.bundled/pep508_rs crates/uv-pep508/License-*

# Patch out foreign (e.g. Windows-only) dependencies.
find -L . -type f -name Cargo.toml -print \
    -execdir rust2rpm-helper strip-foreign -o '{}' '{}' ';'

# Do not strip the compiled executable; we need useful debuginfo. Upstream set
# this intentionally, so this change makes sense to keep downstream-only.
tomcli set pyproject.toml false tool.maturin.strip
tomcli set Cargo.toml false profile.release.strip

# We retain the following example even when there are currently no dependencies
# that need to be adjusted.
#
# # foocrate
# #   wanted: 0.2.0
# #   currently packaged: 0.1.2
# #   https://bugzilla.redhat.com/show_bug.cgi?id=1234567
# tomcli set Cargo.toml str workspace.dependencies.foocrate.version 0.1.2

%cargo_prep -v vendor


%generate_buildrequires -p
# For unclear reasons, maturin checks for all crate dependencies when it is
# invoked as part of %%pyproject_buildrequires – including those corresponding
# to optional features.
#
# Since maturin always checks for dev-dependencies, we need -t so that they are
# generated even when the “check” bcond is disabled.
#% cargo_generate_buildrequires -a -t


%build -p
%cargo_license_summary
%{cargo_license} > LICENSE.dependencies


%check -a
# If upstream starts listing license files explicitly, LICENSE.dependencies may
# be dropped from the .dist-info directory. Guard against this.
[ -n "$(find '%{buildroot}%{python3_sitearch}' -name LICENSE.dependencies)" ]

%if %{with check}
# These tests require files from scripts/packages/built-by-uv/, which are not
# included in the sdist.
skip="${skip-} --skip tests::built_by_uv_building"
skip="${skip-} --skip tests::built_by_uv_building_tar_codec"
skip="${skip-} --skip tests::editable_wheel_compression"
skip="${skip-} --skip wheel::test::test_prepare_metadata"

%cargo_test -- -- --exact ${skip-}
%endif


%files -n python3-uv-build -f %{pyproject_files}
# The other license files (LICENSE-APACHE, LICENSE-MIT, and
# LICENSE.dependencies) are already handled in the .dist-info directory.
%license LICENSE.bundled/
%doc README.md

%{_bindir}/uv-build
# Output of uv-build --help:
#   uv_build contains only the PEP 517 build backend for uv and can't be used
#   on the CLI. Use `uv build` or another build frontend instead.
# Therefore, it does not make sense to package a man page.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 327 |14mr|python-vcs-versioning-2.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Bootstrap mode is needed to break circular dependency with setuptools-scm:
# - setuptools_scm >= 10 requires vcs-versioning
# - pytest itself also requires setuptools_scm
# When bootstrapping, we cannot run tests at all.
%bcond bootstrap 1
%bcond tests %{without bootstrap}

Name:           python-vcs-versioning
Version:        2.3.0
Release:        1
Summary:        The blessed package to manage your versions by vcs metadata
License:        MIT
URL:            https://github.com/pypa/setuptools-scm
Source:         %{pypi_source vcs_versioning}

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-packaging

%if %{with tests}
BuildRequires:  /usr/bin/git
%if %{undefined rhel}
BuildRequires:  /usr/bin/hg
%endif
%endif

%global _description %{expand:
This package extracts project version information from version control system
(VCS) metadata, eliminating the need to manually maintain version numbers in
multiple places. It automatically derives versions from VCS tags and commit
history.}

%description %_description


%prep
%autosetup -p1 -n vcs_versioning-%{version}
# Remove unwanted test dependencies (coverage not needed,
# pytest-timeout and pytest-xdist not in RHEL)
%pyproject_patch_dependency pytest-cov:ignore
%if %{defined rhel}
%pyproject_patch_dependency pytest-timeout:ignore
%pyproject_patch_dependency pytest-xdist:ignore
sed -i -e '/^timeout *=/d' pyproject.toml
%endif


%generate_buildrequires
%if %{with tests}
%pyproject_buildrequires -g test
%else
%pyproject_buildrequires
%endif


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files -l vcs_versioning


%package -n python3-vcs-versioning
Summary:        %{summary}

%description -n python3-vcs-versioning %_description


%if %{with tests}
%check
%pytest -v %{!?rhel:-n auto}
%else
# this imports pytest, so we cannot import check it without it
%check
%pyproject_check_import -e '*.test_api'
%endif


%files -n python3-vcs-versioning -f %{pyproject_files}
%doc README.md
%{_bindir}/vcs-versioning

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 328 |14mr|python-virt-firmware-24.7-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_version 24.7

Name:           python-virt-firmware
Version:        %{pypi_version}
Release:        1
Summary:        Tools for virtual machine firmware volumes
Group:		Development/Python
License:        GPL-2.0-only
URL:            https://pypi.org/project/virt-firmware/
Source0:        virt_firmware-%{pypi_version}.tar.gz
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3dist(cryptography)
BuildRequires:  python3dist(setuptools)
BuildRequires:  make help2man

%description
Tools for ovmf / armvirt firmware volumes This is a small collection of tools
for edk2 firmware images. They support decoding and printing the content of
firmware volumes. Variable stores (OVMF_VARS.fd) can be modified, for example
to enroll secure boot certificates.

%package -n     python3-virt-firmware
Summary:        %{summary}
%{?python_provide:%python_provide python3-virt-firmware}
Provides:       virt-firmware
Conflicts:      python3-virt-firmware-peutils < 23.9
Obsoletes:      python3-virt-firmware-peutils < 23.9
Requires:       python3dist(cryptography)
Requires:       python3dist(setuptools)
Requires:       python3dist(pefile)
Recommends:     qemu-img
Recommends:     dialog
%description -n python3-virt-firmware
Tools for ovmf / armvirt firmware volumes This is a small collection of tools
for edk2 firmware images. They support decoding and printing the content of
firmware volumes. Variable stores (OVMF_VARS.fd) can be modified, for example
to enroll secure boot certificates.

%package -n     python3-virt-firmware-tests
Summary:        %{summary} - test cases
Requires:       python3-virt-firmware
Requires:       python3dist(pytest)
#Requires:       edk2-ovmf
%description -n python3-virt-firmware-tests
test cases

%package -n     uki-direct
Provides:       ukidirect
Summary:        %{summary} - manage UKI kernels
Requires:       python3-virt-firmware

%description -n uki-direct
kernel-install plugin and systemd unit to manage automatic
UKI (unified kernel image) updates.

%prep
%autosetup -n virt_firmware-%{pypi_version}

%build
%py3_build

%install
%py3_install
# manpages
install -m 755 -d      %{buildroot}%{_mandir}/man1
install -m 644 man/*.1 %{buildroot}%{_mandir}/man1
# tests
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -ar tests %{buildroot}%{_datadir}/%{name}
# uki-direct
install -m 755 -d  %{buildroot}%{_unitdir}
install -m 755 -d  %{buildroot}%{_prefix}/lib/kernel/install.d
install -m 644 systemd/kernel-bootcfg-boot-successful.service %{buildroot}%{_unitdir}
install -m 755 systemd/99-uki-uefi-setup.install %{buildroot}%{_prefix}/lib/kernel/install.d
cp -r experimental %{buildroot}%{python3_sitelib}

%post -n uki-direct
%systemd_post kernel-bootcfg-boot-successful.service

%preun -n uki-direct
%systemd_preun kernel-bootcfg-boot-successful.service

%files -n python3-virt-firmware
%license LICENSE
%doc README.md
%{_bindir}/host-efi-vars
%{_bindir}/virt-fw-dump
%{_bindir}/virt-fw-vars
%{_bindir}/virt-fw-sigdb
%{_bindir}/kernel-bootcfg
%{_bindir}/uefi-boot-menu
%{_bindir}/migrate-vars
%{_bindir}/pe-dumpinfo
%{_bindir}/pe-listsigs
%{_bindir}/pe-addsigs
%{_bindir}/pe-inspect
%{_mandir}/man1/virt-*.1*
%{_mandir}/man1/kernel-bootcfg.1*
%{_mandir}/man1/uefi-boot-menu.1*
%{_mandir}/man1/pe-*.1*
%dir %{python3_sitelib}/virt
%{python3_sitelib}/virt/firmware
%{python3_sitelib}/experimental
%{python3_sitelib}/virt/peutils
%{python3_sitelib}/virt_firmware-%{pypi_version}-py%{python3_version}.egg-info

%files -n python3-virt-firmware-tests
%{_datadir}/%{name}/tests

%files -n uki-direct
%{_unitdir}/kernel-bootcfg-boot-successful.service
%{_prefix}/lib/kernel/install.d/99-uki-uefi-setup.install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 329 |14mr|python-virtualenv-20.26.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name virtualenv

Summary:	Virtual Python Environment builder
Name:		python-%{pypi_name}
Version:	20.26.3
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://www.virtualenv.org/
Source0:	%{pypi_source}
BuildArch:	noarch
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(setuptools-scm)

%description
virtualenv is a tool to create isolated Python environments.

#-------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Tool to create isolated Python 3 environments
Group:		Development/Python
Requires:	python3dist(setuptools)

%description -n python3-%{pypi_name}
virtualenv is a tool to create isolated Python 3 environments. virtualenv
is a successor to workingenv, and an extension of virtual-python. It is
written by Ian Bicking, and sponsored by the Open Planning Project. It is
licensed under an MIT-style permissive license

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc PKG-INFO README.md
%license LICENSE
%{_bindir}/%{pypi_name}

#-------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 330 |14mr|python-webencodings-0.5.1-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name webencodings

Name:		python-%{pypi_name}
Version:	0.5.1
Release:	3
Summary:	Character encoding aliases for legacy web content
Group:		Development/Python

License:	BSD
URL:		https://github.com/SimonSapin/python-webencodings
Source0:	%{pypi_source}
BuildArch:	noarch

BuildRequires:	python3-devel
BuildRequires:	python3-setuptools

%description
python-webencodings
===================

This is a Python implementation of the
`WHATWG Encoding standard
<http://encoding.spec.whatwg.org/>`_.

* Latest
documentation: http://packages.python.org/webencodings/
* Source code and issue
tracker:
  https://github.com/gsnedders/python2-webencodings
* PyPI releases:
http://pypi.python.org/pypi/webencodings

#---------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name}
python-webencodings
===================

This is a Python implementation of the
`WHATWG Encoding standard
<http://encoding.spec.whatwg.org/>`_.

* Latest
documentation: http://packages.python.org/webencodings/
* Source code and issue
tracker:
  https://github.com/gsnedders/python2-webencodings
* PyPI releases:
http://pypi.python.org/pypi/webencodings

%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#---------------------------------------------------
%prep
%setup -qn %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 331 |14mr|python-webob-1.8.7-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define tarname	WebOb

Summary:	WSGI request and response object for Python

Name:		python-webob
Version:	1.8.7
Release:	2
Source0:	https://files.pythonhosted.org/packages/c7/45/ee5f034fb4ebe3236fa49e5a4fcbc54444dd22ecf33079cf56f9606d479d/WebOb-1.8.7.tar.gz
License:	MIT
Group:		Development/Python
Url:		http://pythonpaste.org/webob/
BuildArch:	noarch

%description
WebOb provides wrappers around the WSGI request environment, and an
object to help create WSGI responses.

The objects map much of the specified behavior of HTTP, including
header parsing and accessors for other standard parts of the
environment.

%package -n python3-webob
Summary:	WSGI request and response object for Python
Group:		Development/Python
BuildRequires:	python3-setuptools

%description -n python3-webob
WebOb provides wrappers around the WSGI request environment, and an
object to help create WSGI responses.

The objects map much of the specified behavior of HTTP, including
header parsing and accessors for other standard parts of the
environment.


%prep
%setup -q -n %{tarname}-%{version}

# Disable performance_test, which requires repoze.profile, which isn't
# in Fedora.
%{__rm} -f tests/performance_test.py
# Remove an empty unneeded file that is there for scm purposes.
rm docs/_static/.empty

%build
%py3_build

%install
%py3_install

%files -n python3-webob
%license docs/license.txt
%doc docs/*
%{python3_sitelib}/webob/
%{python3_sitelib}/WebOb-%{version}-py%{python3_version}.egg-info

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 332 |14mr|python-webtest-3.0.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global with_tests 0

Name:           python-webtest
Version:	3.0.1
Release:	1
Summary:        Helper to test WSGI applications
Group:		Development/Python
License:        MIT
URL:            https://github.com/Pylons/webtest
Source0:        https://github.com/Pylons/webtest/archive/%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-nose

%if 0%{?with_tests}
BuildRequires:  python3-beautifulsoup4
BuildRequires:  python3-paste-deploy
BuildRequires:  python3-pyquery
BuildRequires:  python3-six
BuildRequires:  python3-waitress
BuildRequires:  python3-webob
BuildRequires:  python3-WSGIProxy2
BuildRequires:  python3-pylons-sphinx-themes
%endif

%global _description\
WebTest wraps any WSGI application and makes it easy to send test\
requests to that application, without starting up an HTTP server.\
\
This provides convenient full-stack testing of applications written\
with any WSGI-compatible framework.

%description %_description

%package -n python3-webtest
Summary:        Helper to test WSGI applications

Requires:       python3-beautifulsoup4
Requires:       python3-six
Requires:       python3-waitress
Requires:       python3-webob

%description -n python3-webtest
WebTest wraps any WSGI application and makes it easy to send test
requests to that application, without starting up an HTTP server.

This provides convenient full-stack testing of applications written
with any WSGI-compatible framework.


%prep
%setup -q -n webtest-%{version}

# Remove bundled egg info if it exists.
rm -rf *.egg-info

find tests -type f -exec sed -i "s|import mock|from unittest import mock|" {} \;

%build
%py3_build
# remove files not needed in documentation
rm -f docs/Makefile docs/conf.py docs/changelog.rst
cp -a CHANGELOG.rst docs/

%install
%{__rm} -rf %{buildroot}
%py3_install


%if 0%{?with_tests}
%check
PYTHONPATH=$(pwd) nosetests-%{python3_version}
%endif

%files -n python3-webtest
%doc docs/*
%{python3_sitelib}/webtest
%{python3_sitelib}/*.egg-info

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 333 |14mr|python-werkzeug-3.1.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name werkzeug

Name:		python-%{pypi_name}
Version:	3.1.3
Release:	1
Summary:	Comprehensive WSGI web application library
Group:		Development/Python

License:	BSD
URL:		https://werkzeug.palletsprojects.com
Source0:	%{pypi_source}
BuildRequires:	python3-devel
BuildRequires:	python3dist(setuptools)

BuildArch:	noarch

%global _description %{expand:
Werkzeug
========

Werkzeug started as simple collection of various utilities for WSGI
applications and has become one of the most advanced WSGI utility
modules.  It includes a powerful debugger, full featured request and
response objects, HTTP utilities to handle entity tags, cache control
headers, HTTP dates, cookie handling, file uploads, a powerful URL
routing system and a bunch of community contributed addon modules.

Werkzeug is unicode aware and does not enforce a specific template
engine, database adapter or anything else. It does not even enforce
a specific way of handling requests and leaves all that up to the
developer. It is most useful for end user applications which should work
on as many server environments as possible (such as blogs, wikis,
bulletin boards, etc.).}

%description %{_description}

#-----------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name} %{_description}

%files -n python3-%{pypi_name} -f %pyproject_files
%license LICENSE.txt
%doc CHANGES.rst README.md

#-----------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 334 |14mr|python-wheel-0.44.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name	wheel
%bcond_with	tests

Name:		python-%{pypi_name}
Version:	0.44.0
Release:	2
Summary:	A built-package format for Python
Group:		Development/Python
License:	MIT
URL:		https://github.com/pypa/wheel
Source0:        https://github.com/pypa/%{pypi_name}/archive/%{version}.tar.gz?/%{pypi_name}-%{version}.tar.gz
BuildArch:	noarch

BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-flit-core
BuildRequires:	python3-pip
BuildRequires:	pyproject-rpm-macros

%description
A built-package format for Python.

A wheel is a ZIP-format archive with a specially formatted filename and the
.whl extension. It is designed to contain all the files for a PEP 376
compatible install in a way that is very close to the on-disk format.

#--------------------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        A built-package format for Python
Group:          Development/Python

%description -n python3-%{pypi_name}
A built-package format for Python.

A wheel is a ZIP-format archive with a specially formatted filename and the
.whl extension. It is designed to contain all the files for a PEP 376
compatible install in a way that is very close to the on-disk format.

This is package contains Python 3 version of the package.

%files -n python3-%{pypi_name}
%doc LICENSE.txt README.rst
%{_bindir}/python3-wheel
%{_bindir}/wheel
%{python3_sitelib}/%{pypi_name}*
#--------------------------------------------------------------------------
%prep
%setup -q -n %{pypi_name}-%{version}

# for autoinstall BuildRequires
%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

pushd %{buildroot}%{_bindir}
for f in $(ls); do cp $f python3-$f; done
popd

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 335 |14mr|python-x2go-0.6.1.3-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Name:           python-x2go
Version:        0.6.1.3
Release:        2
Summary:        A client-side X2go API for the Python programming language
License:        GPLv3
Group:          Development/Python
Url:            http://www.x2go.org
Source0:        http://code.x2go.org/releases/source/%{name}/%{name}-%{version}.tar.gz
BuildArch:      noarch

%description
Python X2Go provides a client-side X2go API for the Python programming
language.
Python X2go is mostly interesting for developers who want to incorporate X2go
client support into their own Python applications.
Python X2Go forms the core (heart) of the X2Go client-side applications:
PyHoca-GUI and PyHoca-CLI.

#============================================================================
%package -n python3-x2go
Summary:        A client-side X2go API for the Python programming language
Group:          Development/Python
Provides:	python3-x2go = %{EVRD}
BuildRequires:  python3egg(setuptools)
BuildRequires:  python3egg(python-xlib)
BuildRequires:  python3egg(gevent)
BuildRequires:  python3egg(greenlet)
BuildRequires:  python3egg(paramiko)

%description -n python3-x2go
Python X2Go provides a client-side X2go API for the Python programming
language.
Python X2go is mostly interesting for developers who want to incorporate X2go
client support into their own Python applications.
Python X2Go forms the core (heart) of the X2Go client-side applications:
PyHoca-GUI and PyHoca-CLI.

%files -n python3-x2go
%{python3_sitelib}/x2go
%{python3_sitelib}/x2go-%{version}*

#===========================================================================


%prep
%setup -q

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 336 |14mr|python-xattr-1.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-xattr
Version:        1.3.0
Release:        1
Summary:        Python wrapper for extended filesystem attributes

License:        MIT
URL:            https://github.com/xattr/xattr
Source:         %{url}/archive/v%{version}/v%{version}.tar.gz

BuildRequires:  python3-devel

# Not needed for multilib
ExcludeArch: %{ix86}

%global _description %{expand:
Extended attributes extend the basic attributes of files and directories in the
file system. They are stored as name:data pairs associated with file system
objects (files, directories, symlinks, etc).
}

%description %_description

%package -n python3-xattr
Summary:        %{summary}

%description -n python3-xattr %_description


%prep
%autosetup -p1 -n xattr-%{version}


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files xattr


%files -n python3-xattr -f %{pyproject_files}
%doc CHANGES.txt README.rst
%license LICENSE.txt
%{_bindir}/xattr

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 337 |14mr|python-yaml-6.0.3-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyyaml
%define debug_package %{nil}
%define oname yaml

Name:           python-%{oname}
Version:        6.0.3
Release:        2
Summary:        Python package implementing YAML parser and emitter
License:        MIT
Group:          Development/Python
URL:            http://pyyaml.org/
Source0:        %{pypi_source}
BuildRequires:  pkgconfig(yaml-0.1)
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3-setuptools
BuildRequires:  python3-wheel
BuildRequires:  python3-cython

%description
PyYAML is a YAML parser and emitter for the Python programming
language.

YAML is a data serialization format designed for human readability
and interaction with scripting languages.

# ------------------------------------------------------------------

%package -n python3-%{oname}
Summary:        YAML parser and emitter for Python 3
Group:          Development/Python
Provides:       python3-pyyaml = %{EVRD}
Provides:       python3-%{pypi_name} = %{EVRD}
Provides:       python-yaml = %{EVRD}
Provides:       python3-PyYAML = %{EVRD}
Obsoletes:      %{mklibname python3-%{oname} -d} < 5.4.1

%description -n python3-%{oname}
PyYAML is a YAML parser and emitter for the Python programming
language.

YAML is a data serialization format designed for human readability
and interaction with scripting languages.

%files -n python3-%{oname} -f %{pyproject_files}
%doc CHANGES README.md examples

# ------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files yaml _yaml

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 338 |14mr|python-yamlloader-1.4.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name yamlloader

Summary:	Ordered YAML loader and dumper for PyYAML
Name:		python-%{pypi_name}
Version:	1.4.1
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/Phynix/yamlloader
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-hypothesis
BuildArch:	noarch

%description
This module provides loaders and dumpers for PyYAML. Currently, an
OrderedDict loader/dumper is implemented, allowing to keep items order
when loading resp. dumping a file from/to an OrderedDict (Python 3.7+:
Also  regular dicts are supported and are the default items to be loaded
to. As of Python 3.7 preservation of insertion order is a language feature
of regular dicts.)

This project was originally mirrored from yamlordereddict Many thanks to
the original author François Ménabé! The library contains several
improvements including automated testing and the much faster C-versions
of the Loaders/Dumpers.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Ordered YAML loader and dumper for PyYAML
Group:		Development/Python

%description -n python3-%{pypi_name}
This module provides loaders and dumpers for PyYAML. Currently, an
OrderedDict loader/dumper is implemented, allowing to keep items order
when loading resp. dumping a file from/to an OrderedDict (Python 3.7+:
Also  regular dicts are supported and are the default items to be loaded
to. As of Python 3.7 preservation of insertion order is a language feature
of regular dicts.)

This project was originally mirrored from yamlordereddict Many thanks to
the original author François Ménabé! The library contains several
improvements including automated testing and the much faster C-versions
of the Loaders/Dumpers.

%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/yamlloader
%{python3_sitelib}/yamlloader-*.dist-info

#----------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 339 |14mr|python-yarl-1.25.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Enables additional tests in tests/test_pydantic.py
%bcond pydantic 0

Name:           python-yarl
Version:        1.25.1
Release:        1
Summary:        Python module to handle URLs

License:        Apache-2.0
URL:            https://yarl.readthedocs.io
Source:         https://github.com/aio-libs/yarl/archive/v%{version}/yarl-%{version}.tar.gz
# Allow downstream packagers to opt out of release build flags
# https://github.com/aio-libs/yarl/pull/1675
#
# Fixes:
#
# Cannot build distribution-friendly wheels
# https://github.com/aio-libs/yarl/issues/1592
#
# Rebased on v1.25.1.
Patch:          yarl-1.25.1-system-flags.patch

BuildRequires:  python3dist(cython)
BuildRequires:  python3-devel

# See requirements/test-cibuildwheel.txt and requirements/test.txt, which also
# contain coverage-analysis tools and some other unnecessary or unwanted
# dependencies.
BuildRequires:  python3dist(hypothesis)
%if %{with pydantic}
BuildRequires:  python3dist(pydantic)
%endif

%description
The module provides handy URL class for URL parsing and changing.

%package -n python3-yarl
Summary:        %{summary}

%description -n python3-yarl
The module provides handy URL class for URL parsing and changing.

%prep
%autosetup -n yarl-%{version} -p1
# Disable coverage
sed --regexp-extended --in-place 's/(-.*cov.*$)/#\1/g' pytest.ini

%generate_buildrequires
export YARL_NO_BUILD_OPTIMIZATION_FLAGS=1
# Imitates upstream, and doesn’t interfere with respecting distro flags
export CFLAGS="${CFLAGS} -DNDEBUG"
%pyproject_buildrequires

%build
export YARL_NO_BUILD_OPTIMIZATION_FLAGS=1
# Imitates upstream, and doesn’t interfere with respecting distro flags
export CFLAGS="%{optflags} -DNDEBUG"
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files --assert-license yarl

%files -n python3-yarl -f %{pyproject_files}
%doc CHANGES.rst README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 340 |14mr|python-yubico-1.3.3-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name	yubico

Summary:	Pure-python library for interacting with Yubikeys
Name:		python-%{pypi_name}
Version:	1.3.3
Release:	4
License:	BSD
Group:		Development/Python
Url:		https://github.com/Yubico/python-yubico
Source0:	https://github.com/Yubico/python-yubico/archive/%{name}-%{version}.tar.gz
Patch0:		yubico-python38-warning.patch
BuildRequires:	python3-setuptools
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Pure-python library for interacting with Yubikeys

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Pure-python3 library for interacting with Yubikeys
Group:		Development/Python
BuildArch:	noarch
Requires:	python3dist(pyusb)

%description -n	python3-%{pypi_name}
Pure-python3 library for interacting with Yubikeys

%files -n python3-%{pypi_name}
%doc COPYING NEWS README
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/python_%{pypi_name}-%{version}-*

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{name}-%{name}-%{version}
sed -i 's|setup_requires=|tests_require=|' setup.py

%build

%install
PYTHONDONTWRITEBYTECODE=1 %{__python3} setup.py install --root=%{buildroot}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 341 |14mr|python-zipp-3.20.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define _python_no_extras_requires 1

%global pypi_name zipp

%bcond_with docs

Name:           python-%{pypi_name}
Version:	3.20.2
Release:	1
Summary:        Backport of pathlib-compatible object wrapper for zip files
Group:          Development/Python
License:        MIT
URL:            https://github.com/jaraco/zipp
Source0:	%{pypi_source}
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3dist(toml)
%if %{with docs}
BuildRequires:  python3dist(jaraco.packaging)
BuildRequires:  python3dist(rst.linker)
BuildRequires:  python3dist(sphinx)
%endif

%description
A pathlib-compatible Zipfile object wrapper. A backport of the Path object.

#------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python
Requires:       python3dist(pathlib2)

%description -n python3-%{pypi_name}
A pathlib-compatible Zipfile object wrapper. A backport of the Path object.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst

#------------------------------------------------------------

%if %{with docs}
%package -n python-%{pypi_name}-doc
Summary:        zipp documentation
Group:          Documentation

%description -n python-%{pypi_name}-doc
Documentation for zipp

%files -n python-%{pypi_name}-doc
%doc html
%license LICENSE

%endif
#------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%if %{with docs}
# generate html docs
PYTHONPATH=${PWD} sphinx-build docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%endif

%install
%pyproject_install
%pyproject_save_files %{pypi_name}


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 342 |14mr|rpm-6.1.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Get rid of any -gnu/-gnueabi suffix for platform names
# to get traditional directory names
%ifarch x86_64
%define _target_platform x86_64-%{_vendor}-linux
%else
%ifarch aarch64
%define _target_platform aarch64-%{_vendor}-linux
%else
%define _target_platform %{_target_cpu}-%{_vendor}-linux
%endif
%endif

%if %{__isa_bits} == 64
%define _lib lib64
%else
%define _lib lib
%endif

%define _prefix /usr
%define _libdir %{_prefix}/%{_lib}
%define _libexecdir %{_prefix}/libexec
%define _bindir %{_prefix}/bin
%define _sysconfdir /etc
%define _datadir /usr/share
%define _defaultdocdir %{_datadir}/doc
%define _localstatedir /var
%define _infodir %{_datadir}/info
%define _sharedstatedir %{_localstatedir}/lib

%define _real_vendor rosa

# If they aren't provided by a system installed macro, define them
%{!?__python3: %global __python3 /usr/bin/python3}

%{!?python3_sitearch: %global python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

%define _python_bytecompile_errors_terminate_build 1

%define __find_requires %{rpmhome}/%{_real_vendor}/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}}
%define __find_provides %{rpmhome}/%{_real_vendor}/find-provides

# run internal testsuite?
## TODO: Enable by default once hack patches are removed
%bcond_with check
# build with plugins?
%bcond_without plugins
# build with new db format
%bcond_with ndb
# build with openmp support?
# error: liblzma: Memory allocation failed
# on abf builds
# need to investigate
%bcond_without openmp
# Build with libimavm to support rpmsign --signfiles
# Note that libemaevm (ima-evm-utils) is built with LibreSSL
%bcond_without imaevm
# build with fsverity support?
%bcond_without fsverity
# rpmlint requires python3-rpm
%bcond_without python_dep

# Define directory which holds rpm config files, and some binaries actually
# NOTE: it remains */lib even on lib64 platforms as only one version
#       of rpm is supported anyway, per architecture
%define rpmhome /usr/lib/rpm

%global libmajor	10
%global librpmname      %mklibname rpm  %{libmajor}
%global librpmnamedevel %mklibname -d rpm
%global librpmsign      %mklibname rpmsign %{libmajor}
%global librpmbuild     %mklibname rpmbuild %{libmajor}
%global librpmio     	%mklibname rpmio %{libmajor}

Summary:	The RPM package management system
Name:		rpm
Epoch:		3
Version:        6.1.0
Release:	1
# Partially GPL/LGPL dual-licensed and some bits with BSD
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
License:	GPLv2+
Group:		System/Configuration/Packaging
Url:		http://www.rpm.org/
# git tree with patches: https://github.com/mikhailnov/rpm/commits/rosa-v4.17.0
Source0:	https://github.com/rpm-software-management/rpm/releases/download/%{name}-%{version}-release/%{name}-%{version}.tar.bz2
# extracted from http://pkgs.fedoraproject.org/cgit/redhat-rpm-config.git/plain/macros:
Source2:	macros.filter
Source3:	rpm.rpmlintrc
Source10:	rpmdb-rebuild.service
Patch:		0002-disable-the-systemd-inhibit-plugin-when-systemd-logi.patch
Patch:		0003-Add-macro-to-install-files-with-macros.patch
Patch:		0004-Macros-to-recognize-RPM-derivative.patch
Patch:		0006-ROSA-fix-KF5_HTML-directory.patch
Patch:		0010-make-geode-appear-as-i686-rhbz-517475.patch
Patch:		0012-Prohibit-badly-commented-define.patch
Patch:		0016-HACK-don-t-exclude-docs-from-generators-to-fix-Perl-.patch
Patch:		0017-no-doc-conflicts.patch
Patch:		0019-bb-shortcircuit.patch
Patch:		0020-rpmqv-ghost.patch
Patch:		0021-Compatibility-with-find_lang-all-name-with-qt-from-R.patch
Patch:		0022-Add-optional-tag.patch

# fedora
Patch:		https://src.fedoraproject.org/rpms/rpm/raw/rawhide/f/rpm-6.0-rpmformat.patch
Patch:		https://src.fedoraproject.org/rpms/rpm/raw/rawhide/f/rpm-4.9.90-no-man-dirs.patch


BuildRequires:	bison
BuildRequires:	git-core
BuildRequires:	pkgconfig(rpm-sequoia)
BuildRequires:	pkgconfig(zlib)
BuildRequires:	bzip2-devel
BuildRequires:	dbus-devel
BuildRequires:	pkgconfig(liblzma) >= 5
BuildRequires:	pkgconfig(libzstd)
BuildRequires:	pkgconfig(libmagic)
BuildRequires:	doxygen
BuildRequires:	pkgconfig(libelf)
BuildRequires:	binutils-devel
BuildRequires:	gettext-devel
BuildRequires:	pkgconfig(neon)
BuildRequires:	pkgconfig(popt)
BuildRequires:	rpm-rosa-setup-build
BuildRequires:	readline-devel
BuildRequires:	pkgconfig(ncurses)
BuildRequires:	pkgconfig(libgcrypt)
BuildRequires:	pkgconfig(lua) >= 5.3
BuildRequires:	pkgconfig(libcap)
BuildRequires:	pkgconfig(openssl)
BuildRequires:	acl-devel
BuildRequires:	scdoc
BuildRequires:	pkgconfig(libarchive) >= 3.3.3
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(sqlite3)
%if %{with check}
# for testsuite:
BuildRequires:	eatmydata
BuildRequires:	fakechroot
BuildRequires:	gnupg2
%endif
%if %{with imaevm}
BuildRequires:	%mklibname imaevm -d
%endif
%if %{with fsverity}
BuildRequires:	pkgconfig(libfsverity)
%endif
%if %{with openmp}
BuildRequires:	gomp-devel
%endif

Requires:	bzip2
Requires:	xz
Requires:	zstd
Requires:	cpio
Requires:	gawk
Requires:	coreutils
Requires:	setup
Requires:	rpm-rosa-setup
# Do not rely on AutoReq here
# https://forum.rosa.ru/viewtopic.php?p=124466
Requires:	%{librpmname} = %{EVRD}
Requires:	%{librpmio} = %{EVRD}
# Install useful plugins by default
# dbus announce plugin seems to be useless by default
Recommends:	rpm-plugin-audit
Recommends:	rpm-plugin-syslog
%{?with_imaevm:Recommends: rpm-plugin-ima}
Recommends:	rpm-plugin-systemd-inhibit
# If selinux-policy is removed (e.g. after orphaning when is not really needed)
# then removing any RPM package fails because SELinux is active, policy is loaded
# but is not available on disk. It looks more like a feature, not a bug.
Recommends:	(rpm-plugin-selinux if selinux-policy)
Recommends:	(rpm-plugin-fapolicyd if fapolicyd)
# Out-of-tree plugin, we use it to improve user experience with third-party
# proprietary packages and fix our mistakes in broken %%preun scriptlets
# kb#630
Recommends:	rpm-plugin-rotozei

%description
The RPM Package Manager (RPM) is a powerful command line driven
package management system capable of installing, uninstalling,
verifying, querying, and updating software packages.  Each software
package consists of an archive of files along with information about
the package like its version, a description, etc.

%package -n %{librpmname}
Summary:	Libraries for manipulating RPM packages
Group:		System/Libraries
License:	GPLv2+ and LGPLv2+ with exceptions
Provides:	librpm = %{EVRD}
Provides:	rpm-libs = %{EVRD}

%description -n %{librpmname}
This package contains the RPM shared library.

%package -n %{librpmio}
Summary:	Libraries for manipulating RPM packages
Group:		System/Libraries
License:	GPLv2+ and LGPLv2+ with exceptions
# librpmio.so was in librpmname
Conflicts:	%{librpmname} < 2:4.17.0-14

%description -n %{librpmio}
This package contains the RPM IO library.

%package -n %{librpmbuild}
Summary:	Libraries for building and signing RPM packages
Group:		System/Libraries
License:	GPLv2+ and LGPLv2+ with exceptions
Obsoletes:	rpm-build-libs < %{EVRD}
Provides:	rpm-build-libs = %{EVRD}

%description -n %{librpmbuild}
This package contains the RPM shared libraries for building and signing
packages.

%package -n %{librpmnamedevel}
Summary:	Development files for applications which will manipulate RPM packages
Group:		Development/C
License:	GPLv2+ and LGPLv2+ with exceptions
Requires:	rpm = %{EVRD}
Provides:	librpm-devel = %{EVRD}
Provides:	rpm-devel = %{EVRD}
Requires:	pkgconfig(popt)
Requires:	%{librpmname} = %{EVRD}
Requires:	%{librpmio} = %{EVRD}
Requires:	%{librpmbuild} = %{EVRD}
Requires:	%{librpmsign} = %{EVRD}

%description -n %{librpmnamedevel}
This package contains the RPM C library and header files.  These
development files will simplify the process of writing programs that
manipulate RPM packages and databases. These files are intended to
simplify the process of creating graphical package managers or any
other tools that need an intimate knowledge of RPM packages in order
to function.

This package should be installed if you want to develop programs that
will manipulate RPM packages and databases.

%package  -n %{librpmsign}
Summary:	Libraries for building and signing RPM packages
Group:		System/Libraries
License:	GPLv2+ and LGPLv2+ with exceptions

%description -n %{librpmsign}
This package contains the RPM shared libraries for building and signing
packages.

%package build
Summary:	Scripts and executable programs used to build packages
Group:		System/Configuration/Packaging
Requires:	autoconf
Requires:	automake
Requires:	gcc
Requires:	file
Requires:	libtool-base
Requires:	patch
Requires:	diffutils
Requires:	make
Requires:	tar
Requires:	unzip
Requires:	elfutils
Requires:	rpm = %{EVRD}
Requires:	rpm-rosa-setup-build
Requires:	%{librpmbuild} = %{EVRD}
# For pythondistdeps generator
%if %{with python_dep}
Requires:	rpmlint
Requires:	rpmlint-rosa-policy
%endif
Requires:	dwz
Requires:	debugedit
Requires:	spec-helper >= 0.31.12
Requires:	pkgconfig
Requires:	go-srpm-macros
Requires:	qml-rpm-generators
Requires:	efi-srpm-macros
Requires:	python3-rpm-macros
Requires:	pyproject-srpm-macros
Requires:	rust-srpm-macros
Requires:	devel-rpm-generators
Requires:	cmake-rpm-generators
Requires:	order-rpm-generators
Requires:	pam-rpm-generators
Requires:	rpm-helper
Conflicts:	rpm-build < %{EVRD}

%description build
The rpm-build package contains the scripts and executable programs
that are used to build packages using the RPM Package Manager.

%package sign
Summary:	Package signing support
Group:		System/Base

%description sign
This package contains support for digitally signing RPM packages.

%package -n python3-%{name}
Summary:	Python 3 bindings for apps which will manipulate RPM packages
Group:		Development/Python
Requires:	rpm = %{EVRD}

%description -n python3-%{name}
The python3-rpm package contains a module that permits applications
written in the Python programming language to use the interface
supplied by RPM Package Manager libraries.

This package should be installed if you want to develop Python 3
programs that will manipulate RPM packages and databases.

%package apidocs
Summary:	API documentation for RPM libraries
Group:		Documentation
BuildArch:	noarch

%description apidocs
This package contains API documentation for developing applications
that will manipulate RPM packages and databases.

%package	cron
Summary:	Create daily logs of installed packages
Group:		System/Base
BuildArch:	noarch
Requires:	crontabs
Requires:	logrotate
Requires:	rpm = %{EVRD}

%description cron
This package contains a cron job which creates daily logs of installed
packages on a system.

%if %{with plugins}
%package plugin-audit
Summary:	Rpm plugin for logging audit events on package operations
Group:		System/Base
BuildRequires:	pkgconfig(audit)
Requires:	%{librpmname} = %{EVRD}

%description plugin-audit
Rpm plugin for libaudit support

%package plugin-dbus-announce
Summary:	Rpm plugin for announcing transactions on the DBUS
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-dbus-announce
The plugin announces basic information about rpm transactions to the
system DBUS - like packages installed or removed.  Other programs can
subscribe to the signals to get notified when packages on the system
change.

%package plugin-selinux
Summary:	Rpm plugin for SELinux functionality
Group:		System/Base
BuildRequires:	pkgconfig(libselinux)
Requires:	%{librpmname} = %{EVRD}

%description plugin-selinux
Rpm plugin for selinux support

%package plugin-syslog
Summary:	Rpm plugin for syslog functionality
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-syslog
This plugin exports RPM actions to the system log.

%package plugin-systemd-inhibit
Summary:	Rpm plugin for systemd inhibit functionality
Group:		System/Base
BuildRequires:	pkgconfig(dbus-1)
Requires:	%{librpmname} = %{EVRD}

%description plugin-systemd-inhibit
This plugin blocks systemd from entering idle, sleep or shutdown while an rpm
transaction is running using the systemd-inhibit mechanism.

%if %{with imaevm}
%package plugin-ima
Summary:	Rpm plugin for IMA file signatures
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-ima
This plugin adds support for enforcing and verifying IMA file signatures
in an rpm.
%endif

%package plugin-fapolicyd
Summary:	Rpm plugin for fapolicyd support
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-fapolicyd
Rpm plugin for fapolicyd support.
See https://people.redhat.com/sgrubb/fapolicyd/ for information about
the fapolicyd daemon.

%if %{with fsverity}
%package plugin-fsverity
Summary:	Rpm plugin for fsverity file signatures
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-fsverity
%{summary}.
%endif

%package plugin-prioreset
Summary:	Rpm plugin for resetting scriptlet priorities for SysV init
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-prioreset
%{summary}

Useful on legacy SysV init systems if you run rpm transactions with
nice/ionice priorities. Should not be used on systemd systems.

%package plugin-unshare
Summary:	Rpm plugin for Linux namespace isolation functionality
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-unshare
This plugin adds support for Linux namespace isolation functionality.

%endif

%prep
%autosetup -S git_am -n %{name}-%{version} -p1

# still use legacy verify
sed -i -e "s:%%_pkgverify_level all:%%_pkgverify_level digest:g" macros.in

# Allow rpmbuild to download missing SourceN/PatchN from their URLs
sed -i -e 's/^%%_disable_source_fetch[[:space:]]\+1$/%%_disable_source_fetch\t0/' macros.in
grep -n '_disable_source_fetch' macros.in

%build
%set_build_flags
export CMAKE_BUILD_DIR=BUILD
%cmake \
      -DCMAKE_INSTALL_PREFIX=%{_usr} \
      -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_var}/lib \
      -DWITH_SEQUOIA:BOOL=ON \
      -DWITH_SELINUX:BOOL=ON \
      -DENABLE_SQLITE=ON \
      -DENABLE_PLUGINS=ON \
      %{?with_fsverity:-DWITH_FSVERITY=ON} \
      %{?with_imaevm:-DWITH_IMAEVM=ON} \
      %{!?with_openmp:-DENABLE_OPENMP=OFF} \
      -DENABLE_TESTSUITE=OFF \
      -DWITH_DOXYGEN=ON \
      -DRPM_VENDOR=%{_vendor}

%make_build

%install
%make_install -C BUILD
mkdir -p %{buildroot}%{_unitdir}
install -m 644 %{SOURCE10} %{buildroot}/%{_unitdir}

# Save list of packages through cron
mkdir -p %{buildroot}%{_sysconfdir}/cron.daily
install -m 755 scripts/rpm.daily %{buildroot}%{_sysconfdir}/cron.daily/rpm

mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
install -m 644 scripts/rpm.log %{buildroot}%{_sysconfdir}/logrotate.d/rpm

mkdir -p %{buildroot}/usr/lib/sysimage/rpm
# keep the legacy db directory for %ghost'ing and smooth updates
mkdir -p %{buildroot}/var/lib/rpm

cd BUILD

# init an empty database for %ghost'ing for all supported backends
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH
for be in sqlite; do
    mkdir ${be}
    tools/rpmdb --rcfile rpmrc --define "_db_backend ${be}" --dbpath=${PWD}/${be} --initdb
    cp -va ${be}/. %{buildroot}/usr/lib/sysimage/rpm/
done

# some packages invoke find-debuginfo directly, preserve compat for now
ln -s ../../bin/find-debuginfo %{buildroot}/usr/lib/rpm/find-debuginfo.sh

cd ..
%find_lang rpm

# These live in perl-generators and python-rpm-generators now
rm -f %{buildroot}/%{rpmhome}/{perldeps.pl,perl.*,pythond*}
rm -f %{buildroot}/%{_fileattrsdir}/{perl*,python*}
rm -rf %{buildroot}/var/tmp

%if %{with check}
%check
# https://github.com/rpm-software-management/rpm/issues/741
eatmydata make check || (cat tests/rpmtests.log; exit 0)
%endif

%posttrans
# Plan conversion of BerkleyDB into SQlite if BerkleyDB exists
if [ -f /var/lib/rpm/Packages ]; then
	touch /var/lib/rpm/.rebuilddb
fi

%triggerun -- rpm < 2:4.17
# Handle rpmdb rebuild service on erasure of old to avoid ordering issues
# https://pagure.io/fesco/issue/2382
if [ -x /usr/bin/systemctl ]; then
	systemctl --no-reload enable rpmdb-rebuild.service ||:
fi

%define rpmattr %attr(0755,root,root)

%files -f %{name}.lang
%license COPYING
%doc %{_defaultdocdir}/rpm/CONTRIBUTING.md
%doc %{_defaultdocdir}/rpm/COPYING
%doc %{_defaultdocdir}/rpm/CREDITS
%doc %{_defaultdocdir}/rpm/INSTALL
%doc %{_defaultdocdir}/rpm/README
%doc %{_defaultdocdir}/rpm/[a-z]*.md
%attr(0755,root,root) %{_bindir}/rpm
%{_bindir}/rpm2cpio
%attr(0755,root,root) %{_bindir}/rpm2archive
%attr(0755,root,root) %{_bindir}/rpmdb
%attr(0755,root,root) %{_bindir}/rpmkeys
%attr(0755,root,root) %{_bindir}/rpmsort
%{_bindir}/rpmquery
%{_bindir}/rpmverify

%dir %{rpmhome}
%dir /etc/rpm
%attr(0755,root,root) %{rpmhome}/rpmdb_*
%attr(0644,root,root) %{rpmhome}/macros
%exclude %{rpmhome}/macros.d/macros.transaction*
%{rpmhome}/macros.d
%dir %{rpmhome}/lua
%attr(0644,root,root) %{rpmhome}/rpmpopt*
%attr(0644,root,root) %{rpmhome}/rpmrc
%attr(0755,root,root) %{rpmhome}/script.req
%attr(0755,root,root) %{rpmhome}/rpm.daily
%attr(0644,root,root) %{rpmhome}/rpm.log
%attr(0644,root,root) %{rpmhome}/rpm.supp
%attr(0755,root,root) %{rpmhome}/sysusers.sh

%rpmattr %{rpmhome}/rpm2cpio.sh
%rpmattr %{rpmhome}/tgpg

%dir %{rpmhome}/fileattrs
%{rpmhome}/platform/

%if %{with plugins}
%dir %{_libdir}/rpm-plugins
%{_mandir}/man8/rpm-plugins.8*
%endif

%{_mandir}/man1/rpm2archive.1*
%{_mandir}/man1/rpm2cpio.1*
%{_mandir}/man1/rpmsort.1*
%{_mandir}/man5/rpm-config.5*
%{_mandir}/man5/rpm-macrofile.5*
%{_mandir}/man5/rpm-manifest.5*
%{_mandir}/man5/rpm-rpmrc.5*
%{_mandir}/man7/rpm-design.7*
%{_mandir}/man7/rpm-lua.7*
%{_mandir}/man7/rpm-macros.7*
%{_mandir}/man7/rpm-payloadflags.7*
%{_mandir}/man7/rpm-queryformat.7*
%{_mandir}/man7/rpm-version.7*
%{_mandir}/man8/rpm.8*
%{_mandir}/man8/rpmdb.8*
%{_mandir}/man8/rpmkeys.8*
%{_mandir}/man8/rpm-common.8*

%attr(0755, root, root) %dir /var/lib/rpm
%attr(0644, root, root) %ghost %config(missingok,noreplace) /var/lib/rpm/*
%attr(0644, root, root) %ghost /var/lib/rpm/.*.lock
%attr(0755, root, root) %dir /usr/lib/sysimage/rpm
%attr(0644, root, root) %ghost %config(missingok,noreplace) /usr/lib/sysimage/rpm/*
%attr(0644, root, root) %ghost /usr/lib/sysimage/rpm/.*.lock
%{_unitdir}/rpmdb-rebuild.service

%files -n %librpmname
%{_libdir}/librpm.so.%{libmajor}
%{_libdir}/librpm.so.%{libmajor}.*

%files -n %{librpmio}
%{_libdir}/librpmio.so.%{libmajor}
%{_libdir}/librpmio.so.%{libmajor}.*

%if %{with plugins}
%files plugin-audit
%{rpmhome}/macros.d/macros.transaction_audit
%{_libdir}/rpm-plugins/audit.so
%{_mandir}/man8/rpm-plugin-audit.8*

%files plugin-dbus-announce
%{rpmhome}/macros.d/macros.transaction_dbus_announce
%{_libdir}/rpm-plugins/dbus_announce.so
%{_mandir}/man8/rpm-plugin-dbus-announce.8*
%{_datadir}/dbus-1/system.d/org.rpm.conf

%files plugin-selinux
%{rpmhome}/macros.d/macros.transaction_selinux
%{_libdir}/rpm-plugins/selinux.so
%{_mandir}/man8/rpm-plugin-selinux.8*

%files plugin-syslog
%{rpmhome}/macros.d/macros.transaction_syslog
%{_libdir}/rpm-plugins/syslog.so
%{_mandir}/man8/rpm-plugin-syslog.8*

%files plugin-systemd-inhibit
%{rpmhome}/macros.d/macros.transaction_systemd_inhibit
%{_libdir}/rpm-plugins/systemd_inhibit.so
%{_mandir}/man8/rpm-plugin-systemd-inhibit.8*

%if %{with imaevm}
%files plugin-ima
%{rpmhome}/macros.d/macros.transaction_ima
%{_libdir}/rpm-plugins/ima.so
%{_mandir}/man8/rpm-plugin-ima.8*
%endif

%files plugin-fapolicyd
%{rpmhome}/macros.d/macros.transaction_fapolicyd
%{_libdir}/rpm-plugins/fapolicyd.so
%{_mandir}/man8/rpm-plugin-fapolicyd.8*

%if %{with fsverity}
%files plugin-fsverity
%{rpmhome}/macros.d/macros.transaction_fsverity
%{_libdir}/rpm-plugins/fsverity.so
%endif

%files plugin-prioreset
%{rpmhome}/macros.d/macros.transaction_prioreset
%{_libdir}/rpm-plugins/prioreset.so
%{_mandir}/man8/rpm-plugin-prioreset.8*

%files plugin-unshare
%{rpmhome}/macros.d/macros.transaction_unshare
%{_libdir}/rpm-plugins/unshare.so
%{_mandir}/man8/rpm-plugin-unshare.8*
%endif

%files -n %librpmbuild
%{_libdir}/librpmbuild.so.%{libmajor}
%{_libdir}/librpmbuild.so.%{libmajor}.*

%files -n %librpmsign
%{_libdir}/librpmsign.so.%{libmajor}
%{_libdir}/librpmsign.so.%{libmajor}.*

%files build
%rpmattr %{_bindir}/rpmbuild
%rpmattr %{_bindir}/gendiff
%rpmattr %{_bindir}/rpmspec
%rpmattr %{_bindir}/rpmlua
%rpmattr %{_bindir}/rpmuncompress
%rpmattr %{_bindir}/rpm-setup-autosign
%rpmattr %{_prefix}/lib/rpm/brp-*
%rpmattr %{_prefix}/lib/rpm/check-files
%rpmattr %{_prefix}/lib/rpm/*.prov
# compat symlink to /usr/bin/find-debuginfo from debugedit
%{_prefix}/lib/rpm/find-debuginfo.sh
%rpmattr %{_prefix}/lib/rpm/find-lang.sh
%rpmattr %{_prefix}/lib/rpm/find-provides
%rpmattr %{_prefix}/lib/rpm/find-requires
%rpmattr %{_prefix}/lib/rpm/ocamldeps.sh
%rpmattr %{_prefix}/lib/rpm/pkgconfigdeps.sh
%rpmattr %{_prefix}/lib/rpm/rpm_macros_provides.sh
%rpmattr %{_prefix}/lib/rpm/elfdeps
%rpmattr %{_prefix}/lib/rpm/rpmdeps
%rpmattr %{_prefix}/lib/rpm/rpmdump
%{_prefix}/lib/rpm/rpmuncompress
%{_prefix}/lib/rpm/rpm-setup-autosign
%rpmattr %{_prefix}/lib/rpm/check-buildroot
%rpmattr %{_prefix}/lib/rpm/check-prereqs
%rpmattr %{_prefix}/lib/rpm/check-rpaths
%rpmattr %{_prefix}/lib/rpm/check-rpaths-worker
%{rpmhome}/fileattrs/*

%{_mandir}/man1/elfdeps.1*
%{_mandir}/man1/gendiff.1*
%{_mandir}/man1/rpmbuild.1*
%{_mandir}/man1/rpmdeps.1*
%{_mandir}/man1/rpmspec.1*
%{_mandir}/man1/rpmlua.1*
%{_mandir}/man1/rpm-setup-autosign.1*
%{_mandir}/man1/rpmuncompress.1*
%{_mandir}/man5/rpmbuild-config.5*
%{_mandir}/man7/rpm-dependency-generators.7*
%{_mandir}/man7/rpm-scriptlets.7*
%{_mandir}/man7/rpm-sysusers.7*

%files sign
%{_bindir}/rpmsign
%{_mandir}/man1/rpmsign.1*

%files -n python3-%{name}
%{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-%{version}*.egg-info
%doc %{_defaultdocdir}/rpm/examples/

%files -n %librpmnamedevel
%{_bindir}/rpmgraph
%{_libdir}/librp*[a-z].so
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/cmake/rpm/
%{_includedir}/%{name}/
%{_mandir}/man1/rpmgraph.1*

%files apidocs
%license COPYING
%doc %{_defaultdocdir}/rpm/API/

%files cron
%config(noreplace) /etc/cron.daily/rpm
%config(noreplace) /etc/logrotate.d/rpm

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 343 |14mr|rpm-rosa-setup-1.2.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Don't create backups, cp -a user/* build/* is used
%global _default_patch_flags -s -U --no-backup-if-mismatch

%{!?_rpmconfigdir: %global _rpmconfigdir /usr/lib/rpm}
%{!?_rpmluadir: %global _rpmluadir %{_rpmconfigdir}/lua}

# rpmlint depends from python modules, help bootstrap new python3.x
%bcond_without python_dep

%bcond_with bootstrap

Summary:	Macros and scripts for rosa specific rpm behavior
Name:		rpm-rosa-setup
Version:	1.2.5
Release:	1

License:	MIT
Group:		System/Configuration/Packaging
Url:		https://gitea.rosa.ru/software/rpm-rosa-setup
Source0:	https://gitea.rosa.ru/software/rpm-rosa-setup/archive/%{version}.tar.gz
# Forge handling macros
# (From: https://src.fedoraproject.org/rpms/redhat-rpm-config/tree):
Source8:	forge.lua
Source9:	macros.forge
Source10:	common.lua
# needed for golang stuff
Source11:	macros.fedora-misc
BuildRequires:	git-core
Requires:	rpm
# Packaged was renamed from rpm-openmandriva-setup
# (tpg) do not use %%EVRD here, as it does not exist yet
Provides:	rpm-openmandriva-setup = %{version}-%{release}
Conflicts:	rpm-openmandriva-setup < 1.0
Obsoletes:	rpm-openmandriva-setup < 1.0
BuildArch:	noarch

%description
Macros and scripts for rosa specific rpm behavior.

This has been adapted for ROSA Linux systems.

%files
# We should own this directory
%dir %{_rpmconfigdir}/rosa
%{_rpmconfigdir}/rosa/macros
%{_rpmconfigdir}/rosa/rpmrc

#----------------------------------------------------------------------------

%package build
Summary:	Macros and scripts for rosa specific rpmbuild behavior
Group:		System/Configuration/Packaging
Requires:	%{name} = %{version}-%{release}
# Required for package builds to work
Requires:	binutils
Requires:	dwz
Requires:	gdb
Requires:	rpm-build
Requires:	python-srpm-macros
%if %{with python_dep}
Requires:	rpmlint
Requires:	rpmlint-rosa-policy
%endif
Requires:	spec-helper
Provides:	rpm-openmandriva-setup-build = %{version}-%{release}
Conflicts:	rpm-openmandriva-setup-build < 1.0
Obsoletes:	rpm-openmandriva-setup-build < 1.0

%description build
Macros and scripts for rosa specific rpmbuild behavior.

This has been adapted for ROSA Linux systems.

%files build
%{_rpmluadir}/fedora/common.lua
%{_rpmluadir}/fedora/srpm/forge.lua
%{_rpmmacrodir}/macros.buildsys.autotools
%{_rpmmacrodir}/macros.dwz
%{_rpmmacrodir}/macros.fedora-misc
%{_rpmmacrodir}/macros.forge
%{_rpmmacrodir}/macros.kernel
%{_rpmmacrodir}/macros.libpackage
%{_rpmmacrodir}/macros.selinux
%{_rpmmacrodir}/macros.build-constraints
%{_rpmconfigdir}/rosa/kmod-deps.sh
%{_fileattrsdir}/kmod.attr

#----------------------------------------------------------------------------

%prep
%autosetup -S git_am -n rpm-rosa-setup

%build

%install
mkdir -p %{buildroot}%{_rpmconfigdir}
cp -a user/* build/* %{buildroot}%{_rpmconfigdir}

%install_macro forge %{SOURCE9}
%install_macro fedora-misc %{SOURCE11}
mkdir -p %{buildroot}%{_rpmluadir}/fedora/srpm
install -D %{SOURCE10} %{buildroot}%{_rpmluadir}/fedora
install -D %{SOURCE8} %{buildroot}%{_rpmluadir}/fedora/srpm

%if %{without python_dep}
# do not call rpmlint which requires python3-rpm when bootstrapping new python3.x
sed -i'' %{buildroot}%{_rpmconfigdir}/rosa/macros -e 's,/bin/rpmlint,/bin/true,g'
%endif

%if %{with bootstrap}
# This will be enabled at some point - for bootstrap, let it pass since many
# packages aren't ready for rpmlint 2.6 yet
sed -i "s/\(_nonzero_exit_pkgcheck_terminate_build\).*/\1 0/" %{buildroot}%{_rpmconfigdir}/rosa/macros
%else
sed -i "s/\(_nonzero_exit_pkgcheck_terminate_build\).*/\1 1/" %{buildroot}%{_rpmconfigdir}/rosa/macros
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 344 |14mr|rpmsort-2.12-15
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname grub2-rpm-sort
Summary:	rpm-sort, built with no grub2
Name:		rpmsort
Version:	2.12
Release:	15
License:	GPLv2+
Url:		http://www.gnu.org/software/grub/
Group:		System/Base
# just pick it from grub2 package
# and make diff with such version
# to change headers
Source0:	grub-rpm-sort.c
BuildRequires:  pkgconfig(rpm)
Provides:	rpm-sort
Provides:	grub2-rpm-sort = %{EVRD}
Obsoletes:	grub2-rpm-sort < 2.12
Conflicts:	grub2-rpm-sort = 2.06

%description
grub2-rpm-sort built without grub2

%files
%{_bindir}/*
%{_sbindir}/*

#----------------------------------------------------------------------------
%prep
%setup -T -c

%build
install -m0644 %{SOURCE0} .
%{__cc}  -Wall -lrpm -lrpmio grub-rpm-sort.c -o grub2-rpm-sort %{optflags} %{ldflags}

%install
mkdir -p  %{buildroot}%{_bindir}
mkdir -p  %{buildroot}%{_sbindir}
install -m 755 %{oname} %{buildroot}%{_sbindir}
ln -s	%{_sbindir}/%{oname} %{buildroot}%{_bindir}/rpm-sort

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 345 |14mr|rust-1.98.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# ALL Rust libraries are private, because they don't keep an ABI.
%define _privatelibs lib(.*-[[:xdigit:]]{16}*|rustc.*)[.]so.*
%define __provides_exclude ^(%{_privatelibs})$
%define __requires_exclude ^(%{_privatelibs})$
%define __provides_exclude_from ^(%{_docdir}|%{rustlibdir}/src)/.*$
%define __requires_exclude_from ^(%{_docdir}|%{rustlibdir}/src)/.*$

%define debug_package %{nil}

%define _disable_ld_no_undefined 1
# To avoid undefined symbols
%define _find_debuginfo_opts -g

%global _disable_lto 1

# We're going to override --libdir when configuring to get rustlib into a
# common path, but we'll fix the shared libraries during install.
%define rustlibdir %{_libdir}/rustlib

# Only x86_64 and i686 are Tier 1 platforms at this time.
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
%define rust_arches x86_64 %{ix86} %{arm64} %{riscv64} loongarch64

# To bootstrap from scratch, set the channel and date from src/stage0.txt
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
# or nightly wants some beta-YYYY-MM-DD
# Note that cargo matches the program version here, not its crate version.
%global bootstrap_rust 1.97.1
%global bootstrap_cargo 1.97.1
%global bootstrap_date 2026-07-16

# how to use it?
# when you need to upgrade from 1.8.xx to 1.9.xx
# just enable bootstrap option
%bcond_without bootstrap

%if %{with bootstrap}
%define bootstrap_arches %{rust_arches}
# Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases.
%bcond_without llvm_static
%else
%bcond_with llvm_static
%endif

# LLDB only works on some architectures
# LLDB isn't available everywhere...
%bcond_with lldb

%ifarch x86_64
%define rust_triple x86_64-unknown-linux-gnu
%endif
%ifarch %{ix86}
%define rust_triple i686-unknown-linux-gnu
%endif
%ifarch aarch64
%define rust_triple aarch64-unknown-linux-gnu
%endif
%ifarch %{riscv64}
%define rust_triple riscv64gc-unknown-linux-gnu
%endif
%ifarch loongarch64
%define rust_triple loongarch64-unknown-linux-gnu
%endif

%ifarch %{bootstrap_arches}
%define bootstrap_root rust-%{bootstrap_rust}-%{rust_triple}
%define local_rust_root %{_builddir}/%{bootstrap_root}/usr
%else
%define local_rust_root %{_prefix}
%endif

# usr default systemd llvm
# /usr/bin/clang /usr/bin/clang++
%bcond_without system_llvm
# if you need an llvm different from the system one
# llvm15 .. llvmXX from /opt/llvmXX
%bcond_without sideload_llvm

# if system_llvm choosen
# use default /usr/bin/llvm-config and other stuff
%if %{with system_llvm}
%define llvm_major %nil
%define _llvm_config %{_bindir}/llvm-config
%global profiler %(echo %{_libdir}/clang/*/lib/*linux-gnu/libclang_rt.profile.a)
%endif

%bcond_with compiler_gcc

%if %{with compiler_gcc}
%define _cc %{__cc}
%define _cxx %{__cxx}
%else
%define _cc %{_bindir}/clang
%define _cxx %{_bindir}/clang++
%endif

%if %{with sideload_llvm}
%define llvm_major 22
%define llvm_dir_ver llvm%{llvm_major}
%define llvm_path /opt/%{llvm_dir_ver}
%define _llvm_config %{llvm_path}/bin/llvm-config
%global profiler %(echo %{llvm_path}/%{_lib}/clang/%{llvm_major}/lib/*linux-gnu/libclang_rt.profile.a)
%global optimized_builtins %(echo %{llvm_path}/%{_lib}/clang/%{llvm_major}/lib/*linux-gnu/libclang_rt.builtins.a)
%if %{without compiler_gcc}
%define _cc %{llvm_path}/bin/clang
%define _cxx %{llvm_path}/bin/clang++
%endif
%endif

Summary:	The Rust Programming Language
Name:		rust
Version:	1.98.1
Release:	1
License:	(ASL 2.0 or MIT) and (BSD and MIT)
Group:		Development/Rust
# ^ written as: (rust itself) and (bundled libraries)
Url:		https://www.rust-lang.org
Source0:	https://static.rust-lang.org/dist/rustc-%{version}-src.tar.xz
# do bootstrap to download
Source1:	https://static.rust-lang.org/dist/rust-%{bootstrap_rust}-x86_64-unknown-linux-gnu.tar.xz
Source2:	https://static.rust-lang.org/dist/rust-%{bootstrap_rust}-i686-unknown-linux-gnu.tar.xz
Source3:	https://static.rust-lang.org/dist/rust-%{bootstrap_rust}-aarch64-unknown-linux-gnu.tar.xz
Source4:	https://static.rust-lang.org/dist/rust-%{bootstrap_rust}-riscv64gc-unknown-linux-gnu.tar.xz
Source5:	https://static.rust-lang.org/dist/rust-%{bootstrap_rust}-loongarch64-unknown-linux-gnu.tar.xz
Source10:	rust.rpmlintrc
BuildRequires:	ncurses-devel
BuildRequires:	curl
BuildRequires:	pkgconfig(libcurl)
BuildRequires:	pkgconfig(liblzma)
BuildRequires:	pkgconfig(libzstd)
BuildRequires:	pkgconfig(openssl)
BuildRequires:	pkgconfig(zlib)
BuildRequires:	pkgconfig(libxml-2.0)
# needs libssh2_userauth_publickey_frommemory
BuildRequires:	pkgconfig(libssh2) >= 1.6.0
BuildRequires:	pkgconfig(python3)
BuildRequires:	cmake >= 2.8.11
BuildRequires:	ninja
BuildRequires:	stdc++-static-devel
# opt-llvm
%if %{with sideload_llvm}
BuildRequires: llvm%{llvm_major}
BuildRequires: polly-%{llvm_major}
%endif
# system llvm
%if %{with system_llvm}
BuildRequires: llvm-devel
BuildRequires: compiler-rt
BuildRequires: clang
%endif
BuildRequires:  gcc-c++
%if %{with llvm_static}
BuildRequires:	pkgconfig(libffi)
%endif
# make check needs "ps" for src/test/run-pass/wait-forked-but-failed-child.rs
BuildRequires:	procps-ng
# debuginfo-gdb tests need gdb
BuildRequires:	gdb
# when bootstrap DISABLED
%if %{without bootstrap}
BuildRequires:	cargo >= %{bootstrap_cargo}
BuildRequires:	%{name} >= %{bootstrap_rust}
%endif
# Virtual provides for folks who attempt "dnf install rustc"
Provides:		rustc = %{version}-%{release}
# Always require our exact standard library
Requires:		%{name}-std-static = %{version}-%{release}
Requires:		/usr/bin/cc
Obsoletes:		%{name}-analysis < 1.69.0~

%description
Rust is a systems programming language that runs blazingly fast, prevents
segfaults, and guarantees thread safety.

This package includes the Rust compiler and documentation generator.

%files
%license COPYRIGHT* LICENSE-APACHE LICENSE-MIT
%doc README.md
%{_sysconfdir}/ld.so.conf.d/%{name}_%{_arch}.conf
%{_bindir}/rustc
%{_bindir}/rustdoc
%{_libdir}/*.so
%{_libexecdir}/rust-analyzer-proc-macro-srv
%{_mandir}/man1/rustc.1*
%{_mandir}/man1/rustdoc.1*
%dir %{rustlibdir}
%dir %{rustlibdir}/%{rust_triple}
%dir %{rustlibdir}/%{rust_triple}/lib
%{rustlibdir}/%{rust_triple}/lib/*.so*
%dir %{_defaultdocdir}/docs
%{_defaultdocdir}/docs/*
%exclude %{_sysconfdir}/target-spec-json-schema.json

#-------------------------------------------------------------------------

%package std-static
Summary:	Standard library for Rust
Group:		Development/Rust

%description std-static
This package includes the standard libraries for building applications
written in Rust.

%files std-static
%dir %{rustlibdir}
%dir %{rustlibdir}/%{rust_triple}
%dir %{rustlibdir}/%{rust_triple}/lib
%{rustlibdir}/%{rust_triple}/lib/*.rlib
%{rustlibdir}/%{rust_triple}/lib/*.rmeta

#-------------------------------------------------------------------------

%package debugger-common
Summary:	Common debugger pretty printers for Rust
Group:		Development/Rust
BuildArch:	noarch

%description debugger-common
This package includes the common functionality
for %{name}-gdb and %{name}-lldb.

%files debugger-common
%dir %{rustlibdir}
%dir %{rustlibdir}/etc
%{rustlibdir}/etc/rust_*.py*
%optional %{rustlibdir}/etc/__pycache__/rust_*.py*

#-------------------------------------------------------------------------

%package gdb
Summary:	GDB pretty printers for Rust
Group:		Development/Rust
Requires:	gdb
Requires:	%{name}-debugger-common = %{version}-%{release}
BuildArch:	noarch
# (akien) Handle moved files between our old Mageia package and this Fedora-based one
Conflicts:	rust < 1.11.0-3

%description gdb
This package includes the rust-gdb script,
which allows easier debugging of Rust programs.

%files gdb
%{_bindir}/rust-gdb
%{rustlibdir}/etc/gdb_*
%optional %{rustlibdir}/etc/__pycache__/gdb_*
# %%exclude - No work!
#%%exclude %%{_bindir}/rust-gdbgui
%{_bindir}/rust-gdbgui

#-------------------------------------------------------------------------
%if %{with lldb}

%package lldb
Summary:	LLDB pretty printers for Rust
Group:		Development/Rust
Requires:	lldb
Requires:	python3-lldb
Requires:	%{name}-debugger-common = %{version}-%{release}
BuildArch:	noarch

%description lldb
This package includes the rust-lldb script,
which allows easier debugging of Rust programs.

%files lldb
%doc README.md COPYRIGHT LICENSE-APACHE LICENSE-MIT
%{_bindir}/rust-lldb
%{rustlibdir}/etc/lldb_*

%endif
#-------------------------------------------------------------------------

%package -n cargo
Summary:	Rust's package manager and build tool
Group:		Development/Rust
# For tests:
BuildRequires:	git
# Cargo is not much use without Rust
Requires:	rust
Obsoletes:	cargo < 1.26.0-1
# "cargo vendor" is a builtin command starting with 1.37.  The Obsoletes and
# Provides are mostly relevant to RHEL, but harmless to have on Fedora/etc. too
Obsoletes:	cargo-vendor <= 0.1.23
Provides:	cargo-vendor = %{version}-%{release}

%description -n cargo
Cargo is a tool that allows Rust projects to declare their various dependencies
and ensure that you'll always get a repeatable build.

%files -n cargo
%license src/tools/cargo/LICENSE-{APACHE,MIT,THIRD-PARTY}
%doc src/tools/cargo/README.md
%{_bindir}/cargo
%{_mandir}/man1/cargo*.1*
%{_sysconfdir}/bash_completion.d/cargo
%{_datadir}/zsh/site-functions/_cargo
%dir %{_datadir}/cargo
%dir %{_datadir}/cargo/registry

#-------------------------------------------------------------------------

%package -n rustfmt
Summary:	Tool to find and fix Rust formatting issues
Group:		Development/Rust
Requires:	cargo
# The component/package was rustfmt-preview until Rust 1.31.
Obsoletes:	rustfmt-preview < 1.0.0
Provides:	rustfmt-preview = %{version}-%{release}

%description -n rustfmt
A tool for formatting Rust code according to style guidelines.

%files -n rustfmt
%doc src/tools/rustfmt/{README,CHANGELOG,Configurations}.md
%license src/tools/rustfmt/LICENSE-{APACHE,MIT}
%{_bindir}/rustfmt
%{_bindir}/cargo-fmt

#-------------------------------------------------------------------------

%package -n rls
Summary:	Rust Language Server for IDE integration
Group:		Development/Rust
# /usr/bin/rls is dynamically linked against internal rustc libs
Requires:	%{name} = %{version}-%{release}
# The component/package was rls-preview until Rust 1.31.
Obsoletes:	rls-preview < 1.31.6
Provides:	rls-preview = %{version}-%{release}

%description -n rls
The Rust Language Server provides a server that runs in the background,
providing IDEs, editors, and other tools with information about Rust programs.
It supports functionality such as 'goto definition', symbol search,
reformatting, and code completion, and enables renaming and refactorings.

%files -n rls
%doc src/tools/rust-analyzer/README.md
%license src/tools/rust-analyzer/LICENSE-{APACHE,MIT}
#%%%{_bindir}/rls
%{_bindir}/rust-analyzer

#-------------------------------------------------------------------------

%package -n clippy
Summary:	Lints to catch common mistakes and improve your Rust code
Group:		Development/Rust
Requires:	cargo
# /usr/bin/clippy-driver is dynamically linked against internal rustc libs
Requires:	%{name} = %{version}-%{release}
# The component/package was clippy-preview until Rust 1.31.
Obsoletes:	clippy-preview <= 0.0.212
Provides:	clippy-preview = %{version}-%{release}

%description -n clippy
A collection of lints to catch common mistakes and improve your Rust code.

%files -n clippy
%doc src/tools/clippy/{README.md,CHANGELOG.md}
%license src/tools/clippy/LICENSE-{APACHE,MIT}
%{_bindir}/cargo-clippy
%{_bindir}/clippy-driver

#-------------------------------------------------------------------------

%package src
Summary:	Sources for the Rust standard library
Group:		Development/Rust
BuildArch:	noarch

%description src
This package includes source files for the Rust standard library.  It may be
useful as a reference for code completion tools in various editors.

%files src
%dir %{rustlibdir}
%{rustlibdir}/src

#-------------------------------------------------------------------------

%prep
# unpack prebuilt stuff only if bootstrap enabled
%if %{with bootstrap}
%ifarch %{bootstrap_arches}

%ifarch x86_64
tar xf %{SOURCE1}
%endif

%ifarch %{ix86}
tar xf %{SOURCE2}
%endif

%ifarch aarch64
tar xf %{SOURCE3}
%endif

%ifarch %{riscv64}
tar xf %{SOURCE4}
%endif

%ifarch loongarch64
tar xf %{SOURCE5}
%endif

cd rust-%{bootstrap_rust}-*
./install.sh --components=cargo,rustc,rust-std-%{rust_triple} \
	--prefix=%{local_rust_root} --disable-ldconfig
test -f '%{local_rust_root}/bin/cargo'
test -f '%{local_rust_root}/bin/rustc'
# endif bootstrap_arches
%endif
# endif bootstrap
%endif

%setup -qn rustc-%{version}-src
%autopatch -p1


# python3
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure

rm -rf src/llvm-project
mkdir -p src/llvm-project/libunwind/

# Remove submodules we don't need.
rm -rf src/gcc
rm -rf src/tools/enzyme
rm -rf src/tools/rustc-perf/collector/*-benchmarks/

# Remove other unused vendored libraries
rm -rf vendor/curl-sys*/curl/
rm -rf vendor/*jemalloc-sys*/jemalloc/
rm -rf vendor/libffi-sys*/libffi/
rm -rf vendor/libmimalloc-sys*/c_src/mimalloc/
rm -rf vendor/libz-sys*/src/zlib{,-ng}/
rm -rf vendor/lzma-sys/xz-*/
rm -rf vendor/openssl-src/openssl/
rm -rf vendor/capstone-sys-*/capstone/

# This only affects the transient rust-installer, but let it use our dynamic xz-libs
sed -i.lzma -e '/LZMA_API_STATIC/d' src/bootstrap/src/core/build_steps/tool.rs

%if 0
%if %{with llvm_static}
# Static linking to distro LLVM needs to add -lffi
# https://github.com/rust-lang/rust/issues/34486
sed -i.ffi -e '$a #[link(name = "ffi")] extern {}' \
  compiler/rustc_llvm/src/lib.rs
%endif
%endif

# The configure macro will modify some autoconf-related files, which upsets
# cargo when it tries to verify checksums in those files.  If we just truncate
# that file list, cargo won't have anything to complain about.
find vendor -name .cargo-checksum.json \
	-exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+'

# Sometimes Rust sources start with #![...] attributes, and "smart" editors think
# it's a shebang and make them executable. Then brp-mangle-shebangs gets upset...
find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'

%build
# Use hardening ldflags.
%if %{with bootstrap}
export PATH="%{local_rust_root}/bin:$PATH"
%ifarch x86_64
%global rustflags -Clink-arg=-fuse-ld=lld -Clink-arg=-Wl,-z,relro,-z,now
%else
%global rustflags -Clink-arg=-fuse-ld=lld -Clink-arg=-Wl,-z,relro,-z,now
%endif
%else
%global rustflags -Clink-arg=-fuse-ld=lld -Clink-arg=-Wl,-z,relro,-z,now
%endif

# convince libgit2-sys to use the distro libgit2
export LIBGIT2_SYS_USE_PKG_CONFIG=1

# convince libssh2-sys to use the distro libssh2
export LIBSSH2_SYS_USE_PKG_CONFIG=1

export RUSTFLAGS="%{rustflags}"

export CC=%{_cc}
export CXX=%{_cxx}

%configure \
	--disable-option-checking \
	--libdir=%{_libdir} \
	--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
	--python=python3 \
	--local-rust-root=%{local_rust_root} \
        --llvm-config=%{_llvm_config} \
	--set target.%{rust_triple}.linker=%{_cc} \
	--disable-codegen-tests \
	--disable-rpath \
	--enable-extended \
	--tools=analysis,cargo,clippy,rls,rust-analyzer,rustdoc,rustfmt,src \
	--enable-vendor \
	--release-channel=stable \
	--set rust.codegen-units-std=1 \
	--disable-debuginfo \
	--disable-debuginfo-only-std \
	--disable-debuginfo-tools \
	--disable-debuginfo-lines \
%if 0
%if %{with llvm_static}
	--enable-llvm-link-shared \
%endif
%endif
	--set build.verbose=0 \
	--set build.build-stage=2 \
	--set build.test-stage=2 \
	--set build.doc-stage=2 \
	--set build.gdb="%{_bindir}/gdb" \
	--disable-use-libcxx \
	--set rust.jemalloc=false \
	--set rust.lld=false \
	--disable-llvm-static-stdcpp \
	--set rust.llvm-tools=false \
	--disable-llvm-bitcode-linker \
	--disable-lld \
	--disable-dist-src \
	--set target.%{rust_triple}.optimized-compiler-builtins="%{optimized_builtins}" \
	--set target.%{rust_triple}.profiler="%{profiler}" \
	--set build.optimized-compiler-builtins=false \
	--release-description="%{distro_branch} %{version}-%{release}"

python3 ./x.py build sysroot
python3 ./x.py build

%install
# convince libgit2-sys to use the distro libgit2
export LIBGIT2_SYS_USE_PKG_CONFIG=1

# convince libssh2-sys to use the distro libssh2
export LIBSSH2_SYS_USE_PKG_CONFIG=1

export RUSTFLAGS="%{rustflags}"

DESTDIR=%{buildroot} python3 ./x.py install

# The shared libraries should be executable for debuginfo extraction.
find %{buildroot}%{_libdir} -maxdepth 1 -type f -name '*.so' \
	-exec chmod -v +x '{}' '+'

# The libdir libraries are identical to those under rustlib/. It's easier on
# library loading if we keep them in libdir, but we do need them in rustlib/
# to support dynamic linking for compiler plugins, so we'll symlink.
(cd "%{buildroot}%{rustlibdir}/%{rust_triple}/lib" &&
	find ../../../../%{_lib} -maxdepth 1 -name '*.so' |
	while read lib; do
		if [ -f "${lib##*/}" ]; then
			# make sure they're actually identical!
			cmp "$lib" "${lib##*/}"
			ln -v -f -s -t . "$lib"
		fi
	done)

# Remove installer artifacts (manifests, uninstall scripts, etc.)
find %{buildroot}%{rustlibdir} -maxdepth 1 -type f -exec rm -v '{}' '+'

# Remove backup files from %%configure munging
find %{buildroot}%{rustlibdir} -type f -name '*.orig' -exec rm -v '{}' '+'

# https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error
# We don't actually need to ship any of those python scripts in rust-src anyway.
find %{buildroot}%{rustlibdir}/src -type f -name '*.py' -exec rm -v '{}' '+'

# Remove unwanted documentation files (we already package them)
rm -f %{buildroot}%{_docdir}/%{name}/README.md
rm -f %{buildroot}%{_docdir}/%{name}/COPYRIGHT
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE-APACHE
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE-MIT
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE-THIRD-PARTY
rm -f %{buildroot}%{_docdir}/%{name}/*.old

# Delete the HTML documentation
rm -rf %{buildroot}%{_docdir}/%{name}/html

# Create the path for crate-devel packages
mkdir -p %{buildroot}%{_datadir}/cargo/registry

%if %{without lldb}
rm -f %{buildroot}%{_bindir}/rust-lldb
rm -f %{buildroot}%{rustlibdir}/etc/lldb_*
%endif

# We don't want Rust copies of LLVM tools (rust-lld, rust-llvm-dwp)
rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll*
rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-objcopy

# copy rls
#cp -fr build/%{rust_triple}/stage2-tools-bin/rls %{buildroot}%{_bindir}

rm -f %{buildroot}%{_bindir}/*.old

rm -frv %{buildroot}%{_defaultdocdir}/cargo
rm -frv %{buildroot}%{_defaultdocdir}/clippy
rm -frv %{buildroot}%{_defaultdocdir}/rust-analyzer
rm -frv %{buildroot}%{_defaultdocdir}/rustc
rm -frv %{buildroot}%{_defaultdocdir}/rustfmt

mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
cat >%{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}_%{_arch}.conf <<EOF
%{rustlibdir}/%{rust_triple}/lib
EOF

%check
export PATH="%{buildroot}%{_bindir}:$PATH"
export LD_LIBRARY_PATH="%{buildroot}%{_libdir}:LD_LIBRARY_PATH"

readelf -d %{buildroot}%{_libdir}/librustc_driver* | grep LLVM || :

%{buildroot}%{_bindir}/rustc -V
%{buildroot}%{_bindir}/cargo -V

mkdir -p projects/hello_world
 pushd projects/hello_world

cat > main.rs <<EOF
fn main() {
    println!("Hello, world!");
}
EOF

rustc main.rs
	./main
popd


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 346 |14mr|rust-packaging-28.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_without check
# https://pagure.io/koji/issue/659
%global debug_package %{nil}

%global rust2rpm_version 28.0.0

Summary:        RPM macros for building Rust packages on various architectures
Name:           rust-packaging
Version:        28.5
Release:        1
Group:          Development/Rust
License:        MIT
URL:            https://codeberg.org/rust2rpm/cargo-rpm-macros
Source0:        https://codeberg.org/rust2rpm/cargo-rpm-macros/archive/v%{version}.tar.gz#/cargo-rpm-macros-%{version}.tar.gz
Source1:        https://codeberg.org/rust2rpm/rust2rpm/archive/v%{rust2rpm_version}.tar.gz#/rust2rpm-%{rust2rpm_version}.tar.gz
# https://codeberg.org/rust2rpm/cargo-rpm-macros/pulls/17
Patch1:         0001-Allow-to-set-path-to-Rust-toolchain.patch
Patch2:         0001-Temporarily-accept-cargo_prep-V-flag-for-spec-compat.patch
# gawk is needed for stripping dev-deps in macro
Requires:       gawk
Requires:       python3-rust2rpm = %{EVRD}
Requires:       python3-cargo2rpm
Requires:       rust-srpm-macros
Requires:       rust
Requires:       cargo >= 1.41
Provides:       cargo-rpm-macros = %{EVRD}

%description
The package provides macros for building projects in Rust
on various architectures.

%files
%license LICENSE
%{_rpmmacrodir}/macros.aaa-cargo-srpm
%{_rpmmacrodir}/macros.cargo
%{_rpmmacrodir}/macros.cargo-buildsys
%{_rpmmacrodir}/macros.rust
%{_fileattrsdir}/cargo.attr
%{_fileattrsdir}/cargo_vendor.attr

# --------------------------------------------------------------

%package     -n rust-srpm-macros
Summary:        RPM macros for building Rust source packages
Group:          Development/Rust
Requires:       %{name}
Requires:       lua

%description -n rust-srpm-macros
%{summary}.

%files       -n rust-srpm-macros
%license LICENSE
%{_rpmmacrodir}/macros.rust-srpm

# --------------------------------------------------------------

%package     -n python3-rust2rpm
Summary:        Convert Rust packages to RPM
Group:          Development/Rust
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pip
BuildRequires:  python3-wheel
Requires:       cargo
Provides:       rust2rpm = %{version}-%{release}

%description -n python3-rust2rpm
%{summary}.

%files -n python3-rust2rpm
%license LICENSE
%{_bindir}/rust2rpm
%{python3_sitelib}/fileattrs-*.dist-info
%{python3_sitelib}/rust2rpm-*.dist-info
%{python3_sitelib}/rust2rpm/

# --------------------------------------------------------------

%prep
%autosetup -p1 -n cargo-rpm-macros -a1
mv ./rust2rpm* ../rust2rpm

# https://pagure.io/koji/issue/659
sed -i -e 's/i686/%%{ix86}/' macros.d/macros.rust-srpm

%build
%pyproject_wheel
pushd ../rust2rpm
%pyproject_wheel
popd


%install
%pyproject_install

install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.aaa-cargo-srpm
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.cargo
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.cargo-buildsys
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.rust
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.rust-srpm
install -D -p -m 0644 -t %{buildroot}/%{_fileattrsdir} fileattrs/cargo.attr
install -D -p -m 0644 -t %{buildroot}/%{_fileattrsdir} fileattrs/cargo_vendor.attr

pushd ../rust2rpm
%pyproject_install
popd

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 347 |14mr|scons-4.11.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Open Source software construction tool
Name:		scons
Version:	4.11.1
Release:	1
Epoch:		1
License:	MIT
Group:		Development/Other
Url:		http://www.scons.org/
Source0:	https://sourceforge.net/projects/scons/files/scons/%{version}/SCons-%{version}.tar.gz
Source1:	scons.macros
BuildRequires:	pkgconfig(python3)
Requires:	python3-%{name} = %{EVRD}
BuildArch:	noarch

%description
SCons is an Open Source software construction tool--that is, a build
tool; an improved substitute for the classic Make utility; a better way
to build software. SCons is based on the design which won the Software
Carpentry build tool design competition in August 2000.

SCons "configuration files" are Python scripts, eliminating the need
to learn a new build tool syntax. SCons maintains a global view of
all dependencies in a tree, and can scan source (or other) files for
implicit dependencies, such as files specified on #include lines. SCons
uses MD5 signatures to rebuild only when the contents of a file have
really changed, not just when the timestamp has been touched. SCons
supports side-by-side variant builds, and is easily extended with user-
defined Builder and/or Scanner objects.

%files
%doc LICENSE README.* PKG-INFO
%{_bindir}/scons
%{_bindir}/scons-configure-cache
%{_bindir}/sconsign
%{_rpmmacrodir}/*%{name}*

#----------------------------------------------------------------------------

%package -n python3-%{name}
Summary:	SCons library
Group:		Development/Python

%description -n python3-%{name}
The SCons library is required by scons.

%files -n python3-%{name}
%{python3_sitelib}/*

#----------------------------------------------------------------------------

%prep
%autosetup -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

# install scons rpm macro helper
%install_macro %{name} %{SOURCE1}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 348 |14mr|spirv-headers-1.4.357.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	oname SPIRV-Headers

Summary:	Headers for working with SPIR-V, a language for running on GPUs
Name:		spirv-headers
Version:	1.4.357.0
Release:	1
Epoch:		1
License:	BSD
Group:		Development/C
Url:		https://github.com/KhronosGroup/SPIRV-Headers
Source0:	https://github.com/KhronosGroup/SPIRV-Headers/archive/vulkan-sdk-%{version}.tar.gz?/%{oname}-vulkan-sdk-%{version}.tar.gz
BuildRequires:	cmake
BuildArch:	noarch

%description
This package contains machine-readable files for the SPIR-V Registry.
It includes:
* Header files for various languages.
* JSON files describing the grammar for the SPIR-V core instruction
  set and the extended instruction sets.
* The XML registry file.
Headers are placed in the include directory, with up-to-date headers in the
unified1 sub-directory. Older headers are placed in subdirectories according
to their version.

%files
%doc README.md
%license LICENSE
%{_datadir}/cmake/%{oname}
%{_datadir}/pkgconfig/%{oname}.pc
%{_includedir}/spirv

#-----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{oname}-vulkan-sdk-%{version}

%build
%cmake
%make_build

%install
%make_install -C build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 349 |14mr|swig-4.5.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_with guile
%ifarch %{e2k} %{riscv} loongarch64
%bcond_with mono
%bcond_with ocaml
%else
%bcond_with mono
%bcond_with ocaml
%endif
%bcond_with php
%bcond_with ruby
%bcond_with lua

Summary:	Simplified Wrapper and Interface Generator (SWIG)
Name:		swig
Version:	4.5.1
Release:	1
Epoch:		1
License:	BSD
Group:		Development/Other
Url:		http://www.swig.org/
Source0:	http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
BuildRequires:	bison
BuildRequires:	imake
BuildRequires:	libtool
%if %{with mono}
BuildRequires:	mono
BuildRequires:	pkgconfig(mono)
%endif
%if %{with ocaml}
BuildRequires:	ocaml
%endif
BuildRequires:	boost-devel
BuildRequires:	libstdc++-devel
%if %{with guile}
BuildRequires:	lua-devel
%endif
BuildRequires:	perl-devel
%if %{with php}
BuildRequires:	php-devel
%endif
%if %{with ruby}
BuildRequires:	ruby-devel
%endif
BuildRequires:	tcl-devel
%if %{with guile}
BuildRequires:	pkgconfig(guile-2.0)
%endif
BuildRequires:	pkgconfig(libpcre2-posix)
BuildRequires:	pkgconfig(lua)
Obsoletes:	swig-devel < 2.0.7
Conflicts:	swig2

%description
SWIG takes an interface description file written in a combination of C/C++
and special directives and produces interfaces to Perl, Python, and Tcl.
It allows scripting languages to use C/C++ code with minimal effort.

%files
%doc ANNOUNCE INSTALL CHANGES CHANGES.current LICENSE README TODO
%{_bindir}/swig
%{_bindir}/ccache-swig
%{_datadir}/swig

#----------------------------------------------------------------------------

%package doc
Summary:	Documentation and examples for %{name}
Group:		Development/C
Requires:	%{name} = %{EVRD}

%description doc
SWIG takes an interface description file written in a combination of C/C++
and special directives and produces interfaces to Perl, Python, and Tcl.
It allows scripting languages to use C/C++ code with minimal effort.

Install the %{name}-doc package if you want to look at example and
documentation.

%files doc
%doc Examples Doc/Manual

#----------------------------------------------------------------------------

%prep
%autosetup -p1

%build
./autogen.sh
%configure
%make_build

%install
%make_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 350 |14mr|systemd-settings-1-7
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Settings for systemd
Name:		systemd-settings
Version:	1
Release:	7
Group:		System/Configuration/Boot and Init
License:	GPLv2+
BuildArch:	noarch
Source10:	disable-kill-user-processes.conf
Source11:	disable-resolve-llmnr.conf
Source12:	enable-kill-user-processes.conf
Source13:	enable-log-to-tty12.conf
Source14:	enable-showstatus.conf
Source15:	ignore-handle-lid-switch.conf
Source16:	enable-resolve-llmnr.conf
Source17:	set-poweroff-time-sec15.conf
Source18:	00-process-timeouts.conf
Source19:	enable-resolve-single-label.conf
Source20:	disable-resolve-hostname-synthesis.conf
Source21:	disable-resolve-etc-hosts.conf
Source22:	disable-freeze-user-sessions-on-sleep.conf

%description
This package contains drop-in settings for systemd.

#---------------------------------------------------------------------

%package disable-kill-user-processes
Summary:	Set global KillUserProcesses=no in systemd
Requires:	systemd
Conflicts:	%{name}-enable-kill-user-processes
# Tested with 1C_Enterprise83-server-8.3.13-1644.x86_64.rpm
# https://yandex.ru/search/?text=1c+KillUserProcesses
Supplements:	%{_sysconfdir}/init.d/srv1cv83

%description disable-kill-user-processes
%{summary}

%files disable-kill-user-processes
%{_systemd_util_dir}/logind.conf.d/disable-kill-user-processes.conf

#---------------------------------------------------------------------

%package enable-kill-user-processes
Summary:	Set global KillUserProcesses=yes
Requires:	systemd
Conflicts:	%{name}-disable-kill-user-processes

%description enable-kill-user-processes
%{summary}

%files enable-kill-user-processes
%{_systemd_util_dir}/logind.conf.d/enable-kill-user-processes.conf

#---------------------------------------------------------------------

%package enable-showstatus
Summary:	Set global ShowStatus=yes in systemd
Requires:	systemd

%description enable-showstatus
%{summary}

%files enable-showstatus
%{_systemd_util_dir}/system.conf.d/enable-showstatus.conf

#---------------------------------------------------------------------

%package enable-log-to-tty12
Summary: Set global TTYPath=/dev/tty12 to forward logs to TTY12 in systemd
Requires:	systemd

%description enable-log-to-tty12
%{summary}

%files enable-log-to-tty12
%{_systemd_util_dir}/journald.conf.d/enable-log-to-tty12.conf

#---------------------------------------------------------------------

%package disable-resolve-llmnr
Summary:	Set global LLMNR=no in systemd-resolved
Requires:	systemd

%description disable-resolve-llmnr
%{summary}

%files disable-resolve-llmnr
%{_systemd_util_dir}/resolved.conf.d/disable-resolve-llmnr.conf

%post disable-resolve-llmnr
systemctl try-restart systemd-resolved.service >/dev/null 2>&1 || :

%postun disable-resolve-llmnr
if [ "$1" -eq 0 ]; then
    systemctl try-restart systemd-resolved.service >/dev/null 2>&1 || :
fi

#---------------------------------------------------------------------

%package enable-resolve-single-label
Summary:	Set global ResolveUnicastSingleLabel=yes in systemd-resolved
Requires:	systemd

%description enable-resolve-single-label
%{summary}.
Allows resolution of single-label names via unicast DNS instead of
dropping such queries. For example, "host", "printer", "nas" instead of
"host.loc" or "printer.corp.example.com".
Risks:
  1. Leakage of local names to external DNS servers (privacy).
  2. DNS spoofing: an external server may return a forged address.
  3. Conflict with LLMNR/mDNS, which are intended for such names.
Preferred alternative: set a search domain in network settings.

%files enable-resolve-single-label
%{_systemd_util_dir}/resolved.conf.d/enable-resolve-single-label.conf

%post enable-resolve-single-label
systemctl try-restart systemd-resolved.service >/dev/null 2>&1 || :

%postun enable-resolve-single-label
if [ "$1" -eq 0 ]; then
    systemctl try-restart systemd-resolved.service >/dev/null 2>&1 || :
fi

#---------------------------------------------------------------------

%package enable-resolve-llmnr
Summary:	Set global LLMNR=yes in systemd-resolved
Requires:	systemd

%description enable-resolve-llmnr
%{summary}

%files enable-resolve-llmnr
%{_systemd_util_dir}/resolved.conf.d/enable-resolve-llmnr.conf

%post enable-resolve-llmnr
systemctl try-restart systemd-resolved.service >/dev/null 2>&1 || :

%postun enable-resolve-llmnr
if [ "$1" -eq 0 ]; then
    systemctl try-restart systemd-resolved.service >/dev/null 2>&1 || :
fi

#---------------------------------------------------------------------

%package disable-resolve-hostname-synthesis
Summary:	Disable synthesized hostname responses in systemd-resolved
Requires:	systemd

%description disable-resolve-hostname-synthesis
Set SYSTEMD_RESOLVED_SYNTHESIZE_HOSTNAME=0.
systemd-resolved will not synthesize A/AAAA/PTR RRs for the system
hostname, neither for regular nor for reverse lookups.
%files disable-resolve-hostname-synthesis
%{_unitdir}/systemd-resolved.service.d/disable-resolve-hostname-synthesis.conf

%post disable-resolve-hostname-synthesis
systemctl daemon-reload >/dev/null 2>&1 || :
systemctl try-restart systemd-resolved.service >/dev/null 2>&1 || :

%postun disable-resolve-hostname-synthesis
if [ "$1" -eq 0 ]; then
    systemctl daemon-reload >/dev/null 2>&1 || :
    systemctl try-restart systemd-resolved.service >/dev/null 2>&1 || :
fi

#---------------------------------------------------------------------

%package disable-resolve-etc-hosts
Summary:	Set global ReadEtcHosts=no in systemd-resolved
Requires:	systemd

%description disable-resolve-etc-hosts
Set global ReadEtcHosts=no in systemd-resolved.
systemd-resolved will not read /etc/hosts to try to resolve hosts
or addresses by using its entries.

%files disable-resolve-etc-hosts
%{_systemd_util_dir}/resolved.conf.d/disable-resolve-etc-hosts.conf

%post disable-resolve-etc-hosts
systemctl try-restart systemd-resolved.service >/dev/null 2>&1 || :

%postun disable-resolve-etc-hosts
if [ "$1" -eq 0 ]; then
    systemctl try-restart systemd-resolved.service >/dev/null 2>&1 || :
fi

#---------------------------------------------------------------------

%package ignore-handle-lid-switch
Summary:	Set HandleLidSwitch=ignore in systemd
Requires:	systemd

%description ignore-handle-lid-switch
%{summary}

%files ignore-handle-lid-switch
%{_systemd_util_dir}/logind.conf.d/ignore-handle-lid-switch.conf

#---------------------------------------------------------------------

%package set-poweroff-time-sec15
Summary:	Set JobTimeoutSec in poweroff.target systemd
Requires:	systemd

%description set-poweroff-time-sec15
%{summary} to 15 sec

%files set-poweroff-time-sec15
%{_unitdir}/poweroff.target.d/set-poweroff-time-sec15.conf

#---------------------------------------------------------------------

%package process-timeouts-sec5
Summary:	Default timeout stop sec
Requires:	systemd

%description process-timeouts-sec5
%{summary} to 5 sec

%files process-timeouts-sec5
%config(noreplace) %{_sysconfdir}/systemd/user.conf.d/00-process-timeouts.conf

#---------------------------------------------------------------------
%if %{mdvver} >= 202510

%package disable-freeze-user-sessions-on-sleep
Summary:	Disable freezing user.slice when going to sleep or hibernation
Requires:	systemd >= 256

%description disable-freeze-user-sessions-on-sleep
Disable freezing user.slice when going to sleep or hibernation.
Sets the following environmental variable for systemd services that read them:
 * SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false
 * SYSTEMD_HOME_LOCK_FREEZE_SESSION=false
Useful for proprietary NVIDIA drivers.
See also: https://github.com/systemd/systemd/commit/0b958bb3e

%files disable-freeze-user-sessions-on-sleep
%{_unitdir}/systemd-suspend.service.d/disable-freeze-user-sessions-on-sleep.conf
%{_unitdir}/systemd-suspend-then-hibernate.service.d/disable-freeze-user-sessions-on-sleep.conf
%{_unitdir}/systemd-hibernate.service.d/disable-freeze-user-sessions-on-sleep.conf
%{_unitdir}/systemd-hybrid-sleep.service.d/disable-freeze-user-sessions-on-sleep.conf
%{_unitdir}/systemd-homed.service.d/disable-freeze-user-sessions-on-sleep.conf

%endif
#---------------------------------------------------------------------

%prep
%setup -qTc
cp %{sources} .

%install

install -p -Dm644 disable-kill-user-processes.conf \
    %{buildroot}%{_systemd_util_dir}/logind.conf.d/disable-kill-user-processes.conf
install -p -Dm644 enable-kill-user-processes.conf \
    %{buildroot}%{_systemd_util_dir}/logind.conf.d/enable-kill-user-processes.conf
install -p -Dm644 enable-showstatus.conf \
    %{buildroot}%{_systemd_util_dir}/system.conf.d/enable-showstatus.conf
install -p -Dm644 enable-log-to-tty12.conf \
    %{buildroot}%{_systemd_util_dir}/journald.conf.d/enable-log-to-tty12.conf
install -p -Dm644 disable-resolve-llmnr.conf \
    %{buildroot}%{_systemd_util_dir}/resolved.conf.d/disable-resolve-llmnr.conf
install -p -Dm644 enable-resolve-llmnr.conf \
    %{buildroot}%{_systemd_util_dir}/resolved.conf.d/enable-resolve-llmnr.conf
install -p -Dm644 disable-resolve-hostname-synthesis.conf \
    %{buildroot}%{_unitdir}/systemd-resolved.service.d/disable-resolve-hostname-synthesis.conf
install -p -Dm644 disable-resolve-etc-hosts.conf \
    %{buildroot}%{_systemd_util_dir}/resolved.conf.d/disable-resolve-etc-hosts.conf
install -p -Dm644 enable-resolve-single-label.conf \
    %{buildroot}%{_systemd_util_dir}/resolved.conf.d/enable-resolve-single-label.conf
install -p -Dm644 ignore-handle-lid-switch.conf \
    %{buildroot}%{_systemd_util_dir}/logind.conf.d/ignore-handle-lid-switch.conf
install -p -Dm644 set-poweroff-time-sec15.conf \
    %{buildroot}%{_unitdir}/poweroff.target.d/set-poweroff-time-sec15.conf
install -p -Dm644 00-process-timeouts.conf \
    %{buildroot}%{_sysconfdir}/systemd/user.conf.d/00-process-timeouts.conf

%if %{mdvver} >= 202510
# idea from https://github.com/CachyOS/CachyOS-PKGBUILDS/tree/master/nvidia
# attempt to mitigate system freeze with systemd v256
# grep -rl 'systemd-sleep' /usr/lib/systemd/system/ /usr/lib/systemd/user/
for unit in \
	systemd-suspend.service \
	systemd-suspend-then-hibernate.service \
	systemd-hibernate.service \
	systemd-hybrid-sleep.service \
	systemd-homed.service
do
	mkdir -p %{buildroot}%{_unitdir}/${unit}.d/
	install -m644 disable-freeze-user-sessions-on-sleep.conf %{buildroot}%{_unitdir}/${unit}.d/
done
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 351 |14mr|systemtap-5.6-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define _duplicate_files_terminate_build 0

%bcond_with	java
# systemtap uses nested functions in loc2c.c
%global __cc gcc
%global __cxx g++
%define _disable_ld_no_undefined %nil

%bcond_with	avahi
%bcond_with	docs
%bcond_without	exporter
%bcond_without	python3

Summary:	Infrastructure to gather information about the running Linux system
Name:		systemtap
Epoch:		1
Version:	5.6
Release:	1
License:	GPLv2+
Group:		Development/Kernel
Url:		http://sourceware.org/systemtap/
Source0:	http://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz
Source10:	systemtap.rpmlintrc

BuildRequires:	cap-devel
BuildRequires:	elfutils-devel
BuildRequires:	gettext
BuildRequires:	gettext-devel
BuildRequires:	boost-devel
%if %{with avahi}
BuildRequires:	pkgconfig(avahi-client)
BuildRequires:	avahi-common-devel
%endif
%if %{with docs}
BuildRequires:	xmlto
BuildRequires:	texlive-dvips texlive-charter texlive-mathdesign
%endif
BuildRequires:	pkgconfig(nss)
BuildRequires:	pkgconfig(nspr)
BuildRequires:	pkgconfig(sqlite3)
%if %{with python3}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%endif
BuildRequires:	pkgconfig(rpm)
BuildRequires:	pkgconfig(popt)
%if %{with java}
BuildRequires:	jpackage-utils java-1.8.0-openjdk-devel
%endif

%description
SystemTap provides free software (GPL) infrastructure to simplify the gathering
of information about the running Linux system. This assists diagnosis of a
performance or functional problem. SystemTap eliminates the need for the
developer to go through the tedious and disruptive instrument, recompile,
install, and reboot sequence that may be otherwise required to collect data.

SystemTap provides a simple command line interface and scripting language for
writing instrumentation for a live running kernel. We are publishing samples,
as well as enlarging the internal "tapset" script library to aid reuse and
abstraction. We also plan to support probing userspace applications. We are
investigating interfacing Systemtap with similar tools such as Frysk,
Oprofile and LTT.

Current project members include Red Hat, IBM, Intel, and Hitachi.

%files
%{_bindir}/stap
%{_mandir}/man[17]/*
%lang(cs) %{_mandir}/cs/man[17]/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/tapset

#----------------------------------------------------------------------------

%package runtime
Summary:	Runtime environment for systemtap
Group:		Development/Other
Conflicts:	systemtap < 1:2.1-3

%description runtime
SystemTap is an instrumentation system for systems running Linux.
This package contains the runtime environment for systemtap programs.

%files runtime -f systemtap.lang
%{_bindir}/stapbpf
%{_bindir}/staprun
%{_bindir}/stapsh
%{_bindir}/stap-merge
%{_bindir}/stap-report
%{_bindir}/stap-jupyter-container
%{_bindir}/stap-jupyter-install
%{_bindir}/stap-profile-annotate
%{_mandir}/man3/*
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/stapio
%{_libexecdir}/%{name}/stap-env
%{_libexecdir}/%{name}/stap-authorize-cert
%{_libexecdir}/%{name}/stap-service-prepare
%{_mandir}/man8/stapbpf.8.*
%{_mandir}/man8/staprun.8*
%{_mandir}/man8/stapsh.8.*
# systemtap-service.8 was dropped upstream in 5.6
%{_bindir}/stap-onboot
%{_mandir}/man8/stap-onboot.8.*

#----------------------------------------------------------------------------

%if %{with python3}
%package runtime-python3
Summary:	Systemtap Python 3 Runtime Support
Group:		Development/Python
License:	GPLv2+
Url:		https://sourceware.org/systemtap/
Requires:	systemtap = %{EVRD}
# compat with FC:
Provides:	systemtap-runtime-python3 = %{EVRD}

%description runtime-python3
This package includes support files needed to run systemtap scripts
that probe python 3 processes.

%files runtime-python3
%{python3_sitearch}/HelperSDT
# modern pyproject installs produce dist-info instead of egg-info
%{python3_sitearch}/helpersdt-*.dist-info
%endif

#----------------------------------------------------------------------------

%package examples
Summary:	Examples for systemtap
Group:		Development/Other

%description examples
SystemTap is an instrumentation system for systems running Linux.
This package contains examples for systemtap programs.

%files examples
%{_datadir}/%{name}/examples

#----------------------------------------------------------------------------

%if %{with java}
%package runtime-java
Summary:	Systemtap Java Runtime Support
Group:		Development/Java
Requires:	systemtap-runtime = %{EVRD}
# Not packaged yet..
#Requires:	byteman > 2.0

%description runtime-java
This package includes support files needed to run systemtap scripts
that probe Java processes running on the OpenJDK 1.6 and OpenJDK 1.7
runtimes using Byteman.

%files runtime-java
%dir %{_libexecdir}/systemtap
%{_libexecdir}/systemtap/libHelperSDT*.so
%{_libexecdir}/systemtap/HelperSDT.jar
%{_libexecdir}/systemtap/stapbm
%endif

#----------------------------------------------------------------------------

%package server
Summary:	Systemtap server
Group:		Development/Other
Requires:	%{name} = %{EVRD}
Conflicts:	systemtap < 1:2.1-3

%description server
SystemTap is an instrumentation system for systems running Linux.
This package contains the server component of systemtap.

%files server
%{_bindir}/stap-server
%{_libexecdir}/%{name}/stap-gen-cert
%{_libexecdir}/%{name}/stap-serverd
%{_libexecdir}/%{name}/stap-sign-module
%{_libexecdir}/%{name}/stap-start-server
%{_libexecdir}/%{name}/stap-stop-server
%{_mandir}/man8/stap-server.8*
%lang(cs) %{_mandir}/cs/man8/stap-server.8*

#----------------------------------------------------------------------------

%if %{with exporter}
%package exporter
Summary:	Systemtap-prometheus interoperation mechanism
Group:		Development/Kernel
License:	GPLv2+
Url:		http://sourceware.org/systemtap/

%description exporter
This package includes files for a systemd service that manages
systemtap sessions and relays prometheus metrics from the sessions
to remote requesters on demand.

%files exporter
%{_sysconfdir}/stap-exporter
%{_sysconfdir}/sysconfig/stap-exporter
%{_unitdir}/stap-exporter.service
%{_mandir}/man8/stap-exporter.8*
%{_sbindir}/stap-exporter
%endif

#----------------------------------------------------------------------------

%package devel
Summary:	Header files for %{name}
Group:		Development/Other
Requires:	%{name} = %{EVRD}
Requires:	%{name}-sdt-devel = %{EVRD}
Conflicts:	systemtap < 1:2.1-3

%description devel
The package includes the header files for %{name}.

%files devel -f systemtap.lang
%doc README README.unprivileged AUTHORS NEWS
%license COPYING
%{_bindir}/stap
%{_bindir}/stap-prep
%{_bindir}/stap-report
%dir %{_datadir}/systemtap
%{_datadir}/systemtap/runtime
%{_datadir}/systemtap/tapset
%{_mandir}/man1/stap.1*
%{_mandir}/man1/stap-prep.1*
%{_mandir}/man1/stap-report.1*
%{_mandir}/man7/error*
%{_mandir}/man7/stappaths.7*
%{_mandir}/man7/warning*
# Notice that the stap-resolve-module-function.py file is used by
# *both* the python2 and python3 subrpms.  Both subrpms use that same
# python script to help list python probes.
%if %{with python3}
%{_libexecdir}/systemtap/python/stap-resolve-module-function.py
%endif

#----------------------------------------------------------------------------

%package sdt-devel
Summary:	Static probe support tools
License:	GPLv2+ and Public Domain
Url:		http://sourceware.org/systemtap/
Requires:	python3-parsing

%description sdt-devel
This package includes the <sys/sdt.h> header file used for static
instrumentation compiled into userspace programs and libraries, along
with the optional dtrace-compatibility preprocessor to process related
.d files into tracing-macro-laden .h headers.

%files sdt-devel
%{_bindir}/dtrace
%{_includedir}/sys/sdt.h
%{_includedir}/sys/sdt-config.h
%{_mandir}/man1/dtrace.1*
%{_rpmmacrodir}/macros.systemtap
%doc README AUTHORS NEWS
%license COPYING

#----------------------------------------------------------------------------
%package jupyter
Summary:	ISystemtap jupyter kernel and examples
License:	GPL-2.0-or-later
URL:		http://sourceware.org/systemtap/
Requires:	%{name} = %{EVRD}

%description jupyter
This package includes files needed to build and run
the interactive systemtap Jupyter kernel, either locally
or within a container.

%files jupyter
%{_bindir}/stap-jupyter-container
%{_bindir}/stap-jupyter-install
#{_mandir}/man1/stap-jupyter.1*
%dir %{_datadir}/systemtap
%{_datadir}/systemtap/interactive-notebook
#----------------------------------------------------------------------------

%prep
%autosetup -p1

sed -i 's!python-config!python3-config!g' configure.ac


%build
export ac_cv_path_PYTHON=%{__python3}
export PYTHON=%{__python3}
%global optflags %{optflags} -Wno-error
# systemtap 5.6 uses generic lambdas (C++14+) while its configure.ac
# requests only C++11; CXXFLAGS go after the -std=gnu++11 added by
# configure into $CXX, so a later -std wins
export CXXFLAGS="%{optflags} -std=gnu++17"

autoreconf -fi

%configure \
	--with-rpm \
%if %{with python}
	--with-python3 \
	--with-python3-probes \
	--without-python2-probes \
%endif
	--with-selinux \
%if %{with java}
	--with-java=/usr/lib/jvm/java \
%endif
	--enable-sqlite \
	--disable-docs

%make_build

%install
%make_install
%if %{without java}
# 5.6 installs byteman/HelperSDT helpers even without --with-java; they are
# only useful for the runtime-java subpackage, so drop them here
rm -f %{buildroot}%{_libexecdir}/%{name}/libHelperSDT*.so \
      %{buildroot}%{_libexecdir}/%{name}/HelperSDT.jar \
      %{buildroot}%{_libexecdir}/%{name}/stapbm
%endif
sed -i 's!/usr/bin/python$!%{__python3}!g' %{buildroot}/%{_bindir}/dtrace

# we add testsuite with a lot of examples
install -m 755 -d testsuite %{buildroot}%{_datadir}/%{name}/
install -D -m 644 macros.systemtap %{buildroot}/%{_rpmmacrodir}/macros.systemtap

%find_lang %{name} --all-name --with-man

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 352 |14mr|task-iso-14-1.71
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Tasks for all iso
Name:		task-iso
Version:	%{rosa_release}
Release:	1.71
Epoch:		1
License:	MIT
Group:		System/Configuration/Boot and Init
Url:		https://abf.io/import/task-iso

%description
Tasks for all iso.

task-iso-common
	packages common to all iso without DE, tty only

task-iso-common-desktop - packages common to all iso with DE.
When exclude_from_weak_autodetect=true (default)
	If Recommends new package to this, it will soft-installed on all systems.
	This is useful for new packages when it is unclear where to attach them.
When exclude_from_weak_autodetect=false in /etc/dnf/dnf.conf
	If package deleted manually, it will return when updating this project.
	This is useful for "quiet" system repairs.

task-iso-common-var - packages common that can be deleted more freely.
When exclude_from_weak_autodetect=true (default)
	If Recommends new package to this, it will soft-installed on new systems only.
	This is useful for new packages when it is unclear where to attach them
	but there is no need to send them to the installed systems.
When exclude_from_weak_autodetect=false in /etc/dnf/dnf.conf
	If package deleted manually, they will not return when updating this project.
	However, they can be returned with the dnf distrosync command.
	This is useful for fixing the system manually.

task-iso-XXX - analog of task-iso-common with specific packages for XXX DE iso.

task-iso-XXX-var - analog of task-iso-common-var with specific packages for XXX DE iso.

#----------------------------------------------------------------------------

%package common
Summary:	Task for console utilites interface
Group:		System/Configuration/Boot and Init
Recommends:	basesystem
Recommends:	basesystem-mandatory
Recommends:	chrony
Recommends:	cronie
Recommends:	console-gentoo-style
Recommends:	networkmanager-l2tp
Recommends:	networkmanager-openvpn
Recommends:	networkmanager-pptp
Recommends:	networkmanager-vpnc
Recommends:	networkmanager-fortisslvpn
Recommends:	networkmanager-openconnect
Recommends:	rosa-repos
Recommends:	sudo
Recommends:	traceroute
Recommends:	task-archiving
Recommends:	task-filesystems-tools
Recommends:	task-hardware-utils
Recommends:	task-bootloaders
Recommends:	task-kernel

%description common
Task for console utilites interface

%files common

#----------------------------------------------------------------------------

%package common-var
Summary:	Variable task for common iso
Group:		System/Configuration/Boot and Init
Release:	1.var
Recommends:	aria2
Recommends:	at
Recommends:	avahi
Recommends:	curl
Recommends:	ddrescue
Recommends:	htop
Recommends:	ima-evm-utils
Recommends:	imactl
Recommends:	ima-inspect
Recommends:	info
Recommends:	libressl
Recommends:	lynx
Recommends:	man-pages
Recommends:	mc
Recommends:	ncdu
Recommends:	openssh-server
Recommends:	screen
Recommends:	traceroute
Recommends:	tmux
Recommends:	strace
Recommends:	su-aliases
Recommends:	termhelper
Recommends:	tree
Recommends:	wget
Recommends:	wsdd
Recommends:	whois

%description common-var
Variable task for common iso.

%files common-var

#----------------------------------------------------------------------------

%package common-desktop
Summary:	Task for all desktop iso
Group:		System/Configuration/Boot and Init
Requires:	%{name}-common
Requires:	%{name}-common-var
Recommends:	gcr
Recommends:	geoclue-gir
Recommends:	pipewire
# TODO Recomends: (Rosa-theme-fresh-13 or Rosa-theme-chrome-13)
Recommends:	Rosa-theme-fresh-13
Recommends:	task-common-fonts
Recommends:	task-x11
Recommends:	udisks2
Recommends:	rpmgrab

%description common-desktop
Task for all desktop iso.

%files common-desktop

#----------------------------------------------------------------------------

%package common-desktop-var
Summary:	Variable task for common iso
Group:		System/Configuration/Boot and Init
Release:	1.var

Recommends:	(dnfdragora-qt or dnfdragora-gtk)
Recommends:	(gdm or sddm or plasma6-sddm or lightdm)

Recommends:	(rosa-update-system-nopass or rosa-update-system-wheel or barium_utils-applet)
Suggests:	(rosa-update-system-nopass if branding-configs-fresh)
Suggests:	(rosa-update-system-wheel if branding-configs-chrome)

Recommends:	task-printing
Recommends:	task-scanning
Recommends:	task-spell-dictionaries
Recommends:	task-smartcards
Recommends:	userdrake
Recommends:	web-store-desktop

# Guest additions for virtual machines
# Not needed ones are removed automatically by Anaconda post-install script
Recommends:	hyperv-daemons
Recommends:	hyperv-tools
Recommends:	open-vm-tools
Recommends:	spice-vdagent
Recommends:	virtualbox-guest-additions

%description common-desktop-var
Variable task for common desktop iso.

%files common-desktop-var

#----------------------------------------------------------------------------

%package gnome
Summary:	Task for gnome iso
Group:		System/Configuration/Boot and Init
Requires:	%{name}-common-desktop
Requires:	%{name}-common-desktop-var
Requires:	%{name}-gnome-var
Requires:	task-gnome
Recommends:     cheese
Recommends:	dnfdragora-gtk
Recommends:	gnome-session-x11-session
Recommends:	gparted
Recommends:	hw-probe-pyqt6-gui
Recommends:	networkmanager-applet
Recommends:     portproton
Recommends:	qt5-platformtheme-gtk3
Recommends:	qt5-qttranslations
Recommends:	rosa-icons-2021-gnome-dark
Recommends:	rosa-imagewriter
Recommends:	samba-client
Recommends:	samba-server
Recommends:	simple-scan
Recommends:     startwine
Recommends:	templates
Recommends:	unoconv


%description gnome
Task for gnome iso.

%files gnome

#----------------------------------------------------------------------------

%package gnome-var
Summary:	Variable task for gnome iso
Group:		System/Configuration/Boot and Init
Release:	1.var
Recommends:	audacious-gtk
Recommends:	audacity
# removed automatically by Anaconda post-install script when BTRFS is not used
Recommends:	btrfs-snapshot-gui
Recommends:	deluge-gtk
Recommends:	drawing
Recommends:	firefox
Recommends:	(firefox-ru if locales-ru)
Recommends:	gimp3
Recommends:	inkscape
Recommends:	inxi
Recommends:	libreoffice-calc
Recommends:	libreoffice-gnome
Recommends:	(libreoffice-help-ru if locales-ru)
Recommends:	libreoffice-impress
Recommends:	libreoffice-math
Recommends:	libreoffice-style-breeze
Recommends:	libreoffice-style-colibre
Recommends:	libreoffice-style-elementary
Recommends:	libreoffice-style-karasa_jaga
Recommends:	libreoffice-style-sifr
Recommends:	libreoffice-style-sukapura
Recommends:	libreoffice-writer
Recommends:	rosa-wallpapers-2019
Recommends:	rospo-icon-theme
Recommends:	shotcut
Recommends:	smplayer
Recommends:	system-monitoring-center
Recommends:	yandex-browser-install


%description gnome-var
User variable task for gnome iso.

%files gnome-var

#----------------------------------------------------------------------------

%package lxqt
Summary:	Task for LXQt iso
Group:		System/Configuration/Boot and Init
Requires:	%{name}-common-desktop
Requires:	%{name}-common-desktop-var
Requires:	%{name}-lxqt-var
Requires:	task-lxqt
Recommends:	adwaita-gtk2-theme
Recommends:	adwaita-gtk3-theme
Recommends:	(breeze6-dark-gtk2-theme or breeze-gtk2-theme)
Recommends:	(breeze6-dark-gtk3-theme or breeze-gtk3-theme)
Recommends:	dnfdragora-qt
Recommends:	elementary-theme
Recommends:	gtksourceview
Recommends:	hicolor-icon-theme
Recommends:	hw-probe-pyqt6-gui
Recommends:	libqtxdg
Recommends:	networkmanager-applet
Recommends:	qt6-imageformats-plugins
Recommends:	qt6-qttranslations
Recommends:	rosa-icons-13-lxqt-dark
Recommends:	xscreensaver
Recommends:	xscreensaver-gl

%description lxqt
Task for LXQt iso.

%files lxqt

#----------------------------------------------------------------------------

%package lxqt-var
Summary:	Variable task for LXQt iso
Group:		System/Configuration/Boot and Init
Release:	1.var
Recommends:	audacious
Recommends:	audacious-plugins
# removed automatically by Anaconda post-install script when BTRFS is not used
Recommends:	btrfs-snapshot-gui
Recommends:	djvulibre
Recommends:	libreoffice-calc
Recommends:	libreoffice-gnome
Recommends:	libreoffice-gtk3-kde5
Recommends:	libreoffice-writer
Recommends:	newmoon
Recommends:	plasma6-partitionmanager
Recommends:	plasma6-isoimagewriter
Recommends:	trojita
Recommends:	qbittorrent
Recommends:	qpdfview
Recommends:	smplayer

Suggests:	hw-probe-pyqt6-gui

%description lxqt-var
User variable task for LXQt iso.

%files lxqt-var

#----------------------------------------------------------------------------

%package mate
Summary:	Task for Mate iso
Group:		System/Configuration/Boot and Init
Requires:	%{name}-common-desktop
Requires:	%{name}-common-desktop-var
Requires:	%{name}-mate-var
Recommends:	hicolor-icon-theme

Recommends:	rosa-icons-2021-mate
Recommends:	rosa-icons-2021-mate-dark
Recommends:	task-mate
Recommends:	templates
Recommends:	totem-video-thumbnailer

%description mate
Task for Mate iso.

%files mate

#----------------------------------------------------------------------------

%package mate-var
Summary:	Variable task for Mate iso
Group:		System/Configuration/Boot and Init
Release:	1.var
Recommends:	audacious
Recommends:	cheese
Recommends:	hw-probe-pyqt6-gui
Recommends:	kolourpaint
Recommends:	mate-languages-flags
Recommends:	mate-languages-flags-autostart
Recommends:	portproton
Recommends:	qbittorrent
Recommends:	smplayer
Recommends:	libreoffice-calc
Recommends:	libreoffice-gnome
Recommends:	libreoffice-impress
Recommends:	libreoffice-openclipart
Recommends:	libreoffice-style-breeze
Recommends:	libreoffice-style-colibre
Recommends:	libreoffice-style-elementary
Recommends:	libreoffice-style-karasa_jaga
Recommends:	libreoffice-style-sifr
Recommends:	libreoffice-style-sukapura
Recommends:	libreoffice-writer
Recommends:	(libreoffice-help-ru if locales-ru)
Suggests:	dnfdragora-gtk


%description mate-var
User variable task for Mate iso.

%files mate-var

#----------------------------------------------------------------------------

%package plasma5
Summary:	Task for Plasma5 iso
Group:		System/Configuration/Boot and Init
Requires:	%{name}-common-desktop
Requires:	%{name}-common-desktop-var
Requires:	%{name}-plasma5-var
Requires:	task-plasma5
Recommends:	isoimagewriter
Recommends: kde-print-manager
Recommends:	qphotorec
Recommends:	dnfdragora-qt
Recommends:	skanpage
Recommends:	samba-server
Recommends:	hw-probe-pyqt5-gui
Recommends: plasma5-kamera
Recommends: plasma5-kcm-drakauth
Recommends: plasma5-kcm-drakxservices
Recommends: plasma5-kcm-harddrake
Recommends: plasma5-kcm-userdrake
Recommends: plasma5-kget
Recommends: plasma5-thunderbolt

%description plasma5
Task for Plasma5 iso.

%files plasma5

#----------------------------------------------------------------------------

%package plasma5-var
Summary:	Variable task for Plasma5 iso
Group:		System/Configuration/Boot and Init
Release:	1.var
Recommends:	audacity
Recommends:	chromium-browser-stable
Recommends:	smplayer
Recommends:	strawberry
Recommends:	gimp
Recommends: kdenlive
Recommends: kid3-qt
Recommends: krusader
Recommends:	libreoffice-calc
Recommends:	libreoffice-impress
# gtk3-отрисовка работает лучше (меньше артефактов),
# и на kde5 VCL не срабатывает инвертирование значков на темной теме
Recommends:	libreoffice-gtk3-kde5
Recommends:	libreoffice-math
Recommends:	libreoffice-writer
Recommends:	qbittorrent
# removed automatically by Anaconda post-install script when BTRFS is not used
Recommends:	btrfs-snapshot-gui

%description plasma5-var
User variable task for Plasma5 iso.

%files plasma5-var

#----------------------------------------------------------------------------

%package plasma6
Summary:	Task for Plasma6 iso
Group:		Graphical desktop/KDE
Requires:	%{name}-common-desktop
Requires:	%{name}-common-desktop-var
Requires:	%{name}-plasma6-var
Requires:	task-plasma6
Recommends:	dnfdragora-qt
Recommends:	drakxtools
Recommends:	samba-server
Recommends:	hw-probe-pyqt6-gui

%description plasma6
Task for Plasma6 iso.

%files plasma6

#----------------------------------------------------------------------------

%package plasma6-var
Summary:	Variable task for Plasma6 iso
Group:		Graphical desktop/KDE
Release:	1.var
Recommends:	audacity
Recommends:	chromium-browser-stable
Recommends:	gimp3
Recommends:	libreoffice-calc
Recommends:	libreoffice-kde6
Recommends:	libreoffice-impress
Recommends:	libreoffice-math
Recommends:	libreoffice-writer
Recommends:	plasma6-krecorder
Recommends:	strawberry
# autostart of virtual on-screen keyboard in X11 if there is a touchscreen
Recommends:	onboard-autostart-on-touchscreens
# GUI to configure autostart of the virtual keyboard
Recommends:	plasma6-kcm-onboard
# btrfs-snapshot-gui and a button to run it from KDE settings
# (removed automatically by Anaconda post-install script when BTRFS is not used)
Recommends:	plasma6-kcm-btrfs-snapshots
# Add Miracast support into KDE via gnome-network-displays
Recommends:	plasma6-kcm-network-displays
# KCM module to set up /etc/dnf/vars/token in ROSA Chrome (not Fresh)
Recommends:	(plasma6-kcm-rosa-license if branding-configs-chrome)
# KCM module to run rosa-id-mngr and see ROSA ID status
Recommends:	plasma6-kcm-rosa-id
# KCM module to run DAuth for joining a computer to a domain
Recommends:	plasma6-kcm-dauth

%description plasma6-var
User variable task for Plasma6 iso.

%files plasma6-var

#----------------------------------------------------------------------------

%package tde
Summary:	Task for TDE iso
Group:		System/Configuration/Boot and Init
Recommends:	%{name}-common-desktop
Requires:	%{name}-common-desktop-var
Recommends:	task-tde

%description tde
Task for TDE iso.

%files tde

#----------------------------------------------------------------------------

%package xfce
Summary:	Task for XFCE iso
Group:		System/Configuration/Boot and Init
Recommends:	%{name}-common-desktop
Requires:	%{name}-common-desktop-var
Requires:	%{name}-xfce-var
Recommends:	simple-scan
Recommends:	dnfdragora-gtk
Recommends:	rosa-wallpapers-2019
Recommends:	task-xfce-plugins
Recommends:	task-xfce
Recommends:	task-xfce-minimal

%description xfce
Task for XFCE iso.

%files xfce

%package xfce-var
Summary:        Variable task for Plasma5 iso
Group:          Graphical desktop/KDE
Release:        1.var
Recommends:     audio-recorder
Recommends:	alarm-clock-applet
# removed automatically by Anaconda post-install script when BTRFS is not used
Recommends:	btrfs-snapshot-gui
Recommends:	catfish
Recommends:     chromium-browser-stable
Recommends:	gcolor2
Recommends:	gigolo
Recommends:     gimp3
Recommends:	gnome-network-displays
Recommends:	grub-customizer
Recommends:	file-roller
Recommends:     kazam
Recommends:     keepassxc
Recommends:     kolourpaint
Recommends:     kdenlive
Recommends:     kruler
Recommends:     libreoffice-calc
Recommends:     libreoffice-gnome
Recommends:     libreoffice-impress
Recommends:     libreoffice-math
Recommends:     libreoffice-writer
Recommends:     meld
Recommends:     mintstick
Recommends:     remmina
Recommends:     runner-gui
Recommends:     thunderbird-115-ru
Recommends:     transmission-gtk3
Suggests:	dnfdragora-gtk
Suggests:	hw-probe-pyqt6-gui

%description xfce-var
User variable task for Plasma6 iso.

%files xfce-var


#----------------------------------------------------------------------------

%package icewm
Summary:	Task for Icewm iso
Group:		System/Configuration/Boot and Init
Recommends:	%{name}-common-desktop
Requires:	%{name}-common-desktop-var
Recommends:	icewm
Recommends:	icewm-i18n
Recommends:	pcmanfm
Recommends:	gxkb
Recommends:	picom
Recommends:	icewm-config-rosa
Recommends:	xscreensaver
Recommends:	gparted

%description icewm
Task for Icewm iso.

%files icewm

#----------------------------------------------------------------------------

%prep

%build

%install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 353 |14mr|tomcli-0.8.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_without manpages
%bcond_without tests

# Add minimal py3_test_envvars for EPEL 9
%if %{undefined py3_test_envvars}
%define py3_test_envvars %{shrink:
PYTHONPATH=%{buildroot}%{python3_sitelib}
PATH=%{buildroot}%{_bindir}:${PATH}
}
%endif

Name:           tomcli
Version:        0.8.0
Release:        3
Summary:        CLI for working with TOML files. Pronounced "tom clee."
Group:          Development/Python
License:        MIT
URL:            https://sr.ht/~gotmax23/tomcli
Source0:        https://git.sr.ht/~gotmax23/tomcli/refs/download/v%{version}/tomcli-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3-tomlkit
%if %{with tests}
BuildRequires:  python3-pytest
%endif
%if %{with manpages}
BuildRequires:  scdoc
%endif

Requires:       python3dist(tomlkit)

%description
tomcli is a CLI for working with TOML files. Pronounced "tom clee."

%files -f %{pyproject_files}
%license LICENSE
%doc README.md
%doc NEWS.md
%{_bindir}/tomcli*
%{_datadir}/bash-completion/completions/tomcli*
%{_datadir}/fish/vendor_completions.d/tomcli*.fish
%{_datadir}/zsh/site-functions/_tomcli*
%if %{with manpages}
%{_mandir}/man1/tomcli*.1*
%endif

#-----------------------------------------------------------
%prep
%autosetup -p1


%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%if %{with manpages}
for page in doc/*.scd; do
    dest="${page%.scd}"
    scdoc <"${page}" >"${dest}"
done
%endif


%install
%pyproject_install
%pyproject_save_files tomcli

%if %{with manpages}
# Install manpages
install -Dpm 0644 doc/*.1 -t %{buildroot}%{_mandir}/man1
%endif

# Install shell completions
(
export %{py3_test_envvars}
%__python3 compgen.py \
    --installroot %{buildroot} \
    --bash-dir %{_datadir}/bash-completion/completions \
    --fish-dir %{_datadir}/fish/vendor_completions.d \
    --zsh-dir %{_datadir}/zsh/site-functions
)


%check
# Smoke test
(
export %{py3_test_envvars}
TOMCLI="%{buildroot}%{_bindir}/tomcli"
cp pyproject.toml test.toml
name="$($TOMCLI get test.toml project.name)"
test "${name}" = "tomcli"

$TOMCLI set test.toml str project.name not-tomcli
newname="$($TOMCLI get test.toml project.name)"
test "${newname}" = "not-tomcli"
)

%pyproject_check_import
%if %{with tests}
%pytest
%endif


#pyproject_extras_subpkg -n tomcli %{?with tomlkit:all tomlkit} tomli

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 354 |14mt|cargo-rpm-macros-28.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_without check

Name:           cargo-rpm-macros
Version:        28.5
Release:        1
Summary:        RPM macros and generators for building Rust packages with cargo
License:        MIT

URL:            https://codeberg.org/rust2rpm/cargo-rpm-macros
Source:         %{url}/archive/v%{version}.tar.gz

# temporary patch for compatibility with RHEL / ELN:
# The %%cargo_prep macro in RHEL / ELN accepts a -V flag. Using the same spec
# file for both Fedora and ELN would cause spec file parsing errors because
# the -V flag is not known in Fedora.
Patch:          0001-Temporarily-accept-cargo_prep-V-flag-for-spec-compat.patch

BuildArch:      noarch

# obsolete + provide rust-packaging (removed in Fedora 38)
Obsoletes:      rust-packaging < 24
Provides:       rust-packaging = %{version}-%{release}

Requires:       cargo2rpm >= 0.3.4

Requires:       cargo
Requires:       gawk
Requires:       grep

Requires:       rust-srpm-macros = %{version}-%{release}

%description
%{summary}.

%package -n rust-srpm-macros
Summary:        RPM macros for building Rust projects

%description -n rust-srpm-macros
RPM macros for building source packages for Rust projects.

%prep
%autosetup -n cargo-rpm-macros -p1

%build
# nothing to do

%install
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.cargo
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.cargo-buildsys
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.rust
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.aaa-cargo-srpm
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.rust-srpm
install -D -p -m 0644 -t %{buildroot}/%{_fileattrsdir} fileattrs/cargo.attr
install -D -p -m 0644 -t %{buildroot}/%{_fileattrsdir} fileattrs/cargo_vendor.attr

%files
%license LICENSE
%{_rpmmacrodir}/macros.cargo
%{_rpmmacrodir}/macros.cargo-buildsys
%if 0%{?rhel}
%{_rpmmacrodir}/macros.rust
%endif
%{_fileattrsdir}/cargo.attr
%{_fileattrsdir}/cargo_vendor.attr

%files -n rust-srpm-macros
%license LICENSE
%{_rpmmacrodir}/macros.aaa-cargo-srpm
%{_rpmmacrodir}/macros.rust
%{_rpmmacrodir}/macros.rust-srpm

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 355 |14mt|debugedit-5.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Tool for editing debug info in ELF binaries
Name:		debugedit
Version:	5.3
Release:	1
Group:		Development/Other
License:	GPLv3+, parts GPLv2, LGPLv2.1
Source0:	https://sourceware.org/pub/debugedit/%{version}/%{name}-%{version}.tar.xz
Patch0:		rpm-4.15.0-find-debuginfo__mga-cfg.diff
# Look at *.so* files regardless of their permissions - some projects
# follow Debian-ish policies of not making libraries executable, and
# the debuginfo generator runs before the permission fixup
# (it has to, because the same set of scripts that invokes permission
# fixup also invokes further stripping).
Patch1:		debugedit-5.0-look-at-so-files.patch

BuildRequires:	autoconf
BuildRequires:	make
BuildRequires:	pkgconfig(libelf)
BuildRequires:	pkgconfig(libdw)
BuildRequires:	pkgconfig(libxxhash)

# The find-debuginfo.sh script has a couple of tools it needs at runtime.
# For strip_to_debug, eu-strip
Requires:	elfutils
# For add_minidebug, readelf, awk, nm, sort, comm, objcopy, xz
Requires:	binutils, gawk, coreutils, xz
# For find and xargs
Requires:	findutils
# For do_file, gdb_add_index
Requires:	/usr/bin/gdb-add-index
# For run_job, sed
Requires:	sed
# For dwz
Requires:	dwz
# For append_uniq, grep
Requires:	grep

%description
Tool for editing debug info in ELF binaries.

%prep
%autosetup -p1

%build
autoreconf -f -v -i
%configure
%make_build \
	HELP2MAN=%{_bindir}/true

%install
%make_install \
	HELP2MAN=%{_bindir}/true

%files
%license COPYING COPYING3 COPYING.LIB
%{_bindir}/debugedit
%{_bindir}/debugedit-classify-ar
%{_bindir}/find-debuginfo
%{_bindir}/sepdebugcrcfix
%doc %{_mandir}/man1/debugedit.1*
%doc %{_mandir}/man1/debugedit-classify-ar.1*
%doc %{_mandir}/man1/find-debuginfo.1*
%doc %{_mandir}/man1/sepdebugcrcfix.1*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 356 |14mt|mock-6.8-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Builds packages inside chroots
Name:		mock
Version:	6.8
Release:	2
License:	GPLv2+
Group:		Development/Other
Url:		https://github.com/rpm-software-management/mock/
Source0:	https://github.com/rpm-software-management/mock/releases/download/%{name}-%{version}-1/%{name}-%{version}.tar.gz
# For x86_64 rosa2023.1
Source1:	rosa202310-x86_64.cfg
# Sysusers file to create the mock group
Source2:	%{name}.sysusers
BuildArch:	noarch
Requires:	%{name}-filesystem = %{EVRD}
Requires:	distribution-gpg-keys
Requires:	dnf5
Requires:	dnf5-plugins
Requires:	procps-ng
Requires:	python3
Requires:	python3-backoff
Requires:	python3-distro
Requires:	python3-jinja2
Requires:	python3-pyroute2
Requires:	python3-requests
Requires:	python3-rpm
Requires:	python3-six
Requires:	python3-templated-dictionary
Requires:	python3-yaml
Requires:	systemd
Requires:	bsdtar
Requires:	usermode-consoleonly
Recommends:	btrfs-progs
Recommends:	createrepo_c
Recommends:	dnf-utils
Recommends:	dnf-yum
Recommends:	(%{name}-configs-x86_64 if arch(x86_64))

# default.cfg was moved
Conflicts:	mock < 2.11

%description
Mock takes an SRPM and builds it in a chroot.

%files
%doc %{_docdir}/%{name}-%{version}/site-defaults.cfg
%ghost %config(noreplace) %{_sysconfdir}/%{name}/default.cfg
%ghost %config(noreplace) %{_sysconfdir}/%{name}/hermetic-build.cfg
%{_bindir}/%{name}
%{_bindir}/mockchain
%{_bindir}/mock-parse-buildlog
%attr(0644,root,mock) %{_datadir}/bash-completion/completions/%{name}
%{_datadir}/bash-completion/completions/mock-parse-buildlog
%{_datadir}/cheat/%{name}
%{_libexecdir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_mandir}/man1/mock-parse-buildlog.1*
%{python3_sitelib}/*
%config(noreplace) %{_sysconfdir}/%{name}/*.ini
%config(noreplace) %{_sysconfdir}/pam.d/%{name}
%dir %{_sysconfdir}/pki/%{name}
%config(noreplace) %{_sysconfdir}/pki/mock/*
%config(noreplace) %{_sysconfdir}/security/console.apps/%{name}

%defattr(0775,root,mock,02775)
%dir %{_localstatedir}/cache/%{name}
%dir %{_localstatedir}/lib/%{name}

%exclude %{python3_sitelib}/mockbuild/plugins/lvm_root.*
%exclude %{python3_sitelib}/mockbuild/scm.*

#----------------------------------------------------------------------------

%package scm
Summary:	Mock SCM integration module
Group:		Development/Other
Requires:	%{name} = %{EVRD}
Requires:	git
Requires:	subversion
Requires:	tar

%description scm
Mock SCM integration module.

%files scm
%optional %{python3_sitelib}/mockbuild/__pycache__/scm.*.py*
%{python3_sitelib}/mockbuild/scm.py*

#----------------------------------------------------------------------------

%package lvm
Summary:	LVM plugin for mock
Group:		Development/Other
Requires:	%{name} = %{EVRD}
Requires:	lvm2

%description lvm
Mock plugin that enables using LVM as a backend and support creating snapshots
of the buildroot.

%files lvm
%{python3_sitelib}/mockbuild/plugins/lvm_root.*
%optional %{python3_sitelib}/mockbuild/plugins/__pycache__/lvm_root.*.py*

#----------------------------------------------------------------------------

%package filesystem
Summary:	Mock filesystem layout
Group:		Development/Other
Requires(pre):	systemd

%description filesystem
Filesystem layout and group for Mock.

%pre filesystem
%sysusers_create_package %{name} %SOURCE2

%files filesystem
%license COPYING
%{_sysusersdir}/%{name}.conf
%dir %{_datadir}/cheat
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/eol
%dir %{_sysconfdir}/%{name}/eol/templates
%dir %{_sysconfdir}/%{name}/templates

#----------------------------------------------------------------------------

%package configs-x86_64
Summary:	Default configs for mock x86_64
Group:		Development/Other
Requires:	bsdtar
Requires:	zstd
Requires:	%{name}
# make /etc/mock/default.cfg (%%ghost) exist
Requires(posttrans):	%{name}

%description configs-x86_64
Default config for mock x86_64.

%files configs-x86_64
%config(noreplace) %{_sysconfdir}/%{name}/rosa202310-x86_64.cfg

%posttrans configs-x86_64
if [ ! -a /etc/mock/default.cfg ]; then
	cp -f /etc/mock/rosa202310-x86_64.cfg /etc/mock/default.cfg
fi

#----------------------------------------------------------------------------

%prep
%autosetup -p1
sed -i	\
	-e 's|^VERSION = .*|VERSION="%{version}"|'			\
	-e 's|^SYSCONFDIR = .*|SYSCONFDIR="%{_sysconfdir}"|'			\
	-e 's|^PYTHONDIR = .*|PYTHONDIR="%{python3_sitelib}"|'			\
	-e 's|^PKGPYTHONDIR = .*|PKGPYTHONDIR="%{python3_sitelib}/mockbuild"|'	\
		py/mock-parse-buildlog.py py/mockbuild/constants.py
sed -i 's|@VERSION@|%{version}|' docs/%{name}.1 docs/mock-parse-buildlog.1
sed -i "/nr_inodes=0/d" py/mockbuild/plugins/tmpfs.py

%build

%install
#base filesystem
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/eol/templates
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/templates

install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf

install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_libexecdir}/%{name}
install mockchain %{buildroot}%{_bindir}/mockchain
install py/mock-parse-buildlog.py %{buildroot}%{_bindir}/mock-parse-buildlog
install py/%{name}.py %{buildroot}%{_libexecdir}/%{name}/%{name}
ln -s consolehelper %{buildroot}%{_bindir}/%{name}

install -d %{buildroot}%{_sysconfdir}/pam.d
cp -a etc/pam/* %{buildroot}%{_sysconfdir}/pam.d/

install -d %{buildroot}%{_sysconfdir}/%{name}
cp -a etc/%{name}/* %{buildroot}%{_sysconfdir}/%{name}/

install -d %{buildroot}%{_sysconfdir}/security/console.apps/
cp -a etc/consolehelper/%{name} %{buildroot}%{_sysconfdir}/security/console.apps/%{name}

install -d %{buildroot}%{_datadir}/bash-completion/completions/
cp -a etc/bash_completion.d/* %{buildroot}%{_datadir}/bash-completion/completions/
ln -s %{name} %{buildroot}%{_datadir}/bash-completion/completions/mock-parse-buildlog

install -d %{buildroot}%{_sysconfdir}/pki/%{name}
cp -a etc/pki/* %{buildroot}%{_sysconfdir}/pki/%{name}/

install -d %{buildroot}%{python3_sitelib}/
cp -a py/mockbuild %{buildroot}%{python3_sitelib}/

install -d %{buildroot}%{_mandir}/man1
cp -a docs/%{name}.1 docs/mock-parse-buildlog.1 %{buildroot}%{_mandir}/man1/
install -d %{buildroot}%{_datadir}/cheat
cp -a docs/%{name}.cheat %{buildroot}%{_datadir}/cheat/%{name}

install -d %{buildroot}/var/lib/%{name}
install -d %{buildroot}/var/cache/%{name}

mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}
install -p -m 0644 docs/site-defaults.cfg %{buildroot}%{_docdir}/%{name}-%{version}

sed -i 's/^_MOCK_NVR = None$/_MOCK_NVR = "%name-%version-%release"/' \
    %{buildroot}%{_libexecdir}/%{name}/%{name}

cp %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/
sed -i -e "s,^config_opts\(.\)'useradd'\(.\) = .*,config_opts\1'useradd'\2 = '/usr/sbin/useradd -o -m -u {{chrootuid}} -g {{chrootgid}} -d {{chroothome}} {{chrootuser}}'," -e "s,^user_agent=$,user_agent={{ user_agent }}," %{buildroot}%{_sysconfdir}/%{name}/*.cfg

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 357 |14mt|perl-5.44.0-27
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# ******************************************************************
# *** IMPORTANT: When upgrading to a newer, incompatible release ***
# *** (e.g. 5.26.x -> 5.27, not 5.26.1 -> 5.26.2), a number of   ***
# *** package builds will break due to the gprintify script in   ***
# *** spec-helper requiring some extra modules that can be       ***
# *** run by /usr/bin/perl.                                      ***
# *** Please make sure that after building the new perl package, ***
# *** you rebuild (in that order):                               ***
# *** perl-File-Slurp                                            ***
# *** perl-Test-Pod                                              ***
# *** perl-Devel-Symdump                                         ***
# *** perl-PathTools                                             ***
# *** perl-Pod-Coverage                                          ***
# *** perl-Test-Pod-Coverage                                     ***
# *** perl-Try-Tiny                                              ***
# *** perl-Test-Fatal                                            ***
# *** perl-Test-Nowarnings                                       ***
# *** perl-Test-Deep                                             ***
# *** perl-Test-Warnings                                         ***
# *** perl-Exporter-Tiny                                         ***
# *** perl-List-MoreUtils                                        ***
# *** perl-IPC-Run                                               ***
# ***                                                            ***
# *** gprintify is disabled for those packages; they will not    ***
# *** fail because of its dependencies.                          ***
# ***                                                            ***
# *** Due to other dependency issues in build roots, you will    ***
# *** also want to rebuild (in that order):                      ***
# *** perl-HTML-Tagset                                           ***
# *** perl-HTML-Parser                                           ***
# *** perl-Sub-Install                                           ***
# *** perl-Params-Util                                           ***
# *** perl-Data-OptList                                          ***
# *** perl-Test-Requires                                         ***
# *** perl-Spiffy                                                ***
# *** perl-Test-Base                                             ***
# *** perl-YAML                                                  ***
# *** perl-Module-Build                                          ***
# *** perl-DynaLoader-Functions                                  ***
# *** perl-Devel-CallChecker                                     ***
# *** perl-Params-Classify                                       ***
# *** perl-Module-Runtime                                        ***
# *** perl-Sub-Exporter                                          ***
# *** perl-Dist-CheckConflicts                                   ***
# *** perl-Module-Implementation                                 ***
# *** perl-Sub-Uplevel                                           ***
# *** perl-Test-Exception                                        ***
# *** perl-Test-Needs                                            ***
# *** perl-Capture-Tiny                                          ***
# *** perl-Test-Output                                           ***
# *** perl-Sub-Name                                              ***
# *** perl-Package-Stash-XS                                      ***
# *** perl-Package-Stash                                         ***
# *** perl-Package-DeprecationManager                            ***
# *** perl-Sub-Identify                                          ***
# *** perl-Scope-Guard                                           ***
# *** perl-Sub-Exporter-Progressive                              ***
# *** perl-B-Hooks-EndOfScope                                    ***
# *** perl-namespace-clean                                       ***
# *** perl-Class-Load                                            ***
# *** perl-Devel-GlobalDestruction                               ***
# *** perl-Devel-StackTrace                                      ***
# *** perl-Eval-Closure                                          ***
# *** perl-Class-C3-XS                                           ***
# *** perl-Algorithm-C3                                          ***
# *** perl-Class-C3                                              ***
# *** perl-File-Remove                                           ***
# *** perl-JSON                                                  ***
# *** perl-Module-ScanDeps                                       ***
# *** perl-Probe-Perl                                            ***
# *** perl-IPC-Run3                                              ***
# *** perl-Test-Script                                           ***
# *** perl-File-Which                                            ***
# *** perl-SUPER                                                 ***
# *** perl-Test-MockModule                                       ***
# *** perl-Archive-Zip                                           ***
# *** perl-PAR-Dist                                              ***
# *** perl-Module-Install                                        ***
# *** perl-MRO-Compat                                            ***
# *** perl-Task-Weaken                                           ***
# *** perl-Test-LongString                                       ***
# *** perl-Devel-OverloadInfo                                    ***
# *** perl-Moose                                                 ***
# *** perl-strictures                                            ***
# *** perl-Class-Method-Modifiers                                ***
# *** perl-Role-Tiny                                             ***
# *** perl-Sub-Quote                                             ***
# *** perl-Moo                                                   ***
# *** perl-PerlIO-utf8_strict                                    ***
# *** perl-IO-String                                             ***
# *** perl-Mixin-Linewise                                        ***
# *** perl-Config-INI                                            ***
# *** perl-Type-Tiny                                             ***
# *** perl-Array-Compare                                         ***
# *** perl-File-Slurp-Tiny                                       ***
# *** perl-Tree-DAG_Node                                         ***
# *** perl-Test-Warn                                             ***
# *** perl-Algorithm-Diff                                        ***
# *** perl-Text-Diff                                             ***
# *** perl-Test-Differences                                      ***
# *** perl-File-Slurper                                          ***
# *** perl-Pod-POM                                               ***
# *** perl-File-HomeDir                                          ***
# *** perl-AppConfig                                             ***
# *** perl-Text-Reform                                           ***
# *** perl-Text-Autoformat                                       ***
# *** perl-Template-Toolkit (force installation -- circular dep) ***
# *** perl-CGI                                                   ***
# *** perl-SGMLSpm                                               ***
# *** git                                                        ***
# *** perl-YAML-Tiny                                             ***
# ******************************************************************

%global perl_version    5.44.0
%global perl_epoch      1
%global perl_arch_stem -thread-multi
%global perl_archname %{_arch}-%{_os}%{perl_arch_stem}

# Avoid nasty circular dependency loop -- gprintify uses perl
# and various perl-modules not in the perl core distro
%define dont_gprintify 1

# (tpg) without this other perl modules fails to build
# do NOT remove it unless you want to fix all the perl crazy world
%define _disable_ld_no_undefined 1

# And don't run perl_cleaner -- we want to own some directories even
# if they're empty.
%define dont_cleanup_perl 1

%global parallel_tests 0
%global tapsetdir   %{_datadir}/systemtap/tapset

%bcond_with perl_bootstrap

%global dual_life 1
%global rebuild_from_scratch %{defined perl_bootstrap}

# This is to emulate the perl_archlib macro but of the newly installed perl
# which may be different
%define this_perl_archlib %{_prefix}/lib/perl5/%{version}/%{perl_archname}

# This overrides filters from build root (/usr/lib/rpm/macros.d/macros.perl)
# intentionally (unversioned perl(DB) is removed and versioned one is kept).
# Filter provides from *.pl files, bug #924938
%global __provides_exclude_from .*%{_docdir}|.*%{this_perl_archlib}/.*\\.pl$|.*%{perl_privlib}/.*\\.pl$
%global __requires_exclude_from %{_docdir}
%global __provides_exclude perl\\((VMS|Win32|BSD::|DB\\)$)
%global __requires_exclude perl\\((VMS|BSD::|Win32|Tk|Mac::|Your::Module::Here|unicore::Name|FCGI|Locale::Codes::.*(Code|Retired))

# Filter dependencies on private modules. Generator:
# for F in $(find lib -type f); do perl -e '$/ = undef; $_ = <>; if (/^package #\R([\w:]*);/m) { print qq{|^perl\\\\($1\\\\)} }' "$F"; done
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Locale::Codes::Country_Retired\\)|^perl\\(Locale::Codes::LangFam_Retired\\)|^perl\\(Locale::Codes::Script_Retired\\)|^perl\\(Locale::Codes::LangExt_Codes\\)|^perl\\(Locale::Codes::LangFam_Codes\\)|^perl\\(Locale::Codes::Script_Codes\\)|^perl\\(Locale::Codes::Language_Codes\\)|^perl\\(Locale::Codes::LangExt_Retired\\)|^perl\\(Locale::Codes::Currency_Codes\\)|^perl\\(Locale::Codes::LangVar_Retired\\)|^perl\\(Locale::Codes::Language_Retired\\)|^perl\\(Locale::Codes::Country_Codes\\)|^perl\\(Locale::Codes::LangVar_Codes\\)|^perl\\(Locale::Codes::Currency_Retired\\)

# same as we provide in /usr/lib/rpm/macros.d/macros.perl
%global perl5_testdir   %{_libexecdir}/perl5-tests

# Optional features
# We can bootstrap without gdbm
%bcond_without gdbm
# Support for groff, bug #135101
%bcond_without perl_enables_groff
# Run syslog tests
%bcond_with perl_enables_syslog_test

# SystemTap support
%bcond_without perl_enables_systemtap

# <> operator uses File::Glob nowadays. CSH is not needed.
%bcond_with perl_enables_tcsh
%bcond_with test

Name:           perl
# These are all found licenses. They are distributed among various
# subpackages.
# dist/Tie-File/lib/Tie/File.pm:        GPLv2+ or Artistic
# cpan/Getopt-Long/lib/Getopt/Long.pm:  GPLv2+ or Artistic
# cpan/Compress-Raw-Zlib/Zlib.xs:       (GPL+ or Artistic) and zlib
# cpan/Digest-MD5/MD5.xs:               (GPL+ or Artistic) and BSD
# cpan/Time-Piece/Piece.xs:             (GPL+ or Artistic) and BSD
# dist/PathTools/Cwd.xs:                (GPL+ or Artistic) and BSD
# util.c:                               (GPL+ or Artistic) and BSD
# cpan/perlfaq/lib/perlfaq4.pod:        (GPL+ or Artistic) and Public Domain
# cpan/Test-Simple/lib/Test/Tutorial.pod:   (GPL+ or Artistic) and
#                                           Public Domain
# cpan/MIME-Base64/Base64.xs:           (GPL+ or Artistic) and MIT
# cpan/Test-Simple/lib/ok.pm:           CC0
# cpan/Text-Tabs/lib/Text/Wrap.pm:      TTWL
# cpan/Encode/bin/encguess:             Artistic 2.0
# cpan/libnet/lib/Net/libnetFAQ.pod:    Artistic    (CPAN RT#117888)
# cpan/Unicode-Collate/Collate/allkeys.txt:     Unicode
# lib/unicore:                          UCD
# ext/SDBM_File/sdbm.{c,h}:             Public domain
# regexec.c, regcomp.c:                 HSLR
# cpan/Locale-Maketext-Simple/lib/Locale/Maketext/Simple.pm:    MIT (with
#                                       exception for Perl)
# time64.c:                             MIT
# pod/perlpodstyle.pod:                 MIT
# pod/perlunicook.pod:                  (GPL+ or Artistic) and Public Domain
# pod/perlgpl.pod:                      GPL text
# pod/perlartistic.pod:                 Artistic text
# ext/File-Glob/bsd_glob.{c,h}:         BSD
# Other files:                          GPL+ or Artistic
## Not is a binary package
# cpan/podlators/t/style/minimum-version.t          MIT
# cpan/Term-ANSIColor/t/lib/Test/RRA/Config.pm:     MIT
## Unbundled
# cpan/Compress-Raw-Bzip2/bzip2-src:    BSD
# cpan/Compress-Raw-Zlib/zlib-src:      zlib
## perl sub-package notice
# perluniprops.pod is generated from lib/unicore sources:   UCD
#
# This sub-subpackage doesn't contain any copyrightable material.
# Nevertheless, it needs a License tag, so we'll use the generic
# "perl" license.
License:        GPL+ or Artistic
Epoch:          %{perl_epoch}
Version:        %{perl_version}
# release number must be even higher, because dual-lived modules will be broken otherwise
# (tpg) for now keep at least 13 - 2019-11-11
Release:        27
Group:          Development/Perl
Summary:        Practical Extraction and Report Language
Url:            http://www.perl.org/
Source0:        http://www.cpan.org/src/5.0/perl-%{perl_version}.tar.xz
Source3:        macros.perl
#Systemtap tapset and example that make use of systemtap-sdt-devel
# build requirement. Written by lberk; Not yet upstream.
Source4:        perl.stp
Source5:        perl-example.stp
# Tom Christiansen confirms Pod::Html uses the same license as perl
Source6:        Pod-Html-license-clarification
# Pregenerated dependencies for bootstrap.
# If your RPM tool fails on including the source file, then you forgot to
# define _sourcedir macro to point to the directory with the sources.
Source7:        gendep.macros
%if %{with perl_bootstrap}
%include %{SOURCE7}
%endif
Source100:	perl.rpmlintrc

# Removes date check, Fedora/RHEL specific
Patch1:         perl-perlbug-tag.patch

# Fedora/RHEL only (64bit only)
Patch3:         perl-5.8.0-libdir64.patch

# Fedora/RHEL specific (use libresolv instead of libbind), bug #151127
Patch4:         perl-5.38.0-libresolv.patch

# FIXME: May need the "Fedora" references removed before upstreaming
# patches ExtUtils-MakeMaker
Patch5:         perl-USE_MM_LD_RUN_PATH.patch

# Provide maybe_command independently, bug #1129443
Patch6:         perl-5.38.0-Provide-ExtUtils-MM-methods-as-standalone-ExtUtils-M.patch

# The Fedora builders started randomly failing this futime test
# only on x86_64, so we just don't run it. Works fine on normal
# systems.
Patch7:         perl-5.10.0-x86_64-io-test-failure.patch

# switch off test, which is failing only on koji (fork)
Patch8:         perl-5.38.0-offtest.patch

# Define SONAME for libperl.so
Patch15:        perl-5.38.0-create_libperl_soname.patch

# Install libperl.so to -Dshrpdir value
Patch16:        perl-5.22.0-Install-libperl.so-to-shrpdir-on-Linux.patch

# Make *DBM_File desctructors thread-safe, bug #1107543, RT#61912
Patch26:        perl-5.38.0-Destroy-GDBM-NDBM-ODBM-SDBM-_File-objects-only-from-.patch

# Replace ExtUtils::MakeMaker dependency with ExtUtils::MM::Utils.
# This allows not to require perl-devel. Bug #1129443
Patch30:        perl-5.22.1-Replace-EU-MM-dependnecy-with-EU-MM-Utils-in-IPC-Cmd.patch

# Link XS modules to pthread library to fix linking with -z defs,
# <https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/3RHZEHLRUHJFF2XGHI5RB6YPDNLDR4HG/>
Patch79:        perl-5.27.8-hints-linux-Add-lphtread-to-lddlflags.patch

# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
Patch200:       perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch

# Link XS modules to libperl.so with EU::MM on Linux, bug #960048
Patch201:       perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-MM-on-Linux.patch

Patch300:       disable-stack-unwinding.patch

BuildRequires:  bash
BuildRequires:  pkgconfig(bzip2)
BuildRequires:  coreutils
BuildRequires:  findutils
BuildRequires:  bison
BuildRequires:  byacc
BuildRequires:  less
BuildRequires:  zip
BuildRequires:  gcc
BuildRequires:  binutils-devel
%if %{with gdbm}
BuildRequires:  gdbm-devel
%endif
# for iconv
BuildRequires:  glibc
%if %{with perl_enables_groff}
# Build-require groff tools for populating %%Config correctly, bug #135101
BuildRequires:  groff-base
%endif
BuildRequires:  db-devel
BuildRequires:  make
%if %{without perl_bootstrap}
BuildRequires:  perl
%endif
BuildRequires:  sed
%if %{with perl_enables_systemtap}
BuildRequires:  systemtap-devel
%endif
BuildRequires:  tar
%if %{with perl_enables_tcsh}
BuildRequires:  tcsh
%endif
BuildRequires:  pkgconfig(zlib)

# For tests
%if %{with test}
BuildRequires:  procps
%if %{with perl_enables_syslog_test}
BuildRequires:  rsyslog
%endif
%endif

# compat macro needed for rebuild
%global perl_compat perl(:MODULE_COMPAT_5.28.0)

Requires:       %perl_compat
Requires:       perl-base%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
Requires:       perl-libs%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
### FIXME enable once macros.perl is removed from rpm-openmandriva-macros
#Requires:       perl-macros
Requires:       perl-utils
%if %{with perl_bootstrap}
%gendep_perl
%endif

Requires:       perl-File-Fetch
Requires:       perl-File-Path
Requires:       perl-File-Temp
Requires:       perl-Getopt-Long
Requires:       perl-Encode
Requires:       perl-IO-Compress
Requires:       perl-IO-Zlib
Requires:       perl-Compress-Raw-Zlib
Requires:       perl-Compress-Raw-Bzip2
Requires:       perl-Carp
Requires:       perl-Exporter
Requires:       perl-IPC-Cmd
Requires:       perl-Data-Dumper
Requires:       perl-Digest
Requires:       perl-Digest-MD5
Requires:       perl-Digest-SHA
Requires:       perl-MIME-Base64
Requires:       perl-Module-CoreList
Requires:       perl-Thread-Queue
Requires:       perl-version
Requires:       perl-threads
Requires:       perl-threads-shared
Requires:       perl-parent
Requires:       perl-autodie
Requires:       perl-constant
Requires:       perl-encoding

# For compatibility with Fedora packages
Provides:       perl-core = %{perl_version}-%{release}
Provides:       perl-core%{?_isa} = %{perl_version}-%{release}

Provides:       perl(version) = %{EVRD}

%description
Perl is a high-level programming language with roots in C, sed, awk and shell
scripting. Perl is good at handling processes and files, and is especially
good at handling text. Perl's hallmarks are practicality and efficiency.
While it is used to do a lot of different things, Perl's most common
applications are system administration utilities and web programming.

This is a metapackage with all the Perl bits and core modules that can be
found in the upstream tarball from perl.org.

If you need only a specific feature, you can install a specific package
instead. E.g. to handle Perl scripts with %{_bindir}/perl interpreter,
install perl-base package. See perl-base description for more
details on the Perl decomposition into packages.


%package base
Summary:        Standalone executable Perl interpreter
License:        (GPL+ or Artistic) and (GPLv2+ or Artistic) and BSD and Public Domain and UCD
# perl-base denotes a package with the perl executable.
# Full EVR is for compatibility with systems that swapped perl and perl-core
# <https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules>,
# bug #1464903.
Version:        %{perl_version}
Epoch:          %{perl_epoch}

# For compatibility with Fedora packages
Provides: perl-interpreter = %{perl_epoch}:%{perl_version}-%{release}

Requires:       perl-libs%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
# Require this till perl-interpreter sub-package provides any modules
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_interpreter
%endif

# We need this to break the dependency loop, and ensure that perl-libs
# gets installed before perl-interpreter.
Requires(post): perl-libs
# Same as perl-libs. We need macros in basic buildroot, where Perl is only
# because of git.
### FIXME enable once macros.perl is removed from rpm-openmandriva-macros
#Requires(post): perl-macros

# File provides
Provides:       perl(bytes_heavy.pl)
Provides:       perl(dumpvar.pl)
Provides:       perl(perl5db.pl)

# suidperl isn't created by upstream since 5.12.0
Obsoletes:      perl-suidperl <= 4:5.12.2
# perl was renamed to perl-interpreter and perl-core renamed to perl
# <https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules>,
# bug #1464903.
Obsoletes:      perl < 4:5.26.0-395
%rename perl-base

%description base
This is a Perl interpreter as a standalone executable %{_bindir}/perl
required for handling Perl scripts. It does not provide all the other Perl
modules or tools.

Install this package if you want to program in Perl or enable your system to
handle Perl scripts with %{_bindir}/perl interpreter.

If your script requires some Perl modules, you can install them with
"perl(MODULE)" where "MODULE" is a name of required module. E.g. install
"perl(Test::More)" to make Test::More Perl module available.

If you need all the Perl modules that come with upstream Perl sources, so
called core modules, install perl package.

If you only need perl run-time as a shared library, i.e. Perl interpreter
embedded into another application, the only essential package is perl-libs.

Perl header files can be found in perl-devel package.

Perl utils like "splain" or "perlbug" can be found in perl-utils package.


%package libs
Summary:        The libraries for the perl run-time
License:        (GPL+ or Artistic) and HSLR and MIT and UCD
# Compat provides
Provides:       %perl_compat
Provides:       perl(:MODULE_COMPAT_5.26.1)
Provides:       perl(:MODULE_COMPAT_5.26.0)
Provides:       perl(:MODULE_COMPAT_5.28.0)
Provides:       perl(:MODULE_COMPAT_5.38.0)
Provides:       perl(:MODULE_COMPAT_%{version})
# Interpreter version to fulfil required genersted from "require 5.006;"
Provides:       perl(:VERSION) = %{perl_version}
# Integeres are 64-bit on all platforms
Provides:       perl(:WITH_64BIT)
# Threading provides
Provides:       perl(:WITH_ITHREADS)
Provides:       perl(:WITH_THREADS)
# Largefile provides
Provides:       perl(:WITH_LARGEFILES)
# PerlIO provides
Provides:       perl(:WITH_PERLIO)
# Loaded by charnames, unicore/Name.pm does not declare unicore::Name module
Provides:       perl(unicore::Name)
# utf8 and utf8_heavy.pl require Carp, re, strict, warnings, XSLoader
Requires:       perl(Carp)
Requires:       perl(Exporter)
# Term::Cap is optional
Requires:       perl(XSLoader)
Requires:	%{_lib}perl5 = %{perl_epoch}:%{perl_version}-%{release}
%if %{with perl_bootstrap}
%gendep_perl_libs
%endif

# Remove private redefinitions
# XSLoader redefines DynaLoader name space for compatibility, but does not
# load the DynaLoader.pm (though the DynaLoader.xs is compiled into libperl).
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\((charnames|DynaLoader)\\)$

%description libs
The is a perl run-time (interpreter as a shared library and include
directories).


%package devel
Summary:        Header #files for use in perl development
# l1_char_class_tab.h is generated from lib/unicore sources:    UCD
License:        (GPL+ or Artistic) and UCD
%if %{with perl_enables_systemtap}
Requires:       systemtap-devel
%endif
Requires:       perl(ExtUtils::ParseXS)
# needed for check section
%if %{dual_life} || %{rebuild_from_scratch}
Requires:	perl(Test::More)
Requires:	perl(ExtUtils::Manifest)
%endif
Requires:	perl-srpm-macros
Requires:       %perl_compat
# Match library and header files when downgrading releases
Requires:       perl-libs%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
%if %{with perl_bootstrap}
%gendep_perl_devel
%endif

%description devel
This package contains header files and development modules.
Most perl packages will need to install perl-devel to build.


%package macros
Summary:        Macros for rpmbuild
License:        GPL+ or Artistic
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_macros
%endif

%description macros
Macros for rpmbuild are needed during build of srpm in koji. This
sub-package must be installed into buildroot, so it will be needed
by perl. Perl is needed because of git.


%package tests
Summary:        The Perl test suite
License:        GPL+ or Artistic
# right?
AutoReqProv:    0
Requires:       %perl_compat
# FIXME - note this will need to change when doing the core/minimal swizzle
Requires:       perl
%if %{with perl_bootstrap}
%gendep_perl_tests
%endif

%description tests
This package contains the test suite included with Perl %{perl_version}.

Install this if you want to test your Perl installation (binary and core
modules).


%package utils
Summary:        Utilities packaged with the Perl distribution
License:        GPL+ or Artistic
Epoch:          0
Version:        %{perl_version}
BuildArch:      noarch
# Match library exactly for splain messages
Requires:       perl-libs = %{perl_epoch}:%{perl_version}-%{release}
# Keep /usr/sbin/sendmail and Module::CoreList optional for the perlbug tool
%if %{with perl_bootstrap}
%gendep_perl_utils
%endif
Conflicts:      perl < 4:5.22.0-351

%description utils
Several utilities which come with Perl distribution like h2ph, perlbug,
perlthanks, pl2pm, and splain. Some utilities are provided by more specific
packages like perldoc by perl-Pod-Perldoc.


%if %{dual_life} || %{rebuild_from_scratch}
%package Archive-Tar
Summary:        A module for Perl manipulation of .tar files
License:        GPL+ or Artistic
Epoch:          0
Version:        2.32
BuildArch:      noarch
Requires:       %perl_compat
Requires:       perl(IO::Zlib) >= 1.01
# Optional run-time:
Requires:       perl(IO::Compress::Bzip2) >= 2.015
# IO::String not used if perl supports useperlio which is true
# Use Compress::Zlib's version for IO::Uncompress::Bunzip2
Requires:       perl(IO::Uncompress::Bunzip2) >= 2.015
%if %{without perl_bootstrap}
Requires:       perl(Text::Diff)
%endif
%if %{with perl_bootstrap}
%gendep_perl_Archive_Tar
%endif

%description Archive-Tar
Archive::Tar provides an object oriented mechanism for handling tar files.  It
provides class methods for quick and easy files handling while also allowing
for the creation of tar file objects for custom manipulation.  If you have the
IO::Zlib module installed, Archive::Tar will also support compressed or
gzipped tar files.
%endif

%package Attribute-Handlers
Summary:        Simpler definition of attribute handlers
License:        GPL+ or Artistic
Epoch:          0
Version:        1.01
BuildArch:      noarch
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Attribute_Handlers
%endif
Conflicts:      perl < 4:5.22.0-351

%description Attribute-Handlers
This Perl module, when inherited by a package, allows that package's class to
define attribute handler subroutines for specific attributes. Variables and
subroutines subsequently defined in that package, or in packages derived from
that package may be given attributes with the same names as the attribute
handler subroutines, which will then be called in one of the compilation
phases (i.e. in a "BEGIN", "CHECK", "INIT", or "END" block).

%if %{dual_life} || %{rebuild_from_scratch}
%package autodie
Summary:        Replace functions with ones that succeed or die
License:        GPL+ or Artistic
Epoch:          0
Version:        2.29
Requires:       %perl_compat
BuildArch:      noarch
Requires:       perl(B)
Requires:       perl(Fcntl)
Requires:       perl(overload)
Requires:       perl(POSIX)
%if %{with perl_bootstrap}
%gendep_perl_autodie
%endif
Conflicts:      perl < 4:5.16.2-259

%description autodie
The "autodie" and "Fatal" pragma provides a convenient way to replace
functions that normally return false on failure with equivalents that throw an
exception on failure.

However "Fatal" has been obsoleted by the new autodie pragma. Please use
autodie in preference to "Fatal".
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package bignum
Summary:        Transparent big number support for Perl
License:        GPL+ or Artistic
Epoch:          0
Version:        0.51
Requires:       %perl_compat
Requires:       perl(Carp)
# Math::BigInt::Lite is optional
Requires:       perl(Math::BigRat)
Requires:       perl(warnings)
BuildArch:      noarch
%if %{with perl_bootstrap}
%gendep_perl_bignum
%endif

%description bignum
This package attempts to make it easier to write scripts that use BigInts and
BigFloats in a transparent way.

%package Carp
Summary:        Alternative warn and die for modules
Epoch:          0
# Real version 1.50
Version:        1.50
License:        GPL+ or Artistic
Requires:       %perl_compat
Provides:       perl(Carp::Heavy) = %{version}
%if %{with perl_bootstrap}
%gendep_perl_Carp
%endif
BuildArch:      noarch

# Do not export unversioned module
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(Carp\\)\\s*$

%description Carp
The Carp routines are useful in your own modules because they act like
die() or warn(), but with a message which is more likely to be useful to a
user of your module. In the case of cluck, confess, and longmess that
context is a summary of every call in the call-stack. For a shorter message
you can use carp or croak which report the error as being from where your
module was called. There is no guarantee that that is where the error was,
but it is a good educated guess.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Compress-Raw-Bzip2
Summary:        Low-Level Interface to bzip2 compression library
License:        GPL+ or Artistic
Epoch:          0
Version:        2.084
Requires:       perl(Exporter), perl(File::Temp)
%if %{with perl_bootstrap}
%gendep_perl_Compress_Raw_Bzip2
%endif

%description Compress-Raw-Bzip2
This module provides a Perl interface to the bzip2 compression library.
It is used by IO::Compress::Bzip2.

%package Compress-Raw-Zlib
Summary:        Low-Level Interface to the zlib compression library
License:        (GPL+ or Artistic) and zlib
Epoch:          0
Version:        2.084
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Compress_Raw_Zlib
%endif

%description Compress-Raw-Zlib
This module provides a Perl interface to the zlib compression library.
It is used by IO::Compress::Zlib.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Config-Perl-V
Summary:        Structured data retrieval of perl -V output
License:        GPL+ or Artistic
Epoch:          0
Version:        0.32
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Config_Perl_V
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

%description Config-Perl-V
The command "perl -V" will return you an excerpt from the %%Config::Config
hash combined with the output of "perl -V" that is not stored inside the hash,
but only available to the perl binary itself. This package provides Perl
module that will return you the output of "perl -V" in a structure.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package constant
Summary:        Perl pragma to declare constants
License:        GPL+ or Artistic
Epoch:          0
Version:        1.33
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_constant
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.3-264

%description constant
This pragma allows you to declare constants at compile-time:

use constant PI => 4 * atan2(1, 1);

When you declare a constant such as "PI" using the method shown above,
each machine your script runs upon can have as many digits of accuracy
as it can use. Also, your program will be easier to read, more likely
to be maintained (and maintained correctly), and far less likely to
send a space probe to the wrong planet because nobody noticed the one
equation in which you wrote 3.14195.

When a constant is used in an expression, Perl replaces it with its
value at compile time, and may then optimize the expression further.
In particular, any code in an "if (CONSTANT)" block will be optimized
away if the constant is false.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package CPAN
Summary:        Query, download and build perl modules from CPAN sites
License:        GPL+ or Artistic
Epoch:          0
Version:        2.22
Requires:       make
# Prefer Archive::Tar and Compress::Zlib over tar and gzip
Requires:       perl(Archive::Tar) >= 1.50
Requires:       perl(base)
Requires:       perl(Data::Dumper)
%if %{without perl_bootstrap}
Requires:       perl(Devel::Size)
%endif
Requires:       perl(ExtUtils::Manifest)
%if %{without perl_bootstrap}
Requires:       perl(File::HomeDir) >= 0.65
%endif
Requires:       perl(File::Temp) >= 0.16
Requires:       perl(lib)
Requires:       perl(Net::Config)
Requires:       perl(Net::FTP)
Requires:       perl(POSIX)
Requires:       perl(Term::ReadLine)
%if %{without perl_bootstrap}
Requires:       perl(URI)
Requires:       perl(URI::Escape)
%endif
Requires:       perl(User::pwent)
# Optional but higly recommended:
%if %{without perl_bootstrap}
Requires:       perl(Archive::Zip)
Requires:       perl(Compress::Bzip2)
Requires:       perl(CPAN::Meta) >= 2.110.350
%endif
Requires:       perl(Compress::Zlib)
Requires:       perl(Digest::MD5)
# CPAN encourages Digest::SHA strongly because of integrity checks
Requires:       perl(Digest::SHA)
Requires:       perl(Dumpvalue)
Requires:       perl(ExtUtils::CBuilder)
%if %{without perl_bootstrap}
# Avoid circular deps local::lib -> Module::Install -> CPAN when bootstraping
# local::lib recommended by CPAN::FirstTime default choice, bug #1122498
Requires:       perl(local::lib)
%endif
# FIXME is this actually a hard requirement?
Requires:       perl(Module::Build)
%if %{without perl_bootstrap}
Requires:       perl(Text::Glob)
%endif
Requires:       %perl_compat
Provides:       cpan = %{version}
%if %{with perl_bootstrap}
%gendep_perl_CPAN
%endif
BuildArch:      noarch

%description CPAN
The CPAN module automates or at least simplifies the make and install of
perl modules and extensions. It includes some primitive searching
capabilities and knows how to use LWP, HTTP::Tiny, Net::FTP and certain
external download clients to fetch distributions from the net.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package CPAN-Meta
Summary:        Distribution metadata for a CPAN dist
Epoch:          0
Version:        2.150010
License:        GPL+ or Artistic
Requires:       %perl_compat
Requires:       perl(CPAN::Meta::YAML) >= 0.011
Requires:       perl(Encode)
Requires:       perl(JSON::PP) >= 2.27300
%if %{with perl_bootstrap}
%gendep_perl_CPAN_Meta
%endif
BuildArch:      noarch

%description CPAN-Meta
Software distributions released to the CPAN include a META.json or, for
older distributions, META.yml, which describes the distribution, its
contents, and the requirements for building and installing the
distribution. The data structure stored in the META.json file is described
in CPAN::Meta::Spec.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package CPAN-Meta-Requirements
Summary:        Set of version requirements for a CPAN dist
Epoch:          0
# Real version 2.140
Version:        2.140
License:        GPL+ or Artistic
Requires:       %perl_compat
BuildArch:      noarch
# CPAN-Meta-Requirements used to have six decimal places
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(CPAN::Meta::Requirements\\)
Provides:       perl(CPAN::Meta::Requirements) = %{version}000
%if %{with perl_bootstrap}
%gendep_perl_CPAN_Meta_Requirements
%endif

%description CPAN-Meta-Requirements
A CPAN::Meta::Requirements object models a set of version constraints like
those specified in the META.yml or META.json files in CPAN distributions.
It can be built up by adding more and more constraints, and it will reduce
them to the simplest representation.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package CPAN-Meta-YAML
Version:        0.018
Epoch:          0
Summary:        Read and write a subset of YAML for CPAN Meta files
License:        GPL+ or Artistic
BuildArch:      noarch
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_CPAN_Meta_YAML
%endif

%description CPAN-Meta-YAML
This module implements a subset of the YAML specification for use in reading
and writing CPAN metadata files like META.yml and MYMETA.yml. It should not be
used for any other general YAML parsing or generation task.
%endif


%if %{dual_life} || %{rebuild_from_scratch}
%package Data-Dumper
Summary:        Stringify perl data structures, suitable for printing and eval
License:        GPL+ or Artistic
Epoch:          0
Version:        2.174
Requires:       %perl_compat
Requires:       perl(Scalar::Util)
Requires:       perl(XSLoader)
%if %{with perl_bootstrap}
%gendep_perl_Data_Dumper
%endif

%description Data-Dumper
Given a list of scalars or reference variables, writes out their contents
in perl syntax. The references can also be objects. The content of each
variable is output in a single Perl statement. Handles self-referential
structures correctly.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package DB_File
Summary:        Perl5 access to Berkeley DB version 1.x
License:        GPL+ or Artistic
Epoch:          0
Version:        1.843
Requires:       %perl_compat
Requires:       perl(Fcntl)
Requires:       perl(XSLoader)
%if %{with perl_bootstrap}
%gendep_perl_DB_File
%endif
Conflicts:      perl < 4:5.16.3-264

%description DB_File
DB_File is a module which allows Perl programs to make use of the facilities
provided by Berkeley DB version 1.x (if you have a newer version of DB, you
will be limited to functionality provided by interface of version 1.x). The
interface defined here mirrors the Berkeley DB interface closely.
%endif

%package Devel-Peek
Summary:        A data debugging tool for the XS programmer
License:        GPL+ or Artistic
Epoch:          0
Version:        1.28
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Devel_Peek
%endif
Conflicts:      perl < 4:5.22.0-351

%description Devel-Peek
Devel::Peek contains functions which allows raw Perl datatypes to be
manipulated from a Perl script. This is used by those who do XS programming to
check that the data they are sending from C to Perl looks as they think it
should look.

%if %{dual_life} || %{rebuild_from_scratch}
%package Devel-PPPort
Summary:        Perl Pollution Portability header generator
License:        GPL+ or Artistic
Epoch:          0
Version:        3.52
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Devel_PPPort
%endif
Conflicts:      perl < 4:5.20.1-310

%description Devel-PPPort
Perl's API has changed over time, gaining new features, new functions,
increasing its flexibility, and reducing the impact on the C name space
environment (reduced pollution). The header file written by this module,
typically ppport.h, attempts to bring some of the newer Perl API features
to older versions of Perl, so that you can worry less about keeping track
of old releases, but users can still reap the benefit.
%endif

%package Devel-SelfStubber
Summary:        Generate stubs for a SelfLoading module
License:        GPL+ or Artistic
Epoch:          0
Version:        1.06
BuildArch:      noarch
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Devel_SelfStubber
%endif
Conflicts:      perl < 4:5.22.0-351

%description Devel-SelfStubber
Devel::SelfStubber prints the stubs you need to put in the module before the
__DATA__ token (or you can get it to print the entire module with stubs
correctly placed). The stubs ensure that if a method is called, it will get
loaded. They are needed specifically for inherited autoloaded methods.

%if %{dual_life} || %{rebuild_from_scratch}
%package Digest
Summary:        Modules that calculate message digests
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          0
Version:        1.17.01
BuildArch:      noarch
Requires:       %perl_compat
Requires:       perl(MIME::Base64)
%if %{with perl_bootstrap}
%gendep_perl_Digest
%endif

%description Digest
The Digest:: modules calculate digests, also called "fingerprints" or
"hashes", of some data, called a message. The digest is (usually)
some small/fixed size string. The actual size of the digest depend of
the algorithm used. The message is simply a sequence of arbitrary
bytes or bits.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Digest-MD5
Summary:        Perl interface to the MD5 Algorithm
License:        (GPL+ or Artistic) and BSD
# Epoch bump for clean upgrade over old standalone package
Epoch:          0
Version:        2.55
Requires:       %perl_compat
Requires:       perl(XSLoader)
# Recommended
Requires:       perl(Digest::base) >= 1.00
%if %{with perl_bootstrap}
%gendep_perl_Digest_MD5
%endif

%description Digest-MD5
The Digest::MD5 module allows you to use the RSA Data Security Inc. MD5
Message Digest algorithm from within Perl programs. The algorithm takes as
input a message of arbitrary length and produces as output a 128-bit
"fingerprint" or "message digest" of the input.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Digest-SHA
Summary:        Perl extension for SHA-1/224/256/384/512
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        6.02
Requires:       %perl_compat
Requires:       perl(Carp)
# Recommended
Requires:       perl(Digest::base)
%if %{with perl_bootstrap}
%gendep_perl_Digest_SHA
%endif

%description Digest-SHA
Digest::SHA is a complete implementation of the NIST Secure Hash
Standard.  It gives Perl programmers a convenient way to calculate
SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 message digests.  The
module can handle all types of input, including partial-byte data.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Encode
Summary:        Character encodings in Perl
License:        (GPL+ or Artistic) and Artistic 2.0 and UCD
Epoch:          4
Version:        3.01
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Encode
%endif

%description Encode
The Encode module provides the interface between Perl strings and the rest
of the system. Perl strings are sequences of characters.

%package encoding
Summary:        Write your Perl script in non-ASCII or non-UTF-8
License:        GPL+ or Artistic
Epoch:          4
Version:        2.22
# Keeping this sub-package arch-specific because it installs files into
# arch-specific directories.
Requires:       %perl_compat
Requires:       perl(Carp)
# Config not needed on perl ≥ 5.008
# Consider Filter::Util::Call as mandatory, bug #1165183, CPAN RT#100427
Requires:       perl(Filter::Util::Call)
# I18N::Langinfo is optional
# PerlIO::encoding is optional
Requires:       perl(utf8)
%if %{with perl_bootstrap}
%gendep_perl_encoding
%endif
Conflicts:      perl-Encode < 2:2.60-314

%description encoding
With the encoding pragma, you can write your Perl script in any encoding you
like (so long as the Encode module supports it) and still enjoy Unicode
support.

However, this encoding module is deprecated under perl 5.18. It uses
a mechanism provided by perl that is deprecated under 5.18 and higher, and may
be removed in a future version.

The easiest and the best alternative is to write your script in UTF-8.

%package Encode-devel
Summary:        Character encodings in Perl
License:        (GPL+ or Artistic) and UCD
Epoch:          4
Version:        3.01
Requires:       %perl_compat
Requires:       %{name}-Encode = %{epoch}:%{version}-%{release}
Recommends:     perl-devel
%if %{with perl_bootstrap}
%gendep_perl_Encode_devel
%endif
BuildArch:      noarch

%description Encode-devel
enc2xs builds a Perl extension for use by Encode from either Unicode Character
Mapping files (.ucm) or Tcl Encoding Files (.enc). You can use enc2xs to add
your own encoding to perl. No knowledge of XS is necessary.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Env
Summary:        Perl module that imports environment variables as scalars or arrays
License:        GPL+ or Artistic
Epoch:          0
Version:        1.04
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Env
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.2-265

%description Env
Perl maintains environment variables in a special hash named %%ENV. For when
this access method is inconvenient, the Perl module Env allows environment
variables to be treated as scalar or array variables.
%endif

%package Errno
Summary:        System errno constants
License:        GPL+ or Artistic
Epoch:          0
Version:        1.30
Requires:       %perl_compat
# Errno.pm bakes in kernel version at build time and compares it against
# $Config{osvers} at run time. Match exact interpreter build. Bug #1393421.
Requires:       perl-libs%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_Errno
%endif
Conflicts:      perl < 4:5.22.0-351

%description Errno
"Errno" defines and conditionally exports all the error constants defined in
your system "errno.h" include file. It has a single export tag, ":POSIX",
which will export all POSIX defined error numbers.

%if %{dual_life} || %{rebuild_from_scratch}
%package experimental
Summary:        Experimental features made easy
License:        GPL+ or Artistic
Epoch:          0
Version:        0.020
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_experimental
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.20.0-303

%description experimental
This pragma provides an easy and convenient way to enable or disable
experimental features.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Exporter
Summary:        Implements default import method for modules
License:        GPL+ or Artistic
Epoch:          0
Version:        5.73
Requires:       %perl_compat
Requires:       perl(Carp) >= 1.05
%if %{with perl_bootstrap}
%gendep_perl_Exporter
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.2-265

%description Exporter
The Exporter module implements an import method which allows a module to
export functions and variables to its users' name spaces. Many modules use
Exporter rather than implementing their own import method because Exporter
provides a highly flexible interface, with an implementation optimized for
the common case.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-CBuilder
Summary:        Compile and link C code for Perl modules
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        0.280231
BuildArch:      noarch
# C and C++ compilers are highly recommended because compiling code is the
# purpose of ExtUtils::CBuilder, bug #1547165
Requires:       gcc
Requires:       gcc-c++
Requires:       perl-devel
Requires:       %perl_compat
Requires:       perl(DynaLoader)
Requires:       perl(ExtUtils::Mksymlists)
Requires:       perl(File::Spec) >= 3.13
Requires:       perl(Perl::OSType) >= 1
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_CBuilder
%endif

%description ExtUtils-CBuilder
This module can build the C portions of Perl modules by invoking the
appropriate compilers and linkers in a cross-platform manner. It was motivated
by the Module::Build project, but may be useful for other purposes as well.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-Command
Summary:        Perl routines to replace common UNIX commands in Makefiles
License:        GPL+ or Artistic
Epoch:          1
Version:        7.34
BuildArch:      noarch
Requires:       %perl_compat
Conflicts:      perl < 4:5.20.1-312
Requires:       perl(File::Find)
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_Command
%endif

%description ExtUtils-Command
This Perl module is used to replace common UNIX commands. In all cases the
functions work with @ARGV rather than taking arguments. This makes them
easier to deal with in Makefiles.
%endif

%package ExtUtils-Embed
Summary:        Utilities for embedding Perl in C/C++ applications
License:        GPL+ or Artistic
Epoch:          0
Version:        1.35
Requires:       perl-devel
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_Embed
%endif
BuildArch:      noarch

%description ExtUtils-Embed
Utilities for embedding Perl in C/C++ applications.


%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-Install
Summary:        Install files from here to there
License:        GPL+ or Artistic
Epoch:          0
Version:        2.14
BuildArch:      noarch
Requires:       %perl_compat
Requires:       perl(Data::Dumper)
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_Install
%endif

%description ExtUtils-Install
Handles the installing and uninstalling of perl modules, scripts, man
pages, etc.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-MakeMaker
Summary:        Create a module Makefile
License:        GPL+ or Artistic
Epoch:          1
Version:        7.34
# These dependencies are weak in order to relieve building noarch
# packages from perl-devel and gcc. See bug #1547165.
# If an XS module is built, the generated Makefile executes gcc.
Recommends:     gcc
# If an XS module is built, code generated from XS will be compiled and it
# includes Perl header files.
Recommends:     perl-devel
Requires:       %perl_compat
Requires:       perl(Data::Dumper)
Requires:       perl(DynaLoader)
Requires:       perl(ExtUtils::Command)
Requires:       perl(ExtUtils::Install)
Requires:       perl(ExtUtils::Manifest)
Requires:       perl(File::Find)
Requires:       perl(Getopt::Long)
# Optional Pod::Man is needed for generating manual pages from POD
Requires:       perl(Pod::Man)
Requires:       perl(POSIX)
Requires:       perl(Test::Harness)
Requires:       perl(version)
# If an XS module is compiled, xsubpp(1) is needed
Requires:       perl-ExtUtils-ParseXS
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_MakeMaker
%endif
BuildArch:      noarch

# Filter false DynaLoader provides. Versioned perl(DynaLoader) keeps
# unfiltered on perl package, no need to reinject it.
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(DynaLoader\\)\\s*$
%global __provides_exclude %__provides_exclude|^perl\\(ExtUtils::MakeMaker::_version\\)

%description ExtUtils-MakeMaker
Create a module Makefile.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-Manifest
Summary:        Utilities to write and check a MANIFEST file
License:        GPL+ or Artistic
Epoch:          0
Version:        1.70
Requires:       %perl_compat
Requires:       perl(File::Path)
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_Manifest
%endif
BuildArch:      noarch

%description ExtUtils-Manifest
%{summary}.
%endif

%package ExtUtils-Miniperl
Summary:        Write the C code for perlmain.c
License:        GPL+ or Artistic
Epoch:          0
Version:        1.09
Requires:       perl-devel
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_Miniperl
%endif
BuildArch:      noarch

%description ExtUtils-Miniperl
writemain() takes an argument list of directories containing archive libraries
that relate to perl modules and should be linked into a new perl binary. It
writes a corresponding perlmain.c file that is a plain C file containing all
the bootstrap code to make the If the first argument to writemain() is a
reference to a scalar it is used as the filename to open for ouput. Any other
reference is used as the filehandle to write to. Otherwise output defaults to
STDOUT.

%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-MM-Utils
Summary:        ExtUtils::MM methods without dependency on ExtUtils::MakeMaker
License:        GPL+ or Artistic
Epoch:          1
# Real version 7.11_06
# Dual-life ExtUtils-MakeMaker generate it with its version
Version:        7.24
BuildArch:      noarch
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_MM_Utils
%endif

%description ExtUtils-MM-Utils
This is a collection of ExtUtils::MM subroutines that are used by many
other modules but that do not need full-featured ExtUtils::MakeMaker. The
issue with ExtUtils::MakeMaker is it pulls in Perl header files and that
is an overkill for small subroutines.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package ExtUtils-ParseXS
Summary:        Module and a script for converting Perl XS code into C code
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        3.40
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_ExtUtils_ParseXS
%endif
BuildArch:      noarch

%description ExtUtils-ParseXS
ExtUtils::ParseXS will compile XS code into C code by embedding the constructs
necessary to let C functions manipulate Perl values and creates the glue
necessary to let Perl access those functions.
%endif


%if %{dual_life} || %{rebuild_from_scratch}
%package File-Fetch
Summary:        Generic file fetching mechanism
License:        GPL+ or Artistic
Epoch:          0
Version:        0.56
Requires:       perl(IPC::Cmd) >= 0.36
Requires:       perl(Module::Load::Conditional) >= 0.04
Requires:       perl(Params::Check) >= 0.07
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_File_Fetch
%endif
BuildArch:      noarch

%description File-Fetch
File::Fetch is a generic file fetching mechanism.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package File-Path
Summary:        Create or remove directory trees
License:        GPL+ or Artistic
Epoch:          0
Version:        2.16
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_File_Path
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.2-265

%description File-Path
This module provides a convenient way to create directories of arbitrary
depth and to delete an entire directory subtree from the file system.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package File-Temp
Summary:        Return name and handle of a temporary file safely
License:        GPL+ or Artistic
Epoch:          0
Version:        0.2309
Requires:       %perl_compat
BuildArch:      noarch
Requires:       perl(File::Path) >= 2.06
Requires:       perl(POSIX)
%if %{with perl_bootstrap}
%gendep_perl_File_Temp
%endif
Conflicts:      perl < 4:5.16.2-265

%description File-Temp
File::Temp can be used to create and open temporary files in a safe way.
There is both a function interface and an object-oriented interface. The
File::Temp constructor or the tempfile() function can be used to return the
name and the open file handle of a temporary file. The tempdir() function
can be used to create a temporary directory.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
# FIXME Filter-Simple? version?
%package Filter
Summary:        Perl source filters
License:        GPL+ or Artistic
Epoch:          2
Version:        1.55
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Filter
%endif

%description Filter
Source filters alter the program text of a module before Perl sees it, much as
a C preprocessor alters the source text of a C program before the compiler
sees it.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Filter-Simple
Summary:        Simplified Perl source filtering
License:        GPL+ or Artistic
Epoch:          0
Version:        0.95
BuildArch:      noarch
Requires:       %perl_compat
Conflicts:      perl < 4:5.20.1-312
Requires:       perl(Text::Balanced) >= 1.97
Requires:       perl(warnings)
%if %{with perl_bootstrap}
%gendep_perl_Filter_Simple
%endif

%description Filter-Simple
The Filter::Simple Perl module provides a simplified interface to
Filter::Util::Call; one that is sufficient for most common cases.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Getopt-Long
Summary:        Extended processing of command line options
License:        GPLv2+ or Artistic
Epoch:          1
Version:        2.50
Requires:       %perl_compat
Requires:       perl(overload)
Requires:       perl(Text::ParseWords)
# Recommended:
Requires:       perl(Pod::Usage) >= 1.14
%if %{with perl_bootstrap}
%gendep_perl_Getopt_Long
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.3-268

%description Getopt-Long
The Getopt::Long module implements an extended getopt function called
GetOptions(). It parses the command line from @ARGV, recognizing and removing
specified options and their possible values.  It adheres to the POSIX syntax
for command line options, with GNU extensions. In general, this means that
options have long names instead of single letters, and are introduced with
a double dash "--". Support for bundling of command line options, as was the
case with the more traditional single-letter approach, is provided but not
enabled by default.
%endif

%package IO
Summary:        Perl input/output modules
License:        GPL+ or Artistic
Epoch:          0
Version:        1.40
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_IO
%endif

%description IO
This is a collection of Perl input/output modules.

%if %{dual_life} || %{rebuild_from_scratch}
%package IO-Compress
Summary:        IO::Compress wrapper for modules
License:        GPL+ or Artistic
Epoch:          0
Version:        2.084
Requires:       %perl_compat
Obsoletes:      perl-Compress-Zlib <= 2.020
Provides:       perl(IO::Uncompress::Bunzip2)
%if %{with perl_bootstrap}
%gendep_perl_IO_Compress
%endif
BuildArch:      noarch

%description IO-Compress
This module is the base class for all IO::Compress and IO::Uncompress modules.
This module is not intended for direct use in application code. Its sole
purpose is to to be sub-classed by IO::Compress modules.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package IO-Socket-IP
Summary:        Drop-in replacement for IO::Socket::INET supporting both IPv4 and IPv6
License:        GPL+ or Artistic
Epoch:          0
Version:        0.39
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_IO_Socket_IP
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.20.0-303

%description IO-Socket-IP
This module provides a protocol-independent way to use IPv4 and IPv6
sockets, as a drop-in replacement for IO::Socket::INET. Most constructor
arguments and methods are provided in a backward-compatible way.
%endif

%package IO-Zlib
Summary:        Perl IO:: style interface to Compress::Zlib
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        1.10
Requires:       perl(Compress::Zlib)
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_IO_Zlib
%endif
BuildArch:      noarch

%description IO-Zlib
This modules provides an IO:: style interface to the Compress::Zlib package.
The main advantage is that you can use an IO::Zlib object in much the same way
as an IO::File object so you can have common code that doesn't know which sort
of file it is using.


%if %{dual_life} || %{rebuild_from_scratch}
%package IPC-Cmd
Summary:        Finding and running system commands made easy
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          2
Version:        1.02
Requires:       perl(ExtUtils::MM::Utils)
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_IPC_Cmd
%endif
BuildArch:      noarch

%description IPC-Cmd
IPC::Cmd allows you to run commands, interactively if desired, in a platform
independent way, but have them still work.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package IPC-SysV
Summary:        Object interface to System V IPC
License:        GPL+ or Artistic
Epoch:          0
Version:        2.07
Requires:       %perl_compat
Requires:       perl(DynaLoader)
%if %{with perl_bootstrap}
%gendep_perl_IPC_SysV
%endif
Conflicts:      perl < 4:5.22.0-351

%description IPC-SysV
This is an object interface for System V messages, semaphores, and
inter-process calls.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package HTTP-Tiny
Summary:        A small, simple, correct HTTP/1.1 client
License:        GPL+ or Artistic
Epoch:          0
Version:        0.076
Requires:       perl(bytes)
Requires:       perl(Carp)
Requires:       perl(IO::Socket)
Requires:       perl(Time::Local)
%if %{with perl_bootstrap}
%gendep_perl_HTTP_Tiny
%endif
BuildArch:      noarch

%description HTTP-Tiny
This is a very simple HTTP/1.1 client, designed primarily for doing simple GET
requests without the overhead of a large framework like LWP::UserAgent.
It is more correct and more complete than HTTP::Lite. It supports proxies
(currently only non-authenticating ones) and redirection. It also correctly
resumes after EINTR.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package JSON-PP
Summary:        JSON::XS compatible pure-Perl module
Epoch:          1
Version:        4.02
License:        GPL+ or Artistic
BuildArch:      noarch
Requires:       %perl_compat
Requires:       perl(Data::Dumper)
Requires:       perl(Encode)
Requires:       perl(Math::BigFloat)
Requires:       perl(Math::BigInt)
Requires:       perl(Scalar::Util)
Requires:       perl(subs)
%if %{with perl_bootstrap}
%gendep_perl_JSON_PP
%endif
Conflicts:      perl-JSON < 2.50

%description JSON-PP
JSON::XS is the fastest and most proper JSON module on CPAN. It is written by
Marc Lehmann in C, so must be compiled and installed in the used environment.
JSON::PP is a pure-Perl module and is compatible with JSON::XS.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package libnet
Summary:        Perl clients for various network protocols
License:        (GPL+ or Artistic) and Artistic
Epoch:          0
Version:        3.11
Requires:       %perl_compat
Requires:       perl(File::Basename)
Requires:       perl(IO::Socket) >= 1.05
# Prefer IO::Socket::IP over IO::Socket::INET6 and IO::Socket::INET
Requires:       perl(IO::Socket::IP) >= 0.20
Requires:       perl(POSIX)
Requires:       perl(Socket) >= 2.016
Requires:       perl(utf8)
%if %{with perl_bootstrap}
%gendep_perl_libnet
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

%description libnet
This is a collection of Perl modules which provides a simple and
consistent programming interface (API) to the client side of various
protocols used in the internet community.
%endif

%package libnetcfg
Summary:        Configure libnet
License:        GPL+ or Artistic
Epoch:          %perl_epoch
Version:        %perl_version
# Net::Config is optional
BuildArch:      noarch
%if %{with perl_bootstrap}
%gendep_perl_libnetcfg
%endif
Conflicts:      perl-devel < 4:5.22.0-347

%description libnetcfg
The libnetcfg utility can be used to configure the libnet.

%if %{dual_life} || %{rebuild_from_scratch}
%package Locale-Maketext
Summary:        Framework for localization
License:        GPL+ or Artistic
Epoch:          0
Version:        1.29
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Locale_Maketext
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.3-268

%description Locale-Maketext
It is a common feature of applications (whether run directly, or via the Web)
for them to be "localized" -- i.e., for them to present an English interface
to an English-speaker, a German interface to a German-speaker, and so on for
all languages it's programmed with. Locale::Maketext is a framework for
software localization; it provides you with the tools for organizing and
accessing the bits of text and text-processing code that you need for
producing localized applications.
%endif

%package Locale-Maketext-Simple
Summary:        Simple interface to Locale::Maketext::Lexicon
License:        MIT
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        0.21.01
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Locale_Maketext_Simple
%endif
BuildArch:      noarch

%description Locale-Maketext-Simple
This module is a simple wrapper around Locale::Maketext::Lexicon, designed
to alleviate the need of creating Language Classes for module authors.

%if %{dual_life} || %{rebuild_from_scratch}
%package Math-BigInt
Summary:        Arbitrary-size integer and float mathematics
License:        GPL+ or Artistic
Epoch:          1
# Real version 1.999837
Version:        1.9998.37
Requires:       %perl_compat
Requires:       perl(Carp)
# File::Spec not used on recent perl
%if %{with perl_bootstrap}
%gendep_perl_Math_BigInt
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

# Do not export unversioned module
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(Math::BigInt\\)\\s*$

%description Math-BigInt
This provides Perl modules for arbitrary-size integer and float mathematics.

%package Math-BigInt-FastCalc
Summary:        Math::BigInt::Calc XS implementation
License:        GPL+ or Artistic
Epoch:          0
# Version normalized to dot format
# Real version 0.5008
Version:        0.500.800
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Math_BigInt_FastCalc
%endif
Conflicts:      perl < 4:5.22.0-348

%description Math-BigInt-FastCalc
This package provides support for faster big integer calculations.

%package Math-BigRat
Summary:        Arbitrary big rational numbers
License:        GPL+ or Artistic
Epoch:          0
Version:        0.2614
Requires:       %perl_compat
Requires:       perl(Math::BigInt)
%if %{with perl_bootstrap}
%gendep_perl_Math_BigRat
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-348

%description Math-BigRat
Math::BigRat complements Math::BigInt and Math::BigFloat by providing support
for arbitrary big rational numbers.
%endif

%package Math-Complex
Summary:        Complex numbers and trigonometric functions
License:        GPL+ or Artistic
Epoch:          0
Version:        1.59.01
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Math_Complex
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-348

%description Math-Complex
This package lets you create and manipulate complex numbers. By default, Perl
limits itself to real numbers, but an extra "use" statement brings full
complex support, along with a full set of mathematical functions typically
associated with and/or extended to complex numbers.

%package Memoize
Summary:        Transparently speed up functions by caching return values
License:        GPL+ or Artistic
Epoch:          0
Version:        1.03.01
Requires:       %perl_compat
# Keep Time::HiRes optional
%if %{with perl_bootstrap}
%gendep_perl_Memoize
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-350

%description Memoize
Memoizing a function makes it faster by trading space for time. It does
this by caching the return values of the function in a table. If you call
the function again with the same arguments, memoize jumps in and gives
you the value out of the table, instead of letting the function compute
the value all over again.

%if %{dual_life} || %{rebuild_from_scratch}
%package MIME-Base64
Summary:        Encoding and decoding of Base64 and quoted-printable strings
# cpan/MIME-Base64/Base64.xs:   (GPL+ or Artistic) and MIT (Bellcore's part)
# Other files:                  GPL+ or Artistic
License:        (GPL+ or Artistic) and MIT
Epoch:          0
Version:        3.15
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_MIME_Base64
%endif
Conflicts:      perl < 4:5.22.0-347

%description MIME-Base64
This package contains a Base64 encoder/decoder and a quoted-printable
encoder/decoder. These encoding methods are specified in RFC 2045 - MIME
(Multipurpose Internet Mail Extensions).
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Module-CoreList
Summary:        What modules are shipped with versions of perl
License:        GPL+ or Artistic
Epoch:          1
Version:        5.20190522
Requires:       %perl_compat
Requires:       perl(List::Util)
Requires:       perl(version) >= 0.88
%if %{with perl_bootstrap}
%gendep_perl_Module_CoreList
%endif
BuildArch:      noarch

%description Module-CoreList
Module::CoreList provides information on which core and dual-life modules
are shipped with each version of perl.


%package Module-CoreList-tools
Summary:        Tool for listing modules shipped with perl
License:        GPL+ or Artistic
Epoch:          1
Version:        5.20190522
Requires:       %perl_compat
Requires:       perl(feature)
Requires:       perl(version) >= 0.88
Requires:       perl-Module-CoreList = %{epoch}:%{version}-%{release}
%if %{with perl_bootstrap}
%gendep_perl_Module_CoreList_tools
%endif
# The files were distributed with perl.spec's subpackage
# perl-Module-CoreList <= 1:5.020001-309
Conflicts:      perl-Module-CoreList < 1:5.020001-310
BuildArch:      noarch

%description Module-CoreList-tools
This package provides a corelist(1) tool which can be used to query what
modules were shipped with given perl version.
%endif


%if %{dual_life} || %{rebuild_from_scratch}
%package Module-Load
Summary:        Runtime require of both modules and files
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        0.34
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Module_Load
%endif
BuildArch:      noarch

%description Module-Load
Module::Load eliminates the need to know whether you are trying to require
either a file or a module.
%endif


%if %{dual_life} || %{rebuild_from_scratch}
%package Module-Load-Conditional
Summary:        Looking up module information / loading at runtime
License:        GPL+ or Artistic
Epoch:          0
Version:        0.68
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Module_Load_Conditional
%endif
BuildArch:      noarch

%description Module-Load-Conditional
Module::Load::Conditional provides simple ways to query and possibly load any
of the modules you have installed on your system during runtime.
%endif


%package Module-Loaded
Summary:        Mark modules as loaded or unloaded
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        0.08
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Module_Loaded
%endif
BuildArch:      noarch

%description Module-Loaded
When testing applications, often you find yourself needing to provide
functionality in your test environment that would usually be provided by
external modules. Rather than munging the %%INC by hand to mark these external
modules as loaded, so they are not attempted to be loaded by perl, this module
offers you a very simple way to mark modules as loaded and/or unloaded.


%if %{dual_life} || %{rebuild_from_scratch}
%package Module-Metadata
Summary:        Gather package and POD information from perl module files
Epoch:          0
Version:        1.000036
License:        GPL+ or Artistic
BuildArch:      noarch
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Module_Metadata
%endif

%description Module-Metadata
Gather package and POD information from perl module files
%endif

%package Net-Ping
Summary:        Check a remote host for reachability
License:        GPL+ or Artistic
Epoch:          0
Version:        2.71
Requires:       %perl_compat
# Keep Net::Ping::External optional
%if %{with perl_bootstrap}
%gendep_perl_Net_Ping
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-350

%description Net-Ping
Net::Ping module contains methods to test the reachability of remote hosts on
a network.

%package open
Summary:        Perl pragma to set default PerlIO layers for input and output
License:        GPL+ or Artistic
Epoch:          0
Version:        1.11
Requires:       %perl_compat
Requires:       perl(Carp)
Requires:       perl(Encode)
Requires:       perl(encoding)
%if %{with perl_bootstrap}
%gendep_perl_open
%endif
Conflicts:      perl < 4:5.20.2-326
BuildArch:      noarch

%description open
The "open" pragma serves as one of the interfaces to declare default "layers"
(also known as "disciplines") for all I/O.

%if %{dual_life} || %{rebuild_from_scratch}
%package parent
Summary:        Establish an ISA relationship with base classes at compile time
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        0.237
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_parent
%endif
BuildArch:      noarch

%description parent
parent allows you to both load one or more modules, while setting up
inheritance from those modules at the same time. Mostly similar in effect to:

    package Baz;

    BEGIN {
        require Foo;
        require Bar;

        push @ISA, qw(Foo Bar);
    }
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Params-Check
Summary:        Generic input parsing/checking mechanism
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        0.38
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Params_Check
%endif
BuildArch:      noarch

%description Params-Check
Params::Check is a generic input parsing/checking mechanism.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package PathTools
Summary:        PathTools Perl module (Cwd, File::Spec)
License:        (GPL+ or Artistic) and BSD
Epoch:          0
# Converted from 3.76
Version:        3.760
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_PathTools
%endif

%description PathTools
PathTools Perl module (Cwd, File::Spec).
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package perlfaq
Summary:        Frequently asked questions about Perl
# Code examples are Public Domain
License:        (GPL+ or Artistic) and Public Domain
Epoch:          0
Version:        5.20190126
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_perlfaq
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

%description perlfaq
The perlfaq comprises several documents that answer the most commonly asked
questions about Perl and Perl programming.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package PerlIO-via-QuotedPrint
Summary:        PerlIO layer for quoted-printable strings
License:        GPL+ or Artistic
Epoch:          0
Version:        0.08
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_PerlIO_via_QuotedPrint
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

%description PerlIO-via-QuotedPrint
This module implements a PerlIO layer that works on files encoded in the
quoted-printable format. It will decode from quoted-printable while
reading from a handle, and it will encode as quoted-printable while
writing to a handle.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Perl-OSType
Summary:        Map Perl operating system names to generic types
Version:        1.010
Epoch:          0
License:        GPL+ or Artistic
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Perl_OSType
%endif
BuildArch:      noarch

%description Perl-OSType
Modules that provide OS-specific behaviors often need to know if the current
operating system matches a more generic type of operating systems. For example,
'linux' is a type of 'Unix' operating system and so is 'freebsd'.
This module provides a mapping between an operating system name as given by $^O
and a more generic type. The initial version is based on the OS type mappings
provided in Module::Build and ExtUtils::CBuilder (thus, Microsoft operating
systems are given the type 'Windows' rather than 'Win32').
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Pod-Checker
Summary:        Check POD documents for syntax errors
Epoch:          4
Version:        1.73
License:        GPL+ or Artistic
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Pod_Checker
%endif
BuildArch:      noarch

%description Pod-Checker
Module and tools to verify POD documentation contents for compliance with the
Plain Old Documentation format specifications.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Pod-Escapes
Summary:        Resolve POD escape sequences
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        1.07
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Pod_Escapes
%endif
BuildArch:      noarch

%description Pod-Escapes
This module provides things that are useful in decoding Pod E<...> sequences.
%endif

%package Pod-Html
Summary:        Convert POD files to HTML
License:        GPL+ or Artistic
Epoch:          0
# Real version 1.24
Version:        1.24
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Pod_Html
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-350

%description Pod-Html
This package converts files from POD format (see perlpod) to HTML format. It
can automatically generate indexes and cross-references, and it keeps a cache
of things it knows how to cross-reference.

%if %{dual_life} || %{rebuild_from_scratch}
%package Pod-Perldoc
Summary:        Look up Perl documentation in Pod format
License:        GPL+ or Artistic
Epoch:          0
Version:        3.2801
%if %{with perl_enables_groff}
# Pod::Perldoc::ToMan executes roff
Requires:       groff-base
%endif
Requires:       %perl_compat
Requires:       perl(File::Temp) >= 0.22
Requires:       perl(HTTP::Tiny)
Requires:       perl(IO::Handle)
Requires:       perl(IPC::Open3)
# POD2::Base is optional
# Pod::Checker is not needed if Pod::Simple::Checker is available
Requires:       perl(Pod::Simple::Checker)
Requires:       perl(Pod::Simple::RTF) >= 3.16
Requires:       perl(Pod::Simple::XMLOutStream) >= 3.16
Requires:       perl(Text::ParseWords)
# Tk is optional
Requires:       perl(Symbol)
%if %{with perl_bootstrap}
%gendep_perl_Pod_Perldoc
%endif
BuildArch:      noarch

%description Pod-Perldoc
perldoc looks up a piece of documentation in .pod format that is embedded
in the perl installation tree or in a perl script, and displays it via
"groff -man | $PAGER". This is primarily used for the documentation for
the perl library modules.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Pod-Simple
Summary:        Framework for parsing POD documentation
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          1
Version:        3.35
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Pod_Simple
%endif
BuildArch:      noarch

%description Pod-Simple
Pod::Simple is a Perl library for parsing text in the Pod ("plain old
documentation") markup language that is typically used for writing
documentation for Perl and for Perl modules.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Pod-Usage
Summary:        Print a usage message from embedded pod documentation
License:        GPL+ or Artistic
Epoch:          4
Version:        1.69
Requires:       %perl_compat
# Pod::Usage executes perldoc from perl-Pod-Perldoc by default
Requires:       perl-Pod-Perldoc
Requires:       perl(Pod::Text)
%if %{with perl_bootstrap}
%gendep_perl_Pod_Usage
%endif
BuildArch:      noarch

%description Pod-Usage
pod2usage will print a usage message for the invoking script (using its
embedded POD documentation) and then exit the script with the desired exit
status. The usage message printed may have any one of three levels of
"verboseness": If the verbose level is 0, then only a synopsis is printed.
If the verbose level is 1, then the synopsis is printed along with a
description (if present) of the command line options and arguments. If the
verbose level is 2, then the entire manual page is printed.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package podlators
Summary:        Format POD source into various output formats
License:        (GPL+ or Artistic) and MIT
Epoch:          0
Version:        4.11
BuildArch:      noarch
Requires:       %perl_compat
Requires:       perl(File::Spec) >= 0.8
Requires:       perl(Pod::Simple) >= 3.06
%if %{with perl_bootstrap}
%gendep_perl_podlators
%endif
Conflicts:      perl < 4:5.16.1-234

%description podlators
This package contains Pod::Man and Pod::Text modules which convert POD input
to *roff source output, suitable for man pages, or plain text.  It also
includes several sub-classes of Pod::Text for formatted output to terminals
with various capabilities.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Scalar-List-Utils
Summary:        A selection of general-utility scalar and list subroutines
License:        GPL+ or Artistic
Epoch:          3
# Real version 1.50
Version:        1.50
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Scalar_List_Utils
%endif

%description Scalar-List-Utils
Scalar::Util and List::Util contain a selection of subroutines that people have
expressed would be nice to have in the perl core, but the usage would not
really be high enough to warrant the use of a keyword, and the size so small
such that being individual extensions would be wasteful.
%endif

%package SelfLoader
Summary:        Load functions only on demand
License:        GPL+ or Artistic
Epoch:          0
Version:        1.25
BuildArch:      noarch
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_SelfLoader
%endif
Conflicts:      perl < 4:5.22.0-351

%description SelfLoader
This Perl module tells its users that functions in a package are to be
autoloaded from after the "__DATA__" token. See also "Autoloading" in
perlsub.

%if %{dual_life} || %{rebuild_from_scratch}
%package Socket
Summary:        C socket.h defines and structure manipulators
License:        GPL+ or Artistic
Epoch:          4
Version:        2.027
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Socket
%endif

%description Socket
This module is just a translation of the C socket.h file.  Unlike the old
mechanism of requiring a translated socket.ph file, this uses the h2xs program
(see the Perl source distribution) and your native C compiler.  This means
that it has a far more likely chance of getting the numbers right.  This
includes all of the commonly used pound-defines like AF_INET, SOCK_STREAM, etc.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Storable
Summary:        Persistence for Perl data structures
License:        GPL+ or Artistic
Epoch:          1
Version:        3.15
Requires:       %perl_compat
# Carp substitutes missing Log::Agent
Requires:       perl(Carp)
Requires:       perl(Config)
# Fcntl is optional, but locking is good
Requires:       perl(Fcntl)
Requires:       perl(IO::File)
%if %{with perl_bootstrap}
%gendep_perl_Storable
%endif
Conflicts:      perl < 4:5.16.3-274

%description Storable
The Storable package brings persistence to your Perl data structures
containing scalar, array, hash or reference objects, i.e. anything that
can be conveniently stored to disk and retrieved at a later time.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Sys-Syslog
Summary:        Perl interface to the UNIX syslog(3) calls
License:        GPL+ or Artistic
Epoch:          0
Version:        0.35
Requires:       %perl_compat
Requires:       perl(XSLoader)
%if %{with perl_bootstrap}
%gendep_perl_Sys_Syslog
%endif
Conflicts:      perl < 4:5.16.3-269

%description Sys-Syslog
Sys::Syslog is an interface to the UNIX syslog(3) function. Call syslog() with
a string priority and a list of printf() arguments just like at syslog(3).
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Term-ANSIColor
Summary:        Color screen output using ANSI escape sequences
License:        GPL+ or Artistic
Epoch:          0
Version:        4.06
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_Term_ANSIColor
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.18.2-302

%description Term-ANSIColor
This module has two interfaces, one through color() and colored() and the
other through constants. It also offers the utility functions uncolor(),
colorstrip(), colorvalid(), and coloralias(), which have to be explicitly
imported to be used.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Term-Cap
Summary:        Perl termcap interface
License:        GPL+ or Artistic
Epoch:          0
Version:        1.17
Requires:       %perl_compat
# ncurses for infocmp tool
Requires:       ncurses
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_Term_Cap
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

%description Term-Cap
These are low-level functions to extract and use capabilities from a terminal
capability (termcap) database.
%endif

%package Test
Summary:        Simple framework for writing test scripts
License:        GPL+ or Artistic
Epoch:          0
Version:        1.31
Requires:       %perl_compat
# Algorithm::Diff 1.15 is optional
Requires:       perl(File::Temp)
%if %{with perl_bootstrap}
%gendep_perl_Test
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-351

%description Test
The Test Perl module simplifies the task of writing test files for Perl modules,
such that their output is in the format that Test::Harness expects to see.

%if %{dual_life} || %{rebuild_from_scratch}
%package Test-Harness
Summary:        Run Perl standard test scripts with statistics
License:        GPL+ or Artistic
Epoch:          1
Version:        3.42
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Test_Harness
%endif
BuildArch:      noarch

%description Test-Harness
Run Perl standard test scripts with statistics.
Use TAP::Parser, Test::Harness package was whole rewritten.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Test-Simple
Summary:        Basic utilities for writing tests
License:        (GPL+ or Artistic) and CC0 and Public Domain
Epoch:          1
Version:        1.302162
Requires:       %perl_compat
Requires:       perl(Data::Dumper)
%if %{with perl_bootstrap}
%gendep_perl_Test_Simple
%endif
BuildArch:      noarch

%description Test-Simple
Basic utilities for writing tests.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Text-Balanced
Summary:        Extract delimited text sequences from strings
License:        GPL+ or Artistic
Epoch:          0
Version:        2.03
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Text_Balanced
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.22.0-347

%description Text-Balanced
These Perl subroutines may be used to extract a delimited substring, possibly
after skipping a specified prefix string.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Text-ParseWords
Summary:        Parse text into an array of tokens or array of arrays
License:        GPL+ or Artistic
Epoch:          0
Version:        3.30
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_Text_ParseWords
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.2-256

%description Text-ParseWords
Parse text into an array of tokens or array of arrays.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Text-Tabs+Wrap
Summary:        Expand tabs and do simple line wrapping
License:        TTWL
Epoch:          0
Version:        2013.0523
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Text_Tabs_Wrap
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.20.2-325

%description Text-Tabs+Wrap
Text::Tabs performs the same job that the UNIX expand(1) and unexpand(1)
commands do: adding or removing tabs from a document.

Text::Wrap::wrap() will reformat lines into paragraphs. All it does is break
up long lines, it will not join short lines together.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Thread-Queue
Summary:        Thread-safe queues
License:        GPL+ or Artistic
Epoch:          0
Version:        3.13
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_Thread_Queue
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.2-257

%description Thread-Queue
This module provides thread-safe FIFO queues that can be accessed safely by
any number of threads.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Time-HiRes
Summary:        High resolution alarm, sleep, gettimeofday, interval timers
License:        GPL+ or Artistic
Epoch:          1
Version:        1.9760
Requires:       %perl_compat
Requires:       perl(Carp)
%if %{with perl_bootstrap}
%gendep_perl_Time_HiRes
%endif
Conflicts:      perl < 4:5.16.3-271

%description Time-HiRes
The Time::HiRes module implements a Perl interface to the usleep, nanosleep,
ualarm, gettimeofday, and setitimer/getitimer system calls, in other words,
high resolution time and timers.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Time-Local
Summary:        Efficiently compute time from local and GMT time
License:        GPL+ or Artistic
Epoch:          0
# Real version 1.28
Version:        1.280
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Time_Local
%endif
BuildArch:      noarch
Conflicts:      perl < 4:5.16.3-262

%description Time-Local
This module provides functions that are the inverse of built-in perl functions
localtime() and gmtime(). They accept a date as a six-element array, and
return the corresponding time(2) value in seconds since the system epoch
(Midnight, January 1, 1970 GMT on Unix, for example). This value can be
positive or negative, though POSIX only requires support for positive values,
so dates before the system's epoch may not work on all operating systems.
%endif

%package Time-Piece
Summary:        Time objects from localtime and gmtime
License:        (GPL+ or Artistic) and BSD
Epoch:          0
# Really 1.34
Version:        1.340
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_Time_Piece
%endif

%description Time-Piece
The Time::Piece module replaces the standard localtime and gmtime functions
with implementations that return objects.  It does so in a backwards compatible
manner, so that using localtime or gmtime as documented in perlfunc still
behave as expected.

%if %{dual_life} || %{rebuild_from_scratch}
%package threads
Summary:        Perl interpreter-based threads
License:        GPL+ or Artistic
Epoch:          1
Version:        2.22
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_threads
%endif

%description threads
Since Perl 5.8, thread programming has been available using a model called
interpreter threads  which provides a new Perl interpreter for each thread,
and, by default, results in no data or state information being shared between
threads.

(Prior to Perl 5.8, 5005threads was available through the Thread.pm API. This
threading model has been deprecated, and was removed as of Perl 5.10.0.)

As just mentioned, all variables are, by default, thread local. To use shared
variables, you need to also load threads::shared.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package threads-shared
Summary:        Perl extension for sharing data structures between threads
License:        GPL+ or Artistic
Epoch:          0
Version:        1.60
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_threads_shared
%endif

%description threads-shared
By default, variables are private to each thread, and each newly created thread
gets a private copy of each existing variable. This module allows you to share
variables across different threads (and pseudo-forks on Win32). It is used
together with the threads module.  This module supports the sharing of the
following data types only: scalars and scalar refs, arrays and array refs, and
hashes and hash refs.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Unicode-Collate
Summary:        Unicode Collation Algorithm
License:        (GPL+ or Artistic) and Unicode
Epoch:          0
Version:        1.27
Requires:       %perl_compat
Requires:       perl(Unicode::Normalize)
%if %{with perl_bootstrap}
%gendep_perl_Unicode_Collate
%endif
Conflicts:      perl < 4:5.22.0-347

%description Unicode-Collate
This package is Perl implementation of Unicode Technical Standard #10 (Unicode
Collation Algorithm).
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package Unicode-Normalize
Summary:        Unicode Normalization Forms
License:        GPL+ or Artistic
Epoch:          0
Version:        1.26
Requires:       %perl_compat
# unicore/CombiningClass.pl and unicore/Decomposition.pl from perl, perl is
# auto-detected.
%if %{with perl_bootstrap}
%gendep_perl_Unicode_Normalize
%endif
Conflicts:      perl < 4:5.22.0-347

%description Unicode-Normalize
This package provides Perl functions that can convert strings into various
Unicode normalization forms as defined in Unicode Standard Annex #15.
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%package version
Summary:        Perl extension for Version Objects
License:        GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch:          6
# real version 0.9924
Version:        0.99.24
Requires:       %perl_compat
%if %{with perl_bootstrap}
%gendep_perl_version
%endif
BuildArch:      noarch

%description version
Perl extension for Version Objects.
%endif

%package disable-stack-unwinding
Summary:	Disable stack unwinding in Perl

%description disable-stack-unwinding
Disable stack unwinding in Perl

%prep
%setup -q -n perl-%{perl_version}
%autopatch -p1

%if %{without perl_bootstrap}
# Local patch tracking
perl -x patchlevel.h \
    'Fedora Patch1: Removes date check, Fedora/RHEL specific' \
    'Fedora Patch3: support for libdir64' \
    'Fedora Patch4: use libresolv instead of libbind' \
    'Fedora Patch5: USE_MM_LD_RUN_PATH' \
    'Fedora Patch6: Provide MM::maybe_command independently (bug #1129443)' \
    'Fedora Patch7: Dont run one io test due to random builder failures' \
    'Fedora Patch15: Define SONAME for libperl.so' \
    'Fedora Patch16: Install libperl.so to -Dshrpdir value' \
    'Fedora Patch26: Make *DBM_File desctructors thread-safe (RT#61912)' \
    'Fedora Patch27: Make PadlistNAMES() lvalue again (CPAN RT#101063)' \
    'Fedora Patch30: Replace EU::MakeMaker dependency with EU::MM::Utils in IPC::Cmd (bug #1129443)' \
    'Fedora Patch31: Make File::Glob more resistant against degenerative matching (RT#131211)' \
    'Fedora Patch34: Fix cloning :via handles on thread creation (RT#131221)' \
    'Fedora Patch45: Fix File::Glob rt131211.t test random failures' \
    'Fedora Patch46: Fix t/op/hash.t test random failures' \
    'Fedora Patch47: Parse caret variables with subscripts as normal variables inside ${...} escaping (RT#131664)' \
    'Fedora Patch49: Do not display too many bytes when reporting malformed UTF-8 character' \
    'Fedora Patch51: Fix error message for "our sub foo::bar" (RT#131679)' \
    'Fedora Patch52: Fix executing arybase::_tie_it() in Safe compartement (RT#131588)' \
    'Fedora Patch59: Fix an overflow in the lexer when reading a new line (RT#131793)' \
    'Fedora Patch60: Fix Term::ReadLine not to create spurious &STDERR files (RT#132008)' \
    'Fedora Patch63: Fix a crash when a match for inversely repeated group fails (RT#132017)' \
    'Fedora Patch79: Link XS modules to pthread library to fix linking with -z defs' \
    'Fedora Patch81: Fix a heap use after free when moving a stack (RT#131954)' \
    'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
    'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
    %{nil}
%endif

#copy the example script
cp -a %{SOURCE5} .

#copy Pod-Html license clarification
cp %{SOURCE6} .

#
# Candidates for doc recoding (need case by case review):
# find . -name "*.pod" -o -name "README*" -o -name "*.pm" | xargs file -i | grep charset= | grep -v '\(us-ascii\|utf-8\)'
recode()
{
    iconv -f "${2:-iso-8859-1}" -t utf-8 < "$1" > "${1}_"
    touch -r "$1" "${1}_"
    mv -f "${1}_" "$1"
}
# TODO iconv fail on this one
##recode README.tw big5
#recode pod/perlebcdic.pod
#recode pod/perlhack.pod
#recode pod/perlhist.pod
#recode pod/perlthrtut.pod
#recode AUTHORS

find . -name \*.orig -exec rm -fv {} \;

# Configure Compress::Zlib to use system zlib
sed -i 's|BUILD_ZLIB      = True|BUILD_ZLIB      = False|
    s|INCLUDE         = ./zlib-src|INCLUDE         = %{_includedir}|
    s|LIB             = ./zlib-src|LIB             = %{_libdir}|' \
    cpan/Compress-Raw-Zlib/config.in

# Ensure that we never accidentally bundle zlib or bzip2
rm -rf cpan/Compress-Raw-Zlib/zlib-src
rm -rf cpan/Compress-Raw-Bzip2/bzip2-src
sed -i '/\(bzip2\|zlib\)-src/d' MANIFEST

%if !%{with gdbm}
# Do not install anything requiring NDBM_File if NDBM is not available.
rm -rf 'cpan/Memoize/Memoize/NDBM_File.pm'
sed -i '\|cpan/Memoize/Memoize/NDBM_File.pm|d' MANIFEST
%endif

%build
echo "RPM Build arch: %{_arch}"

# use "lib", not %%{_lib}, for privlib, sitelib, and vendorlib
# To build production version, we would need -DDEBUGGING=-g

# Perl INC path (perl -V) in search order:
# - /usr/local/share/perl5            -- for CPAN     (site lib)
# - /usr/local/lib[64]/perl5          -- for CPAN     (site arch)
# - /usr/share/perl5/vendor_perl      -- 3rd party    (vendor lib)
# - /usr/lib[64]/perl5/vendor_perl    -- 3rd party    (vendor arch)
# - /usr/share/perl5                  -- Fedora       (priv lib)
# - /usr/lib[64]/perl5                -- Fedora       (arch lib)

%global privlib     %{_prefix}/share/perl5
%global archlib     %{_libdir}/perl5

%global perl_vendorlib  %{privlib}/vendor_perl
%global perl_vendorarch %{archlib}/vendor_perl

BUILD_BZIP2=0
BZIP2_LIB=%{_libdir}
export BUILD_BZIP2 BZIP2_LIB

# ldflags is not used when linking XS modules.
# Only ldflags is used when linking miniperl.
# Only ccflags and ldflags are used for Configure's compiler checks.
# Set optimize=none to prevent from injecting upstream's value.
/bin/sh Configure -des \
        -Doptimize="none" \
        -Dccflags="${CFLAGS}" \
        -Dldflags="${CFLAGS} ${LDFLAGS}" \
        -Dccdlflags="-Wl,--enable-new-dtags ${CFLAGS} ${LDFLAGS}" \
        -Dlddlflags="-shared ${CFLAGS} ${LDFLAGS}" \
        -Dshrpdir="%{_libdir}" \
        -DDEBUGGING=-g \
        -Dversion=%{perl_version} \
        -Dmyhostname=localhost \
        -Dperladmin=root@localhost \
        -Dcc='%{__cc}' \
        -Dcf_by="%{vendor}" \
        -Dprefix=%{_prefix} \
%if %{without perl_enables_groff}
        -Dman1dir="%{_mandir}/man1" \
        -Dman3dir="%{_mandir}/man3" \
%endif
        -Dvendorprefix=%{_prefix} \
        -Dsiteprefix=%{_prefix}/local \
        -Dsitelib="%{_prefix}/local/share/perl5" \
        -Dsitearch="%{_prefix}/local/%{_lib}/perl5" \
        -Dprivlib="%{privlib}" \
        -Dvendorlib="%{perl_vendorlib}" \
        -Darchlib="%{archlib}" \
        -Dvendorarch="%{perl_vendorarch}" \
        -Darchname=%{perl_archname} \
        -Dlibpth="/usr/local/lib64 /lib64 %{_prefix}/lib64" \
%ifarch sparc sparcv9
        -Ud_longdbl \
%endif
        -Duseshrplib \
        -Dusethreads \
        -Duseithreads \
%if %{with perl_enables_systemtap}
        -Dusedtrace='/usr/bin/dtrace' \
%else
        -Uusedtrace \
%endif
        -Duselargefiles \
        -Dd_semctl_semun \
        -Di_db \
%if %{with gdbm}
        -Ui_ndbm \
        -Di_gdbm \
%endif
        -Di_shadow \
        -Di_syslog \
        -Dman3ext=3pm \
        -Duseperlio \
        -Dinstallusrbinperl=n \
        -Ubincompat5005 \
        -Uversiononly \
        -Dpager='/usr/bin/less -isr' \
        -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto \
        -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto \
        -Ud_endservent_r_proto -Ud_setservent_r_proto \
        -Dscriptdir='%{_bindir}' \
        -Dusesitecustomize \
        -Duse64bitint

# -Duseshrplib creates libperl.so, -Ubincompat5005 help create DSO -> libperl.so

BUILD_BZIP2=0
BZIP2_LIB=%{_libdir}
export BUILD_BZIP2 BZIP2_LIB

# Prepapre a symlink from proper DSO name to libperl.so now so that new perl
# can be executed from make.
%global soname libperl.so.%(echo '%{perl_version}' | sed 's/^\\([^.]*\\.[^.]*\\).*/\\1/')
test -L %soname || ln -s libperl.so %soname

%ifarch sparc64 %{arm}
%make_build -j1
%else
%make_build
%endif

%install
%make_install DESTDIR=%{buildroot}

mkdir -p %{buildroot}%{_sysconfdir}
cat > %{buildroot}%{_sysconfdir}/perl-disable-stack-unwinding << 'EOF'
Stack unwinding is disabled in Perl.
To enable it, remove this file by removing the package:
sudo dnf remove perl-disable-stack-unwinding

Раскрутка стека в Perl отключена.
Чтобы включить ее, удалите этот файл, удалив пакет:
sudo dnf remove perl-disable-stack-unwinding
EOF

%global build_archlib %{buildroot}%{archlib}
%global build_privlib %{buildroot}%{privlib}
%global build_bindir  %{buildroot}%{_bindir}
%global new_perl LD_PRELOAD="%{build_archlib}/CORE/libperl.so" \\\
    LD_LIBRARY_PATH="%{build_archlib}/CORE" \\\
    PERL5LIB="%{build_archlib}:%{build_privlib}" \\\
    %{build_bindir}/perl

# Make proper DSO names, move libperl to standard path.
mv "%{build_archlib}/CORE/libperl.so" \
    "%{buildroot}%{_libdir}/libperl.so.%{perl_version}"
ln -s "libperl.so.%{perl_version}" "%{buildroot}%{_libdir}/%{soname}"
ln -s "libperl.so.%{perl_version}" "%{buildroot}%{_libdir}/libperl.so"
# XXX: Keep symlink from original location because various code glues
# $archlib/CORE/$libperl to get the DSO.
ln -s "../../libperl.so.%{perl_version}" "%{build_archlib}/CORE/libperl.so"
# XXX: Remove the soname named file from CORE directory that was created as
# a symlink in build section and installed as a regular file by perl build
# system.
rm -f "%{build_archlib}/CORE/%{soname}"

install -p -m 755 utils/pl2pm %{build_bindir}/pl2pm

for i in asm/termios.h syscall.h syslimits.h syslog.h \
    sys/ioctl.h sys/socket.h sys/time.h wait.h
do
    %{new_perl} %{build_bindir}/h2ph -a -d %{build_archlib} $i || true
done

# vendor directories (in this case for third party rpms)
# perl doesn't create the auto subdirectory, but modules put things in it,
# so we need to own it.

# i don't like hardlinks, having symlinks instead:
ln -sf perl5 %{buildroot}%{_bindir}/perl
ln -s perl%{perl_version} %{buildroot}%{_bindir}/perl5

mkdir -p %{buildroot}%{perl_vendorarch}/auto
mkdir -p %{buildroot}%{perl_vendorlib}

#
# perl RPM macros
### FIXME enable once macros.perl is removed from rpm-openmandriva-macros
#
#mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
#install -p -m 644 %{SOURCE3} %{buildroot}%{_rpmconfigdir}/macros.d/

#
# Core modules removal
#
# Dual-living binaries clashes on debuginfo files between perl and standalone
# packages. Excluding is not enough, we need to remove them. This is
# a work-around for rpmbuild bug #878863.
find %{buildroot} -type f -name '*.bs' -empty -delete
chmod -R u+w %{buildroot}/*

# miniperl? As an interpreter? How odd. Anyway, a symlink does it:
rm %{build_privlib}/ExtUtils/xsubpp
ln -s ../../../bin/xsubpp %{build_privlib}/ExtUtils/

# Don't need the .packlist
rm %{build_archlib}/.packlist

# Do not distribute File::Spec::VMS as it works on VMS only (bug #973713)
# We cannot remove it in %%prep because dist/Cwd/t/Spec.t test needs it.
rm %{build_archlib}/File/Spec/VMS.pm
rm %{buildroot}%{_mandir}/man3/File::Spec::VMS.3*

# for now, remove Bzip2:
# Why? Now is missing Bzip2 files and provides
##find %{buildroot} -name Bzip2 | xargs rm -r
##find %{buildroot} -name '*B*zip2*'| xargs rm

# tests -- FIXME need to validate that this all works as expected
mkdir -p %{buildroot}%{perl5_testdir}/perl-tests

# "core"
tar -cf - t/ | ( cd %{buildroot}%{perl5_testdir}/perl-tests && tar -xf - )

# "dual-lifed"
for dir in `find ext/ -type d -name t -maxdepth 2` ; do

    tar -cf - $dir | ( cd %{buildroot}%{perl5_testdir}/perl-tests/t && tar -xf - )
done

# Normalize shell bangs in tests.
# brp-mangle-shebangs executed by rpm-build chokes on t/TEST.
%{new_perl} -MConfig -i -pn \
    -e 's"\A#!(?:perl|\./perl|/usr/bin/perl|/usr/bin/env perl)\b"$Config{startperl}"' \
    $(find %{buildroot}%{perl5_testdir}/perl-tests -type f)

%if %{with perl_enables_systemtap}
# Systemtap tapset install
mkdir -p %{buildroot}%{tapsetdir}
%global libperl_stp libperl%{perl_version}-64.stp

sed \
  -e "s|LIBRARY_PATH|%{_libdir}/%{soname}|" \
  %{SOURCE4} \
  > %{buildroot}%{tapsetdir}/%{libperl_stp}
%endif

# TODO: Canonicalize test files (rewrite intrerpreter path, fix permissions)
# XXX: We cannot rewrite ./perl before %%check phase. Otherwise the test
# would run against system perl at build-time.
# See __spec_check_pre global macro in macros.perl.
#T_FILES=`find %%{buildroot}%%{perl5_testdir} -type f -name '*.t'`
#%%fix_shbang_line $T_FILES
#%%{__chmod} +x $T_FILES
#%%{_fixperms} %%{buildroot}%%{perl5_testdir}
#
# lib/perl5db.t will fail if Term::ReadLine::Gnu is available
%check
%if %{with test}
%{new_perl} -I/lib regen/lib_cleanup.pl
cd t
%{new_perl} -I../lib porting/customized.t --regen
cd -
%if %{parallel_tests}
    JOBS=$(printf '%%s' "%{?_smp_mflags}" | sed 's/.*-j\([0-9][0-9]*\).*/\1/')
    LC_ALL=C TEST_JOBS=$JOBS make test_harness
%else
    LC_ALL=C make test
%endif
%endif

%files
# We sub-package modules from perl-base subpackage. Main perl package
# is a meta package.

%files base
%{_mandir}/man1/*.1*
%{_mandir}/man3/*.3*
%{_bindir}/*
%{archlib}/*
%{privlib}/*


# libs
%exclude %dir %{archlib}
%exclude %dir %{archlib}/auto
%exclude %{archlib}/auto/re
%exclude %dir %{archlib}/CORE
%exclude %{archlib}/CORE/libperl.so
%exclude %{archlib}/re.pm
%exclude %{_libdir}/libperl.so.*
%exclude %dir %{perl_vendorarch}
%exclude %dir %{perl_vendorarch}/auto
%exclude %dir %{privlib}
%exclude %{privlib}/integer.pm
%exclude %{privlib}/strict.pm
%exclude %{privlib}/unicore
%exclude %{privlib}/utf8.pm
%exclude %{privlib}/warnings.pm
%exclude %{privlib}/XSLoader.pm
%exclude %dir %{perl_vendorlib}
%exclude %{_mandir}/man3/integer.*
%exclude %{_mandir}/man3/re.*
%exclude %{_mandir}/man3/strict.*
%exclude %{_mandir}/man3/utf8.*
%exclude %{_mandir}/man3/warnings.*
%exclude %{_mandir}/man3/XSLoader.*

# devel
%exclude %{_bindir}/h2xs
%exclude %{_mandir}/man1/h2xs*
%exclude %{_bindir}/perlivp
%exclude %{_mandir}/man1/perlivp*
%exclude %{archlib}/CORE/*.h
%exclude %{_libdir}/libperl.so
%exclude %{_mandir}/man1/perlxs*
%if %{with perl_enables_systemtap}
%exclude %dir %{_datadir}/systemtap
%exclude %dir %{_datadir}/systemtap/tapset
%endif

# utils
%exclude %{_bindir}/h2ph
%exclude %{_bindir}/perlbug
%exclude %{_bindir}/perlthanks
%exclude %{_bindir}/pl2pm
%exclude %{_bindir}/splain
%exclude %{privlib}/pod/perlutil.pod
%exclude %{_mandir}/man1/h2ph.*
%exclude %{_mandir}/man1/perlbug.*
%exclude %{_mandir}/man1/perlthanks.*
%exclude %{_mandir}/man1/perlutil.*
%exclude %{_mandir}/man1/pl2pm.*
%exclude %{_mandir}/man1/splain.*

# Archive-Tar
%exclude %{_bindir}/ptar
%exclude %{_bindir}/ptardiff
%exclude %{_bindir}/ptargrep
%exclude %dir %{privlib}/Archive
%exclude %{privlib}/Archive/Tar
%exclude %{privlib}/Archive/Tar.pm
%exclude %{_mandir}/man1/ptar.1*
%exclude %{_mandir}/man1/ptardiff.1*
%exclude %{_mandir}/man1/ptargrep.1*
%exclude %{_mandir}/man3/Archive::Tar*

# Attribute-Handlers
%exclude %{privlib}/Attribute
%exclude %{_mandir}/man3/Attribute::Handlers.*

# autodie
%exclude %{privlib}/autodie/
%exclude %{privlib}/autodie.pm
%exclude %{privlib}/Fatal.pm
%exclude %{_mandir}/man3/autodie.3*
%exclude %{_mandir}/man3/autodie::*
%exclude %{_mandir}/man3/Fatal.3*

# bignum
%exclude %{privlib}/bigint.pm
%exclude %{privlib}/bignum.pm
%exclude %{privlib}/bigrat.pm
%exclude %{privlib}/Math/BigFloat
%exclude %{privlib}/Math/BigInt/Trace.pm
%exclude %{_mandir}/man3/bigint.*
%exclude %{_mandir}/man3/bignum.*
%exclude %{_mandir}/man3/bigrat.*

# Carp
%exclude %{privlib}/Carp
%exclude %{privlib}/Carp.*
%exclude %{_mandir}/man3/Carp.*

# Config-Perl-V
%exclude %{privlib}/Config/Perl
%exclude %{_mandir}/man3/Config::Perl::V.*

# constant
%exclude %{privlib}/constant.pm
%exclude %{_mandir}/man3/constant.3*

# CPAN
%exclude %{_bindir}/cpan
%exclude %dir %{privlib}/App
%exclude %{privlib}/App/Cpan.pm
%exclude %{privlib}/CPAN
%exclude %{privlib}/CPAN.pm
%exclude %{_mandir}/man1/cpan.1*
%exclude %{_mandir}/man3/App::Cpan.*
%exclude %{_mandir}/man3/CPAN.*
%exclude %{_mandir}/man3/CPAN:*

# CPAN-Meta
%exclude %dir %{privlib}/CPAN
%exclude %{privlib}/CPAN/Meta.pm
%exclude %dir %{privlib}/CPAN/Meta
%exclude %{privlib}/CPAN/Meta/Converter.pm
%exclude %{privlib}/CPAN/Meta/Feature.pm
%exclude %dir %{privlib}/CPAN/Meta/History
%exclude %{privlib}/CPAN/Meta/History.pm
%exclude %{privlib}/CPAN/Meta/Merge.pm
%exclude %{privlib}/CPAN/Meta/Prereqs.pm
%exclude %{privlib}/CPAN/Meta/Spec.pm
%exclude %{privlib}/CPAN/Meta/Validator.pm
%exclude %dir %{privlib}/Parse
%exclude %dir %{privlib}/Parse/CPAN
%exclude %{privlib}/Parse/CPAN/Meta.pm
%exclude %{_mandir}/man3/CPAN::Meta*
%exclude %{_mandir}/man3/Parse::CPAN::Meta.3*

# CPAN-Meta-Requirements
%exclude %dir %{privlib}/CPAN
%exclude %dir %{privlib}/CPAN/Meta
%exclude %{privlib}/CPAN/Meta/Requirements.pm
%exclude %{_mandir}/man3/CPAN::Meta::Requirements.3*

# CPAN-Meta-YAML
%exclude %dir %{privlib}/CPAN
%exclude %dir %{privlib}/CPAN/Meta
%exclude %{privlib}/CPAN/Meta/YAML.pm
%exclude %{_mandir}/man3/CPAN::Meta::YAML*

# Compress-Raw-Bzip2
%exclude %dir %{archlib}/Compress
%exclude %dir %{archlib}/Compress/Raw
%exclude %{archlib}/Compress/Raw/Bzip2.pm
%exclude %dir %{archlib}/auto/Compress
%exclude %dir %{archlib}/auto/Compress/Raw
%exclude %{archlib}/auto/Compress/Raw/Bzip2
%exclude %{_mandir}/man3/Compress::Raw::Bzip2*

# Compress-Raw-Zlib
%exclude %dir %{archlib}/Compress
%exclude %dir %{archlib}/Compress/Raw
%exclude %{archlib}/Compress/Raw/Zlib.pm
%exclude %dir %{archlib}/auto/Compress
%exclude %dir %{archlib}/auto/Compress/Raw
%exclude %{archlib}/auto/Compress/Raw/Zlib
%exclude %{_mandir}/man3/Compress::Raw::Zlib*

# Data-Dumper
%exclude %dir %{archlib}/auto/Data
%exclude %dir %{archlib}/auto/Data/Dumper
%exclude %{archlib}/auto/Data/Dumper/Dumper.so
%exclude %dir %{archlib}/Data
%exclude %{archlib}/Data/Dumper.pm
%exclude %{_mandir}/man3/Data::Dumper.3*

# DB_File
%exclude %{archlib}/DB_File.pm
%exclude %dir %{archlib}/auto/DB_File
%exclude %{archlib}/auto/DB_File/DB_File.so
%exclude %{_mandir}/man3/DB_File*

# Devel-Peek
%dir %exclude %{archlib}/Devel
%exclude %{archlib}/Devel/Peek.pm
%dir %exclude %{archlib}/auto/Devel
%exclude %{archlib}/auto/Devel/Peek
%exclude %{_mandir}/man3/Devel::Peek.*

# Devel-PPPort
%exclude %{archlib}/Devel/PPPort.pm
%exclude %{_mandir}/man3/Devel::PPPort.3*

# Devel-SelfStubber
%exclude %dir %{privlib}/Devel
%exclude %{privlib}/Devel/SelfStubber.pm
%exclude %{_mandir}/man3/Devel::SelfStubber.*

# Digest
%exclude %{privlib}/Digest.pm
%exclude %dir %{privlib}/Digest
%exclude %{privlib}/Digest/base.pm
%exclude %{privlib}/Digest/file.pm
%exclude %{_mandir}/man3/Digest.3*
%exclude %{_mandir}/man3/Digest::base.3*
%exclude %{_mandir}/man3/Digest::file.3*

# Digest-MD5
%exclude %dir %{archlib}/Digest
%exclude %{archlib}/Digest/MD5.pm
%exclude %dir %{archlib}/auto/Digest
%exclude %{archlib}/auto/Digest/MD5
%exclude %{_mandir}/man3/Digest::MD5.3*

# Digest-SHA
%exclude %{_bindir}/shasum
%exclude %dir %{archlib}/Digest
%exclude %{archlib}/Digest/SHA.pm
%exclude %dir %{archlib}/auto/Digest
%exclude %{archlib}/auto/Digest/SHA
%exclude %{_mandir}/man1/shasum.1*
%exclude %{_mandir}/man3/Digest::SHA.3*

# Encode
%exclude %{_bindir}/encguess
%exclude %{_bindir}/piconv
%exclude %{archlib}/Encode*
%exclude %{archlib}/auto/Encode*
%exclude %{privlib}/Encode
%exclude %{_mandir}/man1/encguess.1*
%exclude %{_mandir}/man1/piconv.1*
%exclude %{_mandir}/man3/Encode*.3*

# encoding
%exclude %{archlib}/encoding.pm
%exclude %{_mandir}/man3/encoding.3*

# Encode-devel
%exclude %{_bindir}/enc2xs
%exclude %dir %{privlib}/Encode
%exclude %{privlib}/Encode/*.e2x
%exclude %{privlib}/Encode/encode.h
%exclude %{_mandir}/man1/enc2xs.1*

# Env
%exclude %{privlib}/Env.pm
%exclude %{_mandir}/man3/Env.3*

# Errno
%exclude %{archlib}/Errno.pm
%exclude %{_mandir}/man3/Errno.*

# Exporter
%exclude %{privlib}/Exporter*
%exclude %{_mandir}/man3/Exporter*

# experimental
%exclude %{privlib}/experimental*
%exclude %{_mandir}/man3/experimental*

# ExtUtils-CBuilder
%exclude %{privlib}/ExtUtils/CBuilder
%exclude %{privlib}/ExtUtils/CBuilder.pm
%exclude %{_mandir}/man3/ExtUtils::CBuilder*

# ExtUtils-Command
%exclude %{privlib}/ExtUtils/Command.pm
%exclude %{_mandir}/man3/ExtUtils::Command.*

# ExtUtils-Embed
%exclude %{privlib}/ExtUtils/Embed.pm
%exclude %{_mandir}/man3/ExtUtils::Embed*

# ExtUtils-Install
%exclude %{privlib}/ExtUtils/Install.pm
%exclude %{privlib}/ExtUtils/Installed.pm
%exclude %{privlib}/ExtUtils/Packlist.pm
%exclude %{_mandir}/man3/ExtUtils::Install.3*
%exclude %{_mandir}/man3/ExtUtils::Installed.3*
%exclude %{_mandir}/man3/ExtUtils::Packlist.3*

# ExtUtils-Manifest
%exclude %{privlib}/ExtUtils/Manifest.pm
%exclude %{privlib}/ExtUtils/MANIFEST.SKIP
%exclude %{_mandir}/man3/ExtUtils::Manifest.3*

# ExtUtils-MakeMaker
%exclude %{_bindir}/instmodsh
%exclude %{privlib}/ExtUtils/Command
%exclude %{privlib}/ExtUtils/Liblist
%exclude %{privlib}/ExtUtils/Liblist.pm
%exclude %{privlib}/ExtUtils/MakeMaker
%exclude %{privlib}/ExtUtils/MakeMaker.pm
%exclude %{privlib}/ExtUtils/MM.pm
%exclude %{privlib}/ExtUtils/MM_*.pm
%exclude %{privlib}/ExtUtils/MY.pm
%exclude %{privlib}/ExtUtils/Mkbootstrap.pm
%exclude %{privlib}/ExtUtils/Mksymlists.pm
%exclude %{privlib}/ExtUtils/testlib.pm
%exclude %{_mandir}/man1/instmodsh.1*
%exclude %{_mandir}/man3/ExtUtils::Command::MM*
%exclude %{_mandir}/man3/ExtUtils::Liblist.3*
%exclude %{_mandir}/man3/ExtUtils::MM.3*
%exclude %{_mandir}/man3/ExtUtils::MM_*
%exclude %{_mandir}/man3/ExtUtils::MY.3*
%exclude %{_mandir}/man3/ExtUtils::MakeMaker*
%exclude %{_mandir}/man3/ExtUtils::Mkbootstrap.3*
%exclude %{_mandir}/man3/ExtUtils::Mksymlists.3*
%exclude %{_mandir}/man3/ExtUtils::testlib.3*

# ExtUtils-Miniperl
%exclude %{privlib}/ExtUtils/Miniperl.pm
%exclude %{_mandir}/man3/ExtUtils::Miniperl.3*

# ExtUtils-MM-Utils
%exclude %dir %{privlib}/ExtUtils/MM
%exclude %{privlib}/ExtUtils/MM/Utils.pm
%exclude %{_mandir}/man3/ExtUtils::MM::Utils.*

# ExtUtils-ParseXS
%exclude %dir %{privlib}/ExtUtils/ParseXS
%exclude %{privlib}/ExtUtils/ParseXS.pm
%exclude %{privlib}/ExtUtils/ParseXS.pod
%exclude %{privlib}/ExtUtils/ParseXS/Constants.pm
%exclude %{privlib}/ExtUtils/ParseXS/CountLines.pm
%exclude %{privlib}/ExtUtils/ParseXS/Eval.pm
%exclude %{privlib}/ExtUtils/ParseXS/Utilities.pm
%exclude %dir %{privlib}/ExtUtils/Typemaps
%exclude %{privlib}/ExtUtils/Typemaps.pm
%exclude %{privlib}/ExtUtils/Typemaps/Cmd.pm
%exclude %{privlib}/ExtUtils/Typemaps/InputMap.pm
%exclude %{privlib}/ExtUtils/Typemaps/OutputMap.pm
%exclude %{privlib}/ExtUtils/Typemaps/Type.pm
%exclude %{privlib}/ExtUtils/xsubpp
%exclude %{_bindir}/xsubpp
%exclude %{_mandir}/man1/xsubpp*
%exclude %{_mandir}/man3/ExtUtils::ParseXS.3*
%exclude %{_mandir}/man3/ExtUtils::ParseXS::Constants.3*
%exclude %{_mandir}/man3/ExtUtils::ParseXS::Eval.3*
%exclude %{_mandir}/man3/ExtUtils::ParseXS::Utilities.3*
%exclude %{_mandir}/man3/ExtUtils::Typemaps.3*
%exclude %{_mandir}/man3/ExtUtils::Typemaps::Cmd.3*
%exclude %{_mandir}/man3/ExtUtils::Typemaps::InputMap.3*
%exclude %{_mandir}/man3/ExtUtils::Typemaps::OutputMap.3*
%exclude %{_mandir}/man3/ExtUtils::Typemaps::Type.3*

# File-Fetch
%exclude %{privlib}/File/Fetch.pm
%exclude %{_mandir}/man3/File::Fetch.3*

# File-Path
%exclude %{privlib}/File/Path.pm
%exclude %{_mandir}/man3/File::Path.3*

# File-Temp
%exclude %{privlib}/File/Temp.pm
%exclude %{_mandir}/man3/File::Temp.3*

# Filter
%exclude %dir %{archlib}/auto/Filter
%exclude %{archlib}/auto/Filter/Util
%exclude %dir %{archlib}/Filter
%exclude %{archlib}/Filter/Util
%exclude %{privlib}/pod/perlfilter.pod
%exclude %{_mandir}/man1/perlfilter.*
%exclude %{_mandir}/man3/Filter::Util::*

# Filter-Simple
%exclude %dir %{privlib}/Filter
%exclude %{privlib}/Filter/Simple.pm
%exclude %{_mandir}/man3/Filter::Simple.3*

# Getopt-Long
%exclude %{privlib}/Getopt/Long.pm
%exclude %{_mandir}/man3/Getopt::Long.3*

# IO
%exclude %dir %{archlib}/IO
%exclude %{archlib}/IO.pm
%exclude %{archlib}/IO/Dir.pm
%exclude %{archlib}/IO/File.pm
%exclude %{archlib}/IO/Handle.pm
%exclude %{archlib}/IO/Pipe.pm
%exclude %{archlib}/IO/Poll.pm
%exclude %{archlib}/IO/Seekable.pm
%exclude %{archlib}/IO/Select.pm
%exclude %dir %{archlib}/IO/Socket
%exclude %{archlib}/IO/Socket/INET.pm
%exclude %{archlib}/IO/Socket/UNIX.pm
%exclude %{archlib}/IO/Socket.pm
%exclude %dir %{archlib}/auto/IO
%exclude %{archlib}/auto/IO/IO.so
%exclude %{_mandir}/man3/IO.*
%exclude %{_mandir}/man3/IO::Dir.*
%exclude %{_mandir}/man3/IO::File.*
%exclude %{_mandir}/man3/IO::Handle.*
%exclude %{_mandir}/man3/IO::Pipe.*
%exclude %{_mandir}/man3/IO::Poll.*
%exclude %{_mandir}/man3/IO::Seekable.*
%exclude %{_mandir}/man3/IO::Select.*
%exclude %{_mandir}/man3/IO::Socket::INET.*
%exclude %{_mandir}/man3/IO::Socket::UNIX.*
%exclude %{_mandir}/man3/IO::Socket.*

# IO-Compress
%exclude %{_bindir}/zipdetails
%exclude %dir %{privlib}/IO
%exclude %dir %{privlib}/IO/Compress
%exclude %{privlib}/IO/Compress/FAQ.pod
%exclude %{_mandir}/man1/zipdetails.*
%exclude %{_mandir}/man3/IO::Compress::FAQ.*
# Compress-Zlib
%exclude %dir %{privlib}/Compress
%exclude %{privlib}/Compress/Zlib.pm
%exclude %{_mandir}/man3/Compress::Zlib*
# IO-Compress-Base
%exclude %{privlib}/File/GlobMapper.pm
%exclude %dir %{privlib}/IO
%exclude %dir %{privlib}/IO/Compress
%exclude %{privlib}/IO/Compress/Base
%exclude %{privlib}/IO/Compress/Base.pm
%exclude %dir %{privlib}/IO/Uncompress
%exclude %{privlib}/IO/Uncompress/AnyUncompress.pm
%exclude %{privlib}/IO/Uncompress/Base.pm
%exclude %{_mandir}/man3/File::GlobMapper.*
%exclude %{_mandir}/man3/IO::Compress::Base.*
%exclude %{_mandir}/man3/IO::Uncompress::AnyUncompress.*
%exclude %{_mandir}/man3/IO::Uncompress::Base.*
# IO-Compress-Zlib
%exclude %dir %{privlib}/IO
%exclude %dir %{privlib}/IO/Compress
%exclude %{privlib}/IO/Compress/Adapter
%exclude %{privlib}/IO/Compress/Deflate.pm
%exclude %{privlib}/IO/Compress/Gzip
%exclude %{privlib}/IO/Compress/Gzip.pm
%exclude %{privlib}/IO/Compress/RawDeflate.pm
%exclude %{privlib}/IO/Compress/Bzip2.pm
%exclude %{privlib}/IO/Compress/Zip
%exclude %{privlib}/IO/Compress/Zip.pm
%exclude %{privlib}/IO/Compress/Zlib
%exclude %dir %{privlib}/IO/Uncompress
%exclude %{privlib}/IO/Uncompress/Adapter
%exclude %{privlib}/IO/Uncompress/AnyInflate.pm
%exclude %{privlib}/IO/Uncompress/Bunzip2.pm
%exclude %{privlib}/IO/Uncompress/Gunzip.pm
%exclude %{privlib}/IO/Uncompress/Inflate.pm
%exclude %{privlib}/IO/Uncompress/RawInflate.pm
%exclude %{privlib}/IO/Uncompress/Unzip.pm
%exclude %{_mandir}/man3/IO::Compress::Deflate*
%exclude %{_mandir}/man3/IO::Compress::Bzip2*
%exclude %{_mandir}/man3/IO::Compress::Gzip*
%exclude %{_mandir}/man3/IO::Compress::RawDeflate*
%exclude %{_mandir}/man3/IO::Compress::Zip*
%exclude %{_mandir}/man3/IO::Uncompress::AnyInflate*
%exclude %{_mandir}/man3/IO::Uncompress::Bunzip2*
%exclude %{_mandir}/man3/IO::Uncompress::Gunzip*
%exclude %{_mandir}/man3/IO::Uncompress::Inflate*
%exclude %{_mandir}/man3/IO::Uncompress::RawInflate*
%exclude %{_mandir}/man3/IO::Uncompress::Unzip*

# IO-Socket-IP
%exclude %dir %{privlib}/IO
%exclude %dir %{privlib}/IO/Socket
%exclude %{privlib}/IO/Socket/IP.pm
%exclude %{_mandir}/man3/IO::Socket::IP.*

# IO-Zlib
%exclude %dir %{privlib}/IO
%exclude %{privlib}/IO/Zlib.pm
%exclude %{_mandir}/man3/IO::Zlib.*

# HTTP-Tiny
%exclude %dir %{privlib}/HTTP
%exclude %{privlib}/HTTP/Tiny.pm
%exclude %{_mandir}/man3/HTTP::Tiny*

# IPC-Cmd
%exclude %{privlib}/IPC/Cmd.pm
%exclude %{_mandir}/man3/IPC::Cmd.3*

# IPC-SysV
%exclude %{archlib}/auto/IPC
%exclude %{archlib}/IPC/Msg.pm
%exclude %{archlib}/IPC/Semaphore.pm
%exclude %{archlib}/IPC/SharedMem.pm
%exclude %{archlib}/IPC/SysV.pm
%exclude %{_mandir}/man3/IPC::Msg.*
%exclude %{_mandir}/man3/IPC::Semaphore.*
%exclude %{_mandir}/man3/IPC::SharedMem.*
%exclude %{_mandir}/man3/IPC::SysV.*

# JSON-PP
%exclude %{_bindir}/json_pp
%exclude %dir %{privlib}/JSON
%exclude %{privlib}/JSON/PP
%exclude %{privlib}/JSON/PP.pm
%exclude %{_mandir}/man1/json_pp.1*
%exclude %{_mandir}/man3/JSON::PP.3*
%exclude %{_mandir}/man3/JSON::PP::Boolean.3pm*

# libnet
%exclude %{privlib}/Net/Cmd.pm
%exclude %{privlib}/Net/Config.pm
%exclude %{privlib}/Net/Domain.pm
%exclude %{privlib}/Net/FTP
%exclude %{privlib}/Net/FTP.pm
%exclude %{privlib}/Net/libnetFAQ.pod
%exclude %{privlib}/Net/NNTP.pm
%exclude %{privlib}/Net/Netrc.pm
%exclude %{privlib}/Net/POP3.pm
%exclude %{privlib}/Net/SMTP.pm
%exclude %{privlib}/Net/Time.pm
%exclude %{_mandir}/man3/Net::Cmd.*
%exclude %{_mandir}/man3/Net::Config.*
%exclude %{_mandir}/man3/Net::Domain.*
%exclude %{_mandir}/man3/Net::FTP.*
%exclude %{_mandir}/man3/Net::libnetFAQ.*
%exclude %{_mandir}/man3/Net::NNTP.*
%exclude %{_mandir}/man3/Net::Netrc.*
%exclude %{_mandir}/man3/Net::POP3.*
%exclude %{_mandir}/man3/Net::SMTP.*
%exclude %{_mandir}/man3/Net::Time.*

# libnetcfg
%exclude %{_bindir}/libnetcfg
%exclude %{_mandir}/man1/libnetcfg*

# Locale-Maketext
%exclude %dir %{privlib}/Locale
%exclude %dir %{privlib}/Locale/Maketext
%exclude %{privlib}/Locale/Maketext.*
%exclude %{privlib}/Locale/Maketext/Cookbook.*
%exclude %{privlib}/Locale/Maketext/Guts.*
%exclude %{privlib}/Locale/Maketext/GutsLoader.*
%exclude %{privlib}/Locale/Maketext/TPJ13.*
%exclude %{_mandir}/man3/Locale::Maketext.*
%exclude %{_mandir}/man3/Locale::Maketext::Cookbook.*
%exclude %{_mandir}/man3/Locale::Maketext::Guts.*
%exclude %{_mandir}/man3/Locale::Maketext::GutsLoader.*
%exclude %{_mandir}/man3/Locale::Maketext::TPJ13.*

# Locale-Maketext-Simple
%exclude %dir %{privlib}/Locale
%exclude %dir %{privlib}/Locale/Maketext
%exclude %{privlib}/Locale/Maketext/Simple.pm
%exclude %{_mandir}/man3/Locale::Maketext::Simple.*

# Math-BigInt
%exclude %{privlib}/Math/BigFloat.pm
%exclude %{privlib}/Math/BigInt.pm
%exclude %dir %exclude %{privlib}/Math/BigInt
%exclude %{privlib}/Math/BigInt/Calc.pm
%exclude %{privlib}/Math/BigInt/Lib.pm
%exclude %{_mandir}/man3/Math::BigFloat.*
%exclude %{_mandir}/man3/Math::BigInt.*
%exclude %{_mandir}/man3/Math::BigInt::Calc.*
%exclude %{_mandir}/man3/Math::BigInt::Lib.*

# Math-BigInt-FastCalc
%exclude %{archlib}/Math
%exclude %{archlib}/auto/Math
%exclude %{_mandir}/man3/Math::BigInt::FastCalc.*

# Math-BigRat
%exclude %{privlib}/Math/BigRat.pm
%exclude %{_mandir}/man3/Math::BigRat.*

# Math-Complex
%dir %exclude %{privlib}/Math
%exclude %{privlib}/Math/Complex.pm
%exclude %{privlib}/Math/Trig.pm
%exclude %{_mandir}/man3/Math::Complex.*
%exclude %{_mandir}/man3/Math::Trig.*

# Memoize
%exclude %{privlib}/Memoize
%exclude %{privlib}/Memoize.pm
%exclude %{_mandir}/man3/Memoize::*
%exclude %{_mandir}/man3/Memoize.*

# MIME-Base64
%exclude %{archlib}/auto/MIME
%exclude %{archlib}/MIME
%exclude %{_mandir}/man3/MIME::*

# Module-CoreList
%exclude %dir %{privlib}/Module
%exclude %{privlib}/Module/CoreList
%exclude %{privlib}/Module/CoreList.pm
%exclude %{privlib}/Module/CoreList.pod
%exclude %{_mandir}/man3/Module::CoreList*

# Module-CoreList-tools
%exclude %{_bindir}/corelist
%exclude %{_mandir}/man1/corelist*

# Module-Load
%exclude %dir %{privlib}/Module
%exclude %{privlib}/Module/Load.pm
%exclude %{_mandir}/man3/Module::Load.*

# Module-Load-Conditional
%exclude %dir %{privlib}/Module
%exclude %{privlib}/Module/Load
%exclude %{_mandir}/man3/Module::Load::Conditional*

# Module-Loaded
%exclude %dir %{privlib}/Module
%exclude %{privlib}/Module/Loaded.pm
%exclude %{_mandir}/man3/Module::Loaded*

# Module-Metadata
%exclude %dir %{privlib}/Module
%exclude %{privlib}/Module/Metadata.pm
%exclude %{_mandir}/man3/Module::Metadata.3pm*

# Net-Ping
%exclude %{privlib}/Net/Ping.pm
%exclude %{_mandir}/man3/Net::Ping.*

# PathTools
%exclude %{archlib}/Cwd.pm
%exclude %{archlib}/File/Spec*
%exclude %{archlib}/auto/Cwd/
%exclude %{_mandir}/man3/Cwd*
%exclude %{_mandir}/man3/File::Spec*

# Params-Check
%exclude %{privlib}/Params/
%exclude %{_mandir}/man3/Params::Check*

# perlfaq
%exclude %{privlib}/perlfaq.pm
%exclude %{privlib}/pod/perlfaq*
%exclude %{privlib}/pod/perlglossary.pod
%exclude %{_mandir}/man1/perlfaq*
%exclude %{_mandir}/man1/perlglossary.*

# PerlIO-via-QuotedPrint
%exclude %{privlib}/PerlIO
%exclude %{_mandir}/man3/PerlIO::via::QuotedPrint.*

# Perl-OSType
%exclude %dir %{privlib}/Perl
%exclude %{privlib}/Perl/OSType.pm
%exclude %{_mandir}/man3/Perl::OSType.3pm*

# open
%exclude %{privlib}/open.pm
%exclude %{_mandir}/man3/open.3*

# parent
%exclude %{privlib}/parent.pm
%exclude %{_mandir}/man3/parent.3*

# Pod-Checker
%exclude %{_bindir}/podchecker
%exclude %{privlib}/Pod/Checker.pm
%exclude %{_mandir}/man1/podchecker.*
%exclude %{_mandir}/man3/Pod::Checker.*

# Pod-Escapes
%exclude %{privlib}/Pod/Escapes.pm
%exclude %{_mandir}/man3/Pod::Escapes.*

# Pod-Html
%exclude %{_bindir}/pod2html
%exclude %{privlib}/Pod/Html.pm
%exclude %{_mandir}/man1/pod2html.1*
%exclude %{_mandir}/man3/Pod::Html.*

# Pod-Perldoc
%exclude %{_bindir}/perldoc
%exclude %{privlib}/pod/perldoc.pod
%exclude %{privlib}/Pod/Perldoc.pm
%exclude %{privlib}/Pod/Perldoc/
%exclude %{_mandir}/man1/perldoc.1*
%exclude %{_mandir}/man3/Pod::Perldoc*

# Pod-Usage
%exclude %{_bindir}/pod2usage
%exclude %{privlib}/Pod/Usage.pm
%exclude %{_mandir}/man1/pod2usage.*
%exclude %{_mandir}/man3/Pod::Usage.*

# podlators
%exclude %{_bindir}/pod2man
%exclude %{_bindir}/pod2text
%exclude %{privlib}/pod/perlpodstyle.pod
%exclude %{privlib}/Pod/Man.pm
%exclude %{privlib}/Pod/ParseLink.pm
%exclude %{privlib}/Pod/Text
%exclude %{privlib}/Pod/Text.pm
%exclude %{_mandir}/man1/pod2man.1*
%exclude %{_mandir}/man1/pod2text.1*
%exclude %{_mandir}/man1/perlpodstyle.1*
%exclude %{_mandir}/man3/Pod::Man*
%exclude %{_mandir}/man3/Pod::ParseLink*
%exclude %{_mandir}/man3/Pod::Text*

# Pod-Simple
%exclude %{privlib}/Pod/Simple/
%exclude %{privlib}/Pod/Simple.pm
%exclude %{privlib}/Pod/Simple.pod
%exclude %{_mandir}/man3/Pod::Simple*

# Scalar-List-Utils
%exclude %{archlib}/List/
%exclude %{archlib}/Scalar/
%exclude %{archlib}/Sub/
%exclude %{archlib}/auto/List/
%exclude %{_mandir}/man3/List::Util*
%exclude %{_mandir}/man3/Scalar::Util*
%exclude %{_mandir}/man3/Sub::Util*

# SelfLoader
%exclude %{privlib}/SelfLoader.pm
%exclude %{_mandir}/man3/SelfLoader*

# Storable
%exclude %{archlib}/Storable.pm
%exclude %{archlib}/auto/Storable/
%exclude %{_mandir}/man3/Storable.*

# Sys-Syslog
%exclude %{archlib}/Sys/Syslog.pm
%exclude %{archlib}/auto/Sys/Syslog/
%exclude %{_mandir}/man3/Sys::Syslog.*

# Term-ANSIColor
%exclude %{privlib}/Term/ANSIColor.pm
%exclude %{_mandir}/man3/Term::ANSIColor*

# Term-Cap
%exclude %{privlib}/Term/Cap.pm
%exclude %{_mandir}/man3/Term::Cap.*

# Test
%exclude %{privlib}/Test.pm
%exclude %{_mandir}/man3/Test.*

# Test-Harness
%exclude %{_bindir}/prove
%exclude %dir %{privlib}/App
%exclude %{privlib}/App/Prove*
%exclude %{privlib}/TAP*
%exclude %dir %{privlib}/Test
%exclude %{privlib}/Test/Harness*
%exclude %{_mandir}/man1/prove.1*
%exclude %{_mandir}/man3/App::Prove*
%exclude %{_mandir}/man3/TAP*
%exclude %{_mandir}/man3/Test::Harness*

# Test-Simple
%exclude %{privlib}/ok*
%exclude %dir %{privlib}/Test
%exclude %{privlib}/Test/More*
%exclude %{privlib}/Test/Builder*
%exclude %{privlib}/Test/Tester*
%exclude %{privlib}/Test/Simple*
%exclude %{privlib}/Test/Tutorial*
%exclude %{privlib}/Test/use
%exclude %{privlib}/Test2*
%exclude %{_mandir}/man3/ok*
%exclude %{_mandir}/man3/Test::More*
%exclude %{_mandir}/man3/Test::Builder*
%exclude %{_mandir}/man3/Test::Tester*
%exclude %{_mandir}/man3/Test::Simple*
%exclude %{_mandir}/man3/Test::Tutorial*
%exclude %{_mandir}/man3/Test::use::*
%exclude %{_mandir}/man3/Test2*

# Text-Balanced
%exclude %{privlib}/Text/Balanced.pm
%exclude %{_mandir}/man3/Text::Balanced.*

# Text-ParseWords
%exclude %{privlib}/Text/ParseWords.pm
%exclude %{_mandir}/man3/Text::ParseWords.*

# Text-Tabs+Wrap
%exclude %{privlib}/Text/Tabs.pm
%exclude %{privlib}/Text/Wrap.pm
%exclude %{_mandir}/man3/Text::Tabs.*
%exclude %{_mandir}/man3/Text::Wrap.*

# Thread-Queue
%exclude %{privlib}/Thread/Queue.pm
%exclude %{_mandir}/man3/Thread::Queue.*

# Time-HiRes
%exclude %dir %{archlib}/Time
%exclude %{archlib}/Time/HiRes.pm
%exclude %dir %{archlib}/auto/Time
%exclude %{archlib}/auto/Time/HiRes
%exclude %{_mandir}/man3/Time::HiRes.*

# Time-Local
%exclude %{privlib}/Time/Local.pm
%exclude %{_mandir}/man3/Time::Local.*

# Time-Piece
%exclude %dir %{archlib}/Time
%exclude %{archlib}/Time/Piece.pm
%exclude %{archlib}/Time/Seconds.pm
%exclude %dir %{archlib}/auto/Time
%exclude %{archlib}/auto/Time/Piece
%exclude %{_mandir}/man3/Time::Piece.3*
%exclude %{_mandir}/man3/Time::Seconds.3*

# Socket
%exclude %dir %{archlib}/auto/Socket
%exclude %{archlib}/auto/Socket/Socket.*
%exclude %{archlib}/Socket.pm
%exclude %{_mandir}/man3/Socket.3*

# threads
%dir %exclude %{archlib}/auto/threads
%exclude %{archlib}/auto/threads/threads*
%exclude %{archlib}/threads.pm
%exclude %{_mandir}/man3/threads.3*

# threads-shared
%exclude %{archlib}/auto/threads/shared*
%exclude %dir %{archlib}/threads
%exclude %{archlib}/threads/shared*
%exclude %{_mandir}/man3/threads::shared*

# Unicode-Collate
%dir %exclude %{archlib}/auto/Unicode
%exclude %{archlib}/auto/Unicode/Collate
%dir %exclude %{archlib}/Unicode
%exclude %{archlib}/Unicode/Collate
%exclude %{archlib}/Unicode/Collate.pm
%exclude %{privlib}/Unicode/Collate
%exclude %{_mandir}/man3/Unicode::Collate.*
%exclude %{_mandir}/man3/Unicode::Collate::*

# Unicode-Normalize
%exclude %{archlib}/auto/Unicode/Normalize
%exclude %{archlib}/Unicode/Normalize.pm
%exclude %{_mandir}/man3/Unicode::Normalize.*

# version
%exclude %{privlib}/version.pm
%exclude %{privlib}/version.pod
%exclude %{privlib}/version/
%exclude %{_mandir}/man3/version.3*
%exclude %{_mandir}/man3/version::Internals.3*

%package -n %{_lib}%{name}5
Summary: The %{name} library, a part of %{name}
Group: System/Libraries
Obsoletes: %{_lib}perl5 < 4:5.38
Provides: libperl.so.5.30()(64bit) = 5.30
Provides: libperl.so.5.30 = 5.30
%description -n %{_lib}%{name}5
The perl library, a part of perl
%files -n %{_lib}%{name}5
%{_libdir}/lib%{name}.so.5*

%files libs
%license Artistic Copying
%doc AUTHORS README Changes
%dir %{archlib}
%dir %{archlib}/auto
%{archlib}/auto/re
%dir %{archlib}/CORE
%{archlib}/CORE/libperl.so
%{archlib}/re.pm
%dir %{perl_vendorarch}
%dir %{perl_vendorarch}/auto
%dir %{privlib}
%{privlib}/integer.pm
%{privlib}/strict.pm
%{privlib}/unicore
%{privlib}/utf8.pm
%{privlib}/warnings.pm
%{privlib}/XSLoader.pm
%dir %{perl_vendorlib}
%{_mandir}/man3/integer.*
%{_mandir}/man3/re.*
%{_mandir}/man3/strict.*
%{_mandir}/man3/utf8.*
%{_mandir}/man3/warnings.*
%{_mandir}/man3/XSLoader.*

%files devel
%{_bindir}/h2xs
%{_mandir}/man1/h2xs*
%{_bindir}/perlivp
%{_mandir}/man1/perlivp*
%{archlib}/CORE/*.h
%{_libdir}/libperl.so
%{_mandir}/man1/perlxs*
%if %{with perl_enables_systemtap}
%{tapsetdir}/%{libperl_stp}
%doc perl-example.stp
%endif

### FIXME enable once macros.perl is removed from rpm-openmandriva-macros
#files macros
#{_rpmconfigdir}/macros.d/macros.perl

%files tests
%{perl5_testdir}/

%files utils
%{_bindir}/h2ph
%{_bindir}/perlbug
%{_bindir}/perlthanks
%{_bindir}/pl2pm
%{_bindir}/splain
%dir %{privlib}/pod
%{privlib}/pod/perlutil.pod
%{_mandir}/man1/h2ph.*
%{_mandir}/man1/perlbug.*
%{_mandir}/man1/perlthanks.*
%{_mandir}/man1/perlutil.*
%{_mandir}/man1/pl2pm.*
%{_mandir}/man1/splain.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Archive-Tar
%{_bindir}/ptar
%{_bindir}/ptardiff
%{_bindir}/ptargrep
%dir %{privlib}/Archive
%{privlib}/Archive/Tar
%{privlib}/Archive/Tar.pm
%{_mandir}/man1/ptar.1*
%{_mandir}/man1/ptardiff.1*
%{_mandir}/man1/ptargrep.1*
%{_mandir}/man3/Archive::Tar*
%endif

%files Attribute-Handlers
%{privlib}/Attribute
%{_mandir}/man3/Attribute::Handlers.*

%if %{dual_life} || %{rebuild_from_scratch}
%files autodie
%{privlib}/autodie/
%{privlib}/autodie.pm
%{privlib}/Fatal.pm
%{_mandir}/man3/autodie.3*
%{_mandir}/man3/autodie::*
%{_mandir}/man3/Fatal.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files bignum
%{privlib}/bigint.pm
%{privlib}/bignum.pm
%{privlib}/bigrat.pm
%dir %{privlib}/Math
%{privlib}/Math/BigFloat
%dir %{privlib}/Math/BigInt
%{privlib}/Math/BigInt/Trace.pm
%{_mandir}/man3/bigint.*
%{_mandir}/man3/bignum.*
%{_mandir}/man3/bigrat.*

%files Carp
%{privlib}/Carp
%{privlib}/Carp.*
%{_mandir}/man3/Carp.*

%files Compress-Raw-Bzip2
%dir %{archlib}/Compress
%dir %{archlib}/Compress/Raw
%{archlib}/Compress/Raw/Bzip2.pm
%dir %{archlib}/auto/Compress
%dir %{archlib}/auto/Compress/Raw
%{archlib}/auto/Compress/Raw/Bzip2
%{_mandir}/man3/Compress::Raw::Bzip2*

%files Compress-Raw-Zlib
%dir %{archlib}/Compress
%dir %{archlib}/Compress/Raw
%{archlib}/Compress/Raw/Zlib.pm
%dir %{archlib}/auto/Compress
%dir %{archlib}/auto/Compress/Raw
%{archlib}/auto/Compress/Raw/Zlib
%{_mandir}/man3/Compress::Raw::Zlib*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Config-Perl-V
%dir %{privlib}/Config
%{privlib}/Config/Perl
%{_mandir}/man3/Config::Perl::V.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files constant
%{privlib}/constant.pm
%{_mandir}/man3/constant.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files CPAN
%{_bindir}/cpan
%dir %{privlib}/App
%{privlib}/App/Cpan.pm
%{privlib}/CPAN
%{privlib}/CPAN.pm
%{_mandir}/man1/cpan.1*
%{_mandir}/man3/App::Cpan.*
%{_mandir}/man3/CPAN.*
%{_mandir}/man3/CPAN:*
%exclude %{privlib}/CPAN/Meta/
%exclude %{privlib}/CPAN/Meta.pm
%exclude %{_mandir}/man3/CPAN::Meta*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files CPAN-Meta
%dir %{privlib}/CPAN/Meta
%{privlib}/CPAN/Meta.pm
%{privlib}/CPAN/Meta/Converter.pm
%{privlib}/CPAN/Meta/Feature.pm
%dir %{privlib}/CPAN/Meta/History
%{privlib}/CPAN/Meta/History.pm
%{privlib}/CPAN/Meta/Merge.pm
%{privlib}/CPAN/Meta/Prereqs.pm
%{privlib}/CPAN/Meta/Spec.pm
%{privlib}/CPAN/Meta/Validator.pm
%dir %{privlib}/Parse/
%dir %{privlib}/Parse/CPAN/
%{privlib}/Parse/CPAN/Meta.pm
%{_mandir}/man3/CPAN::Meta*
%{_mandir}/man3/Parse::CPAN::Meta.3*
%exclude %{_mandir}/man3/CPAN::Meta::YAML*
%exclude %{_mandir}/man3/CPAN::Meta::Requirements*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files CPAN-Meta-Requirements
%dir %{privlib}/CPAN
%dir %{privlib}/CPAN/Meta
%{privlib}/CPAN/Meta/Requirements.pm
%{_mandir}/man3/CPAN::Meta::Requirements.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files CPAN-Meta-YAML
%dir %{privlib}/CPAN
%dir %{privlib}/CPAN/Meta
%{privlib}/CPAN/Meta/YAML.pm
%{_mandir}/man3/CPAN::Meta::YAML*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Data-Dumper
%dir %{archlib}/auto/Data
%dir %{archlib}/auto/Data/Dumper
%{archlib}/auto/Data/Dumper/Dumper.so
%dir %{archlib}/Data
%{archlib}/Data/Dumper.pm
%{_mandir}/man3/Data::Dumper.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files DB_File
%{archlib}/DB_File.pm
%dir %{archlib}/auto/DB_File
%{archlib}/auto/DB_File/DB_File.so
%{_mandir}/man3/DB_File*
%endif

%files Devel-Peek
%dir %{archlib}/Devel
%{archlib}/Devel/Peek.pm
%dir %{archlib}/auto/Devel
%{archlib}/auto/Devel/Peek
%{_mandir}/man3/Devel::Peek.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Devel-PPPort
%dir %{archlib}/Devel
%{archlib}/Devel/PPPort.pm
%{_mandir}/man3/Devel::PPPort.3*
%endif

%files Devel-SelfStubber
%dir %{privlib}/Devel
%{privlib}/Devel/SelfStubber.pm
%{_mandir}/man3/Devel::SelfStubber.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Digest
%{privlib}/Digest.pm
%dir %{privlib}/Digest
%{privlib}/Digest/base.pm
%{privlib}/Digest/file.pm
%{_mandir}/man3/Digest.3*
%{_mandir}/man3/Digest::base.3*
%{_mandir}/man3/Digest::file.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Digest-MD5
%dir %{archlib}/Digest
%{archlib}/Digest/MD5.pm
%dir %{archlib}/auto/Digest
%{archlib}/auto/Digest/MD5
%{_mandir}/man3/Digest::MD5.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Digest-SHA
%{_bindir}/shasum
%dir %{archlib}/Digest
%{archlib}/Digest/SHA.pm
%dir %{archlib}/auto/Digest
%{archlib}/auto/Digest/SHA
%{_mandir}/man1/shasum.1*
%{_mandir}/man3/Digest::SHA.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Encode
%{_bindir}/encguess
%{_bindir}/piconv
%{archlib}/Encode*
%{archlib}/auto/Encode*
%{privlib}/Encode
%exclude %{privlib}/Encode/*.e2x
%exclude %{privlib}/Encode/encode.h
%{_mandir}/man1/encguess.1*
%{_mandir}/man1/piconv.1*
%{_mandir}/man3/Encode*.3*

%files encoding
%{archlib}/encoding.pm
%{_mandir}/man3/encoding.3*

%files Encode-devel
%{_bindir}/enc2xs
%dir %{privlib}/Encode
%{privlib}/Encode/*.e2x
%{privlib}/Encode/encode.h
%{_mandir}/man1/enc2xs.1*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Env
%{privlib}/Env.pm
%{_mandir}/man3/Env.3*
%endif

%files Errno
%{archlib}/Errno.pm
%{_mandir}/man3/Errno.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Exporter
%{privlib}/Exporter*
%{_mandir}/man3/Exporter*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files experimental
%{privlib}/experimental*
%{_mandir}/man3/experimental*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-CBuilder
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/CBuilder
%{privlib}/ExtUtils/CBuilder.pm
%{_mandir}/man3/ExtUtils::CBuilder*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-Command
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/Command.pm
%{_mandir}/man3/ExtUtils::Command.*
%endif

%files ExtUtils-Embed
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/Embed.pm
%{_mandir}/man3/ExtUtils::Embed*

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-Install
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/Install.pm
%{privlib}/ExtUtils/Installed.pm
%{privlib}/ExtUtils/Packlist.pm
%{_mandir}/man3/ExtUtils::Install.3*
%{_mandir}/man3/ExtUtils::Installed.3*
%{_mandir}/man3/ExtUtils::Packlist.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-Manifest
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/Manifest.pm
%{privlib}/ExtUtils/MANIFEST.SKIP
%{_mandir}/man3/ExtUtils::Manifest.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-MakeMaker
%{_bindir}/instmodsh
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/Command/
%{privlib}/ExtUtils/Liblist
%{privlib}/ExtUtils/Liblist.pm
%{privlib}/ExtUtils/MakeMaker
%{privlib}/ExtUtils/MakeMaker.pm
%{privlib}/ExtUtils/MM.pm
%{privlib}/ExtUtils/MM_*.pm
%{privlib}/ExtUtils/MY.pm
%{privlib}/ExtUtils/Mkbootstrap.pm
%{privlib}/ExtUtils/Mksymlists.pm
%{privlib}/ExtUtils/testlib.pm
%{_mandir}/man1/instmodsh.1*
%{_mandir}/man3/ExtUtils::Command::MM*
%{_mandir}/man3/ExtUtils::Liblist.3*
%{_mandir}/man3/ExtUtils::MM.3*
%{_mandir}/man3/ExtUtils::MM_*
%{_mandir}/man3/ExtUtils::MY.3*
%{_mandir}/man3/ExtUtils::MakeMaker*
%{_mandir}/man3/ExtUtils::Mkbootstrap.3*
%{_mandir}/man3/ExtUtils::Mksymlists.3*
%{_mandir}/man3/ExtUtils::testlib.3*
%endif

%files ExtUtils-Miniperl
%dir %{privlib}/ExtUtils
%{privlib}/ExtUtils/Miniperl.pm
%{_mandir}/man3/ExtUtils::Miniperl.3*

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-MM-Utils
%dir %{privlib}/ExtUtils
%dir %{privlib}/ExtUtils/MM
%{privlib}/ExtUtils/MM/Utils.pm
%{_mandir}/man3/ExtUtils::MM::Utils.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files ExtUtils-ParseXS
%dir %{privlib}/ExtUtils
%dir %{privlib}/ExtUtils/ParseXS
%{privlib}/ExtUtils/ParseXS.pm
%{privlib}/ExtUtils/ParseXS.pod
%{privlib}/ExtUtils/ParseXS/Constants.pm
%{privlib}/ExtUtils/ParseXS/CountLines.pm
%{privlib}/ExtUtils/ParseXS/Eval.pm
%{privlib}/ExtUtils/ParseXS/Utilities.pm
%dir %{privlib}/ExtUtils/Typemaps
%{privlib}/ExtUtils/Typemaps.pm
%{privlib}/ExtUtils/Typemaps/Cmd.pm
%{privlib}/ExtUtils/Typemaps/InputMap.pm
%{privlib}/ExtUtils/Typemaps/OutputMap.pm
%{privlib}/ExtUtils/Typemaps/Type.pm
%{privlib}/ExtUtils/xsubpp
%{_bindir}/xsubpp
%{_mandir}/man1/xsubpp*
%{_mandir}/man3/ExtUtils::ParseXS.3*
%{_mandir}/man3/ExtUtils::ParseXS::Constants.3*
%{_mandir}/man3/ExtUtils::ParseXS::Eval.3*
%{_mandir}/man3/ExtUtils::ParseXS::Utilities.3*
%{_mandir}/man3/ExtUtils::Typemaps.3*
%{_mandir}/man3/ExtUtils::Typemaps::Cmd.3*
%{_mandir}/man3/ExtUtils::Typemaps::InputMap.3*
%{_mandir}/man3/ExtUtils::Typemaps::OutputMap.3*
%{_mandir}/man3/ExtUtils::Typemaps::Type.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files File-Fetch
%dir %{privlib}/File
%{privlib}/File/Fetch.pm
%{_mandir}/man3/File::Fetch.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files File-Path
%dir %{privlib}/File
%{privlib}/File/Path.pm
%{_mandir}/man3/File::Path.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files File-Temp
%dir %{privlib}/File
%{privlib}/File/Temp.pm
%{_mandir}/man3/File::Temp.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Filter
%dir %{archlib}/auto/Filter
%{archlib}/auto/Filter/Util
%dir %{archlib}/Filter
%{archlib}/Filter/Util
%{privlib}/pod/perlfilter.pod
%{_mandir}/man1/perlfilter.*
%{_mandir}/man3/Filter::Util::*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Filter-Simple
%dir %{privlib}/Filter
%{privlib}/Filter/Simple.pm
%{_mandir}/man3/Filter::Simple.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Getopt-Long
%dir %{privlib}/Getopt
%{privlib}/Getopt/Long.pm
%{_mandir}/man3/Getopt::Long.3*
%endif

%files IO
%dir %{archlib}/IO
%{archlib}/IO.pm
%{archlib}/IO/Dir.pm
%{archlib}/IO/File.pm
%{archlib}/IO/Handle.pm
%{archlib}/IO/Pipe.pm
%{archlib}/IO/Poll.pm
%{archlib}/IO/Seekable.pm
%{archlib}/IO/Select.pm
%dir %{archlib}/IO/Socket
%{archlib}/IO/Socket/INET.pm
%{archlib}/IO/Socket/UNIX.pm
%{archlib}/IO/Socket.pm
%dir %{archlib}/auto/IO
%{archlib}/auto/IO/IO.so
%{_mandir}/man3/IO.*
%{_mandir}/man3/IO::Dir.*
%{_mandir}/man3/IO::File.*
%{_mandir}/man3/IO::Handle.*
%{_mandir}/man3/IO::Pipe.*
%{_mandir}/man3/IO::Poll.*
%{_mandir}/man3/IO::Seekable.*
%{_mandir}/man3/IO::Select.*
%{_mandir}/man3/IO::Socket::INET.*
%{_mandir}/man3/IO::Socket::UNIX.*
%{_mandir}/man3/IO::Socket.*

%if %{dual_life} || %{rebuild_from_scratch}
%files IO-Compress
# IO-Compress
%{_bindir}/zipdetails
%dir %{privlib}/IO
%dir %{privlib}/IO/Compress
%{privlib}/IO/Compress/FAQ.pod
%{_mandir}/man1/zipdetails.*
%{_mandir}/man3/IO::Compress::FAQ.*
# Compress-Zlib
%dir %{privlib}/Compress
%{privlib}/Compress/Zlib.pm
%{_mandir}/man3/Compress::Zlib*
#IO-Compress-Base
%dir %{privlib}/File
%{privlib}/File/GlobMapper.pm
%{privlib}/IO/Compress/Base
%{privlib}/IO/Compress/Base.pm
%dir %{privlib}/IO/Uncompress
%{privlib}/IO/Uncompress/AnyUncompress.pm
%{privlib}/IO/Uncompress/Base.pm
%{_mandir}/man3/File::GlobMapper.*
%{_mandir}/man3/IO::Compress::Base.*
%{_mandir}/man3/IO::Uncompress::AnyUncompress.*
%{_mandir}/man3/IO::Uncompress::Base.*
# IO-Compress-Zlib
%{privlib}/IO/Compress/Adapter
%{privlib}/IO/Compress/Deflate.pm
%{privlib}/IO/Compress/Bzip2.pm
%{privlib}/IO/Compress/Gzip
%{privlib}/IO/Compress/Gzip.pm
%{privlib}/IO/Compress/RawDeflate.pm
%{privlib}/IO/Compress/Zip
%{privlib}/IO/Compress/Zip.pm
%{privlib}/IO/Compress/Zlib
%{privlib}/IO/Uncompress/Adapter/
%{privlib}/IO/Uncompress/AnyInflate.pm
%{privlib}/IO/Uncompress/Bunzip2.pm
%{privlib}/IO/Uncompress/Gunzip.pm
%{privlib}/IO/Uncompress/Inflate.pm
%{privlib}/IO/Uncompress/RawInflate.pm
%{privlib}/IO/Uncompress/Unzip.pm
%{_mandir}/man3/IO::Compress::Deflate*
%{_mandir}/man3/IO::Compress::Gzip*
%{_mandir}/man3/IO::Compress::Bzip2*
%{_mandir}/man3/IO::Compress::RawDeflate*
%{_mandir}/man3/IO::Compress::Zip*
%{_mandir}/man3/IO::Uncompress::AnyInflate*
%{_mandir}/man3/IO::Uncompress::Bunzip2*
%{_mandir}/man3/IO::Uncompress::Gunzip*
%{_mandir}/man3/IO::Uncompress::Inflate*
%{_mandir}/man3/IO::Uncompress::RawInflate*
%{_mandir}/man3/IO::Uncompress::Unzip*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files IO-Socket-IP
%dir %{privlib}/IO
%dir %{privlib}/IO/Socket
%{privlib}/IO/Socket/IP.pm
%{_mandir}/man3/IO::Socket::IP.*
%endif

%files IO-Zlib
%dir %{privlib}/IO
%{privlib}/IO/Zlib.pm
%{_mandir}/man3/IO::Zlib.*

%if %{dual_life} || %{rebuild_from_scratch}
%files HTTP-Tiny
%dir %{privlib}/HTTP
%{privlib}/HTTP/Tiny.pm
%{_mandir}/man3/HTTP::Tiny*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files IPC-Cmd
%dir %{privlib}/IPC
%{privlib}/IPC/Cmd.pm
%{_mandir}/man3/IPC::Cmd.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files IPC-SysV
%{archlib}/auto/IPC
%dir %{archlib}/IPC
%{archlib}/IPC/Msg.pm
%{archlib}/IPC/Semaphore.pm
%{archlib}/IPC/SharedMem.pm
%{archlib}/IPC/SysV.pm
%{_mandir}/man3/IPC::Msg.*
%{_mandir}/man3/IPC::Semaphore.*
%{_mandir}/man3/IPC::SharedMem.*
%{_mandir}/man3/IPC::SysV.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files JSON-PP
%{_bindir}/json_pp
%dir %{privlib}/JSON
%{privlib}/JSON/PP
%{privlib}/JSON/PP.pm
%{_mandir}/man1/json_pp.1*
%{_mandir}/man3/JSON::PP.3*
%{_mandir}/man3/JSON::PP::Boolean.3pm*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files libnet
%dir %{privlib}/Net
%{privlib}/Net/Cmd.pm
%{privlib}/Net/Config.pm
%{privlib}/Net/Domain.pm
%{privlib}/Net/FTP
%{privlib}/Net/FTP.pm
%{privlib}/Net/libnetFAQ.pod
%{privlib}/Net/NNTP.pm
%{privlib}/Net/Netrc.pm
%{privlib}/Net/POP3.pm
%{privlib}/Net/SMTP.pm
%{privlib}/Net/Time.pm
%{_mandir}/man3/Net::Cmd.*
%{_mandir}/man3/Net::Config.*
%{_mandir}/man3/Net::Domain.*
%{_mandir}/man3/Net::FTP.*
%{_mandir}/man3/Net::libnetFAQ.*
%{_mandir}/man3/Net::NNTP.*
%{_mandir}/man3/Net::Netrc.*
%{_mandir}/man3/Net::POP3.*
%{_mandir}/man3/Net::SMTP.*
%{_mandir}/man3/Net::Time.*
%endif

%files libnetcfg
%{_bindir}/libnetcfg
%{_mandir}/man1/libnetcfg*

%if %{dual_life} || %{rebuild_from_scratch}
%files Locale-Maketext
%dir %{privlib}/Locale
%dir %{privlib}/Locale/Maketext
%{privlib}/Locale/Maketext.*
%{privlib}/Locale/Maketext/Cookbook.*
%{privlib}/Locale/Maketext/Guts.*
%{privlib}/Locale/Maketext/GutsLoader.*
%{privlib}/Locale/Maketext/TPJ13.*
%{_mandir}/man3/Locale::Maketext.*
%{_mandir}/man3/Locale::Maketext::Cookbook.*
%{_mandir}/man3/Locale::Maketext::Guts.*
%{_mandir}/man3/Locale::Maketext::GutsLoader.*
%{_mandir}/man3/Locale::Maketext::TPJ13.*
%endif

%files Locale-Maketext-Simple
%dir %{privlib}/Locale
%dir %{privlib}/Locale/Maketext
%{privlib}/Locale/Maketext/Simple.pm
%{_mandir}/man3/Locale::Maketext::Simple.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Math-BigInt
%dir %{privlib}/Math
%{privlib}/Math/BigFloat.pm
%{privlib}/Math/BigInt.pm
%dir %{privlib}/Math/BigInt
%{privlib}/Math/BigInt/Calc.pm
%{privlib}/Math/BigInt/Lib.pm
%{_mandir}/man3/Math::BigFloat.*
%{_mandir}/man3/Math::BigInt.*
%{_mandir}/man3/Math::BigInt::Calc.*
%{_mandir}/man3/Math::BigInt::Lib.*

%files Math-BigInt-FastCalc
%{archlib}/Math
%{archlib}/auto/Math
%{_mandir}/man3/Math::BigInt::FastCalc.*

%files Math-BigRat
%dir %{privlib}/Math
%{privlib}/Math/BigRat.pm
%{_mandir}/man3/Math::BigRat.*
%endif

%files Math-Complex
%dir %{privlib}/Math
%{privlib}/Math/Complex.pm
%{privlib}/Math/Trig.pm
%{_mandir}/man3/Math::Complex.*
%{_mandir}/man3/Math::Trig.*

%files Memoize
%{privlib}/Memoize
%{privlib}/Memoize.pm
%{_mandir}/man3/Memoize::*
%{_mandir}/man3/Memoize.*

%if %{dual_life} || %{rebuild_from_scratch}
%files MIME-Base64
%{archlib}/auto/MIME
%{archlib}/MIME
%{_mandir}/man3/MIME::*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Module-CoreList
%dir %{privlib}/Module
%{privlib}/Module/CoreList
%{privlib}/Module/CoreList.pm
%{privlib}/Module/CoreList.pod
%{_mandir}/man3/Module::CoreList*

%files Module-CoreList-tools
%{_bindir}/corelist
%{_mandir}/man1/corelist*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Module-Load
%dir %{privlib}/Module
%{privlib}/Module/Load.pm
%{_mandir}/man3/Module::Load.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Module-Load-Conditional
%dir %{privlib}/Module
%{privlib}/Module/Load
%{_mandir}/man3/Module::Load::Conditional*
%endif

%files Module-Loaded
%dir %{privlib}/Module
%{privlib}/Module/Loaded.pm
%{_mandir}/man3/Module::Loaded*

%if %{dual_life} || %{rebuild_from_scratch}
%files Module-Metadata
%dir %{privlib}/Module
%{privlib}/Module/Metadata.pm
%{_mandir}/man3/Module::Metadata.3pm*
%endif

%files Net-Ping
%dir %{privlib}/Net
%{privlib}/Net/Ping.pm
%{_mandir}/man3/Net::Ping.*

%if %{dual_life} || %{rebuild_from_scratch}
%files PathTools
%{archlib}/Cwd.pm
%dir %{archlib}/File
%{archlib}/File/Spec*
%{archlib}/auto/Cwd
%{_mandir}/man3/Cwd*
%{_mandir}/man3/File::Spec*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Params-Check
%{privlib}/Params/
%{_mandir}/man3/Params::Check*
%endif

%files open
%{privlib}/open.pm
%{_mandir}/man3/open.3*

%if %{dual_life} || %{rebuild_from_scratch}
%files parent
%{privlib}/parent.pm
%{_mandir}/man3/parent.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files perlfaq
%{privlib}/perlfaq.pm
%dir %{privlib}/pod
%{privlib}/pod/perlfaq*
%{privlib}/pod/perlglossary.pod
%{_mandir}/man1/perlfaq*
%{_mandir}/man1/perlglossary.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files PerlIO-via-QuotedPrint
%{privlib}/PerlIO
%{_mandir}/man3/PerlIO::via::QuotedPrint.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Perl-OSType
%dir %{privlib}/Perl
%{privlib}/Perl/OSType.pm
%{_mandir}/man3/Perl::OSType.3pm*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Pod-Checker
%{_bindir}/podchecker
%dir %{privlib}/Pod
%{privlib}/Pod/Checker.pm
%{_mandir}/man1/podchecker.*
%{_mandir}/man3/Pod::Checker.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Pod-Escapes
%dir %{privlib}/Pod
%{privlib}/Pod/Escapes.pm
%{_mandir}/man3/Pod::Escapes.*
%endif

%files Pod-Html
%license Pod-Html-license-clarification
%dir %{privlib}/Pod
%{_bindir}/pod2html
%{privlib}/Pod/Html.pm
%{_mandir}/man1/pod2html.1*
%{_mandir}/man3/Pod::Html.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Pod-Perldoc
%{_bindir}/perldoc
%{privlib}/pod/perldoc.pod
%dir %{privlib}/Pod
%{privlib}/Pod/Perldoc
%{privlib}/Pod/Perldoc.pm
%{_mandir}/man1/perldoc.1*
%{_mandir}/man3/Pod::Perldoc*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Pod-Usage
%{_bindir}/pod2usage
%dir %{privlib}/Pod
%{privlib}/Pod/Usage.pm
%{_mandir}/man1/pod2usage.*
%{_mandir}/man3/Pod::Usage.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files podlators
%{_bindir}/pod2man
%{_bindir}/pod2text
%{privlib}/pod/perlpodstyle.pod
%dir %{privlib}/Pod
%{privlib}/Pod/Man.pm
%{privlib}/Pod/ParseLink.pm
%{privlib}/Pod/Text
%{privlib}/Pod/Text.pm
%{_mandir}/man1/pod2man.1*
%{_mandir}/man1/pod2text.1*
%{_mandir}/man1/perlpodstyle.1*
%{_mandir}/man3/Pod::Man*
%{_mandir}/man3/Pod::ParseLink*
%{_mandir}/man3/Pod::Text*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Pod-Simple
%dir %{privlib}/Pod
%{privlib}/Pod/Simple
%{privlib}/Pod/Simple.pm
%{privlib}/Pod/Simple.pod
%{_mandir}/man3/Pod::Simple*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Scalar-List-Utils
%{archlib}/List
%{archlib}/Scalar
%{archlib}/Sub
%{archlib}/auto/List
%{_mandir}/man3/List::Util*
%{_mandir}/man3/Scalar::Util*
%{_mandir}/man3/Sub::Util*
%endif

%files SelfLoader
%{privlib}/SelfLoader.pm
%{_mandir}/man3/SelfLoader*

%if %{dual_life} || %{rebuild_from_scratch}
%files Sys-Syslog
%dir %{archlib}/Sys
%{archlib}/Sys/Syslog.pm
%dir %{archlib}/auto/Sys
%{archlib}/auto/Sys/Syslog
%{_mandir}/man3/Sys::Syslog.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Socket
%dir %{archlib}/auto/Socket
%{archlib}/auto/Socket/Socket.*
%{archlib}/Socket.pm
%{_mandir}/man3/Socket.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Storable
%{archlib}/Storable.pm
%{archlib}/auto/Storable
%{_mandir}/man3/Storable.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Term-ANSIColor
%dir %{privlib}/Term
%{privlib}/Term/ANSIColor.pm
%{_mandir}/man3/Term::ANSIColor*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Term-Cap
%dir %{privlib}/Term
%{privlib}/Term/Cap.pm
%{_mandir}/man3/Term::Cap.*
%endif

%files Test
%{privlib}/Test.pm
%{_mandir}/man3/Test.*

%if %{dual_life} || %{rebuild_from_scratch}
%files Test-Harness
%{_bindir}/prove
%dir %{privlib}/App
%{privlib}/App/Prove*
%{privlib}/TAP*
%dir %{privlib}/Test
%{privlib}/Test/Harness*
%{_mandir}/man1/prove.1*
%{_mandir}/man3/App::Prove*
%{_mandir}/man3/TAP*
%{_mandir}/man3/Test::Harness*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Test-Simple
%{privlib}/ok*
%dir %{privlib}/Test
%{privlib}/Test/More*
%{privlib}/Test/Builder*
%{privlib}/Test/Tester*
%{privlib}/Test/Simple*
%{privlib}/Test/Tutorial*
%{privlib}/Test/use
%{privlib}/Test2*
%{_mandir}/man3/ok*
%{_mandir}/man3/Test::More*
%{_mandir}/man3/Test::Builder*
%{_mandir}/man3/Test::Tester*
%{_mandir}/man3/Test::Simple*
%{_mandir}/man3/Test::Tutorial*
%{_mandir}/man3/Test::use::*
%{_mandir}/man3/Test2*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Text-Balanced
%dir %{privlib}/Text
%{privlib}/Text/Balanced.pm
%{_mandir}/man3/Text::Balanced.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Text-ParseWords
%dir %{privlib}/Text
%{privlib}/Text/ParseWords.pm
%{_mandir}/man3/Text::ParseWords.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Text-Tabs+Wrap
%dir %{privlib}/Text
%{privlib}/Text/Tabs.pm
%{privlib}/Text/Wrap.pm
%{_mandir}/man3/Text::Tabs.*
%{_mandir}/man3/Text::Wrap.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Thread-Queue
%dir %{privlib}/Thread
%{privlib}/Thread/Queue.pm
%{_mandir}/man3/Thread::Queue.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Time-HiRes
%dir %{archlib}/Time
%{archlib}/Time/HiRes.pm
%dir %{archlib}/auto/Time
%{archlib}/auto/Time/HiRes
%{_mandir}/man3/Time::HiRes.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Time-Local
%dir %{privlib}/Time
%{privlib}/Time/Local.pm
%{_mandir}/man3/Time::Local.*
%endif

%files Time-Piece
%dir %{archlib}/Time
%{archlib}/Time/Piece.pm
%{archlib}/Time/Seconds.pm
%dir %{archlib}/auto/Time
%{archlib}/auto/Time/Piece
%{_mandir}/man3/Time::Piece.3*
%{_mandir}/man3/Time::Seconds.3*

%if %{dual_life} || %{rebuild_from_scratch}
%files threads
%dir %{archlib}/auto/threads
%{archlib}/auto/threads/threads*
%{archlib}/threads.pm
%{_mandir}/man3/threads.3*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files threads-shared
%dir %{archlib}/auto/threads
%{archlib}/auto/threads/shared*
%dir %{archlib}/threads
%{archlib}/threads/shared*
%{_mandir}/man3/threads::shared*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Unicode-Collate
%dir %{archlib}/auto/Unicode
%{archlib}/auto/Unicode/Collate
%dir %{archlib}/Unicode
%{archlib}/Unicode/Collate
%{archlib}/Unicode/Collate.pm
%dir %{privlib}/Unicode
%{privlib}/Unicode/Collate
%{_mandir}/man3/Unicode::Collate.*
%{_mandir}/man3/Unicode::Collate::*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files Unicode-Normalize
%dir %{archlib}/auto/Unicode
%{archlib}/auto/Unicode/Normalize
%dir %{archlib}/Unicode
%{archlib}/Unicode/Normalize.pm
%{_mandir}/man3/Unicode::Normalize.*
%endif

%if %{dual_life} || %{rebuild_from_scratch}
%files version
%{privlib}/version.pm
%{privlib}/version.pod
%{privlib}/version/
%{_mandir}/man3/version.3*
%{_mandir}/man3/version::Internals.3*
%endif

%files disable-stack-unwinding
%{_sysconfdir}/perl-disable-stack-unwinding

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 358 |14mt|python-aeidon-1.13-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define url_ver %(echo %{version}|cut -d. -f1,2)
%define srcname	aeidon

Summary:	Python package for reading, writing and manipulating text-based subtitle files
Name:		python-%{srcname}
Version:	1.13
Release:	1
License:	GPLv3+
Group:		Development/Python
Url:		http://download.gna.org/gaupol/doc/api/aeidon.html
Source0:	%{pypi_source}
Patch1:		aeidon-setup.patch
BuildArch:	noarch
BuildRequires:	intltool
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
Recommends:	iso-codes
Recommends:	python3-chardet
Recommends:	python3-enchant >= 1.4.0

%description
aeidon is a Python package that provides classes and functions for dealing
with text-based subtitle files of many different formats. Functions exist
for reading and writing subtitle files as well as manipulating subtitle data,
i.e. positions (times or frames) and texts.

#----------------------------------------------------------------------------
%package -n python3-%{srcname}
Summary:	Python package for reading, writing and manipulating text-based subtitle files
Group:		Development/Python

%description -n python3-%{srcname}
aeidon is a Python package that provides classes and functions for dealing
with text-based subtitle files of many different formats. Functions exist
for reading and writing subtitle files as well as manipulating subtitle data,
i.e. positions (times or frames) and texts.

%files -n python3-%{srcname}
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{srcname}-%{version}
sed -i 's/get_aeidon_version()/"%{version}"/' setup-aeidon.py

%build
%{__python3} setup-aeidon.py build '--executable=%{__python3} -s'

%install
%{__python3} setup-aeidon.py install -O1 --skip-build --root %{buildroot}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 359 |14mt|python-aiohappyeyeballs-2.4.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name aiohappyeyeballs

Name:           python-aiohappyeyeballs
Version:        2.4.3
Release:        1
Summary:        Happy Eyeballs for asyncio
Group:          Development/Python
License:        PSF-2.0
URL:            https://github.com/aio-libs/aiohappyeyeballs
# The GitHub archive contains CHANGELOG.md and other ancillary files that the
# PyPI sdist lacks.
Source:         %{url}/archive/v%{version}/aiohappyeyeballs-%{version}.tar.gz

# Downstream-only: remove pytest options for coverage analysis
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
Patch:          0001-Downstream-only-remove-pytest-options-for-coverage-a.patch

BuildArch:      noarch

BuildRequires:  python3-devel

BuildRequires:  python3-pytest
BuildRequires:  python3-pytest-asyncio

%global common_description %{expand:
This library exists to allow connecting with Happy Eyeballs (RFC 8305) when you
already have a list of addrinfo and not a DNS name.

The stdlib version of loop.create_connection() will only work when you pass in
an unresolved name which is not a good fit when using DNS caching or resolving
names via another method such as zeroconf.}

%description %{common_description}


%package -n     python3-aiohappyeyeballs
Summary:        %{summary}
Group:          Development/Python

%description -n python3-aiohappyeyeballs %{common_description}


%prep
%autosetup -n aiohappyeyeballs-%{version} -p1


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files %{pypi_name}


%check
%pytest


%files -n python3-aiohappyeyeballs -f %{pyproject_files}
%license LICENSE
%doc CHANGELOG.md
%doc README.md

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 360 |14mt|python-aiosignal-1.3.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name aiosignal

Summary:	List of registered asynchronous callbacks
Name:		python-%{pypi_name}
Version:	1.3.1
Release:	2
License:	ASL 2.0
Group:		Development/Python
Url:		https://github.com/aio-libs/aiohttp
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildArch:      noarch

%description
A project to manage callbacks in asyncio projects.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	List of registered asynchronous callbacks
Group:		Development/Python
# python3 files were packaged to main package by mistake
Obsoletes:	python-%{pypi_name} < 1.3.1

%description -n python3-%{pypi_name}
A project to manage callbacks in asyncio projects.

%files -n python3-%{pypi_name}
%doc CHANGES.rst CONTRIBUTORS.txt README.rst LICENSE
%{python3_sitelib}/*

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 361 |14mt|python-apache-libcloud-3.8.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name apache-libcloud

Summary:       Abstract away differences among multiple cloud provider APIs
Name:          python-%{pypi_name}
Version:	3.8.0
Release:	1
License:       ASL 2.0
Group:         Development/Python
Url:           https://libcloud.apache.org
Source0:	%{pypi_source}
BuildRequires: python3-setuptools
BuildRequires: pkgconfig(python3)
Requires:      python3-simplejson
Provides:      python3-libcloud = %{EVRD}
BuildArch:     noarch

%description
Apache Libcloud is a standard Python library that abstracts away differences
among multiple cloud provider APIs.

#-------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary: Abstract away differences among multiple cloud provider APIs
Group:   Development/Python

%description -n python3-%{pypi_name}
Apache Libcloud is a standard Python library that abstracts away differences
among multiple cloud provider APIs.

%files -n python3-%{pypi_name}
%dir %{python3_sitelib}/libcloud/
%{python3_sitelib}/libcloud/*
%{python3_sitelib}/apache_libcloud-*.egg-info
#-------------------------------------------------------------------
%prep
%setup -qn apache-libcloud-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 362 |14mt|python-apipkg-3.0.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname apipkg
%global sum A Python namespace control and lazy-import mechanism

Name:		python-%{srcname}
Version:	3.0.2
Release:	1
Summary:	%{sum}
Group:		Development/Python
License:	MIT
URL:		https://pypi.org/project/apipkg/
Source0:	%{pypi_source}
BuildArch:	noarch
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros

%description
With apipkg you can control the exported namespace of a python package and
greatly reduce the number of imports for your users. It is a small python
module that works on virtually all Python versions, including CPython2.3 to
Python3.1, Jython and PyPy. It co-operates well with Python's help() system,
custom importers (PEP302) and common command line completion tools.

#--------------------------------------------------------------------------
%package -n python3-%{srcname}
Summary:	%{sum}
Group:		Development/Python

%description -n python3-%{srcname}
With apipkg you can control the exported namespace of a python package and
greatly reduce the number of imports for your users. It is a small python
module that works on virtually all Python versions, including CPython2.3 to
Python3.1, Jython and PyPy. It co-operates well with Python's help() system,
custom importers (PEP302) and common command line completion tools.

%files -n python3-%{srcname} -f %{pyproject_files}
%doc README.rst

#--------------------------------------------------------------------------

%prep
%autosetup -n %{srcname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_wheel

%install
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_install
%pyproject_save_files %{srcname}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 363 |14mt|python-astroid-3.3.4-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name astroid

%global __requires_exclude enum34|backports.functools-lru-cache|lazy-object-proxy

Summary:	Extension of compiler.ast Python pypi_name
Name:		python-%{pypi_name}
Version:	3.3.4
Release:	2
License:	GPLv2+
Group:		Development/Python
Url:		http://www.pylint.org/astroid
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(wheel)
BuildArch:	noarch

%description
This pypi_name provides a common base representation of Python source
code for Logilab projects such as pylint. It extends class defined in
the compiler.ast pypi_name with some additional methods and attributes

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Extension of compiler.ast Python pypi_name
Group:		Development/Python
Requires:	python3-lazy-object-proxy >= 1.4.0
Requires:	python3-wrapt >= 1.11
Requires:	python3-logilab-common >= 0.62.0
Provides:	python3-logilab-astng = %{EVRD}
Provides:	python3egg(logilab-astng) = %{EVRD}
Obsoletes:	python3-logilab-astng < 0.25

%description -n python3-%{pypi_name}
This pypi_name provides a common base representation of Python source
code for Logilab projects such as pylint. It extends class defined in
the compiler.ast pypi_name with some additional methods and attributes

%files -n python3-%{pypi_name}
%{python3_sitelib}/%{pypi_name}*

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 364 |14mt|python-attrdict-2.0.1-10
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Created by pyp2rpm-3.3.7
%global pypi_name attrdict

Name:           python-%{pypi_name}
Version:        2.0.1
Release:        10
Summary:        A dict with attribute-style access
Group:          Development/Python
License:        MIT License
URL:            https://github.com/bcj/AttrDict
Source0:        %{pypi_source}
Patch1:		attrdict-collections.abc.patch
BuildArch:      noarch

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3-devel

%description
AttrDict is a library that provides mapping objects that allow their elements
to be accessed both as keys and as attributes.

%package -n     python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}

Requires:       python3dist(six)

%description -n python3-%{pypi_name}
AttrDict is a library that provides mapping objects that allow their elements
to be accessed both as keys and as attributes.

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE.txt
%doc README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 365 |14mt|python-authres-1.2.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name authres
%define mod_name %{pypi_name}
%define oname authres

Summary:        authres - Authentication Results Header Module
Name:           python-%{oname}
Version:        1.2.0
Release:        1
License:        Apache-2.0
Group:          Development/Python
Url:            https://launchpad.net/authentication-results-python
Source0:        %{pypi_source}

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3dist(wheel)
BuildRequires:  python3dist(pip)
BuildArch:      noarch

%description
%{summary}.

#------------------------------------------------------------------

%package -n python3-%{oname}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{oname}
%{summary}.

%files -n python3-%{oname} -f %{pyproject_files}

#------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{mod_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 366 |14mt|python-autocommand-2.2.2-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name autocommand

Summary:	Automatically generate and run simple argparse parsers from function signatures
Name:		python-%{pypi_name}
Version:	2.2.2
Release:	2
License:	LGPLv3
Group:		Development/Python
Url:		https://github.com/Lucretiel/autocommand
Source0:	%{pypi_source}
Patch0:		autocommand-2.2.2-license.patch
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
A library to automatically generate and run simple argparse parsers
from function signatures.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Automatically generate and run simple argparse parsers from function signatures
Group:		Development/Python

%description -n python3-%{pypi_name}
A library to automatically generate and run simple argparse parsers
from function signatures.

%files -n python3-%{pypi_name}
%doc README*
%{python3_sitelib}/*

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 367 |14mt|python-babel-2.18.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# There is some bootstrapping involved when upgrading Python 3
# First of all we need babel (this package) to use sphinx
# And pytest is at this point not yet ready
%bcond bootstrap 1

# Since babel 2.12, the pytz dependency is optional.
# However, pytz is preferred when installed.
# Running tests with pytz is optional as well.
# We don't want to pull pytz into ELN/RHEL just to test integration with it,
# but we don't want to ship babel in Fedora with an untested default,
# so we make the dependency conditional.
# Ideally, the dependency would be conditional on pytz availability in the repo,
# but that's not possible in 2023 yet.
# Additionally, the date/time tests require freezegun, which is unwanted in RHEL.
%bcond datetime_tests 0

Name:           python-babel
Version:        2.18.0
Release:        1
Summary:        Tools for internationalizing Python applications

License:        BSD-3-Clause
URL:            https://babel.pocoo.org/
Source:         %{pypi_source babel}

BuildArch:      noarch

BuildRequires:  python3-devel

%if %{without bootstrap}
BuildRequires:  coreutils
# The Python test dependencies are not generated from tox.ini,
# because it would require complex patching to be usable
# and because we want to avoid the tox dependency in ELN/RHEL.
BuildRequires:  python3-pytest
%if %{with datetime_tests}
BuildRequires:  python3-freezegun
# The pytz tests are skipped when pytz is missing
BuildRequires:  python3-pytz
%endif
# build the documentation
BuildRequires:  make
BuildRequires:  python3-sphinx
%endif
Requires:       python3-babel = %{?epoch:%{epoch}:}%{version}-%{release}


%description
Babel is composed of two major parts:

* tools to build and work with gettext message catalogs

* a Python interface to the CLDR (Common Locale Data Repository),
  providing access to various locale display names, localized number
  and date formatting, etc.


%package -n python3-babel
Summary:        Library for internationalizing Python applications

%description -n python3-babel
Babel is composed of two major parts:

* tools to build and work with gettext message catalogs

* a Python interface to the CLDR (Common Locale Data Repository),
  providing access to various locale display names, localized number
  and date formatting, etc.

%if %{without bootstrap}
%package doc
Summary:        Documentation for Babel
%py_provides    python3-babel-doc

%description doc
Documentation for Babel
%endif

%prep
%autosetup -p1 -n babel-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

BUILDDIR="$PWD/built-docs"
rm -rf "$BUILDDIR"

%if %{without bootstrap}
pushd docs
make \
    SPHINXBUILD=sphinx-build-3 \
    BUILDDIR="$BUILDDIR" \
    html man
popd
rm -f "$BUILDDIR/html/.buildinfo"
%endif

%install
%pyproject_install
%pyproject_save_files babel

%if %{without bootstrap}
install -D -m 0644 built-docs/man/babel.1 %{buildroot}%{_mandir}/man1/pybabel.1
%endif

%check
export TZ=UTC
%pyproject_check_import
%if %{without bootstrap}
# The deselected doctests fail without pytz when run during Eastern Daylight Time
# https://github.com/python-babel/babel/issues/988
# The ignored files use freezegun
%pytest %{!?with_datetime_tests:\
  -k "not (babel.dates.format_time or babel.dates.get_timezone_name)" \
  --ignore tests/test_dates.py \
  --ignore tests/messages/frontend/test_cli.py \
  --ignore tests/messages/frontend/test_extract.py \
  --ignore tests/messages/frontend/test_init.py}
%endif

%files
%doc CHANGES.rst AUTHORS
%{_bindir}/pybabel

%if %{without bootstrap}
%{_mandir}/man1/pybabel.1*
%endif

%files -n python3-babel -f %{pyproject_files}

%if %{without bootstrap}
%files doc
%license LICENSE
%doc built-docs/html/*
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 368 |14mt|python-backcall-0.2.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name backcall

Summary:	Specifications for callback functions passed in to an API
Name:		python-%{pypi_name}
Version:	0.2.0
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://github.com/takluyver/backcall
Source0:	http://pypi.python.org/packages/source/b/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:	noarch

%description
If your code lets other people supply callback functions, it’s important to
specify the function signature you expect, and check that functions support
that. Adding extra parameters later would break other peoples code unless
you’re careful.
backcall provides a way of specifying the callback signature using a prototype
function.
If the callback takes fewer parameters than your prototype, backcall will wrap
it in a function that discards the extra arguments. If the callback expects
more arguments, a TypeError is thrown when it is registered.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Specifications for callback functions passed in to an API
Group:		Development/Python
BuildRequires:	pkgconfig(python3)

%description -n python3-%{pypi_name}
If your code lets other people supply callback functions, it’s important to
specify the function signature you expect, and check that functions support
that. Adding extra parameters later would break other peoples code unless
you’re careful.
backcall provides a way of specifying the callback signature using a prototype
function.
If the callback takes fewer parameters than your prototype, backcall will wrap
it in a function that discards the extra arguments. If the callback expects
more arguments, a TypeError is thrown when it is registered.

%files -n python3-%{pypi_name}
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 369 |14mt|python-beaker-1.13.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module beaker
%define pypi_name Beaker

Summary:	WSGI middleware layer to provide sessions
Name:		python-%{module}
Version:	1.13.0
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://beaker.groovie.org/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
Beaker is a caching library that includes Session and Cache objects built on
Myghty's Container API used in MyghtyUtils. WSGI middleware is also included to
manage Session objects and signed cookies.

#----------------------------------------------------------------------------

%package -n python3-%{module}
Summary:	WSGI middleware layer to provide sessions
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(setuptools)

%description -n python3-%{module}
Beaker is a caching library that includes Session and Cache objects built on
Myghty's Container API used in MyghtyUtils. WSGI middleware is also included to
manage Session objects and signed cookies.

%files -n python3-%{module}
%{python3_sitelib}/beaker/
%{python3_sitelib}/Beaker*

#----------------------------------------------------------------------------

%prep
%autosetup -n Beaker-%{version}

%build
%py3_build

%install
%py3_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 370 |14mt|python-beautifulsoup4-4.12.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define srcname beautifulsoup4

Summary:	The Screen-Scraper's Friend
Name:		python-%{srcname}
Version:	4.12.2
Release:	1
Group:		Development/Python
License:	MIT
Url:		http://www.crummy.com/software/BeautifulSoup
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:  python3dist(hatchling)
BuildRequires:  python3dist(soupsieve)
BuildArch:	noarch
%generate_buildrequires
%pyproject_buildrequires

%global _description \
The BeautifulSoup class turns arbitrarily bad HTML into a tree-like \
nested tag-soup list of Tag objects and text snippets. A Tag object \
corresponds to an HTML tag.  It knows about the HTML tag's attributes, \
and contains a representation of everything contained between the \
original tag and its closing tag (if any). It's easy to extract Tags \
that meet certain criteria.

%description
%{_description}

#------------------------------------------------------------------

%package -n python3-%{srcname}
Summary:	The Screen-Scraper's Friend
Group:		Development/Python
Requires:	python3-lxml
Provides:	python3-beautifulsoup = %{version}-%{release}

%description -n python3-%{srcname}
%{_description}

%files -n python3-%{srcname}
%doc *.txt
%{python3_sitelib}/beautifulsoup4-%{version}.dist-info/
%{python3_sitelib}/bs4

#------------------------------------------------------------------

%prep
%setup -q -n %{srcname}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install

%check
python3 -m unittest discover -s bs4 || :

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 371 |14mt|python-beniget-0.4.2.post1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name beniget

Name:           python-%{pypi_name}
Version:        0.4.2.post1
Release:        1
Summary:        Extract semantic information about static Python code
Group:          Development/Python
License:        BSD 3-Clause
URL:            https://github.com/serge-sans-paille/beniget/
Source0:        %{pypi_source}
BuildArch:      noarch

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)

%description
A static analyzer for Python3 code. Beniget provides a static over-
approximation of the global and local definitions inside Python
Module/Class/Function. It can also compute def-use chains from each definition.

#-----------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name}
A static analyzer for Python3 code.Beniget provides a static over-
approximation of the global and local definitions inside Python
Module/Class/Function. It can also compute def-use chains from each definition.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst

#-----------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}




@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 372 |14mt|python-blinker-1.7.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name blinker

Summary:	Fast, simple object-to-object and broadcast signaling
Name:		python-%{pypi_name}
Version:	1.7.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://pythonhosted.org/blinker/
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Blinker provides a fast dispatching system that allows any number of
interested parties to subscribe to events, or "signals".

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Fast, simple object-to-object and broadcast signaling
Group:		Development/Python

%description -n python3-%{pypi_name}
Blinker provides a fast dispatching system that allows any number of
interested parties to subscribe to events, or "signals".

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE.rst
%doc CHANGES.rst README.rst

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files blinker

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 373 |14mt|python-breathe-4.35.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:        Adds support for Doxygen xml output to reStructuredText and Sphinx
Name:           python-breathe
License:        BSD
Group:          Development/Python
Version:        4.35.0
Release:        1
URL:            https://github.com/michaeljones/breathe
Source0:        https://github.com/michaeljones/breathe/archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
BuildRequires:  doxygen
BuildRequires:  which
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-six
# NOTE: git is only needed because part of the build process checks if it's in a git repo
BuildRequires:  %{_bindir}/git
BuildArch:      noarch

%define _description \
Breathe is an extension to reStructuredText and Sphinx to be able to read and \
render the Doxygen xml output.

%description %_description

#------------------------------------------------------------------------------

%package -n python3-breathe
Summary:        %{summary}
Group:          Development/Python
Requires:       python3-six
Requires:       doxygen

%description -n python3-breathe
%_description

%files -n python3-breathe
%license LICENSE
%doc README.rst
%{_bindir}/breathe-apidoc
%{python3_sitelib}/*

#------------------------------------------------------------------------------
%prep
%autosetup -n breathe-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 374 |14mt|python-cachecontrol-0.14.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name cachecontrol

Summary:	Port of the caching algorithms in httplib2
Name:		python-cachecontrol
Version:	0.14.0
Release:	1
License:	ASL
Group:		Development/Python
Url:		https://github.com/ionrock/cachecontrol
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(flit-core)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
CacheControl is a port of the caching algorithms in httplib2 for use with
requests session object.
It was written because httplib2’s better support for caching is often
mitigated by its lack of thread safety. The same is true of requests in terms of caching.

#----------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Port of the caching algorithms in httplib2
Group:		Development/Python

%description -n python3-%{pypi_name}
CacheControl is a port of the caching algorithms in httplib2 for use with
requests session object.
It was written because httplib2’s better support for caching is often
mitigated by its lack of thread safety. The same is true of requests in terms of caching.

%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE.txt
%{_bindir}/doesitcache
%{python3_sitelib}/*

#----------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

rm -rf *.egg-info

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 375 |14mt|python-cachetools-5.5.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name cachetools

Summary:	Extensible memoizing collections and decorators
Name:		python-cachetools
Version:	5.5.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/tkem/cachetools
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
This module provides various memoizing collections and decorators,
including a variant of the Python 3 Standard Library `@lru_cache`_
function decorator.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Extensible memoizing collections and decorators
Group:		Development/Python

%description -n python3-%{pypi_name}
This module provides various memoizing collections and decorators,
including a variant of the Python 3 Standard Library `@lru_cache`_
function decorator.

%files -n python3-%{pypi_name}
%doc README.rst
%doc LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 376 |14mt|python-cairocffi-1.7.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name cairocffi
%global pypi_oname cairocffi

Summary:	cffi-based cairo bindings for Python
Name:		python-%{pypi_name}
Version:	1.7.1
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://pypi.python.org/pypi/%{pypi_name}
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(cffi)
BuildRequires:	python3dist(pytest-runner)
BuildArch:	noarch

%description
cffi-based cairo bindings for Python.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	cffi-based cairo bindings for Python
Group:		Development/Python

%description -n python3-%{pypi_name}
cffi-based cairo bindings for Python.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc LICENSE README.rst

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_oname}-%{version}
%autopatch -p1

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files cairocffi

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 377 |14mt|python-caja-1.28.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define url_ver %(echo %{version}|cut -d. -f1,2)

Summary:	Python bindings for MATE's caja
Summary(ru_RU.UTF-8):	Привязки Python для caja от MATE
Name:		python-caja
Version:	1.28.0
Release:	1
License:	GPLv2+ and LGPLv2+
Group:		Development/Python
Url:		http://mate-desktop.org
Source0:	http://pub.mate-desktop.org/releases/%{url_ver}/%{name}-%{version}.tar.xz
BuildRequires:	mate-common
BuildRequires:	pkgconfig(libcaja-extension)
BuildRequires:	pkgconfig(pygobject-3.0)
BuildRequires:	pkgconfig(python3)

%description
These are bindings for the caja extension library introduced in MATE.

%description -l ru_RU.UTF-8
Это привязки для библиотеки расширений caja, представленной в MATE.

#----------------------------------------------------------------------------
%package -n python3-caja
Summary:	Python3 bindings for MATE's caja
Summary(ru_RU.UTF-8):	Привязки Python3 для caja от MATE
Obsoletes:	python-caja < 1.22.0-2

%description -n python3-caja
These are bindings for the caja extension library introduced in MATE.

%description -n python3-caja -l ru_RU.UTF-8
Это привязки для библиотеки расширений caja, представленной в MATE.

%files -n python3-caja -f %{name}.lang
%doc AUTHORS ChangeLog NEWS
%{_libdir}/caja/extensions-2.0/*
%{_datadir}/caja/extensions/*

#----------------------------------------------------------------------------

%package -n python3-caja-devel
Summary:	Pkgconfig file and examples for %{name}
Summary(ru_RU.UTF-8):	Файл Pkgconfig и примеры для %{name}
Group:		Development/Python
Requires:	python3-caja = %{EVRD}

%description -n python3-caja-devel
This package contains Pkgconfig file for %{name}.

%description -n python3-caja-devel -l ru_RU.UTF-8
Этот пакет содержит файл Pkgconfig для %{name}.

%files -n python3-caja-devel
%doc AUTHORS ChangeLog NEWS
%{_libdir}/pkgconfig/caja-python.pc
%{_docdir}/python-caja

#----------------------------------------------------------------------------

%prep
%autosetup -p1

%build
%configure

%make_build

%install
%make_install

%find_lang %{name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 378 |14mt|python-cargo2rpm-0.3.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module	cargo2rpm

Summary:	Translation layer between cargo and RPM
Group:		Development/Python
Name:		python-cargo2rpm
Version:	0.3.3
Release:	1
License:	MIT
Url:		https://codeberg.org/rust2rpm/cargo2rpm
Source0:	https://codeberg.org/rust2rpm/cargo2rpm/archive/v%{version}.tar.gz#/%{module}-%{version}.tar.gz

BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(wheel)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Translation layer between cargo and RPM

#---------------------------------------------------
%package -n python3-%{module}
Summary:	Translation layer between cargo and RPM
Group:		Development/Python

%description -n python3-%{module}
Translation layer between cargo and RPM

%files -n python3-%{module}
%doc *.md
%license LICENSE
%{_bindir}/cargo2rpm
%{python3_sitelib}/cargo2rpm
%{python3_sitelib}/cargo2rpm-%{version}*-info

#-----------------------------------------------------

%prep
%autosetup -p1 -n %{module}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 379 |14mt|python-cattrs-24.1.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name cattrs

%global _description %{expand:
cattrs is an open source Python library for structuring and
unstructuring data. cattrs works best with attrs classes and the usual
Python collections, but other kinds of classes are supported by
manually registering converters.}

Name:           python-cattrs
Version:	24.1.2
Release:	1
Summary:        Python library for structuring and unstructuring data
Group:          Development/Python
License:        MIT
URL:            https://github.com/python-attrs/cattrs
BuildArch:      noarch
# The GitHub archive contains tests and docs, which the PyPI sdist lacks
#Source0:	%{pypi_source}
Source0:	%{pypi_source}


BuildRequires:  python3-devel

# [tool.poetry.dev-dependencies]
# We can’t easily generate the “dev” dependencies from Poetry, so we maintain
# them manually:

%description %_description

%package -n python3-%{pypi_name}
Group:          Development/Python
Summary:        %{summary}

%description -n python3-%{pypi_name} %_description

%prep
%autosetup -n %{pypi_name}-%{version}

# loosen requirement
sed -i 's/poetry-core.*"/poetry-core"/' pyproject.toml
# Don’t run benchmarks, either.
sed -r -i 's/ --benchmark[^[:blank:]"]*//g' pyproject.toml

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files cattrs cattr

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 380 |14mt|python-cffi-2.1.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-cffi
Version:        2.1.1
Release:        1
Summary:        Foreign Function Interface for Python to call C code
# cffi is MIT
# cffi/_imp_emulation.py has bits copied from CPython (PSF-2.0)
License:        MIT AND PSF-2.0
URL:            https://github.com/python-cffi/cffi
Source:         %{url}/archive/v%{version}/cffi-%{version}.tar.gz

BuildRequires:  python3-devel
BuildRequires:  pkgconfig(libffi)

# For tests:
BuildRequires:  gcc-c++

%description
Foreign Function Interface for Python, providing a convenient and
reliable way of calling existing C code from Python. The interface is
based on LuaJIT’s FFI.


%package -n python3-cffi
Summary:        %{summary}

%description -n python3-cffi
Foreign Function Interface for Python, providing a convenient and
reliable way of calling existing C code from Python. The interface is
based on LuaJIT’s FFI.


%prep
%autosetup -p1 -n cffi-%{version}


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files _cffi_backend cffi

%files -n python3-cffi -f %{pyproject_files}
%doc README.md
%{_bindir}/cffi-gen-src

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 381 |14mt|python-chardet-7.6.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name chardet

Summary:	Character encoding auto-detection in Python
Name:		python-%{pypi_name}
Version:	7.6.0
Release:	1
License:	LGPLv2+
Group:		Development/Python
Url:		http://chardet.feedparser.org/
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Character encoding auto-detection in Python. As smart as your browser.

#----------------------------------------------------------------------------

%package -n python3-chardet
Summary:	Character encoding auto-detection in Python
Group:		Development/Python

%description -n python3-chardet
Character encoding auto-detection in Python. As smart as your browser.

%files -n python3-chardet -f %{pyproject_files}
%license LICENSE
%{_bindir}/chardetect

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files chardet

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 382 |14mt|python-cmd2-2.4.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name cmd2

Summary:	Extra features for standard library's cmd module
Name:		python-%{pypi_name}
Version:	2.4.3
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://pypi.python.org/pypi/cmd2
Source0:	%{pypi_source}
BuildArch:	noarch

%description
Enhancements for standard library's cmd module.

Drop-in replacement adds several features for command-prompt tools:

 * Searchable command history (commands: "hi", "li", "run")
 * Load commands from file, save to file, edit commands in file
 * Multi-line commands
 * Case-insensitive commands
 * Special-character shortcut commands (beyond cmd's "@" and "!")
 * Settable environment parameters
 * Parsing commands with flags
 * > (filename), >> (filename) redirect output to file
 * < (filename) gets input from file
 * bare >, >>, < redirect to/from paste buffer
 * accepts abbreviated commands when unambiguous
 * `py` enters interactive Python console
 * test apps against sample session transcript (see example/example.py)

Usable without modification anywhere cmd is used; simply import cmd2.Cmd
in place of cmd.Cmd.

See docs at http://packages.python.org/cmd2/

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Extra features for standard library's cmd module
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-setuptools
BuildRequires:	python3-setuptools_scm
BuildRequires:	dos2unix
Requires:	python3-pyparsing
Requires:	python3-pyperclip
Requires:	python3-six
Requires:	python3-wcwidth
Requires:	/usr/bin/which

%description -n python3-%{pypi_name}
Enhancements for standard library's cmd module.

Drop-in replacement adds several features for command-prompt tools:

 * Searchable command history (commands: "hi", "li", "run")
 * Load commands from file, save to file, edit commands in file
 * Multi-line commands
 * Case-insensitive commands
 * Special-character shortcut commands (beyond cmd's "@" and "!")
 * Settable environment parameters
 * Parsing commands with flags
 * > (filename), >> (filename) redirect output to file
 * < (filename) gets input from file
 * bare >, >>, < redirect to/from paste buffer
 * accepts abbreviated commands when unambiguous
 * `py` enters interactive Python console
 * test apps against sample session transcript (see example/example.py)

Usable without modification anywhere cmd is used; simply import cmd2.Cmd
in place of cmd.Cmd.

See docs at http://packages.python.org/cmd2/

%files -n python3-%{pypi_name}
%license LICENSE
%doc CHANGELOG.md README.md
%{python3_sitelib}/cmd2
%{python3_sitelib}/%{pypi_name}-%{version}*

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 383 |14mt|python-colorama-0.4.6-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name colorama

Summary:	Cross-platform colored terminal text
Name:		python-%{pypi_name}
Version:	0.4.6
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://github.com/tartley/colorama
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Makes ANSI escape character sequences (for producing colored
terminal text and cursor positioning) work under MS Windows.

ANSI escape character sequences have long been used to produce
colored terminal text and cursor positioning on Unix and Macs.
Colorama makes this work on Windows, too, by wrapping stdout,
stripping ANSI sequences it finds (which would appear as gobbledygook
in the output), and converting them into the appropriate win32 calls
to modify the state of the terminal.
On other platforms, Colorama does nothing.

#---------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Cross-platform colored terminal text
Group:		Development/Python

%description -n python3-%{pypi_name}
Makes ANSI escape character sequences (for producing colored
terminal text and cursor positioning) work under MS Windows.
ANSI escape character sequences have long been used to produce
colored terminal text and cursor positioning on Unix and Macs.
Colorama makes this work on Windows, too, by wrapping stdout,
stripping ANSI sequences it finds (which would appear as gobbledygook
in the output), and converting them into the appropriate win32 calls
to modify the state of the terminal.
On other platforms, Colorama does nothing.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc CHANGELOG.rst LICENSE.txt README.rst

#---------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files colorama

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 384 |14mt|python-colorlog-6.12.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name colorlog
%global desc "colorlog.ColoredFormatter is a formatter for use with Python's logging module that outputs records using terminal colors."

Name:           python-%{pypi_name}
Version:        6.12.0
Release:        1
Summary:        Colored formatter for the Python logging module

License:        MIT
URL:            https://github.com/borntyping/python-colorlog
Source0:        %{pypi_source}
BuildArch:      noarch

BuildRequires:  python3-devel

%generate_buildrequires
%pyproject_buildrequires

%description
%{desc}

%package -n python3-%{pypi_name}
Summary:        %{summary}

%description -n python3-%{pypi_name}
%{desc}

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install

%files -n python3-%{pypi_name}
%doc README.md
%license LICENSE
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}*.dist-info/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 385 |14mt|python-configparser-6.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name configparser

Summary:        Configparser module
Name:           python-%{pypi_name}
Version:        6.0.0
Release:        1
Group:          Development/Python
License:        MIT
URL:            https://pypi.org/project/%{pypi_name}
Source0:        %{pypi_source}
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(setuptools-scm)
BuildRequires:  python3dist(toml)
BuildRequires:  python3dist(wheel)
BuildRequires:  python3dist(pip)
Requires:       python3dist(setuptools)
Provides:       python3-%{pypi_name} = %{EVRD}
BuildArch:      noarch

%description
The ancient ConfigParser module available in the standard library 2.x
has seen a major update in Python 3.2. This package is a backport of
those changes so that they can be used directly in Python 2.6 - 3.5.
#--------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:      Configparser module
Group:        Development/Python
Obsoletes:    python3-backports-common < %{EVRD}

%description -n python3-%{pypi_name}
The ancient ConfigParser module available in the standard library 2.x
has seen a major update in Python 3.2. This package is a backport of
those changes so that they can be used directly in Python 2.6 - 3.5.

%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/backports/%{pypi_name}
%{python3_sitelib}/%{pypi_name}/__init__.py
%{python3_sitelib}/%{pypi_name}-%{version}*-info
%{python3_sitelib}/%{pypi_name}/__pycache__
#--------------------------------------------------------------------

%prep
%setup -q -n  %{pypi_name}-%{version}

%build
%pyproject_wheel


%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 386 |14mt|python-construct-2.10.70-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name construct

Summary:	A powerful declarative parser/builder for binary data
Name:		python-%{pypi_name}
Version:	2.10.70
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://construct.readthedocs.org
Source0:	%{pypi_source}
BuildArch:	noarch

%description
Construct is a powerful declarative parser (and builder) for binary
data.

Instead of writing imperative code to parse a piece of data, you
declaratively define a data structure that describes your data. As
this data structure is not code, you can use it in one direction to
parse data into Pythonic objects, and in the other direction, convert
(build) objects into binary data.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A powerful declarative parser/builder for binary data
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(setuptools)

%description -n python3-%{pypi_name}
Construct is a powerful declarative parser (and builder) for binary
data.

Instead of writing imperative code to parse a piece of data, you
declaratively define a data structure that describes your data. As
this data structure is not code, you can use it in one direction to
parse data into Pythonic objects, and in the other direction, convert
(build) objects into binary data.

This is the Python 3 version of the package.

%files -n python3-%{pypi_name}
%doc README.rst LICENSE
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-*.egg-info

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py3_build

%install
%py3_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 387 |14mt|python-coverage-7.6.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name coverage

Summary:	Code coverage measurement for Python
Name:		python-%{pypi_name}
Version:	7.6.1
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://nedbatchelder.com/code/coverage/
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)

%description
Coverage measures code coverage, typically during test execution. It
uses the code analysis tools and tracing hooks provided in the Python
standard library to determine which lines are executable, and which
have been executed.

#----------------------------------------------------------------------------

%package -n python3-coverage
Summary:	Code coverage measurement for Python
Group:		Development/Python

%description -n python3-coverage
Coverage measures code coverage, typically during test execution. It
uses the code analysis tools and tracing hooks provided in the Python
standard library to determine which lines are executable, and which
have been executed.

%files -n python3-coverage
%{_bindir}/coverage
%{_bindir}/coverage3
%{_bindir}/coverage-%{python3_version}
%{python3_sitearch}/coverage
%{python3_sitearch}/coverage-*.dist-info

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 388 |14mt|python-cparser-3.00-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-cparser
Summary:        C parser and AST generator written in Python
Version:        3.00
Release:        1
License:        BSD-3-Clause

URL:            https://github.com/eliben/pycparser
Source0:        %{url}/archive/release_v%{version}/pycparser-release_v%{version}.tar.gz
Source1:        pycparser-3.00-remove-relative-sys-path.py

# Drop redundant BuildRequires for python3-wheel
# https://github.com/fedora-eln/eln/issues/284
Patch:          https://github.com/eliben/pycparser/commit/8c219ec6.patch

BuildArch:      noarch
BuildRequires:  python3-devel

%description
pycparser is a complete parser for the C language, written in pure Python.
It is a module designed to be easily integrated into applications that
need to parse C source code.

%package -n python3-cparser
Summary:        %{summary}

%description -n python3-cparser
pycparser is a complete parser for the C language, written in pure Python.
It is a module designed to be easily integrated into applications that
need to parse C source code.

%prep
%autosetup -p1 -n pycparser-release_v%{version}

# Remove relative sys.path from the examples
%{python3} %{SOURCE1} examples

%generate_buildrequires
%pyproject_buildrequires

%build
pushd pycparser
%{python3} _ast_gen.py
popd
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files -l pycparser

%files -n python3-cparser -f %{pyproject_files}
%doc README.rst
%doc examples

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 389 |14mt|python-crashtest-0.4.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name crashtest

%global common_description %{expand:
Crashtest is a Python library that makes exceptions handling and
inspection easier.}

Name:           python-%{pypi_name}
Version:        0.4.1
Release:        1
Summary:        Manage Python errors with ease
Group:          Development/Python
License:        MIT

URL:            https://github.com/sdispater/crashtest
Source0:        %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-pytest
BuildRequires:  pyproject-rpm-macros

%description %{common_description}

#---------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name} %{common_description}

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.md

#---------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1


%generate_buildrequires
%pyproject_buildrequires -r


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files %{pypi_name}


%check
%pytest

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 390 |14mt|python-cwcwidth-0.1.10-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name cwcwidth

Name:           python-%{pypi_name}
Version:        0.1.10
Release:        2
Summary:        Python bindings for wc(s)width
Group:          Development/Python
License:        MIT
URL:            https://github.com/sebastinas/cwcwidth
Source0:        %{pypi_source}

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(cython)

%description
Python bindings for wc(s)widthcwcwidth provides Python bindings for wcwidth and
wcswidth functions defined in POSIX.1-2001 and POSIX.1-2008 based on Cython.
These functions compute the printable length of a unicode character/string on a
terminal. The module provides the same functions as wcwidth and its behavior is
compatible.

%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name}
Python bindings for wc(s)widthcwcwidth provides Python bindings for wcwidth and
wcswidth functions defined in POSIX.1-2001 and POSIX.1-2008 based on Cython.
These functions compute the printable length of a unicode character/string on a
terminal. The module provides the same functions as wcwidth and its behavior is
compatible.

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%check
(cd tests ; PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m unittest -v)

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 391 |14mt|python-dacite-1.8.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define srcname dacite

Name:		python-dacite
Version:	1.8.1
Release:	1
Summary:	Simple creation of data classes from dictionaries
Group:		Development/Python
License:	MIT
URL:		https://github.com/konradhalas/dacite
Source0:	https://github.com/konradhalas/dacite/archive/refs/tags/v%{version}.tar.gz?/%{srcname}-%{version}.tar.gz
BuildRequires:	python3-pip
BuildRequires:	python3-setuptools
BuildRequires:	python3-wheel
BuildRequires:	python3-devel
BuildRequires:	unzip
BuildRequires:	fdupes
BuildArch:	noarch

%description
Simplifies creating type-hinted data transfer objects (DTOs)
from dictionaries, useful for data from HTTP requests or databases.
It complements Python's dataclasses and isn't a validation library.
For validation, combine it with other libraries.

#----------------------------------------------
%package -n python3-%{srcname}
Summary:	Simple creation of data classes from dictionaries
Group:		Development/Python

%description -n python3-%{srcname}
Simplifies creating type-hinted data transfer objects (DTOs)
from dictionaries, useful for data from HTTP requests or databases.
It complements Python's dataclasses and isn't a validation library.
For validation, combine it with other libraries.

%files -n python3-%{srcname}
%{python3_sitelib}/dacite
%{python3_sitelib}/dacite-%{version}.dist-info

#----------------------------------------------
%prep
%autosetup -p1 -n dacite-%{version}
sed -ri 's/--benchmark-[^ "]+//g' pyproject.toml

%build
%pyproject_wheel

%install
%pyproject_install
%fdupes %{buildroot}%{python3_sitelib}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 392 |14mt|python-dasbus-1.7-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname dasbus
Summary:        DBus library in Python 3
Group:			Development/Python
Name:           python-%{srcname}
Version:	1.7
Release:	1
Epoch:			1
License:        LGPLv2+
URL:            https://pypi.python.org/pypi/dasbus
Source0:	%{pypi_source}
BuildArch:      noarch

%description
Dasbus is a DBus library written in Python 3, based on
GLib and inspired by pydbus. It is designed to be easy
to use and extend.

#----------------------------------------------------------

%package -n python3-%{srcname}
Summary:        %{summary}
Group:			Development/Python
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
Requires:       python3-gi-cairo
%{?python_provide:%python_provide python3-%{srcname}}
%{?python_provide:%python_provide python-%{srcname}}

%description -n python3-%{srcname}
Dasbus is a DBus library written in Python 3, based on
GLib and inspired by pydbus. It is designed to be easy
to use and extend.

%files -n python3-%{srcname}
%doc LICENSE README.md
%{python3_sitelib}/%{srcname}-*.dist-info/
%{python3_sitelib}/%{srcname}/

#----------------------------------------------------------

%prep
%setup -qn %{srcname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 393 |14mt|python-dateutil-2.8.2-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define fname dateutil

Name:		python-dateutil
Version:	2.8.2
Release:	2
License:	Python
Summary:	Provides powerful extensions to the standard datetime module
Group:		Development/Python
Url:		https://dateutil.readthedocs.io/en/stable/
Source0:	https://pypi.python.org/packages/source/p/python-dateutil/python-%{fname}-%{version}.tar.gz
BuildArch:	noarch
BuildRequires:	python3-setuptools >= 3.0
BuildRequires:	python3dist(setuptools-scm)
BuildRequires:	pkgconfig(python3)

%description
The dateutil module provides powerful extensions to the standard
datetime module available in Python. Features include:

* Computing of relative deltas (next month, next year, next monday,
  last week of month, etc);
* Computing of relative deltas between two given date and/or datetime
  objects;
* Computing of dates based on very flexible recurrence rules, using a
  superset of the iCalendar specification. Parsing of RFC strings is
  supported as well;
* Generic parsing of dates in almost any string format;
* Timezone (tzinfo) implementations for tzfile(5) format files
  (/etc/localtime, /usr/share/zoneinfo, etc), TZ environment string
  (in all known formats), iCalendar format files, given ranges (with
  help from relative deltas), local machine timezone, fixed offset
  timezone, UTC timezone, and Windows registry-based time zones;
* Internal up-to-date world timezone information based on Olson's
  database;
* Computing of Easter Sunday dates for any given year, using Western,
  Orthodox or Julian algorithms;
* More than 400 test cases.

#----------------------------------------------------------------
%package -n python3-dateutil
Summary:	Provides powerful extensions to the standard datetime module
Group:		Development/Python
Requires:	python3 >= 3.0
Requires:	timezone
#Provides:	python3-dateutil
#Provides:	python3dist(dateutil)

%description -n python3-dateutil
The dateutil module provides powerful extensions to the standard
datetime module available in Python. Features include:

* Computing of relative deltas (next month, next year, next monday,
  last week of month, etc);
* Computing of relative deltas between two given date and/or datetime
  objects;
* Computing of dates based on very flexible recurrence rules, using a
  superset of the iCalendar specification. Parsing of RFC strings is
  supported as well;
* Generic parsing of dates in almost any string format;
* Timezone (tzinfo) implementations for tzfile(5) format files
  (/etc/localtime, /usr/share/zoneinfo, etc), TZ environment string
  (in all known formats), iCalendar format files, given ranges (with
  help from relative deltas), local machine timezone, fixed offset
  timezone, UTC timezone, and Windows registry-based time zones;
* Internal up-to-date world timezone information based on Olson's
  database;
* Computing of Easter Sunday dates for any given year, using Western,
  Orthodox or Julian algorithms;
* More than 400 test cases.


%files -n python3-dateutil
%doc LICENSE NEWS
%{python3_sitelib}/%{fname}
%{python3_sitelib}/python_%{fname}-*.dist-info

#----------------------------------------------------------------
%prep
%setup -q -n python-%{fname}-%{version}
rm -rf python_dateutil.egg-info/

iconv --from=ISO-8859-1 --to=UTF-8 NEWS > NEWS.new
mv NEWS.new NEWS

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 394 |14mt|python-dbusmock-0.29.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name	dbusmock

Name:		python-%{pypi_name}
Version:	0.29.1
Release:	1
Summary:	Mock D-Bus objects
Group:		Development/Python
License:	LGPLv3+
URL:		http://pypi.python.org/pypi/python-dbusmock
# http://pypi.io/packages/source/p/%%{name}/%%{name}-%%{version}.tar.gz
Source0:	https://github.com/martinpitt/python-dbusmock/releases/download/%{version}/dist.%{name}-%{version}.tar.gz
BuildArch:	noarch
BuildRequires:	dbus-x11
BuildRequires:	upower

BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(nose)
BuildRequires:	python3dist(dbus-python)
BuildRequires:	python3-gobject3

%description
With this program/Python library you can easily create mock objects on
D-Bus. This is useful for writing tests for software which talks to
D-Bus services such as upower, systemd, ConsoleKit, gnome-session or
others, and it is hard (or impossible without root privileges) to set
the state of the real services to what you expect in your tests.

#------------------------------------------------
%package -n	python3-%{pypi_name}
Summary:	Mock D-Bus objects (in Python3)
Group:		Development/Python
Requires:	dbus-x11
Requires:	python3dist(dbus-python)
Requires:	python3dist(pygobject)

%description -n	python3-%{pypi_name}
With this program/Python3 library you can easily create mock objects on
D-Bus. This is useful for writing tests for software which talks to
D-Bus services such as upower, systemd, ConsoleKit, gnome-session or
others, and it is hard (or impossible without root privileges) to set
the state of the real services to what you expect in your tests.

This is the Python 3 version of the package.

%files -n python3-%{pypi_name}
%doc README* COPYING
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/python_%{pypi_name}-*.dist-info

#------------------------------------------------

%prep
%setup -q

# Remove bundled egg-info
rm -rf *.dist-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%check
%define enable_tests_python3 0
%if %{enable_tests_python3}
python3 setup.py test
%endif


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 395 |14mt|python-decorator-5.1.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name    decorator

Summary:        Python decorator utilities
Name:           python-%{pypi_name}
Version:	5.1.1
Release:	1
Url:            http://pypi.python.org/pypi/decorator/
Source0:	%{pypi_source}
License:        BSD
Group:          Development/Python
BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description
The aim of the decorator module it to simplify the usage of decorators
for the average programmer, and to popularize decorators by showing
various non-trivial examples. Of course, as all techniques, decorators
can be abused and you should not try to solve every problem with a
decorator, just because you can.

#-------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        Python decorator utilities
Group:          Development/Python

%description -n python3-%{pypi_name}
The aim of the decorator module it to simplify the usage of decorators
for the average programmer, and to popularize decorators by showing
various non-trivial examples. Of course, as all techniques, decorators
can be abused and you should not try to solve every problem with a
decorator, just because you can.

%files -n python3-%{pypi_name}
%doc LICENSE.txt README.rst
%{python3_sitelib}/%{pypi_name}*
%{python3_sitelib}/__pycache__/*

#-------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 396 |14mt|python-distro-1.9.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name distro

Name:		python-%{pypi_name}
Version:	1.9.0
Release:	1
Summary:	Linux Distribution - a Linux OS platform information API
Group:		Development/Python
License:	ASL 2.0
URL:		https://github.com/nir0s/distro
Source0:	%{pypi_source}
BuildArch:	noarch

%global _description \
The distro (for: Linux Distribution) package provides information about the\
Linux distribution it runs on, such as a reliable machine-readable ID, or\
version information.\
\
It is a renewed alternative implementation for Python's original\
platform.linux_distribution function, but it also provides much more\
functionality. An alternative implementation became necessary because\
Python 3.5 deprecated this function, and Python 3.7 is expected to remove it\
altogether. Its predecessor function platform.dist was already deprecated since\
Python 2.6 and is also expected to be removed in Python 3.7. Still, there are\
many cases in which access to that information is needed. See Python issue 1322\
for more information.

%description %{_description}

#--------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
Recommends:	lsb-release

%description -n python3-%{pypi_name} %{_description}

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc *.md
%license LICENSE

#--------------------------------------------------------------

%package cli
Summary:	%{summary}
Group:		Development/Python
Requires:	python3-%{pypi_name} = %{EVRD}

%description cli %{_description}

This package provides the %{_bindir}/distro CLI utility.

%files cli
%{_bindir}/distro

#--------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 397 |14mt|python-docutils-0.20.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name docutils
%define enable_tests 1

Name:		python-%{pypi_name}
Summary:	Python Documentation Utilities
Version:	0.20.1
Release:	1
URL:		http://docutils.sourceforge.net/
License:	Public Domain and BSD and Python and GPLv3+
Group:		Development/Python
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
The Docutils project specifies a plaintext markup language, reStructuredText,
which is easy to read and quick to write.  The project includes a python
library to parse rST files and transform them into other useful formats such
as HTML, XML, and TeX as well as commandline tools that give the enduser
access to this functionality.

Currently, the library supports parsing rST that is in standalone files and
PEPs (Python Enhancement Proposals).  Work is underway to parse rST from
Python inline documentation modules and packages.

#------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	System for processing plaintext documentation for python3
Group:		Development/Python
Recommends:	python3dist(pillow)
Conflicts:	python2-docutils < 0.14-3
Provides:	rst2html = %{version}-%{release}
Provides:	rst2man = %{version}-%{release}

%description -n python3-%{pypi_name}
The Docutils project specifies a plaintext markup language, reStructuredText,
which is easy to read and quick to write.  The project includes a python
library to parse rST files and transform them into other useful formats such
as HTML, XML, and TeX as well as commandline tools that give the enduser
access to this functionality.

Currently, the library supports parsing rST that is in standalone files and
PEPs (Python Enhancement Proposals).  Work is underway to parse rST from
Python inline documentation modules and packages.

This package contains the module, ported to run under python3.

#------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

# Remove shebang from library files
for file in docutils/utils/{code_analyzer.py,punctuation_chars.py,error_reporting.py} docutils/utils/math/{latex2mathml.py,math2html.py} docutils/writers/xetex/__init__.py; do
sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $file
done

iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp
mv tmp tools/editors/emacs/IDEAS.rst

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

# docutils setup.py runs 2to3 on a copy of the tests and puts it in sitelib.
rm -rf %{buildroot}%{python3_sitelib}/test


for file in %{buildroot}%_bindir/*.py; do
  mv $file %{buildroot}%_bindir/`basename $file .py`
done

# We want the licenses but don't need this build file
rm -f licenses/docutils.conf

%files -n python3-%{pypi_name}
%doc BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
%doc THANKS.txt licenses docs tools/editors
%{python3_sitelib}/*
%{_bindir}/docutils
%{_bindir}/rst2html
%{_bindir}/rst2html4
%{_bindir}/rst2html5
%{_bindir}/rst2latex
%{_bindir}/rst2man
%{_bindir}/rst2odt
%{_bindir}/rst2odt_prepstyles
%{_bindir}/rst2pseudoxml
%{_bindir}/rst2s5
%{_bindir}/rst2xetex
%{_bindir}/rst2xml
%{_bindir}/rstpep2html

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 398 |14mt|python-doxyqml-0.5.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name doxyqml

Summary:	Doxyqml lets you use Doxygen to document your QML classes
Name:		python-%{pypi_name}
Version:	0.5.3
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://agateau.com/projects/doxyqml/
Source0:	%{pypi_source}
BuildRequires:	python3-setuptools
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Doxyqml lets you use Doxygen to document your QML classes. It integrates
as a Doxygen input filter to turn .qml files into pseudo-C++ which Doxygen
can then use to generate documentation.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Doxyqml lets you use Doxygen to document your QML classes
Group:		Development/Python

%description -n python3-%{pypi_name}
Doxyqml lets you use Doxygen to document your QML classes. It integrates
as a Doxygen input filter to turn .qml files into pseudo-C++ which Doxygen
can then use to generate documentation.

%files -n python3-%{pypi_name}
%{_bindir}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}*.dist-info
%{python3_sitelib}/%{pypi_name}

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 399 |14mt|python-enchant-3.2.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyenchant

Summary:	Python bindings for Enchant spellchecking library
Name:		python-enchant
Version:	3.2.2
Release:	1
License:	LGPL
Group:		Development/Python
Url:		https://pyenchant.github.io/pyenchant/
Source0:	%{pypi_source}
BuildRequires:	python3dist(setuptools)
BuildRequires:  pkgconfig(python3)
BuildArch:	noarch

%define _description %{expand:
PyEnchant is a spellchecking library for Python, based on the excellent Enchant
library.
PyEnchant combines all the functionality of the underlying Enchant library with
the flexibility of Python and a nice "Pythonic" object-oriented interface.
}

%description
%{_description}

#------------------------------------------------------------------------------

%package -n python3-enchant
Summary:	%{summary}
Provides:	PyEnchant = %{EVRD}
Provides:	python3-pyenchant = %{EVRD}
Requires:	enchant2

%description -n python3-enchant
%{_description}

%files -n python3-enchant
%doc README.rst Changelog
%license LICENSE.txt
%{python3_sitelib}/enchant
%{python3_sitelib}/*.egg-info

#------------------------------------------------------------------------------

%prep
%autosetup -p1 -n pyenchant-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 400 |14mt|python-entrypoints-0.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name entrypoints

Summary:	Discover and load entry points from installed packages
Name:		python-%{pypi_name}
Version:	0.4
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/takluyver/entrypoints
Source0:	%{pypi_source}
BuildArch:	noarch

%description
The entrypoints module contains functions to find and load entry points.


#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Discover and load entry points from installed packages
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(flit-core)
BuildRequires:	python3dist(wheel)
BuildRequires:	python3dist(pip)

%description -n python3-%{pypi_name}
The entrypoints module contains functions to find and load entry points.

%files -n python3-%{pypi_name}
%doc LICENSE
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/%{pypi_name}.py*
%{python3_sitelib}/%{pypi_name}-%{version}*-info

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 401 |14mt|python-et_xmlfile-1.1.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name et_xmlfile

Summary:	An implementation of lxml.xmlfile for the standard library
Name:		python-%{pypi_name}
Version:	1.1.0
Release:	2
License:	MIT
Group:		Development/Python
Url:		https://pypi.python.org/pypi/%{pypi_name}
Source0:	%{pypi_source}
BuildArch:	noarch

%description
et_xmlfile is a low memory library for creating large XML files. It is based
upon the xmlfile module from lxml with the aim of allowing code to be developed
that will work with both libraries. It was developed initially for the openpyxl
project but is now a standalone module.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	An implementation of lxml.xmlfile for the standard library
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
Requires:	python3-jdcal

%description -n python3-%{pypi_name}
et_xmlfile is a low memory library for creating large XML files. It is based
upon the xmlfile module from lxml with the aim of allowing code to be developed
that will work with both libraries. It was developed initially for the openpyxl
project but is now a standalone module.

%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/%{pypi_name}-*.dist-info/
%{python3_sitelib}/%{pypi_name}/

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
rm -rf *.dist-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 402 |14mt|python-evdev-1.7.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	pypi_name	evdev

Name:		python-%{pypi_name}
Version:	1.7.1
Release:	2
Summary:	Bindings to the Linux input handling subsystem
Group:		Development/Python
Url:		https://github.com/gvalkov/python-evdev
Source0:	%{pypi_source}
License:	Revised BSD License
BuildRequires:	python3-devel

%description
*evdev*
-------

This package provides bindings to the generic input event interface in
Linux. The *evdev* interface serves the purpose of passing events
generated in the kernel directly to userspace through character
devices that are typically located in ``/dev/input/``.

This package also comes with bindings to *uinput*, the userspace input
subsystem. *Uinput* allows userspace programs to create and handle
input devices that can inject events directly into the input
subsystem.

Documentation:
    http://python-evdev.readthedocs.io/en/latest/

Development:
    https://github.com/gvalkov/python-evdev

Package:
    http://pypi.python.org/pypi/evdev

Changelog:
    http://python-evdev.readthedocs.io/en/latest/changelog.html
#---------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	Bindings to the Linux input handling subsystem
Group:		Development/Python

%description -n python3-%{pypi_name}
*evdev*
-------

This package provides bindings to the generic input event interface in
Linux. The *evdev* interface serves the purpose of passing events
generated in the kernel directly to userspace through character
devices that are typically located in ``/dev/input/``.

This package also comes with bindings to *uinput*, the userspace input
subsystem. *Uinput* allows userspace programs to create and handle
input devices that can inject events directly into the input
subsystem.

Documentation:
    http://python-evdev.readthedocs.io/en/latest/

Development:
    https://github.com/gvalkov/python-evdev

Package:
    http://pypi.python.org/pypi/evdev

Changelog:
    http://python-evdev.readthedocs.io/en/latest/changelog.html

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc LICENSE
%doc README.md

#---------------------------------------------------------------


%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 403 |14mt|python-ezodf-0.3.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define debug_package %{nil}

%define pypi_name ezodf

Summary:	Package to create new or open existing OpenDocument (ODF) files
Name:		python-ezodf
Version:	0.3.2
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/T0ha/ezodf
Source0:	%pypi_source
BuildRequires:	python3dist(lxml)
BuildRequires:	python3dist(nose)
BuildRequires:	python3dist(pytest)
BuildRequires:	pkgconfig(python3)

%description
Ezodf is a Python package to create new or open existing OpenDocument
(ODF) files to extract, add, modify or delete document data.

#💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧

%package -n python3-%{pypi_name}
Summary:	Package to create new or open existing OpenDocument (ODF) files
Group:		Development/Python

%description -n python3-%{pypi_name}
Ezodf is a Python package to create new or open existing OpenDocument
(ODF) files to extract, add, modify or delete document data.

%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py*.egg-info

#💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧💧

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

sed -i "s|#!/usr/bin/env python|#!/usr/bin/python3|" %{buildroot}%{python3_sitelib}/%{pypi_name}/*.py
chmod +x %{buildroot}%{python3_sitelib}/%{pypi_name}/*.py

%check
%pytest

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 404 |14mt|python-fasteners-0.19-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name fasteners

Summary:	A python package that provides useful locks
Name:		python-%{pypi_name}
Version:	0.19
Release:	2
License:	ASL 2.0
Group:		Development/Python
Url:		https://github.com/harlowja/fasteners
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(wheel)
BuildRequires:	python3dist(pip)
BuildArch:	noarch

%description
Python standard library provides a lock for threads (both a reentrant one,
and a non-reentrant one, see below). Fasteners extends this, and provides a
lock for processes, as well as Reader Writer locks for both threads and
processes.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A python package that provides useful locks
Group:		Development/Python

%description -n python3-%{pypi_name}
Python standard library provides a lock for threads (both a reentrant one,
and a non-reentrant one, see below). Fasteners extends this, and provides a
lock for processes, as well as Reader Writer locks for both threads and
processes.

%files -n python3-%{pypi_name}
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}*-info/

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 405 |14mt|python-filelock-3.15.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name filelock

Name:		python-%{pypi_name}
Version:	3.15.4
Release:	1
Summary:	A platform independent file lock
Group:		Development/Python
License:	Unlicense
URL:		https://github.com/benediktschmitt/py-filelock
Source0:	%{pypi_source}
BuildArch:	noarch
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros

%description
This package contains a single module, which implements a platform independent
file locking mechanism for Python.

The lock includes a lock counter and is thread safe. This means, when locking
the same lock object twice, it will not block.

#-----------------------------------------------
%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name}
This package contains a single module, which implements a platform independent
file locking mechanism for Python.

The lock includes a lock counter and is thread safe. This means, when locking
the same lock object twice, it will not block.

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{python3_sitelib}/%{pypi_name}/*
%{python3_sitelib}/%{pypi_name}-%{version}*-info

#-----------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 406 |14mt|python-flit-3.12.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# circular build dependency on requests-download and testpath
%bcond_with tests

%global srcname flit

Name:		python-%{srcname}
Version:	3.12.0
Release:	1
Summary:	Simplified packaging of Python modules
Group:		Development/Python
# ./flit/log.py under ASL 2.0 license
# ./flit/upload.py under PSF license
License:	BSD and ASL 2.0 and Python

URL:		https://flit.readthedocs.io/en/latest/
Source0:	https://github.com/takluyver/flit/archive/%{version}/%{srcname}-%{version}.tar.gz

# For the tests
Source1:	https://pypi.org/pypi?%3Aaction=list_classifiers#/classifiers.lst

BuildArch:	noarch
BuildRequires:	python3-devel
BuildRequires:	pyproject-rpm-macros >= 0-40
BuildRequires:	python3-pip

# Runtime deps needed to build self
BuildRequires:	python3-tomli

%if %{with tests}
# Runtime deps, others
BuildRequires:	python3-requests
BuildRequires:	python3-docutils
BuildRequires:	python3-pygments
BuildRequires:	python3-tomli-w

# Test deps
BuildRequires:	/usr/bin/python
BuildRequires:	python3-pytest
BuildRequires:	python3-responses

# Test deps that require flit to build:
BuildRequires:	python3-testpath
BuildRequires:	python3-requests-download
%endif

%global _description %{expand:
Flit is a simple way to put Python packages and modules on PyPI.

Flit only creates packages in the new 'wheel' format. People using older
versions of pip (<1.5) or easy_install will not be able to install them.

Flit packages a single importable module or package at a time, using the import
name as the name on PyPI. All sub-packages and data files within a package are
included automatically.

Flit requires Python 3, but you can use it to distribute modules for Python 2,
so long as they can be imported on Python 3.}

%description %_description

#------------------------------------------------------------------------------

%package -n python3-%{srcname}
Summary:	%{summary}
Group:		Development/Python
Requires:	python3-%{srcname}-core = %{version}-%{release}

# https://pypi.python.org/pypi/tornado
# ./flit/log.py unknown version
Provides:	bundled(python3dist(tornado))

# soft dependency: (WARNING) Cannot analyze code. Pygments package not found.
Recommends:	python3-pygments

%description -n python3-%{srcname} %_description

%files -n python3-%{srcname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/flit-*.dist-info/
%{python3_sitelib}/flit/
%{_bindir}/flit

#------------------------------------------------------------------------------

%package -n python3-%{srcname}-core
Summary:	PEP 517 build backend for packages using Flit
Group:		Development/Python
Conflicts:	python3-%{srcname} < 2.1.0-2
# We manually specify this, because it's bundled upstream and not in the metadata
Requires:       python3-tomli

%description -n python3-%{srcname}-core
This provides a PEP 517 build backend for packages using Flit.
The only public interface is the API specified by PEP 517,
at flit_core.buildapi.

%files -n python3-%{srcname}-core
%license LICENSE
%doc flit_core/README.rst
%{python3_sitelib}/flit_core-*.dist-info/
%{python3_sitelib}/flit_core/

#------------------------------------------------------------------------------
%prep
%autosetup -p1 -n %{srcname}-%{version}

# Remove vendored tomli that flit_core includes to solve the circular dependency.
# (flit_core requires tomli, but flit_core is needed to build tomli).
# We don't use this, as python3-tomli already has its own bootstrap bcond
# to build without flit_core.
#
# flit's tests already require tomli, so we're pulling it in at buildtime anyways.
# Удаляем проблемные glob patterns из pyproject.toml
sed -i "/^license-files/c\license-files = ['LICENSE']" flit_core/pyproject.toml
sed -i 's|from \.vendor import tomli|import tomli|' flit_core/flit_core/config.py
rm -rf flit_core/flit_core/vendor
# Копируем основной LICENSE файл на место
cp LICENSE flit_core/

%build
export FLIT_NO_NETWORK=1

# first, build flit_core with self
cd flit_core
%pyproject_wheel
cd -

# build of the main flit (needs flit_core)
export PYTHONPATH=$PWD:$PWD/flit_core
%pyproject_wheel

%install
%pyproject_install

# don't ship tests in flit_core package
# if upstream decides to change the installation, it can be removed:
# https://github.com/takluyver/flit/issues/403
# rm -r %{buildroot}%{python3_sitelib}/flit_core/tests/

%if %{with tests}
%check
# flit attempts to download list of classifiers from PyPI, but not if it's cached
# test_invalid_classifier fails without the list
mkdir -p fake_cache/flit
cp %{SOURCE1} fake_cache/flit
export XDG_CACHE_HOME=$PWD/fake_cache

%pytest
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 407 |14mt|python-funcsigs-1.0.2-6
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name funcsigs

Name:           python-funcsigs
Version:        1.0.2
Release:        6
Summary:        Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+
Group:          Development/Python
License:        ASL
URL:            http://funcsigs.readthedocs.org/
Source0:        http://pypi.python.org/packages/source/f/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3-setuptools

%description
funcsigs is a backport of the PEP 362 function signature features from
Python 3.3’s inspect pypi_name.

#-----------------------------------------------------
%package -n python3-funcsigs
Summary:        Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+
Group:          Development/Python

%description -n python3-funcsigs
funcsigs is a backport of the PEP 362 function signature features from
Python 3.3’s inspect module.

%files -n python3-funcsigs
%doc docs/ README.rst PKG-INFO
%{python3_sitelib}/*

#-----------------------------------------------------
%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 408 |14mt|python-future-1.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name future

Summary:	Clean single-source support for Python 3 and 2
Name:		python-future
Version:	1.0.0
Release:	1
License:	MIT
Group:		Development/Python
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
Easy, safe support for Python 3/2 compatibility.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Clean single-source support for Python 3 and 2
Group:		Development/Python

%description -n python3-%{pypi_name}
Easy, safe support for Python 3/2 compatibility.

%files -n python3-%{pypi_name}
%doc README.rst docs/_themes/LICENSE LICENSE.txt
%{_bindir}/futurize
%{_bindir}/pasteurize
%{python3_sitelib}/%{pypi_name}-*.dist-info
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/past
%{python3_sitelib}/libfuturize
%{python3_sitelib}/libpasteurize

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 409 |14mt|python-gast-0.6.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name gast

Name:           python-%{pypi_name}
Version:	0.6.0
Release:	1
Summary:        Python AST that abstracts the underlying Python version
Group:          Development/Python
License:        BSD 3-Clause
URL:            https://github.com/serge-sans-paille/gast/
Source0:	%{pypi_source}
BuildArch:      noarch

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)

%description
A generic AST to represent Python3's Abstract Syntax Tree(AST). GAST provides a
compatibility layer between the AST of various Python versions, as produced by
ast.parse from the standard ast module.
#---------------------------------------------------

%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name}
A generic AST to represent Python3's Abstract Syntax Tree(AST). GAST provides a
compatibility layer between the AST of various Python versions, as produced by
ast.parse from the standard ast module.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst

#---------------------------------------------------
%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}




@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 410 |14mt|python-gettext-5.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module gettext

Summary:	Python Gettext po to mo file compiler
Name:		python-%{module}
Version:	5.0
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://pypi.org/project/python-gettext
Source0:	https://pypi.io/packages/source/p/python-gettext/%{name}-%{version}.tar.gz
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
This implementation of Gettext for Python includes a Msgfmt class which can be
used to generate compiled mo files from Gettext po files and includes support
for the newer msgctxt keyword.

#------------------------------------------------------------------

%package -n python3-%{module}
Summary:	Python 3 Gettext po to mo file compiler
Group:		Development/Python
BuildArch:	noarch

%description -n	python3-%{module}
This implementation of Gettext for Python 3 includes a Msgfmt class which can
be used to generate compiled mo files from Gettext po files and includes
support for the newer msgctxt keyword.

%files -n python3-%{module}
%doc CHANGES.rst README.rst
%license LICENSE.rst
%{python3_sitelib}/pythongettext/
%{python3_sitelib}/python_gettext-*.dist-info/

#------------------------------------------------------------------

%prep
%autosetup -p1

# Remove bundled egg-info
rm -rf python_gettext.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 411 |14mt|python-gitdb-4.0.12-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name gitdb
%define debug_package	%{nil}

Name:		python-%{pypi_name}
Version:	4.0.12
Release:	1
Summary:	Git Object Database
License:	BSD
Group:		Development/Python
Url:		https://pypi.python.org/pypi/gitdb
Source0:	%{pypi_source}

%description
GitDB is a Python git object database.

#-----------------------------------------------------------

%package -n python3-gitdb
Summary:	A pure-Python 3 git object database
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(nose)
BuildRequires:	python3dist(async)
BuildRequires:	python3dist(smmap)
#gitdb2 project its a mirror if gitdb
Provides:	python3dist(gitdb2) = %{EVRD}
Provides:	python3-gitdb2 = %{EVRD}
Requires:	python3dist(async)
BuildArch:	noarch

%description -n python3-gitdb
GitDB allows you to access bare git repositories for reading and writing. It
aims at allowing full access to loose objects as well as packs with performance
and scalability in mind. It operates exclusively on streams, allowing to
operate on large objects with a small memory footprint.

This is the Python 3 version of the package.

%files -n python3-gitdb
%doc AUTHORS LICENSE
%{python3_sitelib}/gitdb*

#-----------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 412 |14mt|python-gitpython-3.1.58-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name gitpython

Name:		python-gitpython
Version:	3.1.58
Release:	1
Summary:	Python Git library
License:	BSD
Group:		Development/Python
Url:		http://pypi.python.org/pypi/GitPython/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
GitPython is a python library used to interact with Git repositories.

GitPython provides object model access to your git repository. Once you have
created a repository object, you can traverse it to find parent commit(s),
trees, blobs, etc.

GitPython is a port of the grit library in Ruby created by Tom Preston-Werner
and Chris Wanstrath

#--------------------------------------------------------------------
%package -n python3-gitpython
Summary:	Python 3 Git Library
Group:		Development/Python
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
Requires:	git-core
Requires:	python3dist(gitdb2)

%description -n python3-gitpython
GitPython is a python library used to interact with Git repositories.

GitPython provides object model access to your git repository. Once you have
created a repository object, you can traverse it to find parent commit(s),
trees, blobs, etc.

GitPython is a port of the grit library in Ruby created by Tom Preston-Werner
and Chris Wanstrath

%files -n python3-gitpython
%doc CHANGES AUTHORS LICENSE
%{python3_sitelib}/GitPython-%{version}-py*.egg-info
%{python3_sitelib}/git/

#--------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}
find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'

%build
%py3_build

%install
%py3_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 413 |14mt|python-glad-2.0.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name glad

Name:		python-%{pypi_name}
Version:	2.0.4
Release:	1
Summary:	Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator
Group:		Development/Python
License:	MIT and ASL 2.0
Url:		https://github.com/Dav1dde/glad
Source0:	https://github.com/Dav1dde/glad/archive/refs/tags/v%{version}/glad-%{version}.tar.gz
Source1:	python-glad.rpmlintrc
BuildRequires:	python3-setuptools
Requires:	python3-setuptools_scm
BuildArch:	noarch

%description
Glad uses the official Khronos-XML specs to generate a GL/GLES/EGL/GLX/WGL
Loader made for your needs.

#---------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator

%description -n python3-%{pypi_name}
Glad uses the official Khronos-XML specs to generate a GL/GLES/EGL/GLX/WGL
Loader made for your needs.

%files -n python3-%{pypi_name}
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/glad2-%{version}-py*.*.egg-info/

#---------------------------------------------------------------------------

%package -n %{pypi_name}
Summary:	Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator
Requires:	python3-%{pypi_name} = %{EVRD}

%description -n %{pypi_name}
Glad uses the official Khronos-XML specs to generate a GL/GLES/EGL/GLX/WGL
Loader made for your needs.

%files -n %{pypi_name}
%{_bindir}/glad

#---------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

# Fix shebang
sed -i -e '/^#!\//, 1d' %{pypi_name}/__main__.py

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 414 |14mt|python-gnupg-0.5.3-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name python-gnupg
%define module_name gnupg

Summary:	A Python wrapper for GnuPG
Name:		python-%{module_name}
Version:	0.5.3
Release:	3
Epoch:		2
License:	BSD
Group:		Development/Python
Url:		https://github.com/vsajip/python-gnupg
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3-pip
BuildRequires:	python3-tomli
BuildRequires:	python3-psutil
BuildRequires:	python3-devel
BuildRequires:	python3-wheel

Requires:	gnupg2
BuildArch:	noarch

%description
This module implements a Python library which takes care of the internal
details and allows its users to generate and manage keys, encrypt and
decrypt data, and sign and verify messages.

#----------------------------------------------------------------------------
%package -n python3-%{module_name}
Summary:	A Python wrapper for GnuPG
Group:		Development/Python

%description -n python3-%{module_name}
This module implements a Python3 library which takes care of the internal
details and allows its users to generate and manage keys, encrypt and
decrypt data, and sign and verify messages.

%files -n python3-%{module_name}  -f %{pyproject_files}
%doc LICENSE.txt README.rst

#---------------------------------------------------------------------------

%generate_buildrequires
%pyproject_buildrequires -r

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{module_name}
# rm -f %{buildroot}/%{_bindir}/versioneer.py

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 415 |14mt|python-google-auth-2.29.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name google-auth

Summary:	Google Authentication Library
Name:		python-google-auth
Version:	2.29.0
Release:	1
License:	ASLv2
Group:		Development/Python
Url:		https://github.com/googleapis/google-auth-library-python
Source0:	%{pypi_source}
BuildArch:	noarch
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(cachetools) >= 2.0.0
BuildRequires:	python3dist(mock)
BuildRequires:	python3dist(pyasn1-modules) >= 0.2.1
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(rsa) >= 3.1.4
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(six) >= 1.9.0
Requires:	python3dist(cachetools) >= 2.0.0
Requires:	python3dist(pyasn1-modules) >= 0.2.1
Requires:	python3dist(rsa) >= 3.1.4

%description
Google Auth Python Library simplifies using Google's various server-to-server
authentication mechanisms to access Google.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Google Authentication Library
Group:		Development/Python

%description -n python3-%{pypi_name}
Google Auth Python Library simplifies using Google's various server-to-server
authentication mechanisms to access Google.

%files -n python3-%{pypi_name}
%doc LICENSE
%doc README.rst
%{python3_sitelib}/google
%{python3_sitelib}/google_auth-*.dist-info

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 416 |14mt|python-greenlet-3.5.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global         modname greenlet

Name:           python-%{modname}
Version:        3.5.5
Release:        1
Summary:        Lightweight in-process concurrent programming
License:        MIT AND PSF-2.0
URL:            https://github.com/python-greenlet/greenlet
Source0:        %{url}/archive/%{version}/%{modname}-%{version}.tar.gz

# Skip leak checking to avoid a missing dependency, `objgraph`
Patch:          skip-leak-checks.patch

%global _description \
The greenlet package is a spin-off of Stackless, a version of CPython\
that supports micro-threads called "tasklets". Tasklets run\
pseudo-concurrently (typically in a single or a few OS-level threads)\
and are synchronized with data exchanges on "channels".

%description %{_description}

%package -n     python3-%{modname}
Summary:        %{summary}
BuildRequires:  python3-devel
# For tests
BuildRequires:  python3-psutil

%description -n python3-%{modname} %{_description}

Python 3 version.

%package -n     python3-%{modname}-devel
Summary:        C development headers for python3-%{modname}
Requires:       python3-%{modname}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description -n python3-%{modname}-devel
%{summary}.

Python 3 version.

%prep
%autosetup -n %{modname}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{modname}

%files -n python3-%{modname} -f %{pyproject_files}
%doc AUTHORS README.rst

%files -n python3-greenlet-devel
%{_includedir}/python%{python3_version}*/%{modname}/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 417 |14mt|python-gssapi-1.8.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name gssapi

Summary:	Python Bindings for GSSAPI (RFC 2743/2744 and extensions)
Name:		python-%{pypi_name}
Version:	1.8.3
Release:	1
License:	ISC
Group:		Development/Python
Url:		https://github.com/pythongssapi/python-gssapi
Source0:	https://github.com/pythongssapi/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(krb5)
BuildRequires:	python3dist(cython)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pyproject-rpm-macros

%description
A set of Python bindings to the GSSAPI C library providing both
a high-level pythonic interfaces and a low-level interfaces
which more closely matches RFC 2743.  Includes support for
RFC 2743, as well as multiple extensions.

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python Bindings for GSSAPI (RFC 2743/2744 and extensions)
Group:		Development/Python
Requires:	krb5-libs
Requires:	python3-decorator
Requires:	python3-six

%description -n python3-%{pypi_name}
A set of Python bindings to the GSSAPI C library providing both
a high-level pythonic interfaces and a low-level interfaces
which more closely matches RFC 2743.  Includes support for
RFC 2743, as well as multiple extensions.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc LICENSE.txt README.txt

#------------------------------------------------------------------

%prep
%autosetup -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%pyproject_save_files gssapi


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 418 |14mt|python-hamcrest-2.0.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global modname hamcrest
%global pypi_name pyhamcrest

Name:           python-%{modname}
Version:        2.0.4
Release:        1
Summary:        Hamcrest matchers for Python
Group:          Development/Python
License:        BSD
URL:            https://github.com/hamcrest/PyHamcrest
Source0:        %{pypi_source}

# https://github.com/hamcrest/PyHamcrest/commit/37a4d0dbeb9a92b959edfb9b1aceba4eaacf9f78
Patch0001:      0001-Add-boolean-matchers.patch

BuildArch:      noarch

%global _description \
PyHamcrest is a framework for writing matcher objects, allowing you to\
declaratively define "match" rules. There are a number of situations where\
matchers are invaluable, such as UI validation, or data filtering, but it is\
in the area of writing flexible tests that matchers are most commonly used.

%description %{_description}

#-----------------------------------------------------
%package -n python3-%{modname}
Summary:        %{summary}
BuildRequires:  python3-devel
Requires:       python3-six

%description -n python3-%{modname} %{_description}

Python 3 version.

%files -n python3-%{modname}
%{python3_sitelib}/%{pypi_name}-%{version}*info/
%{python3_sitelib}/%{modname}/

#-----------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 419 |14mt|python-hatchling-1.27.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-hatchling
Version:        1.27.0
Release:        1
Summary:        The build backend used by Hatch
Group:          Development/Python
# SPDX
License:        MIT
URL:            https://pypi.org/project/hatchling
Source0:        %{pypi_source hatchling}
# Man page in groff_man(7) format, hand-written for Fedora based on package
# metadata and --help output
Source1:        hatchling.1

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros

%global common_description %{expand:
This is the extensible, standards compliant build backend used by Hatch.}

%description %{common_description}

#----------------------------------------------------------------
%package -n python3-hatchling
Summary:        %{summary}
Group:          Development/Python

%description -n python3-hatchling %{common_description}

%files -n python3-hatchling -f %{pyproject_files}
%license LICENSE.txt
%doc README.md
%{_bindir}/hatchling
%{_mandir}/man1/hatchling.1*

#----------------------------------------------------------------
%prep
%autosetup -n hatchling-%{version}


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files hatchling
install -t '%{buildroot}/%{_mandir}/man1' -D -p -m 0644 '%{SOURCE1}'

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 420 |14mt|python-hatch-vcs-0.4.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Let’s try to build this as early as we can, since it’s a dependency for
# python-userpath.
%bcond_without bootstrap
%if %{without bootstrap}
%bcond_without tests
%else
%bcond_with tests
%endif

Name:           python-hatch-vcs
Version:        0.4.0
Release:        1
Summary:        Hatch plugin for versioning with your preferred VCS
Group:          Development/Python
License:        MIT
URL:            https://github.com/ofek/hatch-vcs
Source0:        %{pypi_source hatch_vcs}
BuildArch:      noarch

BuildRequires:  python3-devel
# RHBZ#1985340, RHBZ#2076994
BuildRequires:  pyproject-rpm-macros >= 1.2.0
BuildRequires:	python3-pip
BuildRequires:	python3-setuptools
BuildRequires:	python3-setuptools_scm

%if %{with tests}
BuildRequires:  python3dist(pytest)
BuildRequires:  git-core
%endif

%global common_description %{expand:
This provides a plugin for Hatch that uses your preferred version control
system (like Git) to determine project versions.}

%description %{common_description}

#--------------------------------------------------------------
%package -n python3-hatch-vcs
Summary:        %{summary}
Group:          Development/Python

%description -n python3-hatch-vcs %{common_description}

%files -n python3-hatch-vcs -f %{pyproject_files}
%license LICENSE.txt
%doc HISTORY.md
%doc README.md

#--------------------------------------------------------------
%prep
%autosetup -n hatch_vcs-%{version} -p1


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files hatch_vcs


%check
%if %{with tests}
%pytest
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 421 |14mt|python-hpack-4.0.0-5
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module    hpack

Name:       python-%{module}
Version:    4.0.0
Release:    5
Summary:    Pure-Python HPACK header compression
Group:      Development/Python
License:    MIT
URL:        http://hyper.rtfd.org/
Source0:    https://pypi.io/packages/source/h/hpack/%{module}-%{version}.tar.gz
BuildArch:  noarch

%description
This module contains a pure-Python HTTP/2 header encoding (HPACK) logic
for use in Python programs that implement HTTP/2. It also contains a
compatibility layer that automatically enables the use of nghttp2 if
it’s available.

%package -n python3-%{module}
Summary:        Pure-Python HPACK header compression
Group:          Development/Python
BuildArch:      noarch
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(setuptools)

%description -n python3-%{module}
This module contains a pure-Python HTTP/2 header encoding (HPACK) logic
for use in Python programs that implement HTTP/2. It also contains a
compatibility layer that automatically enables the use of nghttp2 if
it’s available.

This is the Python 3 version of the package.

%prep
%setup -q -n %{module}-%{version}

# Remove bundled egg-info
rm -rf %{module}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%files -n python3-%{module}
%doc CONTRIBUTORS.rst LICENSE README.rst
%{python3_sitelib}/%{module}/
%{python3_sitelib}/%{module}-*.dist-info/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 422 |14mt|python-httpretty-1.1.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global github_owner    gabrielfalcao
%global github_name     HTTPretty
%global pypi_name         httpretty

Name:           python-httpretty
Version:	1.1.4
# If github_date is defined, assume a post-release snapshot
Release:	1
Summary:        HTTP request mock tool for Python
Group:		Development/Python
License:        MIT
URL:            https://github.com/%{github_owner}/%{github_name}
Source0:	%{pypi_source}
# Alternative for building from a github snapshot
#Source0:	https://files.pythonhosted.org/packages/fc/cd/21014a0068c5ef4b06805eda7b1dc7a1c8fac416b297ac134a09700b447b/httpretty-1.1.0.tar.gz

# Avoid unnecessary remote access requirement (note: test only actually
# does a remote connection after PR #313)
Patch1:         python-httpretty-fakesock_getpeercert_noconnect.patch

# Remote access (these tests were skipped upstream in <= 0.9.7)
Patch2:         skip-test_passthrough.patch

BuildArch:      noarch

%global _description\
Once upon a time a python developer wanted to use a RESTful API, everything was\
fine but until the day he needed to test the code that hits the RESTful API:\
what if the API server is down? What if its content has changed?\
\
Dont worry, HTTPretty is here for you.

%description %_description

%package -n python3-httpretty
Summary:        HTTP request mock tool for Python 3
Requires:       python3-six

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description -n python3-httpretty
Once upon a time a python developer wanted to use a RESTful API, everything was
fine but until the day he needed to test the code that hits the RESTful API:
what if the API server is down? What if its content has changed?

Don't worry, HTTPretty is here for you.

%prep
%autosetup -n httpretty-%{version} -p1

# Alternative for building from commit tarball
#autosetup -n %%{github_name}-%%{github_commit} -p1

# nose plugins we don't have yet
sed -i 's/^with-randomly = 1$//' setup.cfg
sed -i 's/^rednose = 1$//' setup.cfg

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%files -n python3-httpretty
%doc README.rst
%license COPYING
%{python3_sitelib}/httpretty
%{python3_sitelib}/httpretty-*.dist-info

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 423 |14mt|python-hyperframe-6.0.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module hyperframe

Name:       python-%{module}
Version:	6.0.1
Release:	2
Summary:    HTTP/2 framing layer for Python
Group:      Development/Python
License:    MIT
URL:        http://hyper.rtfd.org/
Source0:	https://files.pythonhosted.org/packages/5a/2a/4747bff0a17f7281abe73e955d60d80aae537a5d203f417fa1c2e7578ebb/hyperframe-6.0.1.tar.gz
BuildArch:  noarch

%description
This library contains the HTTP/2 framing code used in the hyper project.
It provides a pure-Python codebase that is capable of decoding a binary
stream into HTTP/2 frames.

This library is used directly by hyper and a number of other projects
to provide HTTP/2 frame decoding logic.

%package -n python3-%{module}
Summary:        HTTP/2 framing layer for Python 3
Group:          Development/Python
BuildArch:      noarch
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(setuptools)

%description -n    python3-%{module}
This library contains the HTTP/2 framing code used in the hyper project.
It provides a pure-Python codebase that is capable of decoding a binary
stream into HTTP/2 frames.

This library is used directly by hyper and a number of other projects
to provide HTTP/2 frame decoding logic.

This is the Python 3 version of the package.

%prep
%setup -q -n %{module}-%{version}

# Remove bundled egg-info
rm -rf %{module}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%files -n python3-%{module}
%doc CONTRIBUTORS.rst LICENSE README.rst
%{python3_sitelib}/%{module}/
%{python3_sitelib}/%{module}-*.dist-info/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 424 |14mt|python-ifaddr-0.2.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name ifaddr
%global _description \
ifaddr is a small Python library that allows you to find all the IP addresses\
of the computer.

Name:		python-%{pypi_name}
Version:	0.2.0
Release:	2
Summary:	Python library that allows you to find all the IP addresses of the computer
Group:		Development/Python
License:	MIT
URL:		https://pypi.org/project/ifaddr/
Source:		%{pypi_source}
BuildArch:      noarch

%description %{_description}

#------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools

%description -n python3-%{pypi_name} %{_description}

Python 3 version.

%files -n python3-%{pypi_name}
%license LICENSE.txt
%doc README.rst
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-*.dist-info/

#------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 425 |14mt|python-imagesize-2.0.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_with tests

%global pypi_name imagesize
%global sum  Python module for analyzing image file headers and returning image sizes

Name:           python-%{pypi_name}
Version:        2.0.0
Release:        3
Summary:        %{sum}

License:        MIT
URL:            https://github.com/shibukawa/imagesize_py
Source0:        https://files.pythonhosted.org/packages/source/i/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-setuptools
BuildRequires:  python%{python3_pkgversion}-devel
%if %{with tests}
BuildRequires:  python%{python3_pkgversion}-pytest
%endif

%description
The imagesize package parses image file headers and returns the image sizes.

* PNG
* JPEG
* JPEG2000
* GIF

This is a pure Python library.

%package -n     python%{python3_pkgversion}-%{pypi_name}
Summary:        %{sum}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}

%description -n python%{python3_pkgversion}-%{pypi_name}
The imagesize package parses image file headers and returns the image sizes.

* PNG
* JPEG
* JPEG2000
* GIF

This is a pure Python library.

%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

# Allow building with Python 3.15
sed -E -i 's/,<3\.15//' setup.py

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files -l %{pypi_name}

%check
%pyproject_check_import
%if %{with tests}
# test_get_filelike requires internet connection, hence we disable it
%pytest -v -k 'not test_get_filelike'
%endif

%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
%doc README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 426 |14mt|python-incremental-22.10.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name incremental

Summary:	Library for versioning Python projects
Name:		python-incremental
Version:	22.10.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://pypi.org/project/incremental/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
Library for versioning Python projects.

#----------------------------------------------------------------------------

%package -n python3-incremental
Summary:	Library for versioning Python 3 projects
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(typing)
BuildArch:	noarch

%description -n python3-incremental
Library for versioning Python 3 projects.

%files -n python3-incremental
%{python3_sitelib}/incremental
%{python3_sitelib}/incremental-*.dist-info/

#----------------------------------------------------------------------------

%prep
%setup -qn incremental-%{version}
%autopatch -p1


%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 427 |14mt|python-iniconfig-2.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name iniconfig

Name:		python-iniconfig
Version:	2.0.0
Release:	1
Summary:	Brain-dead simple parsing of ini files
Group:		Development/Python
License:	MIT
URL:		http://github.com/RonnyPfannschmidt/iniconfig
Source0:	https://pypi.io/packages/source/i/iniconfig/iniconfig-%{version}.tar.gz
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
BuildRequires:	python3-wheel
BuildRequires:	python3-hatchling
BuildRequires:	python3-hatch-vcs
BuildArch:	noarch

%global _description %{expand:
iniconfig is a small and simple INI-file parser module
having a unique set of features:

* tested against Python2.4 across to Python3.2, Jython, PyPy
* maintains order of sections and entries
* supports multi-line values with or without line-continuations
* supports "#" comments everywhere
* raises errors with proper line-numbers
* no bells and whistles like automatic substitutions
* iniconfig raises an Error if two sections have the same name.}
%description %_description

#----------------------------------------------------------------
%package -n python3-iniconfig
Summary:            %{summary}
Group:		Development/Python

%description -n python3-iniconfig %_description

%files -n python3-iniconfig
%doc README.*
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}*-info

#---------------------------------------------------------------
%prep
%autosetup -n iniconfig-%{version} -p1

%build
%pyproject_wheel


%install
%pyproject_install



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 428 |14mt|python-iniparse-0.5-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name iniparse

Summary:	INI parser for python
Name:		python-%{pypi_name}
Version:	0.5
Release:	3
Group:		Development/Python
License:	MIT
Url:		http://code.google.com/p/iniparse/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
iniparse is a INI parser for Python which is:

 * Compatiable with ConfigParser: Backward compatible implementations of
   ConfigParser, RawConfigParser, and SafeConfigParser are included that
   are API-compatible with the Python standard library. They pass all the
   unit tests in Python-2.4.4.
 * Preserves structure of INI files: Order of sections & options, indentation,
   comments, and blank lines are preserved as far as possible when data is
   updated.
 * More convenient: Values can be accessed using dotted notation
   (cfg.user.name), or using container syntax (cfg['user']['name']).

It is very useful for config files that are updated both by users and by
programs, since it is very disorienting for a user to have her config
file completely rearranged whenever a program changes it. iniparse also
allows making the order of entries in a config file significant, which is
desirable in applications like image galleries.

#--------------------------------------------------
%package -n python3-%pypi_name
Summary:	INI parser for python
Group:		Development/Python
BuildRequires:	python3-devel
BuildRequires:	python3dist(setuptools)

%description -n python3-%pypi_name
iniparse is a INI parser for Python which is:

 * Compatiable with ConfigParser: Backward compatible implementations of
   ConfigParser, RawConfigParser, and SafeConfigParser are included that
   are API-compatible with the Python standard library.
 * Preserves structure of INI files: Order of sections & options, indentation,
   comments, and blank lines are preserved as far as possible when data is
   updated.
 * More convenient: Values can be accessed using dotted notation
   (cfg.user.name), or using container syntax (cfg['user']['name']).

It is very useful for config files that are updated both by users and by
programs, since it is very disorienting for a user to have her config
file completely rearranged whenever a program changes it. iniparse also
allows making the order of entries in a config file significant, which is
desirable in applications like image galleries.

%files -n python3-%pypi_name
%doc Changelog LICENSE LICENSE-PSF README.md html/*
%{python3_sitelib}/%{pypi_name}*

#--------------------------------------------------
%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
rm -Rf %{buildroot}/%{_docdir}/*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 429 |14mt|python-installer-0.7.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name installer

Name:		python-installer
Version:	0.7.0
Release:	1
Summary:	A library for installing Python wheels
Group:		Development/Python
License:	MIT
URL:		https://pypi.org/project/installer/
Source0:	https://files.pythonhosted.org/packages/source/i/installer/installer-%{version}.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros
BuildArch:	noarch

%description
A library for installing Python wheels.

#----------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	A library for installing Python wheels
Group:		Development/Python

%description -n python3-%{pypi_name}
A library for installing Python wheels.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README*

#----------------------------------------------------

%prep
%autosetup -p1 -n installer-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files installer

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 430 |14mt|python-isort-5.12.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name isort

Name:          python-%{pypi_name}
Version:       5.12.0
Release:       1
Summary:       Python utility / library to sort Python imports
Group:         Development/Python
License:       MIT
URL:           https://github.com/timothycrosley/%{pypi_name}
Source0:       %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
BuildRequires: pkgconfig(python3)
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(mock)
BuildArch:     noarch

%description
%{summary}.

%files
%{_bindir}/isort-identify-imports

# -----------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:            %{summary}
Group:         Development/Python

%description -n python3-%{pypi_name}
%{summary}.

Python 3 version.

%files -n python3-%{pypi_name}
%doc *.md LICENSE
%{_bindir}/%{pypi_name}
%{_bindir}/%{pypi_name}-3
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}*-info/

# -----------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

# Drop shebang
sed -i -e '1{\@^#!.*@d}' %{pypi_name}/main.py

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

ln -s %{pypi_name} %{buildroot}%{_bindir}/%{pypi_name}-3

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 431 |14mt|python-jaraco.classes-3.4.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global _python_no_extras_requires 1

%define    pypi_name    jaraco.classes

Name:           python-%{pypi_name}
Version:	3.4.0
Release:	1
Summary:        jaraco.classes
Group:          Development/Python
License:        MIT License
Url:            https://github.com/jaraco/jaraco.classes
Source0:	%{pypi_source}
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(setuptools-scm)
BuildRequires:  python3dist(toml)
BuildRequires:  pyproject-rpm-macros
BuildArch:      noarch

%description
jaraco.classes

%generate_buildrequires
%pyproject_buildrequires -R
#-------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:     jaraco.classes
Group:       Development/Python
Provides:    python3dist(jaraco-classes)
Provides:    python3dist(jaraco-classes)
Requires:    python3-jaraco.functools

%description -n python3-%{pypi_name}
jaraco.classes

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README*

#-------------------------------------------------------
%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files jaraco

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 432 |14mt|python-jaraco.collections-4.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name jaraco.collections

Name:           python-%{pypi_name}
Version:	4.3.0
Release:	1
Summary:        jaraco.collections
Group:          Development/Python
License:        MIT License
Url:            https://github.com/jaraco/jaraco.collections
Source0:	%{pypi_source}
Patch0:         jaraco.collections-requirements.patch
BuildRequires:  python3dist(setuptools)
BuildRequires:  pyproject-rpm-macros
BuildArch:      noarch

%description
Models and classes to supplement the stdlib 'collections' module.

%generate_buildrequires
%pyproject_buildrequires -R
#-----------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:    jaraco.collections
Group:        Development/Python

%description -n python3-%{pypi_name}
Models and classes to supplement the stdlib 'collections' module.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README*

#-----------------------------------------------------------------
%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files jaraco


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 433 |14mt|python-jaraco.context-4.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global _python_no_extras_requires 1

%define    pypi_name    jaraco.context

Name:           python-%{pypi_name}
Version:        4.3.0
Release:        1
Summary:        Context managers by jaraco
Group:          Development/Python
License:        MIT License
Url:            https://github.com/jaraco/jaraco.text
Source0:        %{pypi_source}
BuildArch:      noarch
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(setuptools-scm)
BuildRequires:  python3dist(toml)
BuildRequires:  pyproject-rpm-macros

%description
jaraco.text

#---------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:    Context managers by jaraco
Group:      Development/Python

%description -n python3-%{pypi_name}
jaraco.text

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README*

#---------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files jaraco

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 434 |14mt|python-jaraco.text-3.11.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global _python_no_extras_requires 1

%define    pypi_name    jaraco.text

Name:           python-%{pypi_name}
Version:        3.11.1
Release:        1
Summary:        jaraco.text
Group:          Development/Python
License:        MIT License
Url:            https://github.com/jaraco/jaraco.text
Source0:        %{pypi_source}
BuildArch:      noarch
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(setuptools-scm)
BuildRequires:  python3dist(jaraco.context)
BuildRequires:  python3dist(jaraco.functools)
BuildRequires:  python3dist(toml)
BuildRequires:  python3dist(wheel)
BuildRequires:  python3dist(pip)
BuildRequires:  pyproject-rpm-macros

%description
jaraco.text

#---------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:    jaraco.text
Group:      Development/Python

%description -n python3-%{pypi_name}
jaraco.text

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst

#---------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

#generate_buildrequires
#pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files jaraco

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 435 |14mt|python-jdcal-1.4.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global module jdcal

Summary:	Julian dates from proleptic Gregorian and Julian calendars
Name:		python-%{module}
Version:	1.4.1
Release:	2
License:	BSD
Group:		Development/Python
Url:		https://github.com/phn/jdcal
Source0:	https://github.com/phn/jdcal/archive/v%{version}/%{module}-%{version}.tar.gz
BuildArch:	noarch

%description
This module contains functions for converting between Julian dates and calendar
dates.

A function for converting Gregorian calendar dates to Julian dates, and another
function for converting Julian calendar dates to Julian dates are defined.
Two functions for the reverse calculations are also defined.

#----------------------------------------------------------------------------

%package -n python3-%{module}
Summary:	Julian dates from proleptic Gregorian and Julian calendars
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)

%description -n python3-%{module}
This module contains functions for converting between Julian dates and calendar
dates.

A function for converting Gregorian calendar dates to Julian dates, and another
function for converting Julian calendar dates to Julian dates are defined.
Two functions for the reverse calculations are also defined.

%files -n python3-%{module}
%doc README.rst
%{python3_sitelib}/%{module}*
%{python3_sitelib}/__pycache__/

#----------------------------------------------------------------------------

%prep
%setup -qn %{module}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 436 |14mt|python-jedi-0.19.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name jedi

Summary:	An auto completion tool for Python that can be used for text editors
Name:		python-%{pypi_name}
Version:	0.19.1
Release:	1
License:	LGPLv3
Group:		Development/Python
Url:		https://jedi.readthedocs.org/en/latest/index.html
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(typing)
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(parso)
BuildArch:	noarch

%description
Jedi is an auto completion tool for Python. It works. With and without
syntax errors. Sometimes it sucks, but that's normal in dynamic languages.
But it sucks less than other tools. It understands almost all of the basic
Python syntax elements including many built-ins.

Jedi uses a very simple interface to connect with IDE's. As an reference,
there is a VIM implementation, which uses Jedi's auto completion. However,
I encourage you to use Jedi in your IDEs. Start writing plugins! If there are
problems with licensing, just contact me.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	An auto completion tool for Python 3 that can be used for text editors
Group:		Development/Python

#----------------------------------------------------------------------

%description -n python3-%{pypi_name}
Jedi is an auto completion tool for Python 3. It works. With and without
syntax errors. Sometimes it sucks, but that's normal in dynamic languages.
But it sucks less than other tools. It understands almost all of the basic
Python syntax elements including many built-ins.

Jedi uses a very simple interface to connect with IDE's. As an reference,
there is a VIM implementation, which uses Jedi's auto completion. However,
I encourage you to use Jedi in your IDEs. Start writing plugins! If there are
problems with licensing, just contact me.

%files -n python3-%{pypi_name}
%doc *.rst *.txt
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

find %{buildroot} -type f -empty -delete


%ifarch %{x86_64} %{ix86}
%check
# fail on py3.8
skiptests="test_integration"
skiptests+=" or test_sys_path"

export LANG="en_US.UTF-8"
export PYTHONPATH=%{buildroot}%{python3_sitelib}
pytest-3  -k "not ($skiptests)"

%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 437 |14mt|python-jsonpatch-1.33-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name jsonpatch

Name:           python-jsonpatch
Version:	1.33
Release:	1
Group:          Development/Python
Summary:        Apply JSON-Patches (RFC 6902)
License:        Modified BSD License
URL:            https://github.com/stefankoegl/python-json-patch
Source0:	%{pypi_source}
BuildArch:      noarch
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(setuptools)

%description
Library to apply JSON Patches according to RFC 6902.

#-----------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        Apply JSON-Patches (RFC 6902)
Group:          Development/Python

%description -n python3-%{pypi_name}
Library to apply JSON Patches according to RFC 6902.

%files -n python3-%{pypi_name}
%doc README.md
%{_bindir}/jsondiff
%{_bindir}/jsonpatch
%{python3_sitelib}/

#-----------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
#%autopatch -p1

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

# fix shebangs
sed -i 's#usr/bin/env python#usr/bin/python3#' %{buildroot}%{_bindir}/jsondiff %{buildroot}%{_bindir}/jsonpatch

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 438 |14mt|python-jsonpointer-3.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name jsonpointer
%global github_name python-json-pointer

Summary:    Resolve JSON Pointers in Python
Name:       python-%{pypi_name}
Version:	3.0.0
Release:	1
License:    BSD
Group:      Development/Python
Url:        https://github.com/stefankoegl/%{github_name}
Source0:	%{pypi_source}
BuildArch:  noarch

%description
Library to resolve JSON Pointers according to RFC 6901.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:        Resolve JSON Pointers in Python
Group:          Development/Python
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3-setuptools
Conflicts:      python-%{pypi_name} < 1.10-20
Obsoletes:      python-%{pypi_name} < 1.10-20

%description -n python3-%{pypi_name}
Library to resolve JSON Pointers according to RFC 6901.

%files -n python3-%{pypi_name}
%doc README.md AUTHORS
%{_bindir}/jsonpointer
%{_bindir}/jsonpointer-3*
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/%{pypi_name}.py*
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install
mv %{buildroot}%{_bindir}/jsonpointer %{buildroot}%{_bindir}/jsonpointer-%{python3_version}
ln -s ./jsonpointer-%{python3_version} %{buildroot}%{_bindir}/jsonpointer-3
ln -s ./jsonpointer-%{python3_version} %{buildroot}%{_bindir}/jsonpointer

%check
%__python3 tests.py

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 439 |14mt|python-jwcrypto-1.5.6-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define debug_package %{nil}
%define module	jwcrypto

Summary:	Implements JWK,JWS,JWE specifications using python-cryptography
Name:		python-%{module}
Version:	1.5.6
Release:	1
License:	LGPLv3+
Group:		Development/Python
Url:		https://github.com/latchset/
Source0:	https://github.com/latchset/jwcrypto/archive/v%{version}.tar.gz?/%{module}-%{version}.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(cryptography)
BuildRequires:	python3egg(pytest)
BuildRequires:	python3egg(setuptools)

%description
Implements JWK,JWS,JWE specifications using python-cryptography.

#------------------------------------------------------------------
%package -n python3-%{module}
Summary:	Implements JWK,JWS,JWE specifications using python-cryptography
Group:		Development/Python

%description -n python3-%{module}
Implements JWK,JWS,JWE specifications using python-cryptography.

%files -n python3-%{module}
%doc LICENSE README.md
%{python3_sitelib}/%{module}
%{python3_sitelib}/%{module}-*.egg-info

#------------------------------------------------------------------

%prep
%setup -qn %{module}-%{version}

%build

%install
PYTHONDONTWRITEBYTECODE=1 python3 setup.py install --root=%{buildroot}
rm -rf %{buildroot}%{_docdir}/%{module}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 440 |14mt|python-kdcproxy-1.0.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name kdcproxy

Summary:	MS-KKDCP (kerberos proxy) WSGI module
Name:		python-%{pypi_name}
Version:	1.0.0
Release:	2
License:	MIT
Group:		Development/Python
Url:		https://github.com/npmccallum/kdcproxy
Source0:	https://github.com/npmccallum/kdcproxy/archive/v%{version}.tar.gz?/%{pypi_name}-%{version}.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(pyasn1)
BuildRequires:	python3egg(dnspython)
BuildRequires:	python3egg(setuptools)
BuildArch:	noarch

%description
This package contains a Python 2.x WSGI module for proxying KDC requests over
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
minimal configuration.

#-----------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	MS-KKDCP (kerberos proxy) WSGI module
Group:		Development/Python
Requires:	python3egg(pyasn1)
Requires:	python3egg(dnspython)

%description -n python3-%{pypi_name}
This package contains a Python 2.x WSGI module for proxying KDC requests over
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
minimal configuration.

%files -n python3-%{pypi_name}
%doc COPYING README
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-*.egg-info

#-----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}


%build
%py3_build

%install
%py3_install
find %{buildroot}%{python3_sitelib}/%{pypi_name}/ -name '*.py' -exec chmod 755 '{}' \;

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 441 |14mt|python-kmod-0.9.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Python module to work with kernel modules
Name:		python-kmod
Group:		Development/Python
Version:	0.9.2
Release:	1
License:	LGPL-2.0-or-later
Url:		https://github.com/maurizio-lombardi/python-kmod
Source0:	https://github.com/maurizio-lombardi/python-kmod/archive/refs/tags/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
BuildRequires:	gcc
BuildRequires:	python3-cython
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	pkgconfig(libkmod)

%define _description %{expand:
Python module to allow listing, loading, and unloading
Linux Kernel modules, using libkmod.
}

%description %{_description}

#--------------------------------------------------------

%package -n python3-kmod
Summary:	Python module to work with kernel modules

%description -n python3-kmod
%{_description}

%files -n python3-kmod
%license COPYING.LESSER
%{python3_sitearch}/kmod/
%{python3_sitearch}/*.dist-info

#--------------------------------------------------------

%prep
%autosetup -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 442 |14mt|python-kubernetes-31.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global py3 python3
%global py3dev python3

%global library kubernetes
%global basehash a66f8df1dfc0e4f4a17093c7da273b9e485a55a0

Name:       python-%{library}
Version:	31.0.0
Release:	1
Summary:    Python client for the kubernetes API
License:    ASL 2.0
URL:        https://pypi.python.org/pypi/kubernetes
Group:      Development/Python
Source0:    https://github.com/kubernetes-client/python/archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
Source1:    https://github.com/kubernetes-client/python-base/archive/%{basehash}.tar.gz
BuildArch:  noarch

#-----------------------------------------------------
%package -n %{py3}-%{library}
Summary:    Kubernetes Python Client
BuildRequires:  git
BuildRequires:  %{py3dev}-devel
BuildRequires:  %{py3}-setuptools
Requires:  %{py3}-certifi
Requires:  %{py3}-six
Requires:  %{py3}-dateutil
Requires:  %{py3}-setuptools
Requires:  %{py3}-urllib3
Requires:  %{py3}-PyYAML
Requires:  %{py3}-google-auth
Requires:  %{py3}-websocket-client

%description -n %{py3}-%{library}
Python client for the kubernetes API.

%files -n %{py3}-%{library}
%license LICENSE
%doc README.md
%{python3_sitelib}/%{library}
%{python3_sitelib}/%{library}-*.dist-info
%exclude %{python3_sitelib}/%{library}/test
%exclude %{python3_sitelib}/%{library}/e2e_test

#-----------------------------------------------------

%package -n %{py3}-%{library}-tests
Summary:    Tests python-kubernetes library

Requires:  %{py3}-nose
Requires:  %{py3}-py
Requires:  %{py3}-mock
Requires:  %{py3}-%{library} = %{version}-%{release}

%description -n %{py3}-%{library}-tests
Tests python-kubernetes library

%description
Python client for the kubernetes API.

%files -n %{py3}-%{library}-tests
%license LICENSE
%{python3_sitelib}/%{library}/test
%{python3_sitelib}/%{library}/e2e_test

#-----------------------------------------------------

%prep
%autosetup -n python-%{version} -S git

sed -i 's/websocket-client.*/websocket-client>=0.43.0/g' requirements.txt

pushd kubernetes
rm -rf base
tar zxvf %{SOURCE1}
mv python-base-%{basehash} base
popd

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
cp -pr kubernetes/test %{buildroot}%{python3_sitelib}/%{library}/
cp -pr kubernetes/e2e_test %{buildroot}%{python3_sitelib}/%{library}/



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 443 |14mt|python-ldap3-2.9.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module	ldap3

Name:		python-%{module}
Version:	2.9.1
Release:	2
Summary:	Strictly RFC 4510 conforming LDAP V3 pure Python client
Group:		Development/Python
License:	LGPLv2+
URL:		https://pypi.python.org/pypi/%{module}/%{version}
Source0:	https://files.pythonhosted.org/packages/43/ac/96bd5464e3edbc61595d0d69989f5d9969ae411866427b2500a8e5b812c0/ldap3-2.9.1.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
dap3 is a strictly RFC 4510 conforming LDAP V3 pure Python client library.
The same codebase runs in Python 2, Python 3, PyPy and PyPy3.
#=========================================================================
%package -n python3-%{module}
Summary:	Strictly RFC 4510 conforming LDAP V3 pure Python client
Group:		Development/Python

%description -n python3-%{module}
dap3 is a strictly RFC 4510 conforming LDAP V3 pure Python client library.
The same codebase runs in Python 2, Python 3, PyPy and PyPy3.

%files -n python3-%{module}
%doc README.rst _version.json
%doc COPYING.txt COPYING.LESSER.txt LICENSE.txt
%{python3_sitelib}/%{module}/
%{python3_sitelib}/%{module}-*.dist-info
#=========================================================================
%prep
%setup -q -n %{module}-%{version}
%autopatch -p1

# Remove bundled egg-info
rm -r %{module}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 444 |14mt|python-ldap-3.4.5-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module	ldap

Summary:	Various LDAP-related Python modules
Name:		python-%{module}
Version:	3.4.5
Release:	3
Source0:	https://github.com/python-ldap/python-ldap/archive/%{name}-%{version}.tar.gz?/%{name}-%{name}-%{version}.tar.gz
Patch0:		python-ldap-3.4.3-dirs.patch
License:	Modified CNRI Open Source License
Group:		Development/Python
Url:		http://python-ldap.sourceforge.net/
BuildRequires:	openldap-devel
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	sasl-devel
BuildRequires:	pkgconfig(openssl)

%description
python2-ldap provides an object-oriented API to access LDAP directory
servers from Python programs. Mainly it wraps the OpenLDAP 2.x libs
for that purpose.

Additionally the package contains modules for other LDAP-related stuff
(e.g. processing LDIF, LDAPURLs, LDAPv3 schema, etc.).

#------------------------------------------------------------------

%package -n python3-%{module}
Summary:	Various LDAP-related Python3 modules
Group:		Development/Python

%description -n python3-%{module}
python2-ldap provides an object-oriented API to access LDAP directory
servers from Python programs. Mainly it wraps the OpenLDAP 2.x libs
for that purpose.

Additionally the package contains modules for other LDAP-related stuff
(e.g. processing LDIF, LDAPURLs, LDAPv3 schema, etc.).

%files -n python3-%{module}
%doc CHANGES README TODO Demo/
%{python3_sitearch}/*

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{name}-%{name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 445 |14mt|python-lit-18.1.8-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name lit

Summary:	A Software Testing Tool
Name:		python-%{pypi_name}
Version:	18.1.8
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://llvm.org
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
*lit* is a portable tool for executing LLVM and Clang style test suites,
summarizing their results, and providing indication of failures. *lit* is
designed to be a lightweight testing tool with as simple a user interface as
possible.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A Software Testing Tool
Group:		Development/Python

%description -n python3-%{pypi_name}
*lit* is a portable tool for executing LLVM and Clang style test suites,
summarizing their results, and providing indication of failures. *lit* is
designed to be a lightweight testing tool with as simple a user interface as
possible.

%files -n python3-%{pypi_name}
%{_bindir}/lit
%{python3_sitelib}/lit
%{python3_sitelib}/lit*.dist-info

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

# Strip out #!/usr/bin/env python
#sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/%{pypi_name}/*.py


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 446 |14mt|python-looseversion-1.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name looseversion

Name:           python-%{pypi_name}
Version:        1.3.0
Release:        1
Summary:        Version numbering for anarchists and software realists
License:        PSF-2.0
Group:          Development/Python
URL:            https://pypi.org/pypi/looseversion
Source0:        %{pypi_source}
BuildArch:      noarch
BuildRequires:  pyproject-rpm-macros
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3-pytest

%description
A backwards/forwards-compatible fork of distutils.version.LooseVersion, for
times when PEP-440 isnt what you need.

The goal of this package is to be a drop-in replacement for the original
LooseVersion. It implements an identical interface and comparison logic to
LooseVersion. The only major change is that a looseversion.LooseVersion is
comparable to a distutils.version.LooseVersion, which means tools should not
need to worry whether all dependencies that use LooseVersion have migrated.

If you are simply comparing versions of Python packages, consider moving to
packaging.version.Version, which follows PEP-440. LooseVersion is better suited
to interacting with heterogeneous version schemes that do not follow PEP-440.

#--------------------------------------------------------
%package -n python3-looseversion
Summary:        %{summary}
Group:          Development/Python

%description -n python3-looseversion
A backwards/forwards-compatible fork of distutils.version.LooseVersion, for
times when PEP-440 isnt what you need.

The goal of this package is to be a drop-in replacement for the original
LooseVersion. It implements an identical interface and comparison logic to
LooseVersion. The only major change is that a looseversion.LooseVersion is
comparable to a distutils.version.LooseVersion, which means tools should not
need to worry whether all dependencies that use LooseVersion have migrated.

If you are simply comparing versions of Python packages, consider moving to
packaging.version.Version, which follows PEP-440. LooseVersion is better suited
to interacting with heterogeneous version schemes that do not follow PEP-440.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md CHANGES.md

#--------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%check
%pytest -v tests.py



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 447 |14mt|python-lxml-5.3.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name lxml

Name:		python-lxml
Version:	5.3.0
Release:	2
Summary:	ElementTree-like Python bindings for libxml2 and libxslt
Group:		Development/Python
License:	BSD
URL:		http://lxml.de
Source0:	%{pypi_source}
BuildRequires:	libxslt-devel
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(zlib)
BuildRequires:	python3-setuptools

%description
lxml provides a Python binding to the libxslt and libxml2 libraries.
It follows the ElementTree API as much as possible in order to provide
a more Pythonic interface to libxml2 and libxslt than the default
bindings.  In particular, lxml deals with Python Unicode strings
rather than encoded UTF-8 and handles memory management automatically,
unlike the default bindings.

#--------------------------------------------------------------------
%package docs
Summary:	Documentation for %{name}
BuildArch:	noarch

%description docs
This package provides the documentation for %{name}, e.g. the API as html.

%files docs
%doc doc/*

#--------------------------------------------------------------------

%package -n python3-lxml
Summary:	ElementTree-like Python 2 bindings for libxml2 and libxslt
Provides:	python-lxml = %{EVRD}

%description -n python3-lxml
lxml provides a Python 3 binding to the libxslt and libxml2 libraries.
It follows the ElementTree API as much as possible in order to provide
a more Pythonic interface to libxml2 and libxslt than the default
bindings.  In particular, lxml deals with Python Unicode strings
rather than encoded UTF-8 and handles memory management automatically,
unlike the default bindings.

%files -n python3-lxml
%doc LICENSES.txt PKG-INFO CREDITS.txt CHANGES.txt
%{python3_sitearch}/lxml
%{python3_sitearch}/lxml-*.egg-info

#--------------------------------------------------------------------

%prep
%setup -q -n lxml-%{version}

%build
CFLAGS="%{optflags}" %{__python3} setup.py build --without-cython

%install
%{__python3} setup.py install --skip-build --no-compile --without-cython --root %{buildroot}


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 448 |14mt|python-lz4-4.4.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname lz4

Name:           python-%{srcname}
Version:        4.4.4
Release:        1
URL:            https://github.com/%{name}/%{name}
Summary:        LZ4 Bindings for Python
# Automatically converted from old format: BSD - review is highly recommended.
License:        LicenseRef-Callaway-BSD
Source:         https://files.pythonhosted.org/packages/source/l/%{srcname}/%{srcname}-%{version}.tar.gz
# Reduce setuptools_scm dep to >= 6
Patch:          python-lz4-deps.patch
# Support Python 3.14
Patch:          https://github.com/python-lz4/python-lz4/pull/303.patch

BuildRequires:  lz4-devel
BuildRequires:  python3-devel

%description
Python bindings for the lz4 compression library.


%package -n python3-lz4
Summary:        LZ4 Bindings for Python 3
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-lz4
Python 3 bindings for the lz4 compression library.


%prep
%autosetup -n %{srcname}-%{version} -p1
sed -i -e '/pytest-cov/d' setup.py
sed -i -e 's/--cov=lz4\/block --cov=lz4\/frame//' tox.ini

rm lz4libs/lz4*.[ch]

%generate_buildrequires
%pyproject_buildrequires -t

%build
%pyproject_wheel


%install
%pyproject_install

%pyproject_save_files lz4
# Fix permissions on shared objects
find %{buildroot}%{python3_sitearch} -name 'lz4*.so' \
    -exec chmod 0755 {} \;

%files -n python3-lz4 -f %{pyproject_files}
%license LICENSE
%doc README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 449 |14mt|python-magic-0.4.27-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name magic

Summary:	File type identification using libmagic
Name:		python-%{pypi_name}
Version:	0.4.27
Release:	2
License:	MIT
Group:		Development/Python
Url:		http://github.com/ahupp/python-magic
Source0:	%{pypi_source %{name}}
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Python interface to the libmagic file type identification library.
Libmagic identifies file types by checking their headers according to
a predefined list of file types. This functionality is exposed to
the command line by the Unix command file.

#----------------------------------------------------------------------------

%package -n python3-%{name}
Summary:	File type identification using libmagic
Group:		Development/Python

%description -n python3-%{name}
Python interface to the libmagic file type identification library.
Libmagic identifies file types by checking their headers according to
a predefined list of file types. This functionality is exposed to
the command line by the Unix command file.

%files -n python3-%{name}
%doc README.md
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/python_magic-%{version}-*.egg-info
#----------------------------------------------------------------------------

%prep
%autosetup -p1

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 450 |14mt|python-mako-1.3.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name Mako

Summary:	Mako template library for Python
Name:		python-mako
Version:	1.3.5
Release:	1
Group:		Development/Python
License:	MIT
URL:		https://www.makotemplates.org/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
Mako is a template library written in Python. It provides a familiar, non-XML
syntax which compiles into Python modules for maximum performance. Mako's
syntax and API borrows from the best ideas of many others, including Django
templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded
Python (i.e. Python Server Page) language, which refines the familiar ideas of
componentized layout and inheritance to produce one of the most straightforward
and flexible models available, while also maintaining close ties to Python
calling and scoping semantics.

#--------------------------------------------------------------------
%package -n python3-mako
Summary:	Mako template library for Python 3
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(nose)
BuildRequires:	python3dist(beaker)
BuildRequires:	python3dist(markupsafe)
BuildRequires:	python3dist(mock)
Provides:	python-mako = %{version}-%{release}
Requires:	python3dist(beaker)
Requires:	python3dist(markupsafe)

%description -n python3-mako
Mako is a template library written in Python. It provides a familiar, non-XML
syntax which compiles into Python modules for maximum performance. Mako's
syntax and API borrows from the best ideas of many others, including Django
templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded
Python (i.e. Python Server Page) language, which refines the familiar ideas of
componentized layout and inheritance to produce one of the most straightforward
and flexible models available, while also maintaining close ties to Python
calling and scoping semantics.

%files -n python3-mako
%doc CHANGES LICENSE README.rst doc examples
%{_bindir}/mako-render
%{python3_sitelib}/*

#--------------------------------------------------------------------

%prep
%setup -q -n Mako-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

rm -rf doc/build

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 451 |14mt|python-markdown-it-py-4.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name markdown-it-py

Name:		python-%{pypi_name}
Version:	4.0.0
Release:	1
Summary:	Python port of markdown-it
Group:		Development/Python
License:	MIT
URL:		https://github.com/executablebooks/markdown-it-py
Source0:	%{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz

BuildArch:	noarch

BuildRequires:	python3-devel
BuildRequires:	pyproject-rpm-macros


%global _description %{expand:
Markdown parser done right. Its features:
Follows the CommonMark spec for baseline parsing.
Has configurable syntax: you can add new rules and even replace existing ones.
Pluggable: Adds syntax extensions to extend the parser.
High speed & safe by default
}

%description %_description

#----------------------------------------------------

%package -n     python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name} %_description

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md
%license LICENSE*
%{_bindir}/markdown-it
#----------------------------------------------------
%prep
%autosetup -p1 -n %{pypi_name}-%{version}

# Remove unnecessary shebang
sed -i '1{\@^#!/usr/bin/env python@d}' markdown_it/cli/parse.py
# Remove coverage (it resides in testing extra which we want to use)
# Upstream issue to move those to another extra:
# https://github.com/executablebooks/markdown-it-py/issues/195
sed -i '/"coverage",/d' pyproject.toml
sed -i '/"pytest-cov",/d' pyproject.toml

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files markdown_it


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 452 |14mt|python-markupsafe-3.0.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-markupsafe
Version:        3.0.2
Release:        1
Summary:        Implements a XML/HTML/XHTML Markup safe string for Python
License:        BSD-3-Clause
URL:            https://palletsprojects.com/p/markupsafe/
Source:         https://github.com/pallets/markupsafe/archive/%{version}/markupsafe-%{version}.tar.gz

BuildRequires:  python3-devel

%global _description %{expand:
MarkupSafe implements a text object that escapes characters so it is
safe to use in HTML and XML. Characters that have special meanings are
replaced so that they display as the actual characters. This mitigates
injection attacks, meaning untrusted user input can safely be displayed
on a page.}

%description %_description


%package -n python3-markupsafe
Summary:        %{summary}

%description -n python3-markupsafe %_description


%prep
%autosetup -n markupsafe-%{version}
# Exclude C source from the package:
echo 'global-exclude *.c' >> MANIFEST.in
# Allow older setuptools
sed -i '/setuptools/s/>=.*"/"/' pyproject.toml

%generate_buildrequires
%pyproject_buildrequires requirements/tests.in

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files markupsafe

%files -n python3-markupsafe -f %{pyproject_files}
%doc CHANGES.rst README.md

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 453 |14mt|python-matplotlib-inline-0.1.6-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name matplotlib-inline

Name:           python-matplotlib-inline
Version:        0.1.6
Release:        4
Summary:        Inline Matplotlib backend for Jupyter
Group:          Development/Python
License:        BSD
URL:            https://github.com/ipython/matplotlib-inline
Source0:        %{pypi_source matplotlib-inline}
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros

%description
Inline Matplotlib backend for Jupyter

#-------------------------------------------------------
%package -n     python3-matplotlib-inline
Summary:        %{summary}
Group:          Development/Python

%description -n python3-matplotlib-inline
Inline Matplotlib backend for Jupyter

%files -n python3-matplotlib-inline -f %{pyproject_files}
%license LICENSE
%doc README.md

#-------------------------------------------------------
%prep
%autosetup -n matplotlib-inline-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files matplotlib_inline

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 454 |14mt|python-mccabe-0.7.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	oname	mccabe

Name:		python-%{oname}
Version:	0.7.0
Release:	3
Summary:	McCabe checker, plugin for flake8
Source0:	%{pypi_source mccabe}
License:	MIT
Group:		Development/Python
Url:		https://github.com/pycqa/mccabe
Patch0:		mccabe-test.patch
BuildArch:	noarch

%description
McCabe complexity checker
=========================
Ned's script to check McCabe complexity.
This module provides a plugin for ``flake8``,
the Python code checker.

#------------------------------------------------------------
%package -n python3-%{oname}

Group:          Development/Python
Summary:        McCabe checker, plugin for flake8
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(pytest)
BuildRequires:  python3-pytest-runner
BuildArch:      noarch

%description -n python3-%{oname}
McCabe complexity checker
=========================
Ned's script to check McCabe complexity.
This module provides a plugin for ``flake8``,
the Python code checker.

%files -n python3-%{oname}
%{python3_sitelib}/mccabe.py*
%{python3_sitelib}/mccabe*.dist-info
%{python3_sitelib}/__pycache__/*

#------------------------------------------------------------
%prep
%autosetup -p1 -n %{oname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%check
%if %{mdvver} >= 201610
%pytest
%else
python3 setup.py test
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 455 |14mt|python-mdurl-0.1.2-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name mdurl

Name:           python-mdurl
Version:        0.1.2
Release:        2
Summary:        Markdown URL utilities
Group:          Development/Python
License:        MIT
URL:            https://github.com/hukkin/mdurl
Source0:        %{url}/archive/%{version}/mdurl-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros


%global _description %{expand:
URL utilities for markdown-it parser.}


%description %_description

#---------------------------------------------------
%package -n     python3-mdurl
Summary:        %{summary}
Group:          Development/Python

%description -n python3-mdurl %_description

%files -n python3-mdurl -f %{pyproject_files}
%doc README.md
%license LICENSE

#---------------------------------------------------
%prep
%autosetup -p1 -n mdurl-%{version}

# Remove coverage from the test requirements
sed -i "s/pytest-cov//" tests/requirements.txt


%generate_buildrequires
%pyproject_buildrequires 
#tests/requirements.txt


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files mdurl


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 456 |14mt|python-meh-0.52-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	A python library for handling exceptions
Name:		python-meh
Version:	0.52
Release:	1
License:	GPLv2+
Group:		System/Libraries
Url:		https://github.com/rhinstaller/python-meh
Source0:	https://github.com/rhinstaller/python-meh/archive/%{name}-%{version}.tar.gz
Source1:	locale.zip
BuildRequires:	pkgconfig(python3)
BuildRequires:	gettext
BuildRequires:	intltool
BuildRequires:	python3-dbus
BuildRequires:	python3-setuptools
BuildRequires:	libreport-gtk
BuildRequires:	libreport-cli
BuildArch:	noarch

%description
The python-meh package is a python library for handling, saving, and reporting
exceptions.

#------------------------------------------------------------------------------

%package -n python3-meh
Summary:	A python library for handling exceptions
Requires:	python3
Requires:	python3-dbus
Requires:	openssh-clients
Requires:	python3-rpm
Requires:	libreport-cli

%description -n python3-meh
The python-meh package is a python library for handling, saving, and reporting
exceptions.

%files -n python3-meh -f %{name}.lang
%doc COPYING
%{python3_sitelib}/*
%exclude %{python3_sitelib}/meh/ui/gui.py*

#------------------------------------------------------------------------------

%package -n python3-meh-gui
Summary:	Graphical user interface for the python-meh library
Requires:	python3-meh = %{EVRD}
Requires:	libreport-gtk

%description -n python3-meh-gui
The python-meh-gui package provides a GUI for the python-meh library.

%files -n python3-meh-gui
%{python3_sitelib}/meh/ui/gui.py*
%{_datadir}/python-meh

#------------------------------------------------------------------------------

%prep
%setup -qn %{name}-%{name}-%{version}

%build
%make_build

%install
%make_install

unzip %{SOURCE1} -d %{buildroot}%{_datadir}

%find_lang %{name}

# TODO: python-pocketlint is needed
#%%check
#make check

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 457 |14mt|python-msgpack-1.1.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define debug_package %{nil}

%define pypi_name msgpack

Summary:	MessagePack (de)serializer for Python
Name:		python-msgpack
Version:	1.1.0
Release:	1
License:	Apache License
Group:		Development/Python
Url:		http://msgpack.org/
Source0:	%{pypi_source}

%description
MessagePack is an efficient binary serialization format. It lets you
exchange data among multiple languages like JSON. But it's faster and
smaller. This package provides CPython bindings for reading and writing
MessagePack data.

#----------------------------------------------------------------------------------

%package -n python3-msgpack
Summary:	MessagePack (de)serializer for Python
Group:		Development/Python
BuildRequires:	python3-cython
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
Provides:	python3dist(msgpack) = %{EVRD}
Provides:	python3dist(msgpack) = %{EVRD}
Provides:	python3dist(msgpack-python) = %{EVRD}
Provides:	python3dist(msgpack-python) = %{EVRD}
Provides:	python3dist(msgpack) = %{EVRD}
Provides:	python3dist(msgpack-python) = %{EVRD}

%description -n python3-msgpack
MessagePack is an efficient binary serialization format. It lets you
exchange data among multiple languages like JSON. But it's faster and
smaller. This package provides CPython bindings for reading and writing
MessagePack data.

%files -n python3-msgpack
%doc COPYING README.md
%{python3_sitearch}/msgpack
%{python3_sitearch}/msgpack-*.dist-info/*

#----------------------------------------------------------------------------------

%prep
%setup -qn msgpack-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
PYTHONDONTWRITEBYTECODE=  %pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 458 |14mt|python-multidict-6.1.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name  multidict

Name:		python-%{pypi_name}
Version:	6.1.0
Release:	1
Summary:	multidict implementation
Group:		Development/Python
License:	ASL 2.0
Url:		https://github.com/aio-libs/multidict/
Source0:	https://github.com/aio-libs/multidict/archive/v%{version}.tar.gz?/%{pypi_name}-%{version}.tar.gz

%description
Multidicts are useful for working with HTTP headers, URL query args etc.

The code was extracted from aiohttp library.

#-------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	multidict implementation
Group:		Development/Python

BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)

%description -n python3-%{pypi_name}
Multidicts are useful for working with HTTP headers, URL query args etc.

The code was extracted from aiohttp library.

%files -n python3-%{pypi_name}
%{python3_sitearch}/%{pypi_name}
%{python3_sitearch}/%{pypi_name}-*.dist-info

#-------------------------------------------------------------------------
%prep
%setup -q -n  multidict-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 459 |14mt|python-nox-2024.4.15-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global debug_package %{nil}
%global pypi_name nox

Summary:	Flexible test automation with Python
Name:		python-%{pypi_name}
Version:	2024.4.15
Release:	1
License:	ASL 2.0
Group:		Development/Python
Url:		https://pypi.org/project/nox
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(argcomplete)
BuildRequires:	python3dist(colorlog)
BuildRequires:	python3dist(hatchling)
BuildRequires:	python3dist(jinja2)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(tox)
BuildRequires:	pkgconfig(python3)

%description
Command-line tool that automates testing in multiple Python environments,
similar to tox.

#----------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Flexible test automation with Python
Group:		Development/Python

%description -n python3-%{pypi_name}
Command-line tool that automates testing in multiple Python environments,
similar to tox.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md
%license LICENSE
%{_bindir}/%{pypi_name}
%{_bindir}/tox-to-%{pypi_name}

#----------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 460 |14mt|python-oauthlib-3.2.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	pypi_name	oauthlib

Name:		python-%{pypi_name}
Version:	3.2.2
Release:	1
Summary:	Spec-compliant, thorough OAuth request-signing logic
Group:		Development/Python
License:	BSD
Url:		https://github.com/idan/oauthlib
Source0:	%{pypi_source}
BuildArch:	noarch

%description
OAuthLib is a generic utility which implements the logic of OAuth without
assuming a specific HTTP request object or web framework. Use it to graft OAuth
client support onto your favorite HTTP library, or provider support onto your
favorite web framework. If you're a maintainer of such a library, write a thin
veneer on top of OAuthLib and get OAuth support for very little effort.

#------------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Spec-compliant, thorough OAuth request-signing logic
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)

%description -n python3-%{pypi_name}
OAuthLib is a generic utility which implements the logic of OAuth without
assuming a specific HTTP request object or web framework. Use it to graft OAuth
client support onto your favorite HTTP library, or provider support onto your
favorite web framework. If you're a maintainer of such a library, write a thin
veneer on top of OAuthLib and get OAuth support for very little effort.

%files -n python3-%{pypi_name}
%doc LICENSE
%doc README.rst
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}*-info

#------------------------------------------------------------------------------
%prep
%setup -q -n %{pypi_name}-%{version}
find . -type f -exec chmod 644 {} \;

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 461 |14mt|python-odfpy-1.4.2-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Used by https://hub.mos.ru/mos/pkgs/mos-attestat-print

%define pypi_name	odfpy

Summary:	Python API and tools to manipulate OpenDocument files
Summary(ru_RU.UTF-8):	API и утилиты для работы с документами формата OpenDocument на Python
Name:		python-%{pypi_name}
Version:	1.4.2
Release:	2
License:	GPL
Group:		Development/Python
Url:		https://github.com/eea/odfpy
Source0:	https://github.com/eea/%{pypi_name}/archive/refs/tags/release-%{version}.tar.gz
BuildRequires:	python3-pkg-resources
BuildRequires:	python3-setuptools
BuildArch:	noarch

%description
Python API and tools to manipulate OpenDocument files

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python API to manipulate OpenDocument files
Summary(ru_RU.UTF-8):	API для работы с документами формата OpenDocument на Python
Group:		Development/Python

%description -n python3-%{pypi_name}
Python API to manipulate OpenDocument files

%description -l ru_RU.UTF-8 -n python3-%{pypi_name}
API для работы с документами формата OpenDocument на Python

%files -n python3-%{pypi_name}
%{python3_sitelib}/odf
%{python3_sitelib}/%{pypi_name}*

#------------------------------------------------------------------

%package -n %{pypi_name}
Summary:	Tools to manipulate OpenDocument files
Summary(ru_RU.UTF-8):	Утилиты для работы с документами формата OpenDocument на Python
Group:	Office
Requires:	python3-%{pypi_name} = %{EVRD}

%description -n %{pypi_name}
Tools to manipulate OpenDocument files

%description -l ru_RU.UTF-8 -n %{pypi_name}
Утилиты для работы с документами формата OpenDocument на Python

%files -n %{pypi_name}
%{_bindir}/csv2ods
%{_bindir}/mailodf
%{_bindir}/odf2mht
%{_bindir}/odf2xhtml
%{_bindir}/odf2xml
%{_bindir}/odfimgimport
%{_bindir}/odflint
%{_bindir}/odfmeta
%{_bindir}/odfoutline
%{_bindir}/odfuserfield
%{_bindir}/xml2odf
%{_mandir}/man1/*.1*

#------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-release-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 462 |14mt|python-openpyxl-3.1.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name openpyxl

Summary:	Python library to read/write Excel 2010 xlsx/xlsm files
Name:		python-%{pypi_name}
Version:	3.1.5
Release:	1
License:	MIT and Python
Group:		Development/Python
Url:		https://openpyxl.readthedocs.io/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm
files. It was born from lack of existing library to read/write natively
from Python the Office Open XML format.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python library to read/write Excel 2010 xlsx/xlsm files
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
Requires:	python3-et_xmlfile
Requires:	python3-jdcal

%description -n python3-%{pypi_name}
openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm
files. It was born from lack of existing library to read/write natively
from Python the Office Open XML format.

%files -n python3-%{pypi_name}
%doc LICENCE.rst
%doc README.rst AUTHORS.rst
%{python3_sitelib}/%{pypi_name}-*.dist-info/
%{python3_sitelib}/%{pypi_name}/

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
rm -rf *.dist-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 463 |14mt|python-ordered-set-4.1.0-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name ordered-set
%global module ordered_set

Summary:	A Custom MutableSet that remembers its order
Name:		python-%{pypi_name}
Version:	4.1.0
Release:	4
License:	MIT
Group:		Development/Python
Url:		https://github.com/LuminosoInsight/ordered-set
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
An OrderedSet is a mutable data structure that is a hybrid of a list and a set.
It remembers the order of its entries, and every entry has an index number
that can be looked up.

#----------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	A Custom MutableSet that remembers its order
Group:		Development/Python

%description -n python3-%{pypi_name}
An OrderedSet is a mutable data structure that is a hybrid of a list and a set.
It remembers the order of its entries, and every entry has an index number
that can be looked up.

This package contains python3 bindings.

%files -n python3-%{pypi_name}
%license MIT-LICENSE
%doc README.md
%dir %{python3_sitelib}/%{module}
%{python3_sitelib}/%{module}/*.py
%{python3_sitelib}/%{module}-*.dist-info/
%dir %{python3_sitelib}/%{module}/__pycache__
%{python3_sitelib}/%{module}/__pycache__/*.pyc
%{python3_sitelib}/%{module}/py.typed

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 464 |14mt|python-parsing-3.0.9-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module parsing
%define pypi_name pyparsing

# the dependency generator is not available when bootstrapping a new python
# until pyparsing is rebuilt
%bcond_with bootstrap

Summary:	An object-oriented approach to text processing
Name:		python-%{module}
Version:	3.0.9
Release:	2
Group:		Development/Python
License:	MIT
URL:		https://github.com/pyparsing/pyparsing/
Source0:	https://pypi.io/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:	noarch
%rename python-pyparsing

%description
The pyparsing module provides an alternative approach to creating and
executing simple grammars in Python versus the traditional lex/yacc
approach or the use of regular expressions. It provides a library of
classes that client code can use to construct a grammar directly.

#-------------------------------------------------------------------
%package -n python3-%{module}
Summary:	An object-oriented approach to text processing
Group:		Development/Python
Provides:	python3-pyparsing = %{EVRD}
%if %{with bootstrap}
Provides:	python3dist(pyparsing) = %{EVRD}
Provides:	python3dist(pyparsing) = %{EVRD}
Provides:	python3dist(pyparsing) = %{EVRD}
BuildRequires:	python3-flit-core
BuildRequires:	python3-packaging
BuildRequires:	python3-pip
%endif
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
%if %{without bootstrap}
BuildRequires:	python3dist(sphinx)
%endif
BuildRequires:	pyproject-rpm-macros

%description -n python3-%{module}
The pyparsing module provides an alternative approach to creating and
executing simple grammars in Python versus the traditional lex/yacc
approach or the use of regular expressions. It provides a library of
classes that client code can use to construct a grammar directly.

%files -n python3-%{module} -f %{pyproject_files}
%doc CHANGES README.rst
%if %{without bootstrap}
%doc docs/html examples
%endif
%license LICENSE

#-------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%if %{without bootstrap}
%generate_buildrequires
%pyproject_buildrequires
%endif

%build
%pyproject_wheel

%if %{without bootstrap}
# build docs
pushd docs
# Theme is not available
sed -i '/alabaster/d' conf.py
sphinx-build -b html . html
popd
%endif

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 465 |14mt|python-pathlib2-2.3.6-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pathlib2

Name:           python-pathlib2
Version:	2.3.6
Release:	2
Group:          Development/Python
Summary:        Object-oriented filesystem paths

License:        MIT
URL:            https://pypi.python.org/pypi/pathlib2
Source0:	https://files.pythonhosted.org/packages/df/16/e9d6bcf1aed52a55bc1696324ab22586716053b3e97b85266e0f3ad36bae/pathlib2-2.3.6.tar.gz
BuildArch:      noarch

%description
The goal of pathlib2 is to provide a backport of
`standard pathlib <http://docs.python.org/dev/library/pathlib.html>`_
module which tracks the standard library module,
so all the newest features of the standard pathlib can be
used also on older Python versions.

#-------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:        Object-oriented filesystem paths
BuildRequires: pkgconfig(python3)
BuildRequires: python3dist(setuptools)

%description -n python3-%{pypi_name}
The goal of pathlib2 is to provide a backport of standard pathlib module which
tracks the standard library module, so all the newest features of the standard
pathlib can be used also on older Python versions.


%files -n python3-%{pypi_name}
%doc README.rst LICENSE.rst
%{python3_sitelib}/

#-------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 466 |14mt|python-pathspec-1.1.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-pathspec
Version:        1.1.1
Release:        1
Summary:        Utility library for gitignore style pattern matching of file paths

License:        MPL-2.0
URL:            https://github.com/cpburnz/python-path-specification
Source:         %{pypi_source pathspec}

BuildArch:      noarch
BuildRequires:  python3-devel

%description
Path Specification (pathspec) is a utility library for pattern matching of file
paths. So far this only includes Git's wildmatch pattern matching which itself
is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files.


%package -n     python3-pathspec
Summary:        %{summary}

%description -n python3-pathspec
Path Specification (pathspec) is a utility library for pattern matching of file
paths. So far this only includes Git's wildmatch pattern matching which itself
is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files.


%prep
%autosetup -n pathspec-%{version}


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files pathspec


%files -n python3-pathspec -f %{pyproject_files}
%doc README.rst
%license LICENSE

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 467 |14mt|python-pep517-0.13.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pep517

%bcond_with tests

Name:           python-%{pypi_name}
Version:	0.13.1
Release:	1
Summary:        Wrappers to build Python packages using PEP 517 hooks
Group:          Development/Python

# colorlog.py is "copied from Tornado", Apache licensed
License:        MIT and ASL 2.0
URL:            https://github.com/takluyver/pep517
Source0:	%{pypi_source}

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros


%description
This package contains wrappers around the hooks of standard API
for systems which build Python packages, specified in PEP 517.

#-------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

# colorlog.py is "copied from Tornado", Apache licensed
Provides:       bundled(python3dist(tornado))

%description -n python3-%{pypi_name}
This package contains wrappers around the hooks of standard API
for systems which build Python packages, specified in PEP 517.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst

#-------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

# Don't run the linter as part of tests
sed -i '/--flake8$/d' pytest.ini
sed -i '/pytest-flake8/d' dev-requirements.txt

%generate_buildrequires
%pyproject_buildrequires %{?with_tests:-t}


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files %{pypi_name}


%if %{with tests}
%check
# "test_meta" skipped as it creates a venv and tries
# to install to it from PyPI
%tox -- -- -v -k "not test_meta"
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 468 |14mt|python-pid-3.0.4-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pid

Summary:	PID file management library
Name:		python-%{pypi_name}
Version:	3.0.4
Release:	4
License:	Apache License
Group:		Development/Python
Url:		https://pypi.org/project/pid/
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(setuptools)
BuildRequires:	python3egg(nose)
BuildArch:	noarch

%global _description \
pid provides a PidFile class that manages PID files. PidFile features: \
  - stale detection \
  - locking using fcntl \
  - chmod (default is 0o644) \
  - chown \
  - custom exceptions \
PidFile can also be used as a context manager or a decorator.

%description
%_description

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	PID file management library
Group:		Development/Python

%description -n python3-%{pypi_name}
%_description

%files -n python3-%{pypi_name}
%doc LICENSE AUTHORS CHANGELOG README.rst
%{python3_sitelib}/pid
%{python3_sitelib}/pid-*.egg-info

#------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}
rm -rf *.egg-info

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 469 |14mt|python-pkgconfig-1.5.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pkgconfig
%global _docdir_fmt %{name}

Name:		python-%{pypi_name}
Version:	1.5.5
Release:	1
Summary:	A Python interface to the pkg-config command line tool
Group:		Development/Python
License:	MIT
URL:		https://github.com/matze/%{pypi_name}
Source0:	%{pypi_source}
BuildArch:	noarch

%description
pkgconfig is a Python module to interface with the pkg-config command line
tool and supports Python 2.6+.

It can be used to

* check if a package exists
* check if a package meets certain version requirements
* query CFLAGS and LDFLAGS
* parse the output to build extensions with setup.py

If pkg-config is not on the path, raises EnvironmentError.

#--------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:        A Python3 interface to the pkg-config command line tool
Group:		Development/Python
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
# For tests
BuildRequires:  python3-nose

%description -n python3-%{pypi_name}
pkgconfig is a Python3 module to interface with the pkg-config command line
tool and supports Python 2.6+.

It can be used to

* check if a package exists
* check if a package meets certain version requirements
* query CFLAGS and LDFLAGS
* parse the output to build extensions with setup.py

If pkg-config is not on the path, raises EnvironmentError.

%files -n python3-%{pypi_name}
%{python3_sitelib}/*

#--------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
# Strip shbang
find -name \*.py | xargs sed -i '/^#!\/usr\/bin\/.*python/d'

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 470 |14mt|python-platformdirs-4.2.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name platformdirs

Summary:	Python module for determining appropriate platform-specific dirs
Name:		python-platformdirs
Version:	4.2.2
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/platformdirs/platformdirs
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildArch:	noarch

%description
A small Python package for determining appropriate platform-specific dirs
e.g. a `user data dir`.

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python module for determining appropriate platform-specific dirs
Group:		Development/Python

%description -n python3-%{pypi_name}
A small Python package for determining appropriate platform-specific dirs
e.g. a `user data dir`.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%license LICENSE

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 471 |14mt|python-poetry-core-1.9.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:	Poetry PEP 517 Build Backend
Name:		python-poetry-core
Version:	1.9.0
Release:	1
License:	MIT and (ASL 2.0 or BSD)
Group:		Development/Python
Url:		https://github.com/python-poetry/poetry-core
Source0:	https://github.com/python-poetry/poetry-core/archive/%{version}/poetry-core-%{version}.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros
BuildArch:	noarch

%description
A PEP 517 build backend implementation developed for Poetry.
This project is intended to be a light weight, fully compliant, self-contained
package allowing PEP 517 compatible build frontends to build Poetry managed
projects.

#----------------------------------------------------------------------------

%package -n python3-poetry-core
Summary:	Poetry PEP 517 Build Backend
Group:		Development/Python
# The bundled versions are taken from poetry/core/_vendor/vendor.txt
Provides:	bundled(python3dist(attrs)) = 20.3
Provides:	bundled(python3dist(jsonschema)) = 3.2
Provides:	bundled(python3dist(lark-parser)) = 0.9
Provides:	bundled(python3dist(packaging)) = 20.9
Provides:	bundled(python3dist(pyparsing)) = 2.4.7
Provides:	bundled(python3dist(pyrsistent)) = 0.16.1
Provides:	bundled(python3dist(six)) = 1.15
Provides:	bundled(python3dist(tomlkit)) = 0.7
# Previous versions of poetry included poetry-core in it
Conflicts:	python%{python3_version}dist(poetry) < 1.1

%description -n python3-poetry-core
A PEP 517 build backend implementation developed for Poetry.
This project is intended to be a light weight, fully compliant, self-contained
package allowing PEP 517 compatible build frontends to build Poetry managed
projects.

%files -n python3-poetry-core -f %{pyproject_files}
%doc README.md
%license LICENSE

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n poetry-core-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files poetry

# /usr/share/spec-helper/clean_files removes files named core
# but they are listed in the files section
export DONT_CLEANUP=1

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 472 |14mt|python-poetry-plugin-export-1.8.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name poetry_plugin_export

Name:		python-poetry-plugin-export
Version:	1.8.0
Release:	1
Summary:	Poetry plugin to export the dependencies to various formats
Group:		Development/Python
License:	GPLv2+
URL:		https://pypi.org/project/poetry-plugin-export/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
Poetry plugin to export the dependencies to various formats

#-------------------------------------------------------------------------
%package -n python3-poetry-plugin-export
Summary:	Poetry plugin to export the dependencies to various formats
Group:		Development/Python
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(poetry-core)
BuildRequires:	python3dist(pip)

%description -n python3-poetry-plugin-export
Poetry plugin to export the dependencies to various formats

%files -n python3-poetry-plugin-export -f %{pyproject_files}

#-------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files poetry_plugin_export

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 473 |14mt|python-pretend-1.0.9-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pretend

Name:		python-pretend
Version:	1.0.9
Release:	3
Summary:	A library for stubbing in Python
Group:		Development/Python
License:	BSD
URL:		https://github.com/alex/pretend
Source0:	https://pypi.io/packages/source/p/pretend/pretend-%{version}.tar.gz
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildArch:	noarch

%description
Pretend is a library to make stubbing with Python easier.

#----------------------------------------------------------------
%package -n python3-pretend
Summary:	A library for stubbing in Python
Group:		Development/Python

%description -n python3-pretend
Pretend is a library to make stubbing with Python3 easier.

%files -n python3-pretend
%doc PKG-INFO README.rst LICENSE.rst
%{python3_sitelib}/pretend.py*
%{python3_sitelib}/__pycache__/
%{python3_sitelib}/pretend-%{version}-py*.egg-info

#----------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

# Delete upstream supplied egg-info
rm -rf *.egg-info

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 474 |14mt|python-prettytable-3.11.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name prettytable

Summary:	Python library for displaying data in ASCII table format
Name:		python-prettytable
Version:	3.11.0
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://code.google.com/p/prettytable/
Source0:	%{pypi_source}
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(setuptools-scm)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
PrettyTable is a simple Python library designed to make
 it quick and easy to represent tabular data in visually
appealing ASCII tables. It was inspired by the ASCII
tables used in the PostgreSQL shell psql. PrettyTable
allows for selection of which columns are to be printed,
independent alignment of columns (left or right justified
or centred) and printing of "sub-tables" by specifying a
row range.

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python library for displaying data in ASCII table format
Group:		Development/Python

%description -n python3-%{pypi_name}
PrettyTable is a simple Python library designed to make
 it quick and easy to represent tabular data in visually
appealing ASCII tables. It was inspired by the ASCII
tables used in the PostgreSQL shell psql. PrettyTable
allows for selection of which columns are to be printed,
independent alignment of columns (left or right justified
or centred) and printing of "sub-tables" by specifying a
row range.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md
%license LICENSE

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 475 |14mt|python-priority-2.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name priority

Summary:	A pure-Python implementation of the HTTP/2 priority tree
Name:		python-%{pypi_name}
Version:	2.0.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://python-hyper.org/priority/
Source0:	%pypi_source
# Increase deadline for test_period_of_repetition
Patch1:		deadline.patch
BuildRequires:	python3dist(hypothesis)
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
A HTTP/2 Priority Implementation Priority is a pure-Python
implementation of the priority logic for HTTP/2, set out in RFC 7540 Section
5.3 (Stream Priority)_. This logic allows for clients to express a preference
for how the server allocates its (limited) resources to the many outstanding
HTTP requests that may be running over a single HTTP/2 connection.

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A pure-Python implementation of the HTTP/2 priority tree
Group:		Development/Python

%description -n python3-%{pypi_name}
A HTTP/2 Priority Implementation Priority is a pure-Python
implementation of the priority logic for HTTP/2, set out in RFC 7540 Section
5.3 (Stream Priority)_. This logic allows for clients to express a preference
for how the server allocates its (limited) resources to the many outstanding
HTTP requests that may be running over a single HTTP/2 connection.

%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%check
PYTHONPATH=%{buildroot}%{python3_sitelib}:$PYTHONPATH %{__python3} -m pytest

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 476 |14mt|python-prompt_toolkit-3.0.48-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name prompt_toolkit

Name:           python-%{pypi_name}
Version:	3.0.48
Release:	1
Group:          Development/Python
Summary:        Library for building powerful interactive command lines in Python
License:        BSD
URL:            https://github.com/jonathanslenders/python-prompt-toolkit
Source0:	%{pypi_source}
BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description
prompt_toolkit is a library for building powerful interactive command lines
and terminal applications in Python.

%package -n     python3-%{pypi_name}
Summary:        Library for building powerful interactive command lines in Python
Requires:       python3-pygments
Requires:       python3-six >= 1.9.0
Requires:       python3-wcwidth

%description -n python3-%{pypi_name}
prompt_toolkit is a library for building powerful interactive command lines
and terminal applications in Python.

%prep
%setup -q -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%files -n python3-%{pypi_name}
%doc README.rst AUTHORS.rst CHANGELOG LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 477 |14mt|python-ptyprocess-0.7.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name ptyprocess

Name:		python-%{pypi_name}
Version:	0.7.0
Release:	3
Group:		Development/Python
Summary:	Run a subprocess in a pseudo terminal
License:	BSD
URL:		https://pypi.python.org/pypi/%{pypi_name}
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
Launch a subprocess in a pseudo terminal (pty), and interact with both
the process and its pty.

#----------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:	Run a subprocess in a pseudo terminal
Group:		Development/Python

%description -n python3-%{pypi_name}
Launch a subprocess in a pseudo terminal (pty), and interact with both
the process and its pty.

%files -n python3-%{pypi_name}
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#----------------------------------------------------------
%prep
%setup -qn %{pypi_name}-%{version}

find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 478 |14mt|python-py-1.11.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name  py

Name:		python-%{pypi_name}
Version:	1.11.0
Release:	1
Summary:	Library with cross-python path, ini-parsing, io, code, log facilities
Group:		Development/Python
Url:		http://py.readthedocs.org
License:	MIT
Source0:	https://pypi.io/packages/source/p/py/py-%{version}.tar.gz
BuildRequires:	python3-setuptools
BuildRequires:	python3-setuptools_scm
BuildRequires:	python3-apipkg
BuildArch:	noarch

%description
NOTE: this library is in maintenance mode and should not be used in new code.

The py lib is a development support library featuring these tools and
APIs:

* py.path: uniform local and svn path objects
* py.apipkg: explicit API control and lazy-importing
* py.iniconfig: easy parsing of .ini files
* py.code: dynamic code generation and introspection

NOTE: prior to the 1.4 release this distribution used
to contain py.test which is now its own package,
see http://pytest.org

#----------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	Library with cross-python path, ini-parsing, io, code, log facilities
Group:		Development/Python

%description -n python3-%{pypi_name}
NOTE: this library is in maintenance mode and should
not be used in new code.

The py lib is a development support library featuring
these tools and APIs:

* py.path: uniform local and svn path objects
* py.apipkg: explicit API control and lazy-importing
* py.iniconfig: easy parsing of .ini files
* py.code: dynamic code generation and introspection


NOTE: prior to the 1.4 release this distribution used
to contain py.test which is now its own package,
see http://pytest.org

%files -n python3-%{pypi_name}
%doc CHANGELOG.rst LICENSE README.rst
%{python3_sitelib}/py*

#----------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 479 |14mt|python-pyagentx-0.4.pcs.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define srcname pyagentx

Name:		python-%{srcname}
Version:	0.4.pcs.2
Release:	1
Summary:	Native Python AgentX client implementation to extend SNMP agents
Group:		Development/Python
License:	BSD-2
URL:		https://github.com/ondrejmular/pyagentx
Source0:	https://github.com/ondrejmular/pyagentx/archive/refs/tags/v%{version}.tar.gz?/%{srcname}-%{version}.tar.gz
BuildRequires:	python3-setuptools
BuildRequires:	python3-devel
BuildArch:	noarch

%description
"pyagentx" is pure Python implementation of AgentX protocol (RFC 2741),
it will allow you to extend SNMP agent (snmpd) by writing AgentX subagents,
without modifying your original SNMP agent.

[RFC 2741: Agent Extensibility (AgentX) Protocol Version 1]
(http://www.ietf.org/rfc/rfc2741.txt)

#----------------------------------------------
%package -n python3-%{srcname}
Summary:	Native Python AgentX client implementation to extend SNMP agents
Group:		Development/Python

%description -n python3-%{srcname}
"pyagentx" is pure Python implementation of AgentX protocol (RFC 2741),
it will allow you to extend SNMP agent (snmpd) by writing AgentX subagents,
without modifying your original SNMP agent.

[RFC 2741: Agent Extensibility (AgentX) Protocol Version 1]
(http://www.ietf.org/rfc/rfc2741.txt)

%files -n python3-%{srcname}
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-0.4.1*-info

#----------------------------------------------
%prep
%autosetup -p1 -n %{srcname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 480 |14mt|python-pybeam-0.7-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module	pybeam

Name:		python-%{module}
Version:	0.7
Release:	2
Summary:	Python module to parse Erlang BEAM files
License:	MIT
Group:		Development/Python
URL:		https://github.com/matwey/%{module}
Source0:	https://github.com/matwey/%{module}/archive/%{version}/%{module}-%{version}.tar.gz
BuildArch:	noarch

%description
Python module to parse Erlang BEAM files.
#----------------------------------------------------------

%package -n	python3-%{module}
Summary:	Python 3 module to parse Erlang BEAM files
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(construct)
BuildRequires:	python3dist(sphinx)
BuildArch:	noarch

%description -n python3-%{module}
Python 3 module to parse Erlang BEAM files.

%files -n python3-%{module}
%doc README.md LICENSE
%{python3_sitelib}/*

#----------------------------------------------------------

%prep
%setup -q -n %{module}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 481 |14mt|python-pyflakes-3.2.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyflakes

Summary:	Simple program which checks Python source files for errors
Name:		python-%{pypi_name}
Version:	3.2.0
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://github.com/PyCQA/pyflakes
Source0:	%{pypi_source}
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(setuptools)
BuildArch:	noarch

%description
Pyflakes is a simple program which checks Python source files for errors. It is
similar to PyChecker in scope, but differs in that it does not execute the
modules to check them. This is both safer and faster, although it does not
perform as many checks.

Unlike PyLint, Pyflakes checks only for logical errors in programs; it does
not perform any checks on style.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:        Simple program which checks Python source files for errors
Provides:       py3flakes = %{EVRD}
Provides:	pyflakes = %{EVRD}
Obsoletes:	pyflakes < %{EVRD}

%description -n python3-%{pypi_name}
Pyflakes is a simple program which checks Python source files for errors. It is
similar to PyChecker in scope, but differs in that it does not execute the
modules to check them. This is both safer and faster, although it does not
perform as many checks.

Unlike PyLint, Pyflakes checks only for logical errors in programs; it does
not perform any checks on style.

%files -n python3-%{pypi_name}
%license LICENSE
%doc AUTHORS NEWS.rst README.rst
%{_bindir}/pyflakes-%{python3_version}
%{_bindir}/pyflakes-3
%{_bindir}/pyflakes
%{python3_sitelib}/pyflakes*
%exclude %{python3_sitelib}/pyflakes/test/
#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/pyflakes-%{python3_version}
ln -s pyflakes-%{python3_version} %{buildroot}%{_bindir}/pyflakes-3
ln -s pyflakes-3 %{buildroot}%{_bindir}/pyflakes

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 482 |14mt|python-pyglet-1.5.29-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name  pyglet

Summary:	A cross-platform windowing and multimedia library for Python
Name:		python-%{pypi_name}
Version:	1.5.29
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://pyglet.org
# repack with script pyglet-get-tarball.sh
Source0:	%{pypi_source %{pypi_name} %{version} zip}
Source1:	python-pyglet.rpmlintrc
BuildArch:	noarch

%description
Pyglet provides an object-oriented programming interface for
developing games and other visually-rich applications for Windows, Mac
OS X and Linux. Some of the features of pyglet are:

* No external dependencies or installation requirements. For most
  application and game requirements, pyglet needs nothing else besides
  Python, simplifying distribution and installation.

* Take advantage of multiple windows and multi-monitor
  desktops. pyglet allows you to use as many windows as you need,
  and is fully aware of multi-monitor setups for use with
  fullscreen games.

* Load images, sound, music and video in almost any format. pyglet can
  optionally use AVbin to play back audio formats such as MP3,
  OGG/Vorbis and WMA, and video formats such as DivX, MPEG-2, H.264,
  WMV and Xvid.

#---------------------------------------------------------------
%package -n python3-%{pypi_name}

Summary:	A cross-platform windowing and multimedia library for Python3
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
Requires:	libglvnd-GL
Requires:	libmesaglu
Requires:	libX11
Requires:	python3-pillow

%description -n python3-%{pypi_name}
Pyglet provides an object-oriented programming interface for
developing games and other visually-rich applications for Windows, Mac
OS X and Linux. Some of the features of pyglet are:

* No external dependencies or installation requirements. For most
  application and game requirements, pyglet needs nothing else besides
  Python, simplifying distribution and installation.

* Take advantage of multiple windows and multi-monitor
  desktops. pyglet allows you to use as many windows as you need,
  and is fully aware of multi-monitor setups for use with
  fullscreen games.

* Load images, sound, music and video in almost any format. pyglet can
  optionally use AVbin to play back audio formats such as MP3,
  OGG/Vorbis and WMA, and video formats such as DivX, MPEG-2, H.264,
  WMV and Xvid.

%files -n python3-%{pypi_name}
%doc README* LICENSE NOTICE
%{python3_sitelib}/*
#---------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

# Remove the bundled pypng library (python-pillow provides the same functionality)
rm pyglet/image/codecs/png.py
rm pyglet/extlibs/png.py

# Get rid of hashbang lines. This is a library, it has no executable scripts.
# Also remove Windows newlines
find . -name '*.py' | xargs sed --in-place -e's|#!/usr/bin/\(env \)\?python||;s/\r//'

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 483 |14mt|python-pyinotify-0.9.6-5
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyinotify

Summary:	Python module for monitoring filesystems changes
Name:		python-%{pypi_name}
Version:	0.9.6
Release:	5
License:	MIT
Group:		Development/Python
Url:		http://github.com/seb-m/pyinotify
Source0:	%{pypi_source}
Provides:	%{pypi_name} = %{EVRD}
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Pyinotify is a pure Python module for monitoring filesystems changes.
Pyinotify relies on inotify, a Linux Kernel functionality (since
kernel 2.6.13). inotify is an event-driven notification mechanism, its
notifications are exported to user space through three system calls.
Pyinotify binds these system calls and provides an implementation on
top of them.

#----------------------------------------------------------------------------
%package -n python3-pyinotify
Summary:	Python module for monitoring filesystems changes
Group:		Development/Python
# Previous py3 subpackages were named in a wrong way
Obsoletes:	python3-pyinotify-0.9.4 < 0.9.5
Obsoletes:	python3-pyinotify-0.9.5 < 0.9.5-4

%description -n python3-pyinotify
Pyinotify is a pure Python module for monitoring filesystems changes.
Pyinotify relies on inotify, a Linux Kernel functionality (since
kernel 2.6.13). inotify is an event-driven notification mechanism, its
notifications are exported to user space through three system calls.
Pyinotify binds these system calls and provides an implementation on
top of them.

%files -n python3-pyinotify
%doc README* ACKS COPYING
%{python3_sitelib}/*

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 484 |14mt|python-pylsqpack-0.3.24-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pylsqpack

# -Wl,--as-needed flag breaks the link to `ls-qpack` library
%undefine _ld_as_needed

Name:           python-%{pypi_name}
Version:        0.3.24
Release:        1
Summary:        %{pypi_name} is a wrapper around the ls-qpack library
Group:          Development/Python
License:        BSD-3-Clause
URL:            https://github.com/aiortc/%{pypi_name}
Source0:        %{pypi_source}
Patch0:         %{name}-unbundle_vendor_libs.patch
Patch1:         pylsqpack-pyproject.patch
BuildRequires:  ls-qpack-devel
BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3-devel
BuildRequires:  python3-pytest

%description
It provides Python Decoder and Encoder objects
to read or write HTTP/3 headers compressed with QPACK.

%package -n python3-%{pypi_name}
Summary: %{pypi_name} is a wrapper around the ls-qpack library
Group:          Development/Python

%description -n python3-%{pypi_name}
It provides Python Decoder and Encoder objects
to read or write HTTP/3 headers compressed with QPACK.

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%check
%pytest -v

%files -n python3-%{pypi_name} -f %{pyproject_files}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 485 |14mt|python-pyproject_metadata-0.8.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyproject_metadata

Summary:	PEP 621 metadata parsing
Name:		python-pyproject_metadata
Version:	0.8.0
Release:	1
License:	MIT
Group:		Development/Python
URL:		https://pypi.org/project/pyproject_metadata/
Source0:	%{pypi_source}
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(wheel)
BuildRequires:	pyproject-rpm-macros
BuildArch:	noarch

%description
Dataclass for PEP 621 metadata with support for core metadata generation

This project does not implement the parsing of pyproject.toml containing PEP
621 metadata.

Instead, given a Python data structure representing PEP 621 metadata (already
parsed), it will validate this input and generate a PEP 643-compliant metadata
file (e.g. PKG-INFO).

#----------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	PEP 621 metadata parsing
Group:		Development/Python

%description -n python3-%{pypi_name}
Dataclass for PEP 621 metadata with support for core metadata generation

This project does not implement the parsing of pyproject.toml containing PEP
621 metadata.

Instead, given a Python data structure representing PEP 621 metadata (already
parsed), it will validate this input and generate a PEP 643-compliant metadata
file (e.g. PKG-INFO).

%files -n python3-%{pypi_name}
%{python3_sitelib}/pyproject_metadata
%{python3_sitelib}/pyproject_metadata-%{version}*.*-info

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n pyproject_metadata-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 486 |14mt|python-pyqt6-switch-control-1.0.5-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name	PyQt6_SwitchControl

Summary(ru_RU.UTF-8): Переключатель для PyQt6
Summary:        Switch control for PyQt6
Name:           python-pyqt6-switch-control
Version:        1.0.5
Release:        3
License:        MIT
Group:          Development/Python
URL:            https://github.com/norby4ever/%{pypi_name}
Source0:        https://github.com/norby4ever/%{pypi_name}/archive/refs/tags/v%{version}.tar.gz
BuildArch:      noarch
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3-pkg-resources
Requires:       python3-qt6

%description
Visual switch for PyQt6

%description -l ru_RU.UTF-8
Визуальный переключатель для PyQt6

#------------------------------------------------------------------

%package -n python3-pyqt6-switch-control
Summary(ru_RU.UTF-8): Переключатель для PyQt6
Summary:        Switch control for PyQt6
Group:          Development/Python

%description -n python3-pyqt6-switch-control
Visual switch for PyQt6

%description -l ru_RU.UTF-8 -n python3-pyqt6-switch-control
Визуальный переключатель для PyQt6

%files -n python3-pyqt6-switch-control
%doc README.md
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}*

#------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 487 |14mt|python-pyspf-2.0.14-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyspf
%define mod_name %{pypi_name}
%define oname pyspf

Summary:        SPF (Sender Policy Framework) implemented in Python
Name:           python-%{oname}
Version:        2.0.14
Release:        1
License:        Python-2.0
Group:          Development/Python
Url:            https://github.com/sdgathman/pyspf/
Source0:        %{pypi_source}

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3dist(wheel)
BuildRequires:  python3dist(pip)
BuildArch:      noarch

%description
%{summary}.

#------------------------------------------------------------------

%package -n python3-%{oname}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{oname}
%{summary}.

%files -n python3-%{oname}
%{_bindir}/spfquery.py
%{_bindir}/type99.py
%artifact   %{python3_sitelib}/__pycache__
%{python3_sitelib}/pyspf-%{version}.dist-info
%{python3_sitelib}/spf.py

#------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 488 |14mt|python-pystache-0.6.5-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global	pypi_name pystache

Summary:	Mustache in Python
Name:		python-%{pypi_name}
Version:	0.6.5
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://github.com/defunkt/%{pypi_name}
Source0:	%pypi_source
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Pystache is a Python implementation of Mustache.
Mustache is a framework-agnostic, logic-free templating system
inspired by ctemplate and et.
Like ctemplate, Mustache "emphasizes separating logic from presentation:
it is impossible to embed application logic in this template language."

#--------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Mustache in Python
Group:		Development/Python

%description -n python3-%{pypi_name}
Pystache is a Python implementation of Mustache.
Mustache is a framework-agnostic, logic-free templating system
inspired by ctemplate and et.
Like ctemplate, Mustache "emphasizes separating logic from presentation:
it is impossible to embed application logic in this template language."

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc HISTORY.md README.rst TODO.rst
%license LICENSE
%{_bindir}/%{pypi_name}
%{_bindir}/%{pypi_name}-test

#--------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 489 |14mt|python-pytesseract-0.3.13-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pytesseract
%define mod_name %{pypi_name}
%define oname pytesseract

Summary:        Python-tesseract is a python wrapper for Google's Tesseract-OCR
Name:           python-%{oname}
Version:        0.3.13
Release:        1
License:        Apache-2.0
Group:          Development/Python
Url:            https://github.com/madmaze/pytesseract
Source0:        %{pypi_source}

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3dist(wheel)
BuildRequires:  python3dist(pip)
BuildArch:      noarch

%description
%{summary}.

#------------------------------------------------------------------

%package -n python3-%{oname}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{oname}
%{summary}.

%files -n python3-%{oname} -f %{pyproject_files}
%{_bindir}/pytesseract

#------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{mod_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 490 |14mt|python-pytest-asyncio-0.26.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global _python_no_extras_requires 1

%global pypi_name pytest_asyncio
%global modname pytest-asyncio

Summary:	Pytest support for asyncio
Name:		python-%{modname}
Version:	0.26.0
Release:	1
License:	ASL 2.0
Group:		Development/Python
Url:		https://pypi.python.org/pypi/%{pypi_name}
Source0:	%pypi_source
Patch0:		pytest-asyncio-requirements.patch
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(setuptools-scm)
BuildRequires:	python3dist(wheel)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
pytest-asyncio is an Apache2 licensed library, written in Python, for testing
asyncio code with pytest.

asyncio code is usually written in the form of coroutines, which makes it
slightly more difficult to test using normal testing tools. pytest-asyncio
provides useful fixtures and markers to make testing easier.

#----------------------------------------------------------------------------

%package -n python3-%{modname}
Summary:	Pytest support for asyncio
Group:		Development/Python

%description -n python3-%{modname}
pytest-asyncio is an Apache2 licensed library, written in Python, for testing
asyncio code with pytest.

asyncio code is usually written in the form of coroutines, which makes it
slightly more difficult to test using normal testing tools. pytest-asyncio
provides useful fixtures and markers to make testing easier.

%files -n python3-%{modname} -f %{pyproject_files}
%license LICENSE
%doc README.rst

#-------------------------------------------------------------------------
%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files pytest_asyncio

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 491 |14mt|python-pytest-benchmark-4.0.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pytest-benchmark

Summary:	A py.test fixture for benchmarking code
Name:		python-%{pypi_name}
Version:	4.0.0
Release:	2
License:	BSD
Group:		Development/Python
URL:		https://pytest-benchmark.readthedocs.io
Source:		https://github.com/ionelmc/%{pypi_name}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
BuildArch:	noarch
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
# Tests
#BuildRequires:	python3-cpuinfo
#BuildRequires:	python3-pytest
#BuildRequires:	python3-elasticsearch
#BuildRequires:	python3-freezegun
#BuildRequires:	python3-pytest-xdist
#BuildRequires:	python3-pygal

%global _description\
This plugin provides a benchmark fixture. This fixture is a callable object\
that will benchmark any function passed to it.\
\
Notable features and goals:\
\
  - Sensible defaults and automatic calibration for microbenchmarks\
  - Good integration with pytest\
  - Comparison and regression tracking\
  - Exhausive statistics\
  - JSON export

%description
%_description

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	%summary
Group:		Development/Python
Requires:	python3-pytest
Requires:	python3-cpuinfo

%description -n python3-%{pypi_name}
%_description

%files -n python3-%{pypi_name}
%doc README.rst CHANGELOG.rst CONTRIBUTING.rst AUTHORS.rst
%license LICENSE
%{_bindir}/py.test-benchmark
%{_bindir}/pytest-benchmark
%{python3_sitelib}/pytest_benchmark
%{python3_sitelib}/pytest_benchmark-%{version}-py*.egg-info

#------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

%check
# Tests disabled (missing dependency: aspectlib)
#%%pytest

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 492 |14mt|python-pytest-randomly-3.15.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pytest_randomly

Summary:	Pytest plugin to randomly order tests and control random
Name:		python-pytest-randomly
Version:	3.15.0
Release:	2
License:	BSD
Group:		Development/Python
Url:		https://pypi.org/project/pytest-randomly
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Pytest plugin to randomly order tests and control random.seed.

#----------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Pytest plugin to randomly order tests and control random
Group:		Development/Python
Requires:	python3dist(pytest)
Requires:	python3dist(setuptools)
Obsoletes:	python3-pytest-randomly < 3.15.0

%description -n python3-%{pypi_name}
Pytest plugin to randomly order tests and control random.seed.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%license LICENSE

#----------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 493 |14mt|python-pytest-rerunfailures-15.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname pytest-rerunfailures

Name:		python-%{srcname}
Version:	15.0
Release:	1
Summary:	A py.test plugin that re-runs failed tests to eliminate flakey failures
Group:		Development/Python
License:	MPLv2.0
URL:		https://github.com/pytest-dev/%{srcname}
Source0:	https://github.com/pytest-dev/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz

BuildArch:	noarch

%description
pytest-rerunfailures is a plugin for py.test that re-runs tests to eliminate
intermittent failures.

#------------------------------------------------------------------------
%package -n python3-%{srcname}
Summary:	%{summary}
BuildRequires:	python3-devel
BuildRequires:	python3-pytest >= 5.3
BuildRequires:	python3-setuptools >= 40.0

%description -n python3-%{srcname}
pytest-rerunfailures is a plugin for py.test that re-runs tests to eliminate
intermittent failures.

%files -n python3-%{srcname}
%license LICENSE
%doc CHANGES.rst README.rst
%{python3_sitelib}/pytest_rerunfailures.py
%{python3_sitelib}/__pycache__/pytest_rerunfailures.cpython-*
%{python3_sitelib}/pytest_rerunfailures-%{version}-py*.egg-info/

#--------------------------------------------------------------------------
%prep
%autosetup -n %{srcname}-%{version}


%build
%py3_build


%install
%py3_install


%check
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest tests/test_pytest_rerunfailures.py

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 494 |14mt|python-pytest-xdist-3.3.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pytest-xdist
%global _python_no_extras_requires 1

Summary:	Pytest xdist plugin
Name:		python-%{pypi_name}
Version:	3.3.1
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/pytest-dev/%{pypi_name}
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	pyproject-rpm-macros
# for tests
BuildRequires:	python3-pexpect
BuildArch:	noarch

%description
pytest xdist plugin for distributed testing and loop-on-failing modes.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Pytest xdist plugin
Group:		Development/Python
# python3 files were in main package
Obsoletes:	python-%{pypi_name} < 3.2.1

%description -n python3-%{pypi_name}
pytest xdist plugin for distributed testing and loop-on-failing modes.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc *.rst

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -x testing,psutil,setproctitle

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files xdist

%check
%pytest -v

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 495 |14mt|python-pyusb-1.2.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyusb
%define opypi_name usb

Summary:	Python bindings for libusb
Name:		python-%{pypi_name}
Version:	1.2.1
Release:	2
License:	BSD
Group:		Development/Python
Url:		http://pyusb.sourceforge.net/
Source0:	https://files.pythonhosted.org/packages/d9/6e/433a5614132576289b8643fe598dd5d51b16e130fd591564be952e15bb45/pyusb-1.2.1.tar.gz
BuildRequires:	pkgconfig(libusb)
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(setuptools-scm)
Conflicts:	pyusb < 1.0.0-2a1
Obsoletes:	pyusb < 1.0.0-2a1
Provides:	pyusb = %{EVRD}
BuildArch:	noarch

%description
PyUSB provides easy USB access to python. The pypi_name contains classes and
methods to support most USB operations.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python bindings for libusb
Group:		Development/Python

%description -n python3-%{pypi_name}
PyUSB provides easy USB access to python. The pypi_name contains classes and
methods to support most USB operations.

%files -n python3-%{pypi_name}
%dir %{python3_sitelib}/%{opypi_name}/
%{python3_sitelib}/%{opypi_name}/*
%{python3_sitelib}/%{pypi_name}-*.egg-info

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%build

%install
PYTHONDONTWRITEBYTECODE= %__python3 setup.py install --root=%{buildroot}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 496 |14mt|python-qrcode-7.4.2-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name qrcode

Summary:	Python QR Code image generator
Name:		python-%{pypi_name}
Version:	7.4.2
Release:	2
License:	BSD
Group:		Development/Python
Url:		https://github.com/lincolnloop/python-qrcode
Source0:	https://github.com/lincolnloop/python-qrcode/archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
BuildRequires:	python3dist(pillow)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(six)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
This module uses the Python Imaging Library (PIL) to allow for the
generation of QR Codes.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python QR Code image generator
Group:		Development/Python
Requires:	python3dist(pillow)
Requires:	python3-%{pypi_name}-core = %{EVRD}

%description -n python3-%{pypi_name}
This module uses the Python3 Imaging Library (PIL) to allow for the
generation of QR Codes

%files -n python3-%{pypi_name}
%{_bindir}/qr
%{_mandir}/man1/qr.1*
%{python3_sitelib}/%{pypi_name}/image/svg.py*
%{python3_sitelib}/%{pypi_name}/image/pil.py*

#----------------------------------------------------------------------------


%package -n python3-%{pypi_name}-core
Summary:	Python3 QR Code image generator (core library)
Group:		Development/Python
Requires:	python3dist(six)

%description -n python3-%{pypi_name}-core
Core Python3 module for QR code generation. Does not contain image rendering

%files -n python3-%{pypi_name}-core
%doc LICENSE README.rst CHANGES.rst
%dir %{python3_sitelib}/%{pypi_name}/
%dir %{python3_sitelib}/%{pypi_name}/image
%{python3_sitelib}/%{pypi_name}*.dist-info
%{python3_sitelib}/%{pypi_name}/*.py*
%{python3_sitelib}/%{pypi_name}/__pycache__/*
%{python3_sitelib}/%{pypi_name}/image/__init__.py*
%{python3_sitelib}/%{pypi_name}/image/base.py*
%{python3_sitelib}/%{pypi_name}/image/__pycache__/*
%{python3_sitelib}/%{pypi_name}/image/styles
%{python3_sitelib}/%{pypi_name}/image/styledpil.py
%{python3_sitelib}/%{pypi_name}/image/pure.py*
%{python3_sitelib}/%{pypi_name}/compat
#----------------------------------------------------------------------------


%prep
%autosetup -p1 -n %{name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
rm -Rf %{buildroot}%{python3_sitelib}/%{pypi_name}/tests

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 497 |14mt|python-random2-1.0.1-8
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	pypi_name	random2

Name:		python-%{pypi_name}
Version:	1.0.1
Release:	8
Summary:	Python 3 compatible Pytohn 2 `random` Module
Source0:	http://pypi.python.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.zip
License:	Python
Group:		Development/Python
Url:		http://pypi.python.org/pypi/random2
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
This package provides a Python 3 ported version of Python 2.7's ``random``
module. It has also been back-ported to work in Python 2.6.

In Python 3, the implementation of ``randrange()`` was changed, so that even
with the same seed you get different sequences in Python 2 and 3. Note that
several high-level functions such as ``randint()`` and ``choice()`` use
``randrange()``.

#------------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:	Python 3 compatible Pytohn 2 `random` Module
BuildArch:	noarch

%description -n python3-%{pypi_name}
This package provides a Python 3 ported version of Python 2.7's ``random``
module. It has also been back-ported to work in Python 2.6.

In Python 3, the implementation of ``randrange()`` was changed, so that even
with the same seed you get different sequences in Python 2 and 3. Note that
several high-level functions such as ``randint()`` and ``choice()`` use
``randrange()``.

%files -n python3-%{pypi_name}
%doc CHANGES.txt README.txt
%{python3_sitelib}/random2.py*
%{python3_sitelib}/random2*.dist-info
%{python3_sitelib}/__pycache__/*
#------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 498 |14mt|python-rapidfuzz-3.11.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global	debug_package %{nil}

%global	pypi_name rapidfuzz
%global	oname RapidFuzz

Summary:	RapidFuzz is a fast string matching library for Python and C++
Name:		python-%{pypi_name}
Version:	3.11.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/maxbachmann/RapidFuzz
Source0:	%{pypi_source}
BuildRequires:	cmake
BuildRequires:	jarowinkler-cpp
BuildRequires:	ninja
BuildRequires:	pyproject-rpm-macros
BuildRequires:  python3-pip
BuildRequires:  python3-tomli
BuildRequires:	rapidfuzz-cpp
BuildRequires:	taskflow
#BuildRequires:	python3dist(numpy)
#BuildRequires:	python3dist(rapidfuzz-capi)
BuildRequires:	python3dist(scikit-build)
#BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(wheel)
BuildRequires:	pkgconfig(python3)

%description
RapidFuzz is a fast string matching library for Python and C++,
which is using the string similarity calculations from FuzzyWuzzy.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	This package provides the C-API of RapidFuzz
Group:		Development/Python

%description -n python3-%{pypi_name}
RapidFuzz is a fast string matching library for Python and C++,
which is using the string similarity calculations from FuzzyWuzzy.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README*
%license LICENSE

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -R

%build
#FIXME: investigate C extensions build failure
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files %{pypi_name}



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 499 |14mt|python-rdflib-7.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	pypi_name rdflib

Summary:	Python library for working with RDF
Name:		python-%{pypi_name}
Version:	7.0.0
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://github.com/RDFLib/rdflib
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pyproject-rpm-macros
BuildArch:	noarch

%description
RDFLib is a Python library for working with RDF, a simple yet powerful
language for representing information. The library contains parsers and
serializers for RDF/XML, N3, NTriples, Turtle, TriX and RDFa . It presents
a Graph interface which can be backed by any one of a number of Store
implementations, including, Memory, MySQL, Redland, SQLite, Sleepycat and
SQLObject.

#-----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python 3 library for working with RDF
Group: 		Development/Python
Requires:	python3dist(requests)

%description -n python3-%{pypi_name}
RDFLib is a Python library for working with RDF, a simple yet powerful
language for representing information. The library contains parsers and
serializers for RDF/XML, N3, NTriples, Turtle, TriX and RDFa . It presents
a Graph interface which can be backed by any one of a number of Store
implementations, including, Memory, MySQL, Redland, SQLite, Sleepycat and
SQLObject.

%files -n python3-%{pypi_name}
%doc LICENSE
%{python3_sitelib}/*

#-----------------------------------------------------------------------------

# NOTE: While the library modules for both python versions could be installed
# together, the utility scripts have always the same names so that the ones for
# python 2 cannot be installed with the ones for python 3.
# Put those scripts in a separate sub-package and mark the package for
# python 3 as conflicting with the python 2 one.

%package -n python3-%{pypi_name}-tools
Summary:	Utility scripts for %{name}
Group:		File tools
Requires:	python3-%{pypi_name} = %{EVRD}
Conflicts:	%{name} < %{EVRD}
Conflicts:	python-%{pypi_name}-tools
BuildArch:	noarch

%description -n python3-%{pypi_name}-tools
Utility scripts for %{name}.

%files -n python3-%{pypi_name}-tools
%doc LICENSE
%{_bindir}/csv2rdf
%{_bindir}/rdf*

#-----------------------------------------------------------------------------


%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel


%install
%pyproject_install

# Drop the tests
rm -rf %{buildroot}%{python3_sitelib}/test

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 500 |14mt|python-referencing-0.35.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name referencing

Summary:	An implementation-agnostic implementation of JSON reference resolution
Name:		python-%{pypi_name}
Version:	0.35.1
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://pypi.python.org/pypi/%{pypi_name}
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
An implementation-agnostic implementation of JSON reference resolution.
In other words, a way for e.g. JSON Schema tooling to resolve the $ref
keyword across all drafts without needing to implement support themselves.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	An implementation-agnostic implementation of JSON reference resolution
Group:		Development/Python

%description -n python3-%{pypi_name}
An implementation-agnostic implementation of JSON reference resolution.
In other words, a way for e.g. JSON Schema tooling to resolve the $ref
keyword across all drafts without needing to implement support themselves.

%files -n python3-%{pypi_name} -f %{pyproject_files}

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 501 |14mt|python-requests-2.34.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond tests    0
%bcond extras    0
%bcond extradeps 0

Name:           python-requests
Version:        2.34.2
Release:        1
Summary:        HTTP library, written in Python, for human beings

License:        Apache-2.0
URL:            https://pypi.io/project/requests
Source:         https://github.com/requests/requests/archive/v%{version}/requests-v%{version}.tar.gz

# Explicitly use the system certificates in ca-certificates.
# https://bugzilla.redhat.com/show_bug.cgi?id=904614
Patch:          system-certs.patch

# Add support for IPv6 CIDR in no_proxy setting
# This functionality is needed in Openshift and it has been
# proposed for upstream in 2021 but the PR unfortunately stalled.
# Upstream PR: https://github.com/psf/requests/pull/5953
# This change is backported also into RHEL 9.4 (via CS)
Patch:          support_IPv6_CIDR_in_no_proxy.patch

BuildArch:      noarch
BuildRequires:  python%{python3_pkgversion}-devel
%if %{with tests}
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(pytest-httpbin)
BuildRequires:  python3dist(pytest-mock)
BuildRequires:  python3dist(trustme)
%endif

%description
Most existing Python modules for sending HTTP requests are extremely verbose and
cumbersome. Python’s built-in urllib2 module provides most of the HTTP
capabilities you should need, but the API is thoroughly broken. This library is
designed to make HTTP requests easy for developers.


%package -n python%{python3_pkgversion}-requests
Summary:        %{summary}

%description -n python%{python3_pkgversion}-requests
Most existing Python modules for sending HTTP requests are extremely verbose and
cumbersome. Python’s built-in urllib2 module provides most of the HTTP
capabilities you should need, but the API is thoroughly broken. This library is
designed to make HTTP requests easy for developers.


%if %{with extras}
%pyproject_extras_subpkg -n python%{python3_pkgversion}-requests security socks use_chardet_on_py3
%endif


%generate_buildrequires
%pyproject_buildrequires %{?with_extradeps:-x security,socks,use_chardet_on_py3}


%prep
%autosetup -p1 -n requests-%{version}

# env shebang in nonexecutable file
sed -i '/#!\/usr\/.*python/d' src/requests/certs.py

# Some doctests use the internet and fail to pass in Koji. Since doctests don't have names, I don't
# know a way to skip them. We also don't want to patch them out, because patching them out will
# change the docs. Thus, we set pytest not to run doctests at all.
sed -i 's/ --doctest-modules//' pyproject.toml


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files -l requests


%check
%if %{with tests}
%pyproject_check_import
# test_unicode_header_name - reported: https://github.com/psf/requests/issues/6734
# test_use_proxy_from_environment needs pysocks
%pytest -v tests -k "not test_unicode_header_name %{!?with_extradeps:and not test_use_proxy_from_environment}"
%endif


%files -n python%{python3_pkgversion}-requests -f %{pyproject_files}
%doc README.md HISTORY.md

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 502 |14mt|python-requests-ftp-0.3.1-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname requests-ftp

Summary:	FTP transport adapter for python-requests
Name:		python-%{srcname}
Group:			Development/Python
Version:	0.3.1
Release:	4
License:	ASL 2.0
URL:		https://github.com/Lukasa/requests-ftp
Source0:	https://pypi.python.org/packages/source/r/%{srcname}/%{srcname}-%{version}.tar.gz
# from https://github.com/Lukasa/requests-ftp/pull/28, handle multi-line responses
# from 4090846
Patch1:		PR28-01-Adding-2-tests-and-updated-statud_code-build.patch
# from 4f6a9f5
Patch2:		PR28-02-Adding-code-3-to-retr4ieve-status_code.patch
# from 3fb2700
Patch3:		PR28-03-fix-warning-in-interpreting-ftp-status-codes-minor-d.patch
# 2caa427 is only test updates, tests not in pypi tarball
# from 7321ab3
Patch5:		PR28-05-Improve-logging-in-status-code-extraction.patch
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildArch:	noarch

%description
Requests-FTP is an implementation of a very stupid FTP transport adapter for
use with the awesome Requests Python library.

#----------------------------------------------------------------------------

%package -n python3-%{srcname}
Summary:	FTP transport adapter for python3-requests
Group:		Development/Python
Requires:	python3-requests

%description -n python3-requests-ftp
Requests-FTP is an implementation of a very stupid FTP transport adapter for
use with the awesome Requests Python library.

This is the Python 3 version of the transport adapter module.

%files -n python3-%{srcname}
%doc README.rst LICENSE
%{python3_sitelib}/requests_ftp/
%{python3_sitelib}/requests_ftp*.egg-info*

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{srcname}-%{version}

rm -rf requests_ftp.egg-info

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 503 |14mt|python-rpm-generators-14-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-rpm-generators
Summary:        Dependency generators for Python RPMs
Version:        14
Release:        1
Group:		System/Base
Url:            https://src.fedoraproject.org/rpms/python-rpm-generators

# Originally the following files were part of RPM, so the license is inherited: GPL-2.0-or-later
# The COPYING file is grabbed from the last commit that changed the files
Source0:        https://raw.githubusercontent.com/rpm-software-management/rpm/102eab50b3d0d6546dfe082eac0ade21e6b3dbf1/COPYING
Source1:        python.attr
Source2:        pythondist.attr
# This was crafted in-place as a fork of python.attr, hence also GPL-2.0-or-later
Source3:        pythonname.attr
# This one is also originally from RPM, but it has its own license declaration: LGPL-2.1-or-later
Source4:        pythondistdeps.py
# This was crafted in-place with the following license declaration:
#  LicenseRef-Fedora-Public-Domain OR CC0-1.0 OR LGPL-2.1-or-later OR GPL-2.0-or-later
# Note that CC0-1.0 is not allowed for code in Fedora, so we skip it in the package License tag
Source5:        pythonbundles.py

# See individual licenses above Source declarations
# Originally, this was simplified to GPL-2.0-or-later, but "effective license" analysis is no longer allowed
License:        GPL-2.0-or-later AND LGPL-2.1-or-later AND (LicenseRef-Fedora-Public-Domain OR LGPL-2.1-or-later OR GPL-2.0-or-later)

BuildArch:      noarch

%description
%{summary}.

%package -n python3-rpm-generators
Summary:        %{summary}
Requires:       python3-packaging
# We have parametric macro generators, we need RPM 4.16 (4.15.90+ is 4.16 alpha)
Requires:       rpm > 4.15.90-0
# This contains the Lua functions we use:
Requires:       python-srpm-macros >= 3.10-15

%description -n python3-rpm-generators
%{summary}.

%prep
%autosetup -c -T
cp -a %{sources} .

%install
install -Dpm0644 -t %{buildroot}%{_fileattrsdir} *.attr
install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} *.py

%files -n python3-rpm-generators
%license COPYING
%{_fileattrsdir}/python.attr
%{_fileattrsdir}/pythondist.attr
%{_fileattrsdir}/pythonname.attr
%{_rpmconfigdir}/pythondistdeps.py
%{_rpmconfigdir}/pythonbundles.py

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 504 |14mt|python-rtslib-2.2.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname rtslib
%define pypi_name rtslib_fb

Summary:	API for RisingTide Systems generic SCSI target
Name:		python-%{oname}
Version:	2.2.4
Release:	1
License:	ASL 2.0
Group:		Development/Python
Url:		https://github.com/open-iscsi/rtslib-fb
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(hatchling)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
rtslib-fb is an object-based Python library for configuring the LIO generic
SCSI target, present in 3.x Linux kernel versions.

rtslib-fb is a fork of the "rtslib" code written by RisingTide Systems.
The "-fb" differentiates between the original and this version.
Please ensure to use either all "fb" versions of the targetcli components --
targetcli, rtslib, and configshell, or stick with all non-fb versions, since
they are no longer strictly compatible.

#----------------------------------------------------------------------------

%package -n python3-%{oname}
Summary:	API for RisingTide Systems generic SCSI target
Group:		Development/Python

%description -n python3-%{oname}
rtslib-fb is an object-based Python library for configuring the LIO generic
SCSI target, present in 3.x Linux kernel versions.

rtslib-fb is a fork of the "rtslib" code written by RisingTide Systems.
The "-fb" differentiates between the original and this version.
Please ensure to use either all "fb" versions of the targetcli components --
targetcli, rtslib, and configshell, or stick with all non-fb versions, since
they are no longer strictly compatible.

%files -n python3-%{oname}
%doc README.md
%license COPYING
%{_bindir}/targetctl
%{python3_sitelib}/%{oname}
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 505 |14mt|python-ruamel-yaml-0.18.10-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name ruamel.yaml
%global pname ruamel-yaml

Summary:	YAML 1.2 loader/dumper package for Python
Name:		python-%{pname}
Version:	0.18.10
Release:	2
License:	MIT
Group:		Development/Python
Url:		https://pypi.org/project/ruamel.yaml
Source0:	%{pypi_source}
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(wheel)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
ruamel.yaml is a YAML 1.2 loader/dumper package for Python.
It is a derivative of Kirill Simonov’s PyYAML 3.11

#----------------------------------------------------------------------------

%package -n python3-%{pname}
Summary:	YAML 1.2 loader/dumper package for Python
Group:		Development/Python
Requires:	python3dist(ruamel.yaml.clib)
Requires:	python3dist(setuptools)
Provides:	python3-%{pypi_name} = %{EVRD}

%description -n python3-%{pname}
ruamel.yaml is a YAML 1.2 loader/dumper package for Python.
It is a derivative of Kirill Simonov’s PyYAML 3.11

%files -n python3-%{pname}
%doc README.md
%license LICENSE
%{python3_sitelib}/ruamel
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info

#----------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 506 |14mt|python-s3transfer-0.10.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name s3transfer

Summary:	Amazon S3 Transfer Manager for Python
Name:		python-%{pypi_name}
Version:	0.10.2
Release:	1
License:	ASL 2.0
Group:		Development/Python
Url:		https://github.com/boto/botocore
Source0:	%{pypi_source}
BuildArch:	noarch

%description
S3transfer is a Python library for managing Amazon S3 transfers.

Note:
This project is not currently GA. If you are planning to use this code in
production, make sure to lock to a minor version as interfaces may break from
minor version to minor version. For a basic, stable interface of s3transfer,
try the interfaces exposed in boto3

#------------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Amazon S3 Transfer Manager for Python
Group:		Development/Python
BuildRequires:	python3egg(setuptools)

%description -n python3-%{pypi_name}
S3transfer is a Python library for managing Amazon S3 transfers.

%files -n python3-%{pypi_name}
%{python3_sitelib}/*

#------------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 507 |14mt|python-scikit-build-0.18.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name scikit_build

Summary:	Improved build system generator for Python C/C++/Fortran/Cython extensions
Name:		python-scikit-build
Version:	0.18.1
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/scikit-build/scikit-build
Source0:	%{pypi_source}
BuildRequires:	cmake
BuildRequires:	ninja
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Improved build system generator for Python C/C++/Fortran/Cython extensions

#-----------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Improved build system generator for Python C/C++/Fortran/Cython extensions
Group:		Development/Python
Requires:	cmake
Requires:	python3dist(distro)
Requires:	python3dist(packaging)
Requires:	python3dist(setuptools)
Requires:	python3dist(wheel)
Obsoletes:	python3-scikit-build < 0.17.6

%description -n python3-%{pypi_name}
Improved build system generator for Python C/C++/Fortran/Cython extensions

%files -n python3-%{pypi_name}
%doc AUTHORS.rst CONTRIBUTING.rst README.rst docs/
%license LICENSE
%{python3_sitelib}/*

#-----------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 508 |14mt|python-scikit-build-core-0.10.7-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_with tests

Name:		python-scikit-build-core
Version:	0.10.7
Release:	2
Summary:	Build backend for CMake based projects
Group:		Development/Python
License:	Apache-2.0
URL:		https://github.com/scikit-build/scikit-build-core
Source:		%{pypi_source scikit_build_core}
BuildArch:	noarch

BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(wheel)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(hatchling)
BuildRequires:	python3dist(hatch-vcs)
%if %{with tests}
# Testing dependencies
BuildRequires:	cmake
BuildRequires:	ninja
BuildRequires:	gcc-c++
BuildRequires:	git-core
%endif

%description
A next generation Python CMake adaptor and Python API for plugins.

#-----------------------------------------------
%package -n python3-scikit-build-core
Summary:	Build backend for CMake based projects
Group:		Development/Python
%if %{with tests}
# Testing dependencies
BuildRequires:	python3dist(build)
BuildRequires:	python3dist(build[virtualenv])
BuildRequires:	python3dist(cattrs)
BuildRequires:	python3dist(exceptiongroup)
BuildRequires:	python3dist(hatch-fancy-pypi-readme)
BuildRequires:	python3dist(pybind11)
BuildRequires:	python3dist(pyproject-metadata)
BuildRequires:	python3dist(pytest)
# TODO
#BuildRequires:  python3dist(pytest-subprocess)
%endif
Requires:	cmake
Recommends:	ninja
Requires:	python3dist(pyproject-metadata)
Requires:	python3dist(pathspec)

%description -n python3-scikit-build-core
A next generation Python CMake adaptor and Python API for plugins.

%files -n python3-scikit-build-core -f %{pyproject_files}
%license LICENSE
%doc README.md

#-----------------------------------------------
%prep
%autosetup -n scikit_build_core-%{version}

#generate_buildrequires
#pyproject_buildrequires -x test,test-meta,test-numpy

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files scikit_build_core

%if %{with tests}
%check
# different hash due to different build environment:
donttest="test_pep517_sdist_hash or test_pep518_sdist"
%pytest \
    -m "not network " \
    -k "not ($donttest)"
%endif



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 509 |14mt|python-secretstorage-3.3.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global debug_package %{nil}
%define pypi_name SecretStorage

Summary:	Provides a way for securely storing passwords and other secrets
Name:		python-secretstorage
Version:	3.3.3
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://github.com/mitya57/secretstorage
Source0:	%pypi_source
BuildRequires:	python3dist(cryptography)
BuildRequires:	python3dist(jeepney)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)

%description
This module provides a way for securely storing passwords and other secrets.
It uses D-Bus Secret Service API that is supported by GNOME Keyring
(since version 2.30) and KSecretsService.
The main classes provided are secretstorage.Item, representing a secret
item (that has a label, a secret and some attributes) and secretstorage.
Collection, a place items are stored in.
SecretStorage supports most of the functions provided by Secret Service,
including creating and deleting items and collections, editing items,
locking and unlocking collections (asynchronous unlocking is also supported).

#----------------------------------------------------------------------------

%package -n python3-secretstorage
Summary:	Provides a way for securely storing passwords and other secrets
Group:		Development/Python

%description -n python3-secretstorage
This module provides a way for securely storing passwords and other secrets.
It uses D-Bus Secret Service API that is supported by GNOME Keyring
(since version 2.30) and KSecretsService.
The main classes provided are secretstorage.Item, representing a secret
item (that has a label, a secret and some attributes) and secretstorage.
Collection, a place items are stored in.
SecretStorage supports most of the functions provided by Secret Service,
including creating and deleting items and collections, editing items,
locking and unlocking collections (asynchronous unlocking is also supported).

%files -n python3-secretstorage
%doc README.rst
%license LICENSE
%{python3_sitelib}/*

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}
rm -rf *.dist-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 510 |14mt|python-sentry-sdk-1.39.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# test requires work dns resolve
%bcond_with tests

Name:           python-sentry-sdk
Version:        1.39.1
Release:        1
Summary:        Python SDK for Sentry.io
Group:          Development/Python
License:        BSD-2-Clause
URL:            https://github.com/getsentry/sentry-python
Source0:        https://github.com/getsentry/sentry-python/archive/%{version}/sentry-python-%{version}.tar.gz
BuildRequires:  python3egg(flask) >= 0.11
BuildRequires:  python3egg(sqlalchemy) >= 1.2
BuildRequires:  python3egg(aiohttp) >= 3.5
BuildRequires:  python3egg(asttokens)
BuildRequires:  python3egg(blinker) >= 1.1
BuildRequires:  python3egg(bottle) >= 0.12.13
BuildRequires:  python3egg(certifi)
BuildRequires:  python3egg(executing)
BuildRequires:  python3egg(setuptools)
BuildRequires:  python3egg(tornado) >= 5
BuildRequires:  python3egg(urllib3) >= 1.10.0
BuildRequires:  fdupes
%if %{with tests}
# SECTION test requirements
BuildRequires:  python3egg(werkzeug)
BuildRequires:  python3egg(eventlet)
BuildRequires:  python3egg(gevent)
BuildRequires:  python3egg(hypothesis)
BuildRequires:  python3egg(jsonschema) >= 3.2.0
BuildRequires:  python3egg(pyramid)
BuildRequires:  python3egg(pyrsistent) >= 0.16.0
BuildRequires:  python3egg(pytest-cov) >= 2.8.1
BuildRequires:  python3egg(pytest-forked) >= 1.1.3
BuildRequires:  python3egg(pytest-localserver) >= 0.5.0
BuildRequires:  python3egg(pytest)
BuildRequires:  python3egg(tox)
%endif
BuildArch:      noarch

%description
A Python SDK for Sentry.io.
https://sentry.io/for/python/

#----------------------------------------------------------------
%package -n python3-sentry-sdk
Summary:        Python SDK for Sentry.io
Group:          Development/Python

%description -n python3-sentry-sdk
A Python SDK for Sentry.io.
https://sentry.io/for/python/

%files -n python3-sentry-sdk
%doc README.md CHANGELOG.md
%license LICENSE
%{python3_sitelib}/*

#----------------------------------------------------------------

%prep
%setup -q -n sentry-python-%{version}

%build
%py3_build

%install
%py3_install


%check
%if %{with tests}
export PYTHONDONTWRITEBYTECODE=1
export PYTEST_ADDOPTS="-W ignore::DeprecationWarning"
# do not test integration:
rm -r tests/integrations
# test_transport_works / test_transport_infinite_loop / test_simple_rate_limits/ test_data_category_limits / test_complex_limits_without_data_category stucks

# test_auto_enabling_integrations_catches_import_error asert False where False = ..., not sure
%pytest -k 'not (test_transport_works or test_auto_enabling_integrations_catches_import_error or test_filename or test_transport_infinite_loop or test_simple_rate_limits or test_data_category_limits or test_complex_limits_without_data_category)'
%endif


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 511 |14mt|python-service_identity-24.1.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	pypi_name service_identity

Summary:	Service identity verification for pyOpenSSL
Name:		python-%{pypi_name}
Version:	24.1.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/pyca/service_identity
Source0:	%{pypi_source}
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
Provides:	python-service-identity = %{EVRD}
Obsoletes:	python-service-identity < %{EVRD}
BuildArch:	noarch

%description
Service Identity Verification for pyOpenSSL

Use this package if you use pyOpenSSL and don’t want to be MITMed.

service_identity aspires to give you all the tools you need for verifying
whether a certificate is valid for the intended purposes.

In the simplest case, this means host name verification. However,
service_identity implements RFC 6125 fully and plans to add other relevant RFCs
too.

#-----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Logging as Storytelling
Group:		Development/Python
Provides:	python3-service-identity = %{EVRD}
Obsoletes:	python3-service-identity < %{EVRD}

%description -n python3-%{pypi_name}
Service Identity Verification for pyOpenSSL

Use this package if you use pyOpenSSL and don’t want to be MITMed.

service_identity aspires to give you all the tools you need for verifying
whether a certificate is valid for the intended purposes.

In the simplest case, this means host name verification. However,
service_identity implements RFC 6125 fully and plans to add other relevant RFCs
too.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md
%license LICENSE

#------------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
rm -rf %{py3dir} && mkdir %{py3dir}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 512 |14mt|python-setuptools-84.0.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# used when bootstrapping new Python versions
%bcond bootstrap 1

# The original RHEL N+1 content set is defined by (build)dependencies
# of the packages in Fedora ELN. Hence we disable tests and documentation here
# to prevent pulling many unwanted packages in.
%bcond tests %[%{without bootstrap} && %{defined fedora}]

%global python_wheel_name setuptools-%{version}-py3-none-any.whl

Name:           python-setuptools
# When updating, update the bundled libraries versions bellow!
Version:        84.0.0
Epoch:		2
Release:        1
Summary:        Easily build and distribute Python packages
# setuptools is MIT
# autocommand is LGPL-3.0-only
# backports-tarfile is MIT
# importlib-metadata is Apache-2.0
# jaraco-context is MIT
# jaraco-functools is MIT
# jaraco-text is MIT
# more-itertools is MIT
# packaging is BSD-2-Clause OR Apache-2.0
# platformdirs is MIT
# tomli is MIT
# wheel is MIT
# zipp is MIT
# the setuptools logo is MIT
License:        MIT AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0) AND LGPL-3.0-only
URL:            https://pypi.python.org/pypi/setuptools
Source0:        %{pypi_source setuptools %{version}}

# Some test deps are optional and either not desired or not available in Fedora, thus this patch removes them.
Patch:          Remove-optional-or-unpackaged-test-deps.patch

# The `setup.py install` deprecation notice might be confusing for RPM packagers
# adjust it, but only when $RPM_BUILD_ROOT is set
Patch:          Adjust-the-setup.py-install-deprecation-message.patch

BuildArch:      noarch

BuildRequires:  python3-devel

%if %{with bootstrap}
BuildRequires:  unzip zip
%endif

%if %{with tests}
BuildRequires:  gcc
%endif

# python3 bootstrap: this is built before the final build of python3, which
# adds the dependency on python3-rpm-generators, so we require it manually
# The minimal version is for bundled provides verification script to accept multiple files as input
BuildRequires:  python3-rpm-generators >= 12-8
# we also use %%{_pyproject_wheeldir}, so an explicit requirement on the pyproject-macros is needed
BuildRequires:  pyproject-rpm-macros

%if %{without bootstrap}
# Not to use the pre-generated egg-info, we use setuptools from previous build to generate it
BuildRequires:  python3-setuptools
%endif

%description
Setuptools is a collection of enhancements to the Python distutils that allow
you to more easily build and distribute Python packages, especially ones that
have dependencies on other packages.

# Virtual provides for the packages bundled by setuptools.
# Bundled packages are defined in multiple files. Generate the list with:
# pip freeze --path setuptools/_vendor > vendored.txt
# %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%3dist' vendored.txt
%global bundled %{expand:
Provides: bundled(python3dist(autocommand)) = 2.2.2
Provides: bundled(python3dist(backports-tarfile)) = 1.2
Provides: bundled(python3dist(importlib-metadata)) = 8.7.1
Provides: bundled(python3dist(jaraco-context)) = 6.1
Provides: bundled(python3dist(jaraco-functools)) = 4.4
Provides: bundled(python3dist(jaraco-text)) = 4
Provides: bundled(python3dist(more-itertools)) = 10.8
Provides: bundled(python3dist(packaging)) = 26
Provides: bundled(python3dist(platformdirs)) = 4.4
Provides: bundled(python3dist(tomli)) = 2.4
Provides: bundled(python3dist(wheel)) = 0.46.3
Provides: bundled(python3dist(zipp)) = 3.23
}

%package -n python3-setuptools
Summary:        Easily build and distribute Python 3 packages
Provides:	python3dist(setuptools) = %{EVRD}
%{bundled}

%description -n python3-setuptools
Setuptools is a collection of enhancements to the Python 3 distutils that allow
you to more easily build and distribute Python 3 packages, especially ones that
have dependencies on other packages.


%package -n     %{python_wheel_pkg_prefix}-setuptools-wheel
Summary:        The setuptools wheel
%{bundled}

%description -n %{python_wheel_pkg_prefix}-setuptools-wheel
A Python wheel of setuptools to use with venv.


%prep
%autosetup -p1 -n setuptools-%{version}
%if %{without bootstrap}
# If we don't have setuptools installed yet, we use the pre-generated .egg-info
# See https://github.com/pypa/setuptools/pull/2543
# And https://github.com/pypa/setuptools/issues/2550
rm -r setuptools.egg-info
%endif

# Strip shbang
find setuptools -name \*.py | xargs sed -i -e '1 {/^#!\//d}'
# Remove bundled exes
rm -f setuptools/*.exe
# Don't ship these
rm -r docs/conf.py
# Remove a filter for coverage warning from pytest config
# In pytest < 9, such a warning filter triggers ImportError without coverage
sed -i '/:coverage/d' pytest.ini

%if %{without bootstrap}
%generate_buildrequires
%pyproject_buildrequires -r %{?with_tests:-x test}
%endif

%build
%if %{with bootstrap}
%{python3} setup.py bdist_wheel
mkdir -p %{_pyproject_wheeldir}
mv dist/%{python_wheel_name} %{_pyproject_wheeldir}
%else
%pyproject_wheel
%endif


%install
%if %{with bootstrap}
mkdir -p %{buildroot}%{python3_sitelib}
unzip %{_pyproject_wheeldir}/%{python_wheel_name} -d %{buildroot}%{python3_sitelib} -x setuptools-%{version}.dist-info/RECORD
echo rpm > %{buildroot}%{python3_sitelib}/setuptools-%{version}.dist-info/INSTALLER
%else
%pyproject_install
%pyproject_save_files -l setuptools _distutils_hack
sed -Ei '/\/tests\b/d' %{pyproject_files}
%endif

# Install the wheel for the python-setuptools-wheel package
# and inject SBOM into it (if the macro is available)
mkdir -p %{buildroot}%{python_wheel_dir}
install -pm0644 %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
%{?python_wheel_inject_sbom:%python_wheel_inject_sbom %{buildroot}%{python_wheel_dir}/%{python_wheel_name}}


%check
%if %{without bootstrap}
# Verify bundled provides are up to date
%{python3} -m pip freeze --path setuptools/_vendor > vendored.txt
%{_rpmconfigdir}/pythonbundles.py vendored.txt --namespace 'python3dist' --compare-with '%{bundled}'

# Regression test, the wheel should not be larger than 1300 kB
# https://bugzilla.redhat.com/show_bug.cgi?id=1914481#c3
test $(stat --format %%s %{_pyproject_wheeldir}/%{python_wheel_name}) -lt 1300000

%pyproject_check_import -e '*.tests' -e '*.tests.*'
%endif

# Regression test, the tests are not supposed to be installed
test ! -d %{buildroot}%{python3_sitelib}/setuptools/tests
test ! -d %{buildroot}%{python3_sitelib}/setuptools/_distutils/tests

%if %{with tests}
# Upstream tests
# PIP_NO_BUILD_ISOLATION allows us to run more tests offline with pip 25.3+,
# or else they fecth setuptools from the internet,
# see https://bugzilla.redhat.com/2417963.
# --ignore=setuptools/tests/integration/
# --ignore=setuptools/tests/config/test_apply_pyprojecttoml.py
# -k "not not test_equivalent_output"
#   the tests require internet connection
# --ignore=setuptools/tests/test_editable_install.py
#   the tests require pip-run which we don't have in Fedora
# -k "not test_wheel_includes_cli_scripts"
#   the test expects removed .exe files to be installed
# --ignore=tools
#   the tests test various upstream release tools we don't use/ship
PRE_BUILT_SETUPTOOLS_WHEEL=%{_pyproject_wheeldir}/%{python_wheel_name} \
PIP_NO_BUILD_ISOLATION=0 \
PYTHONPATH=$(pwd) %pytest \
 -n auto \
 --ignore=setuptools/tests/integration/ \
 --ignore=setuptools/tests/test_editable_install.py \
 --ignore=setuptools/tests/config/test_apply_pyprojecttoml.py \
 --ignore=tools \
 -k "not test_wheel_includes_cli_scripts and not test_equivalent_output and not test_pkg_info_roundtrip"
%endif # with tests


%files -n python3-setuptools %{?!with_bootstrap:-f %{pyproject_files}}
%doc docs/* NEWS.rst README.rst
%{python3_sitelib}/distutils-precedence.pth
%if %{with bootstrap}
%{python3_sitelib}/setuptools-%{version}.dist-info/
%{python3_sitelib}/setuptools/
%{python3_sitelib}/_distutils_hack/
%endif

%files -n %{python_wheel_pkg_prefix}-setuptools-wheel
# we own the dir for simplicity
%dir %{python_wheel_dir}/
%{python_wheel_dir}/%{python_wheel_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 513 |14mt|python-setuptools-rust-1.13.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name setuptools_rust
%define oname     setuptools-rust

Name:           python-%{oname}
Version:        1.13.0
Release:        1
Summary:        Compile and distribute Python extensions written in Rust as easily as if they were written in C
Url:            https://pypi.org/project/setuptools-rust/
Source0:        %{pypi_source}
License:        MIT
Group:          Development/Python
BuildArch:      noarch
BuildRequires:  pkgconfig(python3)
Obsoletes:      %{name} < %{EVRD}

%description
%{summary}.

# --------------------------------------------------------------------

%package -n     python3-%{oname}
Summary:        %{summary}
Provides:       python3-%{oname}
Obsoletes:      python3-%{oname} < %{EVRD}

%description -n python3-%{oname}
%{summary}.

%files  -n     python3-%{oname}
%{python3_sitelib}/%{pypi_name}-*.dist-info
%{python3_sitelib}/%{pypi_name}/__pycache__/*.pyc
%{python3_sitelib}/%{pypi_name}/*.py
%{python3_sitelib}/%{pypi_name}/py.typed
# --------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 514 |14mt|python-setuptools_scm-10.2.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond tests 0

Name:           python-setuptools_scm
Version:        10.2.1
Release:        1
Summary:        Blessed package to manage your versions by SCM tags

# SPDX
License:        MIT
URL:            https://github.com/pypa/setuptools_scm/
Source:         %{pypi_source setuptools_scm}

BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-devel
%if %{with tests}
BuildRequires:  git-core
%endif

%description
Setuptools_scm handles managing your Python package versions in SCM metadata.
It also handles file finders for the supported SCMs.


%package -n python%{python3_pkgversion}-setuptools_scm
Summary:        %{summary}
%py_provides    python%{python3_pkgversion}-setuptools-scm

%description -n python%{python3_pkgversion}-setuptools_scm
Setuptools_scm handles managing your Python package versions in SCM metadata.
It also handles file finders for the supported SCMs.


# We don't package the [rich] extra on RHELs, to avoid pulling rich into the buildroot
%pyproject_extras_subpkg -n python%{python3_pkgversion}-setuptools_scm simple,toml%{!?rhel:,rich}


%prep
%autosetup -p1 -n setuptools_scm-%{version}
# Remove flake8, mypy, ruff, … from the test dependencies
%pyproject_patch_dependency griffe:ignore
%pyproject_patch_dependency griffe-public-wildcard-imports:ignore
%pyproject_patch_dependency griffecli:ignore
%pyproject_patch_dependency mypy:ignore
%pyproject_patch_dependency ruff:ignore
%pyproject_patch_dependency flake8:ignore

%generate_buildrequires
# Note: We only pull in the [rich] extra when running tests.
# This is to make the new Python version bootstrapping simpler
# as setuptools_scm is an early package and rich is a late one.
%pyproject_buildrequires %{?with_tests:-g test} -x simple,toml


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files setuptools_scm

# Allow parallel-installable executable for alternate Python stacks (e.g. in RHEL)
mv %{buildroot}%{_bindir}/setuptools-scm %{buildroot}%{_bindir}/setuptools-scm-%{python3_version}
%if "%{python3_pkgversion}" == "3"
ln -s ./setuptools-scm-%{python3_version} %{buildroot}%{_bindir}/setuptools-scm
%endif


%if %{with tests}
%check
# test_pip_download, test_xmlsec_download_regression try to download from the internet
# test_get_version_blank_tag_regex, test_setuptools_version_keyword_ensures_regex fail because
# vcs-versioning 2.x added DeprecationWarnings for tag_regex that the tests don't expect;
# fixed upstream: https://github.com/pypa/setuptools-scm/commit/ba215a70a88bbd35ecf0961c8b1a1301c940629e
%pytest -v -n auto
%endif


%files -n python%{python3_pkgversion}-setuptools_scm -f %{pyproject_files}
%doc README.md
%{_bindir}/setuptools-scm-%{python3_version}
%if "%{python3_pkgversion}" == "3"
%{_bindir}/setuptools-scm
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 515 |14mt|python-setuptools-scm-git-archive-1.4.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name setuptools-scm-git-archive

Name:           python-%{pypi_name}
Version:        1.4.1
Release:        1
Summary:        Setuptools_scm plugin for git archives
License:        MIT
URL:            https://github.com/Changaco/setuptools_scm_git_archive/
Source0:        %{pypi_source setuptools_scm_git_archive}
# Drop pkg_resources usage (removed in setuptools 84) and setup_requires
# in favor of PEP 517 build-system metadata
Patch0:         modernize-build.patch

BuildArch:      noarch

BuildRequires:  python3-devel
# setuptools_scm >= 10 imports vcs_versioning, but the bootstrap build of
# python3-setuptools_scm does not declare this dependency yet
BuildRequires:  python3-setuptools_scm
BuildRequires:  python3-vcs-versioning

%global _description %{expand:
This is a setuptools_scm plugin that adds support for git archives (for
example the ones GitHub automatically generates). Note that it only works for
archives of tagged commits (because git currently lacks a format option
equivalent to git describe --tags).}

%description %_description


%package -n python3-%{pypi_name}
Summary:        %{summary}
Requires:       python3-setuptools_scm

%description -n python3-%{pypi_name} %_description


%prep
%autosetup -p1 -n setuptools_scm_git_archive-%{version}
# Remove bundled egg-info, the build regenerates it
rm -rf %{pypi_name}.egg-info


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files -L setuptools_scm_git_archive

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 516 |14mt|python-sgmllib3k-1.0.0-5
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name sgmllib3k

Name:           python-sgmllib3k
Version:        1.0.0
Release:        5
Group:          Development/Python
Summary:        Py3k port of sgmllib

License:        BSD License
URL:            http://hg.hardcoded.net/sgmllib
Source0:        %{pypi_source}
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description
 sgmllib3k -- Py3k port of the old stdlib module sgmllib was dropped in Python
3. For those depending on it, that's somewhat infortunate. This is a quick and
dirty port of this old module. I just ran 2to3 on it and published it. I don't
indend to maintain it, so it might be a good idea to eventually think about
finding another module to use.

#---------------------------------------------
%package -n python3-%{pypi_name}
Summary:        Py3k port of sgmllib
Group:          Development/Python

%description -n python3-%{pypi_name}
 sgmllib3k -- Py3k port of the old stdlib module sgmllib was dropped in Python
3. For those depending on it, that's somewhat infortunate. This is a quick and
dirty port of this old module. I just ran 2to3 on it and published it. I don't
indend to maintain it, so it might be a good idea to eventually think about
finding another module to use.

%files -n python3-%{pypi_name}
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/sgmllib.py*
%{python3_sitelib}/%{pypi_name}-%{version}-py*.egg-info

#---------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py3_build

%install
%py3_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 517 |14mt|python-sh-2.0.7-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name sh

Summary:	Subprocess replacement for python
Name:		python-%{pypi_name}
Version:	2.0.7
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://pypi.org/project/sh/
Source0:	%{pypi_source}
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
sh is a full-fledged subprocess replacement for Python 2.6 - 3.6,
PyPy and PyPy3 that allows you to call any program as if it were
a function:

.. code:: python

from sh import ifconfig
print ifconfig("eth0")

sh is *not* a collection of system commands implemented in Python.

#-----------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	A Python command line parser inspired by optparse
Group:		Development/Python

%description -n python3-%{pypi_name}
sh is a full-fledged subprocess replacement for Python 2.6 - 3.6,
PyPy and PyPy3 that allows you to call any program as if it were
a function:

.. code:: python

from sh import ifconfig
print ifconfig("eth0")

sh is *not* a collection of system commands implemented in Python.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%license LICENSE.txt

#-----------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 518 |14mt|python-shellingham-1.5.4-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name shellingham

Summary:	Tool to detect surrounding Shell
Name:		python-%{pypi_name}
Version:	1.5.4
Release:	1
License:	ISC
Group:		Development/Python
Url:		https://github.com/sarugaku/shellingham
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Shellingham detects what shell the current Python executable is running in.

#-------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name}
Shellingham detects what shell the current Python executable is running in.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%license LICENSE

#-------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 519 |14mt|python-singledispatch-4.1.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name singledispatch

Summary:	This library brings functools.singledispatch
Name:		python-%{pypi_name}
Version:	4.1.0
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://docs.python.org/3/library/functools.html#functools.singledispatch
Source0:	%pypi_source
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
PEP 443 proposed to expose a mechanism in the functools standard library
module in Python 3.4 that provides a simple form of generic programming
known as single-dispatch generic functions.

This library is a backport of this functionality to Python 2.6 - 3.3.

#---------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	This library brings functools.singledispatch
Group:		Development/Python

%description -n python3-%{pypi_name}
PEP 443 proposed to expose a mechanism in the functools standard library
module in Python 3.4 that provides a simple form of generic programming
known as single-dispatch generic functions.

This library is a backport of this functionality to Python 2.6 - 3.3.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%license LICENSE

#---------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 520 |14mt|python-six-1.17.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# tests are enabled by default
%bcond_with tests

Name:           python-six
Version:        1.17.0
Release:        1
Summary:        Python 2 and 3 compatibility utilities

# SPDX
License:        MIT
URL:            https://github.com/benjaminp/six
Source0:        %{pypi_source six}

BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  pyproject-rpm-macros

%if %{with tests}
BuildRequires:  python%{python3_pkgversion}-pytest
BuildRequires:  python%{python3_pkgversion}-tkinter
%endif

%global _description %{expand:
Six is a Python 2 and 3 compatibility library. It provides utility functions
for smoothing over the differences between the Python versions with the goal
of writing Python code that is compatible on both Python versions.}

%description %{_description}


%package -n python%{python3_pkgversion}-six
Summary:        %{summary}
Provides:	python3egg(six) = %{EVRD}

%description -n python%{python3_pkgversion}-six %{_description}


%prep
%autosetup -p1 -n six-%{version}


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files -l six


%check
%pyproject_check_import
%if %{with tests}
%pytest
%endif


%files -n python%{python3_pkgversion}-six -f %{pyproject_files}
%doc README.rst documentation/index.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 521 |14mt|python-smartypants-2.0.1-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname smartypants

Summary:	Smartypants is a Python fork of SmartyPants
Name:		python-%{oname}
Version:	2.0.1
Release:	4
License:	BSD
Group:		Development/Python
Url:		https://github.com/leohemsted/smartypants.py
Source0:	https://github.com/leohemsted/smartypants.py/archive/v%{version}.tar.gz?/%{oname}.py-%{version}.tar.gz
BuildRequires:	python3egg(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Smartypants is a Python fork of SmartyPants.
SmartyPants is a free web publishing plug-in for Movable Type, Blosxom,
and BBEdit that easily translates plain ASCII punctuation characters into
“smart” typographic punctuation HTML entities.

#--------------------------------------------------
%package -n python3-%{oname}
Summary:	Smartypants is a Python fork of SmartyPants
Group:		Development/Python

%description -n python3-%{oname}
Smartypants is a Python fork of SmartyPants.
SmartyPants is a free web publishing plug-in for Movable Type, Blosxom,
and BBEdit that easily translates plain ASCII punctuation characters into
“smart” typographic punctuation HTML entities.

%files -n python3-%{oname}
%doc README.rst COPYING CHANGES.rst
%{_bindir}/smartypants
%{python3_sitelib}/*.py*
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/smartypants-*.egg-info

#--------------------------------------------------
%prep
%setup -q -n %{oname}.py-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 522 |14mt|python-smbc-1.0.25.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module smbc
%define pypi_name py%{module}

Summary:	Python bindings for the libsmbclient API from Samba
Name:		python-%{module}
Version:	1.0.25.1
Release:	1
License:	BSD
Group:		Development/Python
Url:		https://github.com/hamano/pysmbc
Source0:	%{pypi_source}
Patch0:		pysmbc-1.0.23-samba4.patch
BuildRequires:	pkgconfig(smbclient)
BuildRequires:	python3dist(setuptools)

%description
Python bindings for the libsmbclient API, known as pysmbc. It was written
for use with system-config-printer, but can be put to other uses as well.

#----------------------------------------------------------------------------

%package -n python3-%{module}
Summary:	Python bindings for the libsmbclient API from Samba
Group:		Development/Python
BuildRequires:	pkgconfig(python3)

%description -n python3-%{module}
Python bindings for the libsmbclient API, known as pysmbc. It was written
for use with system-config-printer, but can be put to other uses as well.

%files -n python3-%{module}
%{python3_sitearch}/*.dist-info
%{python3_sitearch}/smbc*
%{python3_sitearch}/*.so

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}
%autopatch -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 523 |14mt|python-smmap-5.0.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name smmap

Name:		python-%{pypi_name}
Version:	5.0.1
Release:	1
Summary:	A pure git implementation of a sliding window memory map manager
License:	BSD
Group:		Development/Python
Url:		https://pypi.python.org/pypi/smmap
Source0:	%{pypi_source}
BuildArch:	noarch

%description
When reading from many possibly large files in a fashion similar to random
access, it is usually the fastest and most efficient to use memory maps.

#--------------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	A pure git implementation of a sliding window memory map manager
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3egg(setuptools)

%description -n python3-%{pypi_name}
When reading from many possibly large files in a fashion similar to random
access, it is usually the fastest and most efficient to use memory maps.

%files -n python3-%{pypi_name}
%doc PKG-INFO
%{python3_sitelib}/smmap
%{python3_sitelib}/smmap-%{version}-py*.egg-info

#--------------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 524 |14mt|python-sortedcontainers-2.4.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global srcname sortedcontainers
%bcond_with docs
%bcond_with tests

Name:		python-%{srcname}
Version:	2.4.0
Release:	2
Summary:	Pure Python sorted container types
Group:		Development/Python
License:	ASL 2.0
URL:		https://pypi.python.org/pypi/%{srcname}
# PyPI tarball does not include docs or tests.
Source0:	https://github.com/grantjenks/python-sortedcontainers/archive/v%{version}/%{name}-%{version}.tar.gz

BuildArch:	noarch

%global _description \
SortedContainers is an Apache2 licensed sorted collections library, written in \
pure-Python, and fast as C-extensions.

%description %{_description}

#-----------------------------------------------------------------
%package -n python3-%{srcname}
Summary:	%{summary}
Group:		Development/Python

BuildRequires:	python3-devel
BuildRequires:	python3-setuptools

%if %{with tests}
BuildRequires:	python3-pytest
BuildRequires:	python3-matplotlib
BuildRequires:	python3-numpy
BuildRequires:	python3-scipy
%endif

%if %{with docs}
BuildRequires:	python3-sphinx
BuildRequires:	dvipng
BuildRequires:	tex(anyfontsize.sty)
BuildRequires:	tex(bm.sty)
%endif

%description -n python3-%{srcname} %{_description}

%files -n python3-%{srcname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/


#-----------------------------------------------------------------

%if %{with docs}
%package -n python-%{srcname}-doc
Summary:	%{summary}
Group:		Documentation

%description -n python-%{srcname}-doc
Documentation for %{srcname} package.

%files -n python-%{srcname}-doc
%license LICENSE
%doc README.rst docs/_build/html
%endif

#-----------------------------------------------------------------

%prep
%autosetup


%build
%py3_build

%if %{with docs}
pushd docs
make SPHINXBUILD=sphinx-build-%{python3_version} html
rm _build/html/.buildinfo
popd
%endif


%install
%py3_install


%if %{with tests}
%check
pushd tests
PYTHONPATH="%{buildroot}%{python3_sitelib}" \
    pytest-%{python3_version}
popd
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 525 |14mt|python-sphinxcontrib-jsmath-1.0.1-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name sphinxcontrib-jsmath

# when bootstrapping sphinx, we cannot run tests yet
%bcond_with check

Name:           python-%{pypi_name}
Version:        1.0.1
Release:        2
Summary:        Sphinx extension for math in HTML via JavaScript
Group:		Development/Python
License:        BSD
URL:            https://pypi.org/project/sphinxcontrib-jsmath/
Source0:        https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz
BuildArch:      noarch

BuildRequires:  pkgconfig(python3)
BuildRequires:  python3-setuptools

%if %{with check}
BuildRequires:  python3-pytest
BuildRequires:  python3-sphinx
%endif

%description
sphinxcontrib-jsmath is a sphinx extension which renders display math in HTML
via JavaScript.

%package -n     python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name}
sphinxcontrib-jsmath is a sphinx extension which renders display math in HTML
via JavaScript.

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%if %{with check}
%check
%{__python3} -m pytest
%endif

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitelib}/sphinxcontrib/
%{python3_sitelib}/sphinxcontrib_jsmath-%{version}-py%{python3_version}-*.pth
%{python3_sitelib}/sphinxcontrib_jsmath-*.dist-info/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 526 |14mt|python-sphinxcontrib-qthelp-1.0.6-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name sphinxcontrib_qthelp

Summary:	Sphinx extension for QtHelp documents
Name:		python-sphinxcontrib-qthelp
Version:	1.0.6
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://sphinx-doc.org/
Source0:	%pypi_source
BuildRequires:	gettext
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document.

#-------------------------------------------------------

%package -n python3-sphinxcontrib-qthelp
Summary:	%{summary}
Group:		Development/Python

%description -n python3-sphinxcontrib-qthelp
sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document.

%files -n python3-sphinxcontrib-qthelp -f sphinxcontrib.qthelp.lang
%doc README.rst
%license LICENSE
%{python3_sitelib}/sphinxcontrib
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info

#-------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}
find -name '*.mo' -delete

%generate_buildrequires
%pyproject_buildrequires -r

%build
for po in $(find -name '*.po'); do
	msgfmt --output-file=${po%.po}.mo ${po}
done
%pyproject_wheel

%install
%pyproject_install

# Move language files to /usr/share
pushd %{buildroot}%{python3_sitelib}
for lang in `find sphinxcontrib/qthelp/locales -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
do
	test $lang == __pycache__ && continue
	install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
	mv sphinxcontrib/qthelp/locales/$lang/LC_MESSAGES/*.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
done
rm -rf sphinxcontrib/qthelp/locales
ln -s %{_datadir}/locale sphinxcontrib/qthelp/locales
popd

%find_lang sphinxcontrib.qthelp

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 527 |14mt|python-sphinxcontrib-serializinghtml-1.1.9-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name sphinxcontrib_serializinghtml
%global oname sphinxcontrib-serializinghtml

# when bootstrapping sphinx, we cannot run tests yet
%bcond_with check

Summary:	Sphinx extension for serialized HTML
Name:		python-%{oname}
Version:	1.1.9
Release:	1
License:	BSD
Group:		Development/Python
Url:		http://sphinx-doc.org/
Source0:	%pypi_source
BuildArch:	noarch
BuildRequires:	gettext
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(flit-core)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(sphinx)
BuildRequires:	pkgconfig(python3)

%if %{with check}
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(sphinx)
%endif

%description
sphinxcontrib-serializinghtml is a sphinx extension which outputs "serialized"
HTML files (json and pickle).

#--------------------------------------------------------------------

%package -n python3-%{oname}
Summary:	%{summary}
Group:		Development/Python
%{?python_provide:%python_provide python3-%{oname}}

%description -n python3-%{oname}
sphinxcontrib-serializinghtml is a sphinx extension which outputs "serialized"
HTML files (json and pickle).

%files -n python3-%{oname} -f sphinxcontrib.serializinghtml.lang
%doc README.rst
%license LICENSE
%{python3_sitelib}/sphinxcontrib
%{python3_sitelib}/sphinxcontrib_serializinghtml-%{version}.dist-info

#--------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}
find -name '*.mo' -delete

%generate_buildrequires
%pyproject_buildrequires -r

%build
for po in $(find -name '*.po'); do
	msgfmt --output-file=${po%.po}.mo ${po}
done
%pyproject_wheel

%install
%pyproject_install

# Move language files to /usr/share
pushd %{buildroot}%{python3_sitelib}
for lang in `find sphinxcontrib/serializinghtml/locales -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
do
	test $lang == __pycache__ && continue
	install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
	mv sphinxcontrib/serializinghtml/locales/$lang/LC_MESSAGES/*.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
done
rm -rf sphinxcontrib/serializinghtml/locales
ln -s %{_datadir}/locale sphinxcontrib/serializinghtml/locales
popd

%find_lang sphinxcontrib.serializinghtml

%if %{with check}
%check
%{__python3} -m pytest
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 528 |14mt|python-sphinx_rtd_theme-1.3.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name sphinx_rtd_theme

Summary:	Sphinx theme for readthedocs.org
Name:		python-%{pypi_name}
Version:	1.3.0
Release:	2
License:	MIT
Group:		Development/Python
Url:		https://github.com/snide/sphinx_rtd_theme
Source0:	%pypi_source
# from upstream https://github.com/readthedocs/sphinx_rtd_theme/commit/5838e6aa545863fac10c08314f90feb6d7ac7757
Patch0:		sphinx_rtd_theme-requirements.patch
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
This is a prototype mobile-friendly sphinx theme for readthedocs.org.
It's currently in development and includes some rtd variable checks that
can be ignored if you're just trying to use it on your project outside
of that site.

#--------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Sphinx theme for readthedocs.org
Group:		Development/Python

%description -n python3-%{pypi_name}
This is a prototype mobile-friendly sphinx theme for readthedocs.org.
It's currently in development and includes some rtd variable checks that
can be ignored if you're just trying to use it on your project outside
of that site.

%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#--------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 529 |14mt|python-sphinx-theme-alabaster-0.7.16-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name alabaster
%global srcname sphinx-theme-%{pypi_name}

Name:           python-%{srcname}
Version:        0.7.16
Release:        2
Summary:        Configurable sidebar-enabled Sphinx theme
Group:          Development/Python
License:        BSD
URL:            https://pypi.python.org/pypi/alabaster
Source0:        https://pypi.io/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3dist(setuptools)
BuildRequires:	python3-pip
BuildRequires:	python3-flit-core

%description
This theme is a modified "Kr" Sphinx theme from @kennethreitz (especially as
used in his Requests project), which was itself originally based on @mitsuhiko's
theme used for Flask & related projects.

%package -n     python3-%{srcname}
Summary:        Configurable sidebar-enabled Sphinx theme
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
This theme is a modified "Kr" Sphinx theme from @kennethreitz (especially as
used in his Requests project), which was itself originally based on @mitsuhiko's
theme used for Flask & related projects.

%generate_buildrequires
%pyproject_buildrequires -r

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%files -n python3-%{srcname} -f %{pyproject_files}
%license LICENSE.rst
%doc README.rst

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 530 |14mt|python-sqlalchemy-2.0.20-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name SQLAlchemy

Summary:	SQL toolkit and object relational mapper for Python
Name:		python-sqlalchemy
Version:	2.0.20
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://www.sqlalchemy.org/
Source0:	%{pypi_source}
BuildRequires:	python3dist(mock)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(sqlite3)
BuildArch:	noarch

%description
SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible,
high-level interface to SQL databases.  Database and domain concepts are
decoupled, allowing both sides maximum flexibility and power. SQLAlchemy
provides a powerful mapping layer that can work as automatically or as manually
as you choose, determining relationships based on foreign keys or letting you
define the join conditions explicitly, to bridge the gap between database and
domain.

#------------------------------------------------------------------

%package -n python3-sqlalchemy
Summary:	Modular and flexible ORM library for python
Group:		Development/Python

%description -n python3-sqlalchemy
SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible,
high-level interface to SQL databases.  Database and domain concepts are
decoupled, allowing both sides maximum flexibility and power. SQLAlchemy
provides a powerful mapping layer that can work as automatically or as manually
as you choose, determining relationships based on foreign keys or letting you
define the join conditions explicitly, to bridge the gap between database and
domain.

%files -n python3-sqlalchemy
%doc README*.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}-%{version}*
%{python3_sitelib}/sqlalchemy

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 531 |14mt|python-sqlite3-0.5.4-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name pysqlite3

Summary:	Python3 bindings for sqlite3
Name:		python-sqlite3
Version:	0.5.4
Release:	2
License:	zlib
Group:		Development/Python
Url:		https://github.com/coleifer/pysqlite3
Source0:	%pypi_source
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(sqlite3)

%description
This library takes the SQLite module from Python 3 and packages it as a
separately-installable module.
This may be useful for creating SQLite modules capable of working with other
versions of SQLite (via the amalgamation option).

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python3 bindings for sqlite3
Group:		Development/Python
# TODO What about autoprovides?
Provides:	python3dist(sqlite3) = %{version}
Provides:	python3dist(sqlite3) = %{version}
Provides:	python3dist(sqlite3) = %{version}
Provides:	python3-sqlite3 = %{version}

%description -n python3-%{pypi_name}
This library takes the SQLite module from Python 3 and packages it as a
separately-installable module.
This may be useful for creating SQLite modules capable of working with other
versions of SQLite (via the amalgamation option).

%files -n python3-%{pypi_name}
%doc README.md
%license LICENSE
%{python3_sitearch}/*.dist-info/*
%{python3_sitearch}/pysqlite3/*

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 532 |14mt|python-sqlparse-0.5.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global		pypi_name sqlparse

Name:		python-%{pypi_name}
Version:	0.5.1
Release:	1
Summary:	Non-validating SQL parser for Python
Group:		Development/Python
License:	BSD
Url:		https://github.com/andialbrecht/%{pypi_name}
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(py)
BuildRequires:	python3dist(setuptools)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
sqlparse is a tool for parsing SQL strings. It can generate pretty-printed
renderings of SQL in various formats.

It is a python module, together with a command-line tool.

#------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Non-validating SQL parser for Python
Group:		Development/Python

%description -n python3-%{pypi_name}
sqlparse is a tool for parsing SQL strings. It can generate pretty-printed
renderings of SQL in various formats.

It is a python module, together with a command-line tool.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc AUTHORS CHANGELOG README.rst
%license LICENSE
%{_bindir}/sqlformat

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 533 |14mt|python-stack-data-0.6.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global _python_no_extras_requires 1

%global pypi_name stack_data

Summary:	Extract data from python stack frames and tracebacks for informative displays
Name:		python-stack-data
Version:	0.6.3
Release:	1
License:	MIT
Group:		Development/Python
Url:		http://github.com/alexmojaki/stack_data
Source0:	https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
This is a library that extracts data from stack frames and tracebacks,
particularly to display more useful tracebacks than the default. It powers the
tracebacks in IPython and futurecoder.

#----------------------------------------------------------------------------

%package -n python3-stack-data
Summary:	Extract data from python stack frames and tracebacks for informative displays
Group:		Development/Python

%description -n python3-stack-data
This is a library that extracts data from stack frames and tracebacks,
particularly to display more useful tracebacks than the default. It powers the
tracebacks in IPython and futurecoder.

%files -n python3-stack-data -f %{pyproject_files}
%license LICENSE.txt
%doc README.md

#----------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 534 |14mt|python-tempita-0.5.3dev-12
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name Tempita

Summary:	A very small text templating language
Name:		python-tempita
Version:	0.5.3dev
Release:	12
License:	MIT
Group:		Development/Python
Url:		http://pythonpaste.org/tempita/
Source0:	http://pypi.python.org/packages/source/T/Tempita/Tempita-%{version}.tar.gz
Patch0:		no-use_2to3.patch
Patch1:		tempita-python3.patch
BuildRequires:	python3-setuptools
BuildArch:	noarch

%description
Tempita is a small templating language for text substitution.

This isn't meant to be the Next Big Thing in templating; it's just a
handy little templating language for when your project outgrows
string.Template or % substitution. It's small, it embeds Python in
strings, and it doesn't do much else.

#----------------------------------------------------------------------------
%package -n python3-tempita
Summary:	A very small text templating language
Group:		Development/Python

%description -n python3-tempita
Tempita is a small templating language for text substitution.

This isn't meant to be the Next Big Thing in templating; it's just a
handy little templating language for when your project outgrows
string.Template or % substitution. It's small, it embeds Python in
strings, and it doesn't do much else.

This is a python3 package.

%files -n python3-tempita
%{python3_sitelib}/*

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%install
PYTHONDONTWRITEBYTECODE= %__python3 setup.py install --root=%{buildroot}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 535 |14mt|python-termcolor-2.4.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name	termcolor

Name:		python-%{pypi_name}
Version:	2.4.0
Release:	2
Summary:	ANSII Color formatting for output in terminal
License:	MIT
Group:		Development/Python
Url:		https://github.com/dvarrazzo/py-setproctitle/
Source0:	%{pypi_source}
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(wheel)
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
%{summary}.

#--------------------------------------------------------------------
%package -n	python3-%{pypi_name}
Summary:	A library allowing a process to change its title
Group:		Development/Python

%description -n	python3-%{pypi_name}
%{summary}.
This is the Python 3 version of the package.

%files -n python3-%{pypi_name}
%doc CHANGES.md README.md
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info
#--------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 536 |14mt|python-testpath-0.6.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name testpath

Summary:	Test utilities for code working with files and commands
Name:		python-testpath
Version:	0.6.0
Release:	3
License:	MIT
Group:		Development/Python
Url:		https://github.com/jupyter/testpath
Source0:	https://pypi.io/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Testpath is a collection of utilities for Python code working with files and
commands.

It contains functions to check things on the filesystem, and tools for
mocking system commands and recording calls to those.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Test utilities for code working with files and commands
Group:		Development/Python

%description -n python3-%{pypi_name}
Testpath is a collection of utilities for Python code working with files and
commands.

It contains functions to check things on the filesystem, and tools for
mocking system commands and recording calls to those.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%doc LICENSE

#----------------------------------------------------------------------------

%package doc
Summary:	%{name} documentation
Group:		Documentation

%description doc
Documentation for %{name}.

%files doc
%doc doc/*.rst

#----------------------------------------------------------------------------

%prep
%setup -qn %{pypi_name}-%{version}

# The exe files are only needed on Microsoft Windows
rm -f %{pypi_name}/*.exe

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 537 |14mt|python-timelib-0.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name timelib

Name:		python-%{pypi_name}
Version:	0.3.0
Release:	1
Summary:	Parse english textual date descriptions
Group:		Development/Python
License:	Zlib AND PHP-3.01
# Code in ext-date-lib is from PHP, the rest is Zlib.

URL:		https://github.com/pediapress/timelib/
Source0:	%{pypi_source %pypi_name}

BuildRequires:	gcc
BuildRequires:	python3-devel
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(cython)

%description
timelib is a short wrapper around php's internal timelib module. It currently
only provides a few functions:timelib.strtodatetime:>>>
timelib.strtodatetime("today") datetime.datetime(2009, 6, 23, 0, 0) >>>
timelib.strtodatetime("today") datetime.datetime(2009, 6, 23, 0, 0) >>>
timelib.strtodatetime("next friday") datetime.datetime(2009, 6, 26, 0, 0) >>>
timelib.strtodatetime("29 feb 2008 -108...
#----------------------------------------------
%package -n     python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name}
timelib is a short wrapper around php's internal timelib module. It currently
only provides a few functions:timelib.strtodatetime:>>>
timelib.strtodatetime("today") datetime.datetime(2009, 6, 23, 0, 0) >>>
timelib.strtodatetime("today") datetime.datetime(2009, 6, 23, 0, 0) >>>
timelib.strtodatetime("next friday") datetime.datetime(2009, 6, 26, 0, 0) >>>
timelib.strtodatetime("29 feb 2008 -108...

%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitearch}/timelib.cpython*so
%{python3_sitearch}/timelib-%{version}.dist-info

#----------------------------------------------
%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%pyproject_save_files %{pypi_name}

%check
%pyproject_check_import


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 538 |14mt|python-tinycss2-1.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name tinycss2

Name:           python-tinycss2
Summary:        CSS parser for Python
Version:        1.3.0
Release:        1
Group:          System/Libraries
License:        BSD
URL:            http://pythonhosted.org/tinycss2/
Source0:        %{pypi_source}
BuildArch:      noarch
BuildRequires:  pkgconfig(python3)
BuildRequires:  pyproject-rpm-macros

# Do not check .so files in the python_sitelib directory
# or any files in the application's directory for provides
#%%global __provides_exclude_from ^(%%{python_sitearch}|%%{python3_sitearch})/.*\\.so$

%description
tinycss2 is a rewrite of the tinycss CSS parser for Python. It supports
It has a simpler API and is based on the more recent
CSS Syntax Level 3 specification.

#-----------------------------------------------------------
%package -n python3-tinycss2
Summary:        CSS parser for Python
Group:          System/Libraries

%description -n python3-tinycss2
tinycss2 is a rewrite of the tinycss CSS parser for Python. It supports
It has a simpler API and is based on the more recent
CSS Syntax Level 3 specification.

%files -n python3-tinycss2 -f %{pyproject_files}

#-----------------------------------------------------------
%prep
%setup -qn %{pypi_name}-%{version}

find . -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 539 |14mt|python-tomli-2.0.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# This package buildrequires flit_core to build the wheel, but flit_core requires tomli.
# To bootstrap, we copy the files to appropriate locations manually and create a minimal dist-info metadata.
# Note that as a pure Python package, the wheel contains no pre-built binary stuff.
# When bootstrap is enabled, we don't run tests either, just an import check.
%bcond_with bootstrap

Summary:	A little TOML parser for Python
Name:		python-tomli
Version:	2.0.2
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://pypi.org/project/tomli/
Source0:	https://github.com/hukkin/tomli/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Tomli is a Python library for parsing TOML.
Tomli is fully compatible with TOML v1.0.0.

#----------------------------------------------------------------------------

%package -n python3-tomli
Summary:	A little TOML parser for Python
Group:		Development/Python

%description -n python3-tomli
Tomli is a Python library for parsing TOML.
Tomli is fully compatible with TOML v1.0.0.

%files -n python3-tomli -f %{pyproject_files}
%doc README.md
%doc CHANGELOG.md
%license LICENSE

#----------------------------------------------------------------------------
%prep
%autosetup -p1 -n tomli-%{version}

%if %{without bootstrap}
%generate_buildrequires
%pyproject_buildrequires -r
%endif

%build
%if %{without bootstrap}
%pyproject_wheel
%else
%global distinfo tomli-%{version}+rpmbootstrap.dist-info
mkdir %{distinfo}
cat > %{distinfo}/METADATA << EOF
Metadata-Version:	2.0.2
Name: tomli
Version:	2.0.2
EOF
%endif

%install
%if %{without bootstrap}
%pyproject_install
%pyproject_save_files tomli
%else
mkdir -p %{buildroot}%{python3_sitelib}
cp -a src/tomli %{distinfo} %{buildroot}%{python3_sitelib}
echo '%{python3_sitelib}/tomli/' > %{pyproject_files}
echo '%{python3_sitelib}/%{distinfo}/' >> %{pyproject_files}
%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 540 |14mt|python-tomli-w-1.2.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%bcond_with check

Name:           python-tomli-w
Version:        1.2.0
Release:        1
Summary:        A Python library for writing TOML

# SPDX
License:        MIT
URL:            https://github.com/hukkin/tomli-w
Source0:        %{url}/archive/%{version}/tomli-w-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel

%global _description %{expand:
Tomli-W is a Python library for writing TOML. It is a write-only counterpart
to Tomli, which is a read-only TOML parser. Tomli-W is fully compatible
with TOML v1.0.0.}

%description %_description

%package -n python3-tomli-w
Summary:        %{summary}

%description -n python3-tomli-w %_description


%prep
%autosetup -p1 -n tomli-w-%{version}
# Measuring coverage is discouraged in Python packaging guidelines:
sed -i '/pytest-cov/d' tests/requirements.txt
# We don't need tomli on Python 3.11+
sed -i '/tomli/d' tests/requirements.txt
sed -Ei 's/tomli(\.|$)/tomllib\1/' tests/*.py
# This testing dependency is optional and we don't have it in (EP)EL,
# it has many missing transitive dependencies that we don't want to maintain
%if 0%{?rhel}
sed -i '/pytest-randomly/d' tests/requirements.txt
%endif


%generate_buildrequires
# We intentionally don't use tox here to avoid a dependency on it in ELN/RHEL,
# the tox deps only list -r tests/requirements.txt anyway and sometimes
# did not run any tests at all.
%pyproject_buildrequires %{?with_check:tests/requirements.txt}


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files tomli_w


%check
%pyproject_check_import tomli_w
%if %{with check}
%pytest -v
%endif


%files -n python3-tomli-w -f %{pyproject_files}
%doc README.md
%doc CHANGELOG.md
%license LICENSE

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 541 |14mt|python-tox-4.15.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Tests requiring Internet connections are disabled by default
# pass --with internet to run them (e.g. when doing a local rebuild
# for sanity checks before committing)
%bcond_with internet

%define pypi_name tox

Name:		python-%{pypi_name}
Version:	4.15.1
Release:	1
Summary:	Virtualenv-based automation of test activities
Group:		Development/Python
# file toxbootstrap.py is licensed under MIT License
License:	MIT
URL:		https://tox.readthedocs.org/
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Tox as is a generic virtualenv management and test command line tool you
can use for:

 - checking your package installs correctly with different Python versions
   and interpreters
 - running your tests in each of the environments, configuring your test tool
   of choice
 - acting as a frontend to Continuous Integration servers, greatly reducing
   boilerplate and merging CI and shell-based testing.

#-----------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary:	Virtualenv-based automation of test activities
Group:		Development/Python
Requires:       python3-py
Requires:       python3-pluggy
# python3-virtualenv is rhbz#537246
Requires:       python3-virtualenv

%description -n python3-%{pypi_name}
Tox as is a generic virtualenv management and test command line tool you
can use for:

 - checking your package installs correctly with different Python versions
   and interpreters
 - running your tests in each of the environments, configuring your test tool
   of choice
 - acting as a frontend to Continuous Integration servers, greatly reducing
   boilerplate and merging CI and shell-based testing.

%files -n python3-%{pypi_name}
%{_bindir}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}*-info

#-----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

# if internet connection available, run tests
%if %{with internet}
%check
%__python3 setup.py test

%endif

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 542 |14mt|python-tox-current-env-0.0.17-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name tox-current-env
%global pypi_under tox_current_env

Summary:	Tox plugin to run tests in current Python environment
Name:		python-%{pypi_name}
Version:	0.0.17
Release:	1
License:	MIT
Group:		Development/Python
URL:            https://github.com/fedora-python/tox-current-env
Source0:        %{pypi_source tox_current_env}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(pip)
BuildRequires:	python3dist(packaging)
BuildArch:	noarch

%description
The tox-current-env plugin allows to run tests in current Python environment.

#---------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Tox plugin to run tests in current Python environment
Group:		Development/Python

%description -n python3-%{pypi_name}
The tox-current-env plugin allows to run tests in current Python environment.

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{pypi_under}/
%{python3_sitelib}/tox_current_env*.dist-info/

#---------------------------------------------------------------------------

%prep
%autosetup -n tox_current_env-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel


%install
%pyproject_install


#check
# the tests currently only work within actual tox and with various Python
# versions installed, so we skip them.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 543 |14mt|python-traitlets-5.14.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name traitlets

Name:		python-traitlets
Version:	5.14.3
Release:	1
Summary:	Traitlets Python config system
Group:		Development/Python
License:	BSD
URL:		http://ipython.org
Source0:	%{pypi_source}
BuildArch:	noarch

BuildRequires:	python3-devel
BuildRequires:	pyproject-rpm-macros

%description
A configuration system for Python applications.

#------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:	Traitlets Python config system
Group:		Development/Python
Requires:	python3-decorator
Requires:	python3-ipython_genutils
Requires:	python3-six

%description -n python3-%{pypi_name}
A configuration system for Python applications.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md CHANGES* CHANGELOG*

#------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 544 |14mt|python-translate-3.14.7-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pname translate
%define oname %{pname}-toolkit

Summary:	Software localization toolkit
Name:		python-%{pname}
Version:	3.14.7
Release:	1
License:	GPLv2+
Group:		Development/Python
Url:		http://translate.sourceforge.net/
Source0:	https://github.com/translate/translate/archive/%{version}.tar.gz?/%{pname}-%{version}.tar.gz
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(lxml)
BuildRequires:	python3dist(simplejson)
BuildArch:	noarch

%description
The Translate Toolkit is a set of software and documentation designed
to help make the lives of localizers both more productive and less
frustrating.  The Toolkit is part of the translate.sourceforge.net
project, hosted at http://translate.sourceforge.net/

The software includes programs to covert localization formats to the
common PO format and programs to check and manage PO files.  The
documentation includes guides on using the tools, running a
localization project and how to localize various projects from
OpenOffice.org to Mozilla.

At its core the software contains a set of classes for handling
various localization storage formats: DTD, properties, OpenOffice.org
GSI/SDF, CSV and of course PO.  And scripts to convert between these
formats.

Also part of the Toolkit are Python programs to create word counts,
merge translations and perform various checks on PO files.

#-------------------------------------------------------

%package -n python3-%{pname}
Summary:	Software localization toolkit
Group:		Development/Python
Requires:	python3dist(lxml)
Requires:	python3dist(levenshtein)
Requires:	python3dist(simplejson)
Requires:	python3dist(pyenchant)
Requires:	python3dist(vobject)
Requires:	python3dist(iniparse)
# for sub2po and po2sub
Requires:	python3dist(aeidon)
# python2-pysco is only available for i586
%ifarch %{ix86}
Requires:	python3-psyco
%endif
Recommends:	python3dist(beautifulsoup4)
Recommends:	python3dist(babel)

%description -n python3-%{pname}
The Translate Toolkit is a set of software and documentation designed
to help make the lives of localizers both more productive and less
frustrating.  The Toolkit is part of the translate.sourceforge.net
project, hosted at http://translate.sourceforge.net/

The software includes programs to covert localization formats to the
common PO format and programs to check and manage PO files.  The
documentation includes guides on using the tools, running a
localization project and how to localize various projects from
OpenOffice.org to Mozilla.

At its core the software contains a set of classes for handling
various localization storage formats: DTD, properties, OpenOffice.org
GSI/SDF, CSV and of course PO.  And scripts to convert between these
formats.

Also part of the Toolkit are Python programs to create word counts,
merge translations and perform various checks on PO files.

%files -n python3-%{pname}
%{_bindir}/*
%{python3_sitelib}/%{pname}
%{python3_sitelib}/translate_toolkit-*.dist-info

#------------------------------------------------------
%prep
%setup -q -n %{pname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 545 |14mt|python-transliterate-1.10.2-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module transliterate

Name:		    python-%{module}
Version:	    1.10.2
Release:	    2
Summary:	    Bi-directional transliterator for Python
Url:		    https://github.com/barseghyanartur/%{module}
Source0:	    https://github.com/barseghyanartur/%{module}/archive/refs/tags/%{module}-%{version}.tar.gz
License:	    GPL2.0
Group:		    Development/Python
BuildArch:	    noarch
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pillow

%define _description \
Bi-directional transliterator for Python.\
Transliterates (unicode) strings according to the rules specified\
in the language packs (source script <-> target script)

%description
%_description

#--------------------------------------------------------------------

%package -n python3-%{module}
Summary:        Bi-directional transliterator for Python
Group:          Development/Python

%description -n python3-%{module}
%_description

%files -n python3-%{module}
%doc README.rst
%{python3_sitelib}/%{module}
%{python3_sitelib}/%{module}-*.dist-info

#--------------------------------------------------------------------

%prep
%autosetup -p1 -n %{module}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 546 |14mt|python-trove-classifiers-2026.6.1.19-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Name:           python-trove-classifiers
Version:        2026.6.1.19
Release:        1
Summary:        Canonical source for classifiers on PyPI (pypi.org)

License:        Apache-2.0
URL:            https://github.com/pypa/trove-classifiers
Source:         %{pypi_source trove_classifiers}

# Drop dependency on calver which is not packaged in Fedora.
# This patch is rebased version of upstream PR:
# https://github.com/pypa/trove-classifiers/pull/126/commits/809156bb35852bcaa1c753e0165f1814f2bcedf6
Patch:          Move-to-PEP-621-declarative-metadata.patch

BuildArch:      noarch
BuildRequires:  python3-devel

%global _description %{expand:
Canonical source for classifiers on PyPI.
Classifiers categorize projects per PEP 301. Use this package to validate
classifiers in packages for PyPI upload or download.
}

%description %_description

%package -n python3-trove-classifiers
Summary:        %{summary}

%description -n python3-trove-classifiers %_description


%prep
%autosetup -p1 -n trove_classifiers-%{version}
# Replace @@VERSION@@ with %%version
%writevars -f pyproject.toml version

# Make the the CLI tests work in %%check
# https://github.com/pypa/trove-classifiers/issues/219
sed -i 's@{BINDIR}/@@' tests/test_cli.py


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files trove_classifiers


%files -n python3-trove-classifiers -f %{pyproject_files}
%doc README.*
%{_bindir}/trove-classifiers

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 547 |14mt|python-typing-extensions-4.15.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name typing-extensions
%global pypi_src typing_extensions

Summary:	Python Typing Extensions
Name:		python-%{pypi_name}
Version:	4.15.0
Release:	1
License:	Python
Group:		Development/Python
Url:		https://pypi.org/project/typing-extensions/
Source0:	%{pypi_source %{pypi_src}}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%global _description %{expand:
The `typing_extensions` module serves two related purposes:

- Enable use of new type system features on older Python versions. For example,
 `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows
 users on Python 3.6 through 3.9 to use it too.
- Enable experimentation with new type system PEPs before they are accepted and
 added to the `typing` module.

New features may be added to `typing_extensions` as soon as they are specified
in a PEP that has been added to the [python/peps](https://github.com/python/peps)
repository. If the PEP is accepted, the feature will then be added to `typing`
for the next CPython release. No typing PEP has been rejected so far, so we
haven't yet figured out how to deal with that possibility.

Starting with version 4.0.0, `typing_extensions` uses
[Semantic Versioning](https://semver.org/). The
major version is incremented for all backwards-incompatible changes.
Therefore, it's safe to depend
on `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,
where `x.y` is the first version that includes all features you need.

`typing_extensions` supports Python versions 3.7 and higher. In the future,
support for older Python versions will be dropped some time after that version
reaches end of life.}

%description %_description

#------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name} %_description

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc CHANGELOG.md README.md

#------------------------------------------------------

%prep
%autosetup -n %{pypi_src}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files typing_extensions

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 548 |14mt|python-typogrify-2.0.7-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define module	typogrify

Summary:	Filters to enhance web typography, with support for Django & Jinja templates
Name:		python-%{module}
Version:	2.0.7
Release:	2
License:	BSD
Group:		Development/Python
URL:		https://github.com/mintchaos/typogrify
Source0:	https://github.com/mintchaos/typogrify/archive/refs/tags/%{version}.tar.gz?/%{module}-%{version}.tar.gz
BuildRequires:	python3-devel
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
Typogrify provides a set of custom filters that automatically apply various
transformations to plain text in order to yield typographically-improved HTML.
While often used in conjunction with Jinja_ and Django_ template systems, the
filters can be used in any environment.

#------------------------------------------------------------------

%package -n python3-%{module}
Summary:	Filters to enhance web typography, with support for Django & Jinja templates
Group:		Development/Python

%description -n python3-%{module}
Typogrify provides a set of custom filters that automatically apply various
transformations to plain text in order to yield typographically-improved HTML.
While often used in conjunction with Jinja_ and Django_ template systems, the
filters can be used in any environment.

%files -n python3-%{module}
%doc README.rst
%license LICENSE.txt
%{python3_sitelib}/%{module}
%{python3_sitelib}/%{module}-%{version}-*

#------------------------------------------------------------------

%prep
%setup -qn %{module}-%{version}

%build
%py3_build

%install
%py3_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 549 |14mt|python-uinput-0.11.2-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Summary:        Pythonic API to the Linux uinput kernel module
Name:           python-uinput
Version:        0.11.2
Release:        3
Group:          Development/Python
License:        GPLv3
URL:            http://pypi.python.org/pypi/python-uinput/
Source0:        %{pypi_source}
BuildRequires:  kernel-headers
BuildRequires:  pkgconfig(udev)
BuildRequires:  python3-devel
BuildRequires:  gcc

%description
Python-uinput is Python interface to the Linux uinput kernel module
which allows attaching userspace device drivers into kernel.

#-------------------------------------------------------------------------

%package -n python3-uinput
Summary:        Pythonic API to the Linux uinput kernel module

%description -n python3-uinput
Python-uinput is Python interface to the Linux uinput kernel module
which allows attaching userspace device drivers into kernel.

%files -n python3-uinput
%license COPYING
%doc NEWS README examples
%{python3_sitearch}/python_uinput-*.dist-info
%{python3_sitearch}/_libsuinput.*.so
%{python3_sitearch}/uinput

#-------------------------------------------------------------------------

%prep
%autosetup -p1

# Use unversioned .so
sed -i "s/libudev.so.0/libudev.so/" setup.py
find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

chmod a-x examples/*

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 550 |14mt|python-unidecode-1.4.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name Unidecode

Summary:	US-ASCII transliterations of Unicode text
Name:		python-unidecode
Version:	1.4.0
Release:	2
License:	GPL+ or Artistic
Group:		Development/Python
Url:		https://pypi.python.org/pypi/%{pypi_name}/%{version}
Source0:	%{pypi_source}
BuildArch:	noarch

%description
This is a python port of Text::Unidecode Perl module. It provides a function,
'unidecode(...)' that takes Unicode data and tries to represent it in ASCII
characters.

#----------------------------------------------------------------------------

%package -n python3-unidecode
Summary:	US-ASCII transliterations of Unicode text
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)

%description -n python3-unidecode
This is a python port of Text::Unidecode Perl module. It provides a function,
'unidecode(...)' that takes Unicode data and tries to represent it in ASCII
characters.

%files -n python3-unidecode
%doc README.rst ChangeLog
%{python3_sitelib}/unidecode/
%{python3_sitelib}/*.dist-info

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

rm -f %{buildroot}%{_bindir}/unidecode


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 551 |14mt|python-uranium-5.6.0-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define debug_package %{nil}

# There are Python plugins in /usr/lib/uranium
# We need to byte-compile it with Python 3
%global __python %__python3

%define module uranium

Summary:	A Python framework for building desktop applications
Name:		python-%{module}
Version:	5.6.0
Release:	3
License:	LGPLv3+
Group:		Development/Python
Url:		https://github.com/Ultimaker/Uranium
Source0:	%{url}/archive/%{version}.tar.gz?/Uranium-%{version}.tar.gz
# missing file
Source1:	UraniumTranslationTools.cmake
Patch0:		uranium-install-files.patch
# https://github.com/Ultimaker/Uranium/pull/320
# Don't hardcode "lib", use sys.lib instead to fix x86_64 search path
BuildRequires:	cmake
BuildRequires:	doxygen
BuildRequires:	gettext
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-pip
%description
Uranium is a Python framework for building 3D printing related applications.

#----------------------------------------------------------------------------

%package -n python3-uranium
Summary:	A Python framework for building desktop applications
Group:		Development/Python
Requires:	python3-cryptography
Requires:	python3-numpy
Requires:	python3-qt5
Requires:	python3-scipy
Requires:	python3-twisted

%description -n python3-uranium
Uranium is a Python framework for building 3D printing related applications.

%files -n python3-uranium -f uranium.lang
%doc README.md
%{python3_sitelib}/UM
%{_prefix}/lib/%{module}
%{_datadir}/%{module}
%{_datadir}/cmake/Modules/UraniumTranslationTools.cmake

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n Uranium-%{version}

# empty file. appending to the end to make sure we are not overriding
# a non empty file in the future
echo '# empty' >> UM/Settings/ContainerRegistryInterface.py

mkdir ./cmake
cp %{SOURCE1} ./cmake/

%build
%cmake -DPython_SITELIB_LOCAL=%{python3_sitelib}
%make_build

%install
%make_install -C build

mkdir -p %{buildroot}%{_prefix}/lib/%{module}
mv -v plugins %{buildroot}%{_prefix}/lib/%{module}

%py_byte_compile %{__python3} %{buildroot}%{_prefix}/lib/%{module}

# Sanitize the location of locale files
pushd %{buildroot}%{_datadir}
mv uranium/resources/i18n locale
ln -s ../../locale uranium/resources/i18n
rm locale/uranium.pot
rm locale/*/uranium.po
popd

%find_lang uranium

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 552 |14mt|python-urlgrabber-4.1.0-5
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name urlgrabber


Name:		python-%{pypi_name}
Version:	4.1.0
Release:	5
Summary:	A high-level cross-protocol url-grabber
Group:		Development/Python
License: 	LGPLv2+
Url:		http://urlgrabber.baseurl.org/
Source0:	%{pypi_source}
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(pycurl)
BuildRequires:	python3dist(setuptools)
BuildArch:	noarch

%description
A high-level cross-protocol url-grabber.

Using urlgrabber, data can be fetched in three basic ways:

  urlgrab(url) copy the file to the local filesystem
  urlopen(url) open the remote file and return a file object (like
  urllib2.urlopen)
  urlread(url) return the contents of the file as a string

When using these functions (or methods), urlgrabber supports the following
features:

  * identical behavior for http://, ftp://, and file:// urls
  * http keepalive - faster downloads of many files by using only a single
    connection
  * byte ranges - fetch only a portion of the file
  * reget - for a urlgrab, resume a partial download
  * progress meters - the ability to report download progress automatically,
    even when using urlopen!
  * throttling - restrict bandwidth usage
  * retries - automatically retry a download if it fails. The number of retries
    and failure types are configurable.
  * authenticated server access for http and ftp
  * proxy support - support for authenticated http and ftp proxies
  * mirror groups - treat a list of mirrors as a single source, automatically
    switching mirrors if there is a failure.

#-----------------------------------------------------------

%package -n python3-%{pypi_name}
Summary: A high-level cross-protocol url-grabber
Group:		Development/Python
Requires: 	python3dist(pycurl)

%description -n python3-%{pypi_name}
A high-level cross-protocol url-grabber.

Using urlgrabber, data can be fetched in three basic ways:

  urlgrab(url) copy the file to the local filesystem
  urlopen(url) open the remote file and return a file object (like
  urllib2.urlopen)
  urlread(url) return the contents of the file as a string

When using these functions (or methods), urlgrabber supports the following
features:

  * identical behavior for http://, ftp://, and file:// urls
  * http keepalive - faster downloads of many files by using only a single
    connection
  * byte ranges - fetch only a portion of the file
  * reget - for a urlgrab, resume a partial download
  * progress meters - the ability to report download progress automatically,
    even when using urlopen!
  * throttling - restrict bandwidth usage
  * retries - automatically retry a download if it fails. The number of retries
    and failure types are configurable.
  * authenticated server access for http and ftp
  * proxy support - support for authenticated http and ftp proxies
  * mirror groups - treat a list of mirrors as a single source, automatically
    switching mirrors if there is a failure.

%files -n python3-%{pypi_name}
%doc README LICENSE ChangeLog TODO
%{_bindir}/%{pypi_name}
%{_libexecdir}/*
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/*.dist-info

#-----------------------------------------------------------
%prep
%setup -q -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
rm -Rf %{buildroot}/usr/share/doc/*

#set python shebang
sed '1 s,^.*$,#!%{__python3},' -i %{buildroot}%{_libexecdir}/urlgrabber-ext-down

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 553 |14mt|python-urllib3-2.2.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define	pypi_name urllib3

Summary:	Python 2 HTTP library
Name:		python-%{pypi_name}
Version:	2.2.3
Release:	1
Epoch:		1
License:	MIT
Group:		Development/Python
Url:		http://urllib3.readthedocs.org/
Source0:	%{pypi_source}
BuildArch:	noarch

%description
The urllib3 pypi_name is a powerful, sanity-friendly HTTP client for Python. It
offers some features that are missing from the Python standard libraries
(urllib and urllib2):
* Thread safety.
* Connection pooling.
* Client-side SSL/TLS verification.
* File uploads with multipart encoding.
* Helpers for retrying requests and dealing with HTTP redirects.
* Support for gzip and deflate encoding.
* Proxy support for HTTP and SOCKS.
The Python standard libraries  have little to do with each other. They were
designed to be independent and standalone, each solving a different scope of
problems, and urllib3 follows in a similar vein.
This package contains the python2 files.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Python 3 HTTP library
Group:		Development/Python
BuildRequires:	python3-setuptools
BuildRequires:	python3-six
BuildRequires:	pkgconfig(python3)
Requires:	python3-six
Requires:	rootcerts

%description -n python3-%{pypi_name}
The urllib3 pypi_name is a powerful, sanity-friendly HTTP client for Python. It
offers some features that are missing from the Python standard libraries
(urllib and urllib2):
* Thread safety.
* Connection pooling.
* Client-side SSL/TLS verification.
* File uploads with multipart encoding.
* Helpers for retrying requests and dealing with HTTP redirects.
* Support for gzip and deflate encoding.
* Proxy support for HTTP and SOCKS.
The Python standard libraries  have little to do with each other. They were
designed to be independent and standalone, each solving a different scope of
problems, and urllib3 follows in a similar vein.
This package contains the python3 files.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc CHANGES.rst

#----------------------------------------------------------------------------

%prep
%setup -q -n %{pypi_name}-%{version}
%generate_buildrequires
# Generate BR’s from packaged extras even when tests are disabled, to ensure
# the extras metapackages are installable if the build succeeds.
%pyproject_buildrequires -x brotli,socks


%build
%pyproject_wheel

%install
%pyproject_install

# Unbundle the Python 3 build
#rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
#rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/six.*
#mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/

%pyproject_save_files urllib3

%pretrans -p <lua>
path = "%{py2_puresitedir}/urllib3/packages/ssl_match_hostname"
st = posix.stat(path)
if st and st.type == "directory" then
  status = os.rename(path, path .. ".rpmmoved")
  if not status then
    suffix = 0
    while not status do
      suffix = suffix + 1
      status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
    end
    os.rename(path, path .. ".rpmmoved")
  end
end

%pretrans -p <lua> -n python3-%{pypi_name}
path = "%{python3_sitelib}/urllib3/packages/ssl_match_hostname"
st = posix.stat(path)
if st and st.type == "directory" then
  status = os.rename(path, path .. ".rpmmoved")
  if not status then
    suffix = 0
    while not status do
      suffix = suffix + 1
      status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
    end
    os.rename(path, path .. ".rpmmoved")
  end
end

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 554 |14mt|python-validate-email-1.3-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name validate-email

Name:           python-%{pypi_name}
Version:        1.3
Release:        4
Summary:        Validate_email verify if an email address is valid and really exists
Group:          Development/Python
License:        LGPL
URL:            http://github.com/syrusakbary/validate_email
Source0:        https://files.pythonhosted.org/packages/source/v/%{pypi_name}/validate_email-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)

%description
 Validate_email Validate_email is a package for Python that check if an email
is valid, properly formatted and really exists.INSTALLATION First, you must
do:: pip install validate_emailExtra For check the domain mx and verify email
exits you must have the pyDNS package installed:: pip install pyDNSBasic
usage:: from validate_email import validate_email is_valid...

#------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python

%description -n python3-%{pypi_name}
 Validate_email Validate_email is a package for Python that check if an email
is valid, properly formatted and really exists.INSTALLATION First, you must
do:: pip install validate_emailExtra For check the domain mx and verify email
exits you must have the pyDNS package installed:: pip install pyDNSBasic
usage:: from validate_email import validate_email is_valid...

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/validate_email.py*
%{python3_sitelib}/validate_email-*.dist-info
#-----------------------------------------------------
%prep
%autosetup -n validate_email-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 555 |14mt|python-variety-slideshow-0.1.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define oname variety-slideshow

Summary:	Pan-and-zoom image slideshow for Linux
Name:		python-variety-slideshow
Version:	0.1.1
Release:	1
License:	GPL-3.0
Group:		Development/Python
Url:		https://github.com/peterlevi/variety-slideshow
Source0:	https://github.com/peterlevi/variety-slideshow/archive/%{version}.tar.gz?/%{oname}-%{version}.tar.gz
BuildRequires:	intltool
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3-gi
BuildRequires:	python3dist(python-distutils-extra)
BuildRequires:	python3dist(setuptools)
Requires:	typelib(GtkClutter) = 1.0
BuildArch:	noarch

%description
Pan-and-zoom image slideshow for Linux.

#------------------------------------------------------------------

%package -n python3-%{oname}
Summary:	Pan-and-zoom image slideshow for Linux
Group:		Development/Python

%description -n python3-%{oname}
Pan-and-zoom image slideshow for Linux.

%files -n python3-%{oname}
%doc README.md
%license COPYING
%{_bindir}/%{oname}*
%{python3_sitelib}/varietyslideshow
%{python3_sitelib}/variety_slideshow-%{version}-py*.egg-info

#------------------------------------------------------------------

%prep
%autosetup -p1 -n %{oname}-%{version}
ln -s %{oname} bin/%{oname}.py

%build
%py3_build

%install
%py3_install

rm -f %{buildroot}%{_defaultdocdir}/%{oname}/README.md

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 556 |14mt|python-vcs-versioning-2.3.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Bootstrap mode is needed to break circular dependency with setuptools-scm:
# - setuptools_scm >= 10 requires vcs-versioning
# - pytest itself also requires setuptools_scm
# When bootstrapping, we cannot run tests at all.
%bcond bootstrap 1
%bcond tests %{without bootstrap}

Name:           python-vcs-versioning
Version:        2.3.0
Release:        1
Summary:        The blessed package to manage your versions by vcs metadata
License:        MIT
URL:            https://github.com/pypa/setuptools-scm
Source:         %{pypi_source vcs_versioning}

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-packaging

%if %{with tests}
BuildRequires:  /usr/bin/git
%if %{undefined rhel}
BuildRequires:  /usr/bin/hg
%endif
%endif

%global _description %{expand:
This package extracts project version information from version control system
(VCS) metadata, eliminating the need to manually maintain version numbers in
multiple places. It automatically derives versions from VCS tags and commit
history.}

%description %_description


%prep
%autosetup -p1 -n vcs_versioning-%{version}
# Remove unwanted test dependencies (coverage not needed,
# pytest-timeout and pytest-xdist not in RHEL)
%pyproject_patch_dependency pytest-cov:ignore
%if %{defined rhel}
%pyproject_patch_dependency pytest-timeout:ignore
%pyproject_patch_dependency pytest-xdist:ignore
sed -i -e '/^timeout *=/d' pyproject.toml
%endif


%generate_buildrequires
%if %{with tests}
%pyproject_buildrequires -g test
%else
%pyproject_buildrequires
%endif


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files -l vcs_versioning


%package -n python3-vcs-versioning
Summary:        %{summary}

%description -n python3-vcs-versioning %_description


%if %{with tests}
%check
%pytest -v %{!?rhel:-n auto}
%else
# this imports pytest, so we cannot import check it without it
%check
%pyproject_check_import -e '*.test_api'
%endif


%files -n python3-vcs-versioning -f %{pyproject_files}
%doc README.md
%{_bindir}/vcs-versioning

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 557 |14mt|python-virt-firmware-24.7-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_version 24.7

Name:           python-virt-firmware
Version:        %{pypi_version}
Release:        1
Summary:        Tools for virtual machine firmware volumes
Group:		Development/Python
License:        GPL-2.0-only
URL:            https://pypi.org/project/virt-firmware/
Source0:        virt_firmware-%{pypi_version}.tar.gz
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3dist(cryptography)
BuildRequires:  python3dist(setuptools)
BuildRequires:  make help2man

%description
Tools for ovmf / armvirt firmware volumes This is a small collection of tools
for edk2 firmware images. They support decoding and printing the content of
firmware volumes. Variable stores (OVMF_VARS.fd) can be modified, for example
to enroll secure boot certificates.

%package -n     python3-virt-firmware
Summary:        %{summary}
%{?python_provide:%python_provide python3-virt-firmware}
Provides:       virt-firmware
Conflicts:      python3-virt-firmware-peutils < 23.9
Obsoletes:      python3-virt-firmware-peutils < 23.9
Requires:       python3dist(cryptography)
Requires:       python3dist(setuptools)
Requires:       python3dist(pefile)
Recommends:     qemu-img
Recommends:     dialog
%description -n python3-virt-firmware
Tools for ovmf / armvirt firmware volumes This is a small collection of tools
for edk2 firmware images. They support decoding and printing the content of
firmware volumes. Variable stores (OVMF_VARS.fd) can be modified, for example
to enroll secure boot certificates.

%package -n     python3-virt-firmware-tests
Summary:        %{summary} - test cases
Requires:       python3-virt-firmware
Requires:       python3dist(pytest)
#Requires:       edk2-ovmf
%description -n python3-virt-firmware-tests
test cases

%package -n     uki-direct
Provides:       ukidirect
Summary:        %{summary} - manage UKI kernels
Requires:       python3-virt-firmware

%description -n uki-direct
kernel-install plugin and systemd unit to manage automatic
UKI (unified kernel image) updates.

%prep
%autosetup -n virt_firmware-%{pypi_version}

%build
%py3_build

%install
%py3_install
# manpages
install -m 755 -d      %{buildroot}%{_mandir}/man1
install -m 644 man/*.1 %{buildroot}%{_mandir}/man1
# tests
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -ar tests %{buildroot}%{_datadir}/%{name}
# uki-direct
install -m 755 -d  %{buildroot}%{_unitdir}
install -m 755 -d  %{buildroot}%{_prefix}/lib/kernel/install.d
install -m 644 systemd/kernel-bootcfg-boot-successful.service %{buildroot}%{_unitdir}
install -m 755 systemd/99-uki-uefi-setup.install %{buildroot}%{_prefix}/lib/kernel/install.d
cp -r experimental %{buildroot}%{python3_sitelib}

%post -n uki-direct
%systemd_post kernel-bootcfg-boot-successful.service

%preun -n uki-direct
%systemd_preun kernel-bootcfg-boot-successful.service

%files -n python3-virt-firmware
%license LICENSE
%doc README.md
%{_bindir}/host-efi-vars
%{_bindir}/virt-fw-dump
%{_bindir}/virt-fw-vars
%{_bindir}/virt-fw-sigdb
%{_bindir}/kernel-bootcfg
%{_bindir}/uefi-boot-menu
%{_bindir}/migrate-vars
%{_bindir}/pe-dumpinfo
%{_bindir}/pe-listsigs
%{_bindir}/pe-addsigs
%{_bindir}/pe-inspect
%{_mandir}/man1/virt-*.1*
%{_mandir}/man1/kernel-bootcfg.1*
%{_mandir}/man1/uefi-boot-menu.1*
%{_mandir}/man1/pe-*.1*
%dir %{python3_sitelib}/virt
%{python3_sitelib}/virt/firmware
%{python3_sitelib}/experimental
%{python3_sitelib}/virt/peutils
%{python3_sitelib}/virt_firmware-%{pypi_version}-py%{python3_version}.egg-info

%files -n python3-virt-firmware-tests
%{_datadir}/%{name}/tests

%files -n uki-direct
%{_unitdir}/kernel-bootcfg-boot-successful.service
%{_prefix}/lib/kernel/install.d/99-uki-uefi-setup.install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 558 |14mt|python-virtualenv-20.26.3-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name virtualenv

Summary:	Virtual Python Environment builder
Name:		python-%{pypi_name}
Version:	20.26.3
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://www.virtualenv.org/
Source0:	%{pypi_source}
BuildArch:	noarch
BuildRequires:	pyproject-rpm-macros
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3dist(setuptools-scm)

%description
virtualenv is a tool to create isolated Python environments.

#-------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Tool to create isolated Python 3 environments
Group:		Development/Python
Requires:	python3dist(setuptools)

%description -n python3-%{pypi_name}
virtualenv is a tool to create isolated Python 3 environments. virtualenv
is a successor to workingenv, and an extension of virtual-python. It is
written by Ian Bicking, and sponsored by the Open Planning Project. It is
licensed under an MIT-style permissive license

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc PKG-INFO README.md
%license LICENSE
%{_bindir}/%{pypi_name}

#-------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 559 |14mt|python-webencodings-0.5.1-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name webencodings

Name:		python-%{pypi_name}
Version:	0.5.1
Release:	3
Summary:	Character encoding aliases for legacy web content
Group:		Development/Python

License:	BSD
URL:		https://github.com/SimonSapin/python-webencodings
Source0:	%{pypi_source}
BuildArch:	noarch

BuildRequires:	python3-devel
BuildRequires:	python3-setuptools

%description
python-webencodings
===================

This is a Python implementation of the
`WHATWG Encoding standard
<http://encoding.spec.whatwg.org/>`_.

* Latest
documentation: http://packages.python.org/webencodings/
* Source code and issue
tracker:
  https://github.com/gsnedders/python2-webencodings
* PyPI releases:
http://pypi.python.org/pypi/webencodings

#---------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:	%{summary}
Group:		Development/Python

%description -n python3-%{pypi_name}
python-webencodings
===================

This is a Python implementation of the
`WHATWG Encoding standard
<http://encoding.spec.whatwg.org/>`_.

* Latest
documentation: http://packages.python.org/webencodings/
* Source code and issue
tracker:
  https://github.com/gsnedders/python2-webencodings
* PyPI releases:
http://pypi.python.org/pypi/webencodings

%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.dist-info

#---------------------------------------------------
%prep
%setup -qn %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 560 |14mt|python-webob-1.8.7-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define tarname	WebOb

Summary:	WSGI request and response object for Python

Name:		python-webob
Version:	1.8.7
Release:	2
Source0:	https://files.pythonhosted.org/packages/c7/45/ee5f034fb4ebe3236fa49e5a4fcbc54444dd22ecf33079cf56f9606d479d/WebOb-1.8.7.tar.gz
License:	MIT
Group:		Development/Python
Url:		http://pythonpaste.org/webob/
BuildArch:	noarch

%description
WebOb provides wrappers around the WSGI request environment, and an
object to help create WSGI responses.

The objects map much of the specified behavior of HTTP, including
header parsing and accessors for other standard parts of the
environment.

%package -n python3-webob
Summary:	WSGI request and response object for Python
Group:		Development/Python
BuildRequires:	python3-setuptools

%description -n python3-webob
WebOb provides wrappers around the WSGI request environment, and an
object to help create WSGI responses.

The objects map much of the specified behavior of HTTP, including
header parsing and accessors for other standard parts of the
environment.


%prep
%setup -q -n %{tarname}-%{version}

# Disable performance_test, which requires repoze.profile, which isn't
# in Fedora.
%{__rm} -f tests/performance_test.py
# Remove an empty unneeded file that is there for scm purposes.
rm docs/_static/.empty

%build
%py3_build

%install
%py3_install

%files -n python3-webob
%license docs/license.txt
%doc docs/*
%{python3_sitelib}/webob/
%{python3_sitelib}/WebOb-%{version}-py%{python3_version}.egg-info

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 561 |14mt|python-webtest-3.0.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global with_tests 0

Name:           python-webtest
Version:	3.0.1
Release:	1
Summary:        Helper to test WSGI applications
Group:		Development/Python
License:        MIT
URL:            https://github.com/Pylons/webtest
Source0:        https://github.com/Pylons/webtest/archive/%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-nose

%if 0%{?with_tests}
BuildRequires:  python3-beautifulsoup4
BuildRequires:  python3-paste-deploy
BuildRequires:  python3-pyquery
BuildRequires:  python3-six
BuildRequires:  python3-waitress
BuildRequires:  python3-webob
BuildRequires:  python3-WSGIProxy2
BuildRequires:  python3-pylons-sphinx-themes
%endif

%global _description\
WebTest wraps any WSGI application and makes it easy to send test\
requests to that application, without starting up an HTTP server.\
\
This provides convenient full-stack testing of applications written\
with any WSGI-compatible framework.

%description %_description

%package -n python3-webtest
Summary:        Helper to test WSGI applications

Requires:       python3-beautifulsoup4
Requires:       python3-six
Requires:       python3-waitress
Requires:       python3-webob

%description -n python3-webtest
WebTest wraps any WSGI application and makes it easy to send test
requests to that application, without starting up an HTTP server.

This provides convenient full-stack testing of applications written
with any WSGI-compatible framework.


%prep
%setup -q -n webtest-%{version}

# Remove bundled egg info if it exists.
rm -rf *.egg-info

find tests -type f -exec sed -i "s|import mock|from unittest import mock|" {} \;

%build
%py3_build
# remove files not needed in documentation
rm -f docs/Makefile docs/conf.py docs/changelog.rst
cp -a CHANGELOG.rst docs/

%install
%{__rm} -rf %{buildroot}
%py3_install


%if 0%{?with_tests}
%check
PYTHONPATH=$(pwd) nosetests-%{python3_version}
%endif

%files -n python3-webtest
%doc docs/*
%{python3_sitelib}/webtest
%{python3_sitelib}/*.egg-info

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 562 |14mt|python-wheel-0.44.0-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name	wheel
%bcond_with	tests

Name:		python-%{pypi_name}
Version:	0.44.0
Release:	2
Summary:	A built-package format for Python
Group:		Development/Python
License:	MIT
URL:		https://github.com/pypa/wheel
Source0:        https://github.com/pypa/%{pypi_name}/archive/%{version}.tar.gz?/%{pypi_name}-%{version}.tar.gz
BuildArch:	noarch

BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-flit-core
BuildRequires:	python3-pip
BuildRequires:	pyproject-rpm-macros

%description
A built-package format for Python.

A wheel is a ZIP-format archive with a specially formatted filename and the
.whl extension. It is designed to contain all the files for a PEP 376
compatible install in a way that is very close to the on-disk format.

#--------------------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        A built-package format for Python
Group:          Development/Python

%description -n python3-%{pypi_name}
A built-package format for Python.

A wheel is a ZIP-format archive with a specially formatted filename and the
.whl extension. It is designed to contain all the files for a PEP 376
compatible install in a way that is very close to the on-disk format.

This is package contains Python 3 version of the package.

%files -n python3-%{pypi_name}
%doc LICENSE.txt README.rst
%{_bindir}/python3-wheel
%{_bindir}/wheel
%{python3_sitelib}/%{pypi_name}*
#--------------------------------------------------------------------------
%prep
%setup -q -n %{pypi_name}-%{version}

# for autoinstall BuildRequires
%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install

pushd %{buildroot}%{_bindir}
for f in $(ls); do cp $f python3-$f; done
popd

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 563 |14mt|python-yaml-6.0.3-2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name pyyaml
%define debug_package %{nil}
%define oname yaml

Name:           python-%{oname}
Version:        6.0.3
Release:        2
Summary:        Python package implementing YAML parser and emitter
License:        MIT
Group:          Development/Python
URL:            http://pyyaml.org/
Source0:        %{pypi_source}
BuildRequires:  pkgconfig(yaml-0.1)
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3-setuptools
BuildRequires:  python3-wheel
BuildRequires:  python3-cython

%description
PyYAML is a YAML parser and emitter for the Python programming
language.

YAML is a data serialization format designed for human readability
and interaction with scripting languages.

# ------------------------------------------------------------------

%package -n python3-%{oname}
Summary:        YAML parser and emitter for Python 3
Group:          Development/Python
Provides:       python3-pyyaml = %{EVRD}
Provides:       python3-%{pypi_name} = %{EVRD}
Provides:       python-yaml = %{EVRD}
Provides:       python3-PyYAML = %{EVRD}
Obsoletes:      %{mklibname python3-%{oname} -d} < 5.4.1

%description -n python3-%{oname}
PyYAML is a YAML parser and emitter for the Python programming
language.

YAML is a data serialization format designed for human readability
and interaction with scripting languages.

%files -n python3-%{oname} -f %{pyproject_files}
%doc CHANGES README.md examples

# ------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files yaml _yaml

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 564 |14mt|python-yamlloader-1.4.1-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%global pypi_name yamlloader

Summary:	Ordered YAML loader and dumper for PyYAML
Name:		python-%{pypi_name}
Version:	1.4.1
Release:	1
License:	MIT
Group:		Development/Python
Url:		https://github.com/Phynix/yamlloader
Source0:	%{pypi_source}
BuildRequires:	pyproject-rpm-macros
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-hypothesis
BuildArch:	noarch

%description
This module provides loaders and dumpers for PyYAML. Currently, an
OrderedDict loader/dumper is implemented, allowing to keep items order
when loading resp. dumping a file from/to an OrderedDict (Python 3.7+:
Also  regular dicts are supported and are the default items to be loaded
to. As of Python 3.7 preservation of insertion order is a language feature
of regular dicts.)

This project was originally mirrored from yamlordereddict Many thanks to
the original author François Ménabé! The library contains several
improvements including automated testing and the much faster C-versions
of the Loaders/Dumpers.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Ordered YAML loader and dumper for PyYAML
Group:		Development/Python

%description -n python3-%{pypi_name}
This module provides loaders and dumpers for PyYAML. Currently, an
OrderedDict loader/dumper is implemented, allowing to keep items order
when loading resp. dumping a file from/to an OrderedDict (Python 3.7+:
Also  regular dicts are supported and are the default items to be loaded
to. As of Python 3.7 preservation of insertion order is a language feature
of regular dicts.)

This project was originally mirrored from yamlordereddict Many thanks to
the original author François Ménabé! The library contains several
improvements including automated testing and the much faster C-versions
of the Loaders/Dumpers.

%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/yamlloader
%{python3_sitelib}/yamlloader-*.dist-info

#----------------------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 565 |14mt|python-yubico-1.3.3-4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define pypi_name	yubico

Summary:	Pure-python library for interacting with Yubikeys
Name:		python-%{pypi_name}
Version:	1.3.3
Release:	4
License:	BSD
Group:		Development/Python
Url:		https://github.com/Yubico/python-yubico
Source0:	https://github.com/Yubico/python-yubico/archive/%{name}-%{version}.tar.gz
Patch0:		yubico-python38-warning.patch
BuildRequires:	python3-setuptools
BuildRequires:	pkgconfig(python3)
BuildArch:	noarch

%description
Pure-python library for interacting with Yubikeys

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	Pure-python3 library for interacting with Yubikeys
Group:		Development/Python
BuildArch:	noarch
Requires:	python3dist(pyusb)

%description -n	python3-%{pypi_name}
Pure-python3 library for interacting with Yubikeys

%files -n python3-%{pypi_name}
%doc COPYING NEWS README
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/python_%{pypi_name}-%{version}-*

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{name}-%{name}-%{version}
sed -i 's|setup_requires=|tests_require=|' setup.py

%build

%install
PYTHONDONTWRITEBYTECODE=1 %{__python3} setup.py install --root=%{buildroot}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 566 |14mt|python-zipp-3.20.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%define _python_no_extras_requires 1

%global pypi_name zipp

%bcond_with docs

Name:           python-%{pypi_name}
Version:	3.20.2
Release:	1
Summary:        Backport of pathlib-compatible object wrapper for zip files
Group:          Development/Python
License:        MIT
URL:            https://github.com/jaraco/zipp
Source0:	%{pypi_source}
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3dist(toml)
%if %{with docs}
BuildRequires:  python3dist(jaraco.packaging)
BuildRequires:  python3dist(rst.linker)
BuildRequires:  python3dist(sphinx)
%endif

%description
A pathlib-compatible Zipfile object wrapper. A backport of the Path object.

#------------------------------------------------------------
%package -n     python3-%{pypi_name}
Summary:        %{summary}
Group:          Development/Python
Requires:       python3dist(pathlib2)

%description -n python3-%{pypi_name}
A pathlib-compatible Zipfile object wrapper. A backport of the Path object.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst

#------------------------------------------------------------

%if %{with docs}
%package -n python-%{pypi_name}-doc
Summary:        zipp documentation
Group:          Documentation

%description -n python-%{pypi_name}-doc
Documentation for zipp

%files -n python-%{pypi_name}-doc
%doc html
%license LICENSE

%endif
#------------------------------------------------------------

%prep
%autosetup -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%if %{with docs}
# generate html docs
PYTHONPATH=${PWD} sphinx-build docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%endif

%install
%pyproject_install
%pyproject_save_files %{pypi_name}


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 567 |14mt|rpm-6.1.0-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Get rid of any -gnu/-gnueabi suffix for platform names
# to get traditional directory names
%ifarch x86_64
%define _target_platform x86_64-%{_vendor}-linux
%else
%ifarch aarch64
%define _target_platform aarch64-%{_vendor}-linux
%else
%define _target_platform %{_target_cpu}-%{_vendor}-linux
%endif
%endif

%if %{__isa_bits} == 64
%define _lib lib64
%else
%define _lib lib
%endif

%define _prefix /usr
%define _libdir %{_prefix}/%{_lib}
%define _libexecdir %{_prefix}/libexec
%define _bindir %{_prefix}/bin
%define _sysconfdir /etc
%define _datadir /usr/share
%define _defaultdocdir %{_datadir}/doc
%define _localstatedir /var
%define _infodir %{_datadir}/info
%define _sharedstatedir %{_localstatedir}/lib

%define _real_vendor rosa

# If they aren't provided by a system installed macro, define them
%{!?__python3: %global __python3 /usr/bin/python3}

%{!?python3_sitearch: %global python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

%define _python_bytecompile_errors_terminate_build 1

%define __find_requires %{rpmhome}/%{_real_vendor}/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}}
%define __find_provides %{rpmhome}/%{_real_vendor}/find-provides

# run internal testsuite?
## TODO: Enable by default once hack patches are removed
%bcond_with check
# build with plugins?
%bcond_without plugins
# build with new db format
%bcond_with ndb
# build with openmp support?
# error: liblzma: Memory allocation failed
# on abf builds
# need to investigate
%bcond_without openmp
# Build with libimavm to support rpmsign --signfiles
# Note that libemaevm (ima-evm-utils) is built with LibreSSL
%bcond_without imaevm
# build with fsverity support?
%bcond_without fsverity
# To help bootstrap new python3: python3-pkg-resources requires
# python3-appdirs, rpm-build requires python3-pkg-resources,
# but python3-appdirs cannot be built with new python without rpm-build;
# rpmlint requires python3-rpm
%bcond_without python_dep

# Define directory which holds rpm config files, and some binaries actually
# NOTE: it remains */lib even on lib64 platforms as only one version
#       of rpm is supported anyway, per architecture
%define rpmhome /usr/lib/rpm

%global libmajor	10
%global librpmname      %mklibname rpm  %{libmajor}
%global librpmnamedevel %mklibname -d rpm
%global librpmsign      %mklibname rpmsign %{libmajor}
%global librpmbuild     %mklibname rpmbuild %{libmajor}
%global librpmio     	%mklibname rpmio %{libmajor}

Summary:	The RPM package management system
Name:		rpm
Epoch:		3
Version:        6.1.0
Release:	1
# Partially GPL/LGPL dual-licensed and some bits with BSD
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
License:	GPLv2+
Group:		System/Configuration/Packaging
Url:		http://www.rpm.org/
# git tree with patches: https://github.com/mikhailnov/rpm/commits/rosa-v4.17.0
Source0:	https://github.com/rpm-software-management/rpm/releases/download/%{name}-%{version}-release/%{name}-%{version}.tar.bz2
# extracted from http://pkgs.fedoraproject.org/cgit/redhat-rpm-config.git/plain/macros:
Source2:	macros.filter
Source3:	rpm.rpmlintrc
Source10:	rpmdb-rebuild.service
Patch:		0002-disable-the-systemd-inhibit-plugin-when-systemd-logi.patch
Patch:		0003-Add-macro-to-install-files-with-macros.patch
Patch:		0004-Macros-to-recognize-RPM-derivative.patch
Patch:		0006-ROSA-fix-KF5_HTML-directory.patch
Patch:		0010-make-geode-appear-as-i686-rhbz-517475.patch
Patch:		0012-Prohibit-badly-commented-define.patch
Patch:		0016-HACK-don-t-exclude-docs-from-generators-to-fix-Perl-.patch
Patch:		0017-no-doc-conflicts.patch
Patch:		0019-bb-shortcircuit.patch
Patch:		0020-rpmqv-ghost.patch
Patch:		0021-Compatibility-with-find_lang-all-name-with-qt-from-R.patch
Patch:		0022-Add-optional-tag.patch

# fedora
Patch:		https://src.fedoraproject.org/rpms/rpm/raw/rawhide/f/rpm-6.0-rpmformat.patch
Patch:		https://src.fedoraproject.org/rpms/rpm/raw/rawhide/f/rpm-4.9.90-no-man-dirs.patch


BuildRequires:	bison
BuildRequires:	git-core
BuildRequires:	pkgconfig(rpm-sequoia)
BuildRequires:	pkgconfig(zlib)
BuildRequires:	bzip2-devel
BuildRequires:	dbus-devel
BuildRequires:	pkgconfig(liblzma) >= 5
BuildRequires:	pkgconfig(libzstd)
BuildRequires:	pkgconfig(libmagic)
BuildRequires:	doxygen
BuildRequires:	pkgconfig(libelf)
BuildRequires:	binutils-devel
BuildRequires:	gettext-devel
BuildRequires:	pkgconfig(neon)
BuildRequires:	pkgconfig(popt)
BuildRequires:	rpm-rosa-setup-build
BuildRequires:	readline-devel
BuildRequires:	pkgconfig(ncurses)
BuildRequires:	pkgconfig(libgcrypt)
BuildRequires:	pkgconfig(lua) >= 5.3
BuildRequires:	pkgconfig(libcap)
BuildRequires:	pkgconfig(openssl)
BuildRequires:	acl-devel
BuildRequires:	scdoc
BuildRequires:	pkgconfig(libarchive) >= 3.3.3
BuildRequires:	pkgconfig(python3)
BuildRequires:	pkgconfig(sqlite3)
%if %{with check}
# for testsuite:
BuildRequires:	eatmydata
BuildRequires:	fakechroot
BuildRequires:	gnupg2
%endif
%if %{with imaevm}
BuildRequires:	%mklibname imaevm -d
%endif
%if %{with fsverity}
BuildRequires:	pkgconfig(libfsverity)
%endif
%if %{with openmp}
BuildRequires:	gomp-devel
%endif

Requires:	bzip2
Requires:	xz
Requires:	zstd
Requires:	cpio
Requires:	gawk
Requires:	coreutils
Requires:	setup
Requires:	rpm-rosa-setup
# Do not rely on AutoReq here
# https://forum.rosa.ru/viewtopic.php?p=124466
Requires:	%{librpmname} = %{EVRD}
Requires:	%{librpmio} = %{EVRD}
# Install useful plugins by default
# dbus announce plugin seems to be useless by default
Recommends:	rpm-plugin-audit
Recommends:	rpm-plugin-syslog
%{?with_imaevm:Recommends: rpm-plugin-ima}
Recommends:	rpm-plugin-systemd-inhibit
# If selinux-policy is removed (e.g. after orphaning when is not really needed)
# then removing any RPM package fails because SELinux is active, policy is loaded
# but is not available on disk. It looks more like a feature, not a bug.
Recommends:	(rpm-plugin-selinux if selinux-policy)
Recommends:	(rpm-plugin-fapolicyd if fapolicyd)
# Out-of-tree plugin, we use it to improve user experience with third-party
# proprietary packages and fix our mistakes in broken %%preun scriptlets
# kb#630
Recommends:	rpm-plugin-rotozei

%description
The RPM Package Manager (RPM) is a powerful command line driven
package management system capable of installing, uninstalling,
verifying, querying, and updating software packages.  Each software
package consists of an archive of files along with information about
the package like its version, a description, etc.

%package -n %{librpmname}
Summary:	Libraries for manipulating RPM packages
Group:		System/Libraries
License:	GPLv2+ and LGPLv2+ with exceptions
Provides:	librpm = %{EVRD}
Provides:	rpm-libs = %{EVRD}

%description -n %{librpmname}
This package contains the RPM shared library.

%package -n %{librpmio}
Summary:	Libraries for manipulating RPM packages
Group:		System/Libraries
License:	GPLv2+ and LGPLv2+ with exceptions
# librpmio.so was in librpmname
Conflicts:	%{librpmname} < 2:4.17.0-14

%description -n %{librpmio}
This package contains the RPM IO library.

%package -n %{librpmbuild}
Summary:	Libraries for building and signing RPM packages
Group:		System/Libraries
License:	GPLv2+ and LGPLv2+ with exceptions
Obsoletes:	rpm-build-libs < %{EVRD}
Provides:	rpm-build-libs = %{EVRD}

%description -n %{librpmbuild}
This package contains the RPM shared libraries for building and signing
packages.

%package -n %{librpmnamedevel}
Summary:	Development files for applications which will manipulate RPM packages
Group:		Development/C
License:	GPLv2+ and LGPLv2+ with exceptions
Requires:	rpm = %{EVRD}
Provides:	librpm-devel = %{EVRD}
Provides:	rpm-devel = %{EVRD}
Requires:	pkgconfig(popt)
Requires:	%{librpmname} = %{EVRD}
Requires:	%{librpmio} = %{EVRD}
Requires:	%{librpmbuild} = %{EVRD}
Requires:	%{librpmsign} = %{EVRD}

%description -n %{librpmnamedevel}
This package contains the RPM C library and header files.  These
development files will simplify the process of writing programs that
manipulate RPM packages and databases. These files are intended to
simplify the process of creating graphical package managers or any
other tools that need an intimate knowledge of RPM packages in order
to function.

This package should be installed if you want to develop programs that
will manipulate RPM packages and databases.

%package  -n %{librpmsign}
Summary:	Libraries for building and signing RPM packages
Group:		System/Libraries
License:	GPLv2+ and LGPLv2+ with exceptions

%description -n %{librpmsign}
This package contains the RPM shared libraries for building and signing
packages.

%package build
Summary:	Scripts and executable programs used to build packages
Group:		System/Configuration/Packaging
Requires:	autoconf
Requires:	automake
Requires:	gcc
Requires:	file
Requires:	libtool-base
Requires:	patch
Requires:	diffutils
Requires:	make
Requires:	tar
Requires:	unzip
Requires:	elfutils
Requires:	rpm = %{EVRD}
Requires:	rpm-rosa-setup-build
Requires:	%{librpmbuild} = %{EVRD}
# For pythondistdeps generator
%if %{with python_dep}
Requires:	rpmlint
Requires:	rpmlint-rosa-policy
%endif
Requires:	dwz
Requires:	debugedit
Requires:	spec-helper >= 0.31.12
Requires:	pkgconfig
Requires:	go-srpm-macros
Requires:	qml-rpm-generators
Requires:	efi-srpm-macros
Requires:	python3-rpm-macros
Requires:	devel-rpm-generators
Requires:	cmake-rpm-generators
Requires:	order-rpm-generators
Requires:	pam-rpm-generators
Requires:	rpm-helper
Conflicts:	rpm-build < %{EVRD}

%description build
The rpm-build package contains the scripts and executable programs
that are used to build packages using the RPM Package Manager.

%package sign
Summary:	Package signing support
Group:		System/Base

%description sign
This package contains support for digitally signing RPM packages.

%package -n python3-%{name}
Summary:	Python 3 bindings for apps which will manipulate RPM packages
Group:		Development/Python
Requires:	rpm = %{EVRD}

%description -n python3-%{name}
The python3-rpm package contains a module that permits applications
written in the Python programming language to use the interface
supplied by RPM Package Manager libraries.

This package should be installed if you want to develop Python 3
programs that will manipulate RPM packages and databases.

%package apidocs
Summary:	API documentation for RPM libraries
Group:		Documentation
BuildArch:	noarch

%description apidocs
This package contains API documentation for developing applications
that will manipulate RPM packages and databases.

%package	cron
Summary:	Create daily logs of installed packages
Group:		System/Base
BuildArch:	noarch
Requires:	crontabs
Requires:	logrotate
Requires:	rpm = %{EVRD}

%description cron
This package contains a cron job which creates daily logs of installed
packages on a system.

%if %{with plugins}
%package plugin-audit
Summary:	Rpm plugin for logging audit events on package operations
Group:		System/Base
BuildRequires:	pkgconfig(audit)
Requires:	%{librpmname} = %{EVRD}

%description plugin-audit
Rpm plugin for libaudit support

%package plugin-dbus-announce
Summary:	Rpm plugin for announcing transactions on the DBUS
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-dbus-announce
The plugin announces basic information about rpm transactions to the
system DBUS - like packages installed or removed.  Other programs can
subscribe to the signals to get notified when packages on the system
change.

%package plugin-selinux
Summary:	Rpm plugin for SELinux functionality
Group:		System/Base
BuildRequires:	pkgconfig(libselinux)
Requires:	%{librpmname} = %{EVRD}

%description plugin-selinux
Rpm plugin for selinux support

%package plugin-syslog
Summary:	Rpm plugin for syslog functionality
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-syslog
This plugin exports RPM actions to the system log.

%package plugin-systemd-inhibit
Summary:	Rpm plugin for systemd inhibit functionality
Group:		System/Base
BuildRequires:	pkgconfig(dbus-1)
Requires:	%{librpmname} = %{EVRD}

%description plugin-systemd-inhibit
This plugin blocks systemd from entering idle, sleep or shutdown while an rpm
transaction is running using the systemd-inhibit mechanism.

%if %{with imaevm}
%package plugin-ima
Summary:	Rpm plugin for IMA file signatures
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-ima
This plugin adds support for enforcing and verifying IMA file signatures
in an rpm.
%endif

%package plugin-fapolicyd
Summary:	Rpm plugin for fapolicyd support
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-fapolicyd
Rpm plugin for fapolicyd support.
See https://people.redhat.com/sgrubb/fapolicyd/ for information about
the fapolicyd daemon.

%if %{with fsverity}
%package plugin-fsverity
Summary:	Rpm plugin for fsverity file signatures
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-fsverity
%{summary}.
%endif

%package plugin-prioreset
Summary:	Rpm plugin for resetting scriptlet priorities for SysV init
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-prioreset
%{summary}

Useful on legacy SysV init systems if you run rpm transactions with
nice/ionice priorities. Should not be used on systemd systems.

%package plugin-unshare
Summary:	Rpm plugin for Linux namespace isolation functionality
Group:		System/Base
Requires:	%{librpmname} = %{EVRD}

%description plugin-unshare
This plugin adds support for Linux namespace isolation functionality.

%endif

%prep
%autosetup -S git_am -n %{name}-%{version} -p1

# still use legacy verify
sed -i -e "s:%%_pkgverify_level all:%%_pkgverify_level digest:g" macros.in

%build
%set_build_flags
export CMAKE_BUILD_DIR=BUILD
%cmake \
      -DCMAKE_INSTALL_PREFIX=%{_usr} \
      -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_var}/lib \
      -DWITH_SEQUOIA:BOOL=ON \
      -DWITH_SELINUX:BOOL=ON \
      -DENABLE_SQLITE=ON \
      -DENABLE_PLUGINS=ON \
      %{?with_fsverity:-DWITH_FSVERITY=ON} \
      %{?with_imaevm:-DWITH_IMAEVM=ON} \
      %{!?with_openmp:-DENABLE_OPENMP=OFF} \
      -DENABLE_TESTSUITE=OFF \
      -DWITH_DOXYGEN=ON \
      -DRPM_VENDOR=%{_vendor}

%make_build

%install
%make_install -C BUILD
mkdir -p %{buildroot}%{_unitdir}
install -m 644 %{SOURCE10} %{buildroot}/%{_unitdir}

# Save list of packages through cron
mkdir -p %{buildroot}%{_sysconfdir}/cron.daily
install -m 755 scripts/rpm.daily %{buildroot}%{_sysconfdir}/cron.daily/rpm

mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
install -m 644 scripts/rpm.log %{buildroot}%{_sysconfdir}/logrotate.d/rpm

mkdir -p %{buildroot}/usr/lib/sysimage/rpm
# keep the legacy db directory for %ghost'ing and smooth updates
mkdir -p %{buildroot}/var/lib/rpm

cd BUILD

# init an empty database for %ghost'ing for all supported backends
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH
for be in sqlite; do
    mkdir ${be}
    tools/rpmdb --rcfile rpmrc --define "_db_backend ${be}" --dbpath=${PWD}/${be} --initdb
    cp -va ${be}/. %{buildroot}/usr/lib/sysimage/rpm/
done

# some packages invoke find-debuginfo directly, preserve compat for now
ln -s ../../bin/find-debuginfo %{buildroot}/usr/lib/rpm/find-debuginfo.sh

cd ..
%find_lang rpm

# These live in perl-generators and python-rpm-generators now
rm -f %{buildroot}/%{rpmhome}/{perldeps.pl,perl.*,pythond*}
rm -f %{buildroot}/%{_fileattrsdir}/{perl*,python*}
rm -rf %{buildroot}/var/tmp

%if %{with check}
%check
# https://github.com/rpm-software-management/rpm/issues/741
eatmydata make check || (cat tests/rpmtests.log; exit 0)
%endif

%posttrans
# Plan conversion of BerkleyDB into SQlite if BerkleyDB exists
if [ -f /var/lib/rpm/Packages ]; then
	touch /var/lib/rpm/.rebuilddb
fi

%triggerun -- rpm < 2:4.17
# Handle rpmdb rebuild service on erasure of old to avoid ordering issues
# https://pagure.io/fesco/issue/2382
if [ -x /usr/bin/systemctl ]; then
	systemctl --no-reload enable rpmdb-rebuild.service ||:
fi

%define rpmattr %attr(0755,root,root)

%files -f %{name}.lang
%license COPYING
%doc %{_defaultdocdir}/rpm/CONTRIBUTING.md
%doc %{_defaultdocdir}/rpm/COPYING
%doc %{_defaultdocdir}/rpm/CREDITS
%doc %{_defaultdocdir}/rpm/INSTALL
%doc %{_defaultdocdir}/rpm/README
%doc %{_defaultdocdir}/rpm/[a-z]*.md
%attr(0755,root,root) %{_bindir}/rpm
%{_bindir}/rpm2cpio
%attr(0755,root,root) %{_bindir}/rpm2archive
%attr(0755,root,root) %{_bindir}/rpmdb
%attr(0755,root,root) %{_bindir}/rpmkeys
%attr(0755,root,root) %{_bindir}/rpmsort
%{_bindir}/rpmquery
%{_bindir}/rpmverify

%dir %{rpmhome}
%dir /etc/rpm
%attr(0755,root,root) %{rpmhome}/rpmdb_*
%attr(0644,root,root) %{rpmhome}/macros
%exclude %{rpmhome}/macros.d/macros.transaction*
%{rpmhome}/macros.d
%dir %{rpmhome}/lua
%attr(0644,root,root) %{rpmhome}/rpmpopt*
%attr(0644,root,root) %{rpmhome}/rpmrc
%attr(0755,root,root) %{rpmhome}/script.req
%attr(0755,root,root) %{rpmhome}/rpm.daily
%attr(0644,root,root) %{rpmhome}/rpm.log
%attr(0644,root,root) %{rpmhome}/rpm.supp
%attr(0755,root,root) %{rpmhome}/sysusers.sh

%rpmattr %{rpmhome}/rpm2cpio.sh
%rpmattr %{rpmhome}/tgpg

%dir %{rpmhome}/fileattrs
%{rpmhome}/platform/

%if %{with plugins}
%dir %{_libdir}/rpm-plugins
%{_mandir}/man8/rpm-plugins.8*
%endif

%{_mandir}/man1/rpm2archive.1*
%{_mandir}/man1/rpm2cpio.1*
%{_mandir}/man1/rpmsort.1*
%{_mandir}/man5/rpm-config.5*
%{_mandir}/man5/rpm-macrofile.5*
%{_mandir}/man5/rpm-manifest.5*
%{_mandir}/man5/rpm-rpmrc.5*
%{_mandir}/man7/rpm-design.7*
%{_mandir}/man7/rpm-lua.7*
%{_mandir}/man7/rpm-macros.7*
%{_mandir}/man7/rpm-payloadflags.7*
%{_mandir}/man7/rpm-queryformat.7*
%{_mandir}/man7/rpm-version.7*
%{_mandir}/man8/rpm.8*
%{_mandir}/man8/rpmdb.8*
%{_mandir}/man8/rpmkeys.8*
%{_mandir}/man8/rpm-common.8*

%attr(0755, root, root) %dir /var/lib/rpm
%attr(0644, root, root) %ghost %config(missingok,noreplace) /var/lib/rpm/*
%attr(0644, root, root) %ghost /var/lib/rpm/.*.lock
%attr(0755, root, root) %dir /usr/lib/sysimage/rpm
%attr(0644, root, root) %ghost %config(missingok,noreplace) /usr/lib/sysimage/rpm/*
%attr(0644, root, root) %ghost /usr/lib/sysimage/rpm/.*.lock
%{_unitdir}/rpmdb-rebuild.service

%files -n %librpmname
%{_libdir}/librpm.so.%{libmajor}
%{_libdir}/librpm.so.%{libmajor}.*

%files -n %{librpmio}
%{_libdir}/librpmio.so.%{libmajor}
%{_libdir}/librpmio.so.%{libmajor}.*

%if %{with plugins}
%files plugin-audit
%{rpmhome}/macros.d/macros.transaction_audit
%{_libdir}/rpm-plugins/audit.so
%{_mandir}/man8/rpm-plugin-audit.8*

%files plugin-dbus-announce
%{rpmhome}/macros.d/macros.transaction_dbus_announce
%{_libdir}/rpm-plugins/dbus_announce.so
%{_mandir}/man8/rpm-plugin-dbus-announce.8*
%{_datadir}/dbus-1/system.d/org.rpm.conf

%files plugin-selinux
%{rpmhome}/macros.d/macros.transaction_selinux
%{_libdir}/rpm-plugins/selinux.so
%{_mandir}/man8/rpm-plugin-selinux.8*

%files plugin-syslog
%{rpmhome}/macros.d/macros.transaction_syslog
%{_libdir}/rpm-plugins/syslog.so
%{_mandir}/man8/rpm-plugin-syslog.8*

%files plugin-systemd-inhibit
%{rpmhome}/macros.d/macros.transaction_systemd_inhibit
%{_libdir}/rpm-plugins/systemd_inhibit.so
%{_mandir}/man8/rpm-plugin-systemd-inhibit.8*

%if %{with imaevm}
%files plugin-ima
%{rpmhome}/macros.d/macros.transaction_ima
%{_libdir}/rpm-plugins/ima.so
%{_mandir}/man8/rpm-plugin-ima.8*
%endif

%files plugin-fapolicyd
%{rpmhome}/macros.d/macros.transaction_fapolicyd
%{_libdir}/rpm-plugins/fapolicyd.so
%{_mandir}/man8/rpm-plugin-fapolicyd.8*

%if %{with fsverity}
%files plugin-fsverity
%{rpmhome}/macros.d/macros.transaction_fsverity
%{_libdir}/rpm-plugins/fsverity.so
%endif

%files plugin-prioreset
%{rpmhome}/macros.d/macros.transaction_prioreset
%{_libdir}/rpm-plugins/prioreset.so
%{_mandir}/man8/rpm-plugin-prioreset.8*

%files plugin-unshare
%{rpmhome}/macros.d/macros.transaction_unshare
%{_libdir}/rpm-plugins/unshare.so
%{_mandir}/man8/rpm-plugin-unshare.8*
%endif

%files -n %librpmbuild
%{_libdir}/librpmbuild.so.%{libmajor}
%{_libdir}/librpmbuild.so.%{libmajor}.*

%files -n %librpmsign
%{_libdir}/librpmsign.so.%{libmajor}
%{_libdir}/librpmsign.so.%{libmajor}.*

%files build
%rpmattr %{_bindir}/rpmbuild
%rpmattr %{_bindir}/gendiff
%rpmattr %{_bindir}/rpmspec
%rpmattr %{_bindir}/rpmlua
%rpmattr %{_bindir}/rpmuncompress
%rpmattr %{_bindir}/rpm-setup-autosign
%rpmattr %{_prefix}/lib/rpm/brp-*
%rpmattr %{_prefix}/lib/rpm/check-files
%rpmattr %{_prefix}/lib/rpm/*.prov
# compat symlink to /usr/bin/find-debuginfo from debugedit
%{_prefix}/lib/rpm/find-debuginfo.sh
%rpmattr %{_prefix}/lib/rpm/find-lang.sh
%rpmattr %{_prefix}/lib/rpm/find-provides
%rpmattr %{_prefix}/lib/rpm/find-requires
%rpmattr %{_prefix}/lib/rpm/ocamldeps.sh
%rpmattr %{_prefix}/lib/rpm/pkgconfigdeps.sh
%rpmattr %{_prefix}/lib/rpm/rpm_macros_provides.sh
%rpmattr %{_prefix}/lib/rpm/elfdeps
%rpmattr %{_prefix}/lib/rpm/rpmdeps
%rpmattr %{_prefix}/lib/rpm/rpmdump
%{_prefix}/lib/rpm/rpmuncompress
%{_prefix}/lib/rpm/rpm-setup-autosign
%rpmattr %{_prefix}/lib/rpm/check-buildroot
%rpmattr %{_prefix}/lib/rpm/check-prereqs
%rpmattr %{_prefix}/lib/rpm/check-rpaths
%rpmattr %{_prefix}/lib/rpm/check-rpaths-worker
%{rpmhome}/fileattrs/*

%{_mandir}/man1/elfdeps.1*
%{_mandir}/man1/gendiff.1*
%{_mandir}/man1/rpmbuild.1*
%{_mandir}/man1/rpmdeps.1*
%{_mandir}/man1/rpmspec.1*
%{_mandir}/man1/rpmlua.1*
%{_mandir}/man1/rpm-setup-autosign.1*
%{_mandir}/man1/rpmuncompress.1*
%{_mandir}/man5/rpmbuild-config.5*
%{_mandir}/man7/rpm-dependency-generators.7*
%{_mandir}/man7/rpm-scriptlets.7*
%{_mandir}/man7/rpm-sysusers.7*

%files sign
%{_bindir}/rpmsign
%{_mandir}/man1/rpmsign.1*

%files -n python3-%{name}
%{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-%{version}*.egg-info
%doc %{_defaultdocdir}/rpm/examples/

%files -n %librpmnamedevel
%{_bindir}/rpmgraph
%{_libdir}/librp*[a-z].so
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/cmake/rpm/
%{_includedir}/%{name}/
%{_mandir}/man1/rpmgraph.1*

%files apidocs
%license COPYING
%doc %{_defaultdocdir}/rpm/API/

%files cron
%config(noreplace) /etc/cron.daily/rpm
%config(noreplace) /etc/logrotate.d/rpm

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 568 |14mt|rpm-rosa-setup-1.2-1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Don't create backups, cp -a user/* build/* is used
%global _default_patch_flags -s -U --no-backup-if-mismatch

# For transitioning from rpm5
# Initial bootstrap of rpm4 with rpm5
%{!?_rpmconfigdir: %global _rpmconfigdir /usr/lib/rpm}
%{!?_rpmluadir: %global _rpmluadir %{_rpmconfigdir}/lua}

# rpmlint depends from python modules, help bootstrap new python3.x
%bcond_without python_dep

%bcond_with bootstrap

Summary:	Macros and scripts for rosa specific rpm behavior
Name:		rpm-rosa-setup
Version:	1.2
Release:	1

License:	MIT
Group:		System/Configuration/Packaging
Url:		https://gitea.rosa.ru/software/rpm-rosa-setup
Source0:	https://gitea.rosa.ru/software/rpm-rosa-setup/archive/%{version}.tar.gz
# Forge handling macros
# (From: https://src.fedoraproject.org/rpms/redhat-rpm-config/tree):
Source8:	forge.lua
Source9:	macros.forge
Source10:	common.lua
# Perl macros
# (Pulled out from rpm 4.14.x before dropped in rpm 4.15)
Source11:	macros.perldirs
# needed for golang stuff
Source12:	macros.fedora-misc
BuildRequires:	git-core
Requires:	rpm
# Packaged was renamed from rpm-openmandriva-setup
# (tpg) do not use %%EVRD here, as it does not exist yet
Provides:	rpm-openmandriva-setup = %{version}-%{release}
Conflicts:	rpm-openmandriva-setup < 1.0
Obsoletes:	rpm-openmandriva-setup < 1.0
BuildArch:	noarch

%description
Macros and scripts for rosa specific rpm behavior.

This has been adapted for ROSA Linux systems.

%files
# We should own this directory
%dir %{_rpmconfigdir}/rosa
%{_rpmconfigdir}/rosa/macros
%{_rpmconfigdir}/rosa/rpmrc

#----------------------------------------------------------------------------

%package build
Summary:	Macros and scripts for rosa specific rpmbuild behavior
Group:		System/Configuration/Packaging
Requires:	%{name} = %{version}-%{release}
# Required for package builds to work
Requires:	binutils
Requires:	dwz
Requires:	gdb
Requires:	rpm-build
%if %{with python_dep}
Requires:	rpmlint
Requires:	rpmlint-rosa-policy
%endif
Requires:	spec-helper
Provides:	rpm-openmandriva-setup-build = %{version}-%{release}
Conflicts:	rpm-openmandriva-setup-build < 1.0
Obsoletes:	rpm-openmandriva-setup-build < 1.0

%description build
Macros and scripts for rosa specific rpmbuild behavior.

This has been adapted for ROSA Linux systems.

%files build
%{_rpmluadir}/fedora/common.lua
%{_rpmluadir}/fedora/srpm/forge.lua
%{_rpmmacrodir}/macros.buildsys.autotools
%{_rpmmacrodir}/macros.dwz
%{_rpmmacrodir}/macros.fedora-misc
%{_rpmmacrodir}/macros.forge
%{_rpmmacrodir}/macros.kernel
%{_rpmmacrodir}/macros.libpackage
%{_rpmmacrodir}/macros.perl
%{_rpmmacrodir}/macros.perldirs
%{_rpmmacrodir}/macros.python
%{_rpmmacrodir}/macros.selinux
%{_rpmconfigdir}/rosa/kmod-deps.sh
%{_fileattrsdir}/kmod.attr

#----------------------------------------------------------------------------

%prep
%autosetup -S git_am -n rpm-rosa-setup

%build

%install
mkdir -p %{buildroot}%{_rpmconfigdir}
cp -a user/* build/* %{buildroot}%{_rpmconfigdir}

%install_macro forge %{SOURCE9}
%install_macro fedora-misc %{SOURCE12}
mkdir -p %{buildroot}%{_rpmluadir}/fedora/srpm
install -D %{SOURCE10} %{buildroot}%{_rpmluadir}/fedora
install -D %{SOURCE8} %{buildroot}%{_rpmluadir}/fedora/srpm
%install_macro perldirs %{SOURCE11}

%if %{without python_dep}
# do not call rpmlint which requires python3-rpm when bootstrapping new python3.x
sed -i'' %{buildroot}%{_rpmconfigdir}/rosa/macros -e 's,/bin/rpmlint,/bin/true,g'
%endif

%if %{with bootstrap}
# This will be enabled at some point - for bootstrap, let it pass since many
# packages aren't ready for rpmlint 2.6 yet
sed -i "s/\(_nonzero_exit_pkgcheck_terminate_build\).*/\1 0/" %{buildroot}%{_rpmconfigdir}/rosa/macros
%else
sed -i "s/\(_nonzero_exit_pkgcheck_terminate_build\).*/\1 1/" %{buildroot}%{_rpmconfigdir}/rosa/macros
%endif
