diff --git a/htmlmin-0.1.13.tar.gz b/htmlmin-0.1.13.tar.gz new file mode 100644 index 0000000..63a80ae Binary files /dev/null and b/htmlmin-0.1.13.tar.gz differ diff --git a/python-htmlmin2.spec b/python-htmlmin2.spec new file mode 100644 index 0000000..e2c4e7f --- /dev/null +++ b/python-htmlmin2.spec @@ -0,0 +1,78 @@ +%global pypi_name htmlmin2 +%global source_name htmlmin + +Name: python-%{pypi_name} +Version: 0.1.13 +Release: 1 +Summary: An HTML Minifier + +License: BSD +URL: https://github.com/wilhelmer/htmlmin +Source0: https://codeload.github.com/wilhelmer/htmlmin/tar.gz/refs/tags/v0.1.13/htmlmin-0.1.13.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-hatchling + + +%description +A configurable HTML Minifier with safety features. + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%package help +Summary: %{summary} +Provides: python3-%{pypi_name}-doc +%description help +Documentation for htmlmin + + +%description -n python3-%{pypi_name} +A configurable HTML Minifier with safety features. + +%package -n python-%{pypi_name}-doc +Summary: htmlmin documentation +%description -n python-%{pypi_name}-doc +Documentation for htmlmin + +%prep +%autosetup -n %{source_name}-%{version} + +%build +%pyproject_build + +%install +%pyproject_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/doclist.lst . + +%check +%{__python3} setup.py test + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst +%{_bindir}/htmlmin +%{python3_sitelib}/%{source_name}* + +%files help +%{_docdir}/* + +%changelog +* Fri Aug 25 2023 luolu12 - 0.1.13-1 +- Initial package.