2016-07-06 09:47:21 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-rjsmin
|
|
|
|
#
|
2020-03-09 09:46:34 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2016-07-06 09:47:21 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-05-15 18:53:36 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-07-06 09:47:21 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-11-15 18:26:56 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
%define mod_name rjsmin
|
2019-05-15 18:53:36 +00:00
|
|
|
%define release_sha 53a0848b2372c1b49c03326bc8209ea39e889c47
|
2020-04-20 09:44:20 +00:00
|
|
|
%bcond_without python2
|
2017-11-15 18:26:56 +00:00
|
|
|
Name: python-%{mod_name}
|
2019-05-15 18:53:36 +00:00
|
|
|
Version: 1.1.0
|
2016-07-06 09:47:21 +00:00
|
|
|
Release: 0
|
2019-06-03 08:03:16 +00:00
|
|
|
Summary: A JavaScript minifier written in Python
|
2016-07-06 09:47:21 +00:00
|
|
|
License: Apache-2.0
|
2019-05-15 18:53:36 +00:00
|
|
|
URL: http://opensource.perlig.de/rjsmin/
|
|
|
|
Source: https://github.com/ndparker/rjsmin/archive/%{release_sha}.tar.gz#/%{mod_name}-%{version}.tar.gz
|
2019-05-20 05:11:56 +00:00
|
|
|
# PATCH-FIX-OPENSUSE -- build without profiling
|
|
|
|
Patch0: reproducible.patch
|
2017-11-15 18:26:56 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
2019-05-15 18:53:36 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-11-15 18:26:56 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-05-15 18:53:36 +00:00
|
|
|
Obsoletes: %{name}-doc
|
2020-04-20 09:44:20 +00:00
|
|
|
%if %{with python2}
|
|
|
|
BuildRequires: python-mock
|
|
|
|
%endif
|
2017-11-15 18:26:56 +00:00
|
|
|
%python_subpackages
|
2016-07-06 09:47:21 +00:00
|
|
|
|
|
|
|
%description
|
2019-06-03 08:03:16 +00:00
|
|
|
rJSmin is a Javascript minifier written in Python.
|
2016-07-06 09:47:21 +00:00
|
|
|
|
|
|
|
The minifier is based on the semantics of jsmin.c by Douglas Crockford.
|
|
|
|
|
2019-06-03 08:03:16 +00:00
|
|
|
The module is a re-implementation targeting speed, so it can be used
|
2016-07-06 09:47:21 +00:00
|
|
|
at runtime (rather than during a preprocessing step).
|
|
|
|
|
|
|
|
%prep
|
2019-05-15 18:53:36 +00:00
|
|
|
%setup -q -n %{mod_name}-%{release_sha}
|
2019-05-20 05:11:56 +00:00
|
|
|
%autopatch -p1
|
2016-07-06 09:47:21 +00:00
|
|
|
|
|
|
|
%build
|
2017-11-15 18:26:56 +00:00
|
|
|
%python_build
|
2016-07-06 09:47:21 +00:00
|
|
|
|
|
|
|
%install
|
2017-11-15 18:26:56 +00:00
|
|
|
%python_install
|
2019-05-15 18:53:36 +00:00
|
|
|
rm -rf %{buildroot}%{_datadir}/doc/rjsmin
|
|
|
|
|
|
|
|
%check
|
|
|
|
%pytest_arch
|
2016-07-06 09:47:21 +00:00
|
|
|
|
2017-11-15 18:26:56 +00:00
|
|
|
%files %{python_files}
|
2019-05-15 18:53:36 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.md docs/CHANGES
|
2016-07-06 09:47:21 +00:00
|
|
|
%{python_sitearch}/*
|
|
|
|
|
|
|
|
%changelog
|