File php-ezyang-htmlpurifier.spec of Package php-ezyang-htmlpurifier

#
# spec file for package php-ezyang-htmlpurifier
#
# Copyright (c) 2019 SUSE LLC
#
# 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.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

%define        php_libdir         %{_datadir}/php%(echo %{php_version}|sed -e 's/[\.].*//')

Name:           php-ezyang-htmlpurifier
Version:        4.12.0
Release:        0
Summary:        Standards compliant HTML filter written in PHP
License:        LGPL-2.1-or-later
Group:          Development/Libraries/Other
URL:            http://htmlpurifier.org/
Source0:        https://api.github.com/repos/ezyang/htmlpurifier/tarball/a617e55bc62a87eec73bd456d146d134ad716f03#/ezyang-htmlpurifier-a617e55.tar.gz
Requires:       php >= 5.2
BuildRequires:  php-devel >= 5.2
Provides:       php-composer(ezyang/htmlpurifier) = 4.12.0

BuildArch:      noarch

%description
Standards compliant HTML filter written in PHP.

%prep
echo %{?php_version}
%setup -q -n ezyang-htmlpurifier-a617e55
rm -rf INSTALL* maintenance/ plugins/phorum/.gitignore
chmod 0644 library/HTMLPurifier/DefinitionCache/Serializer/README
%build
# no building for packaging

%install
# create docdir and move documentations
mkdir -p %{buildroot}%{_docdir}/ezyang/htmlpurifier
for DOC in CREDITS NEWS README* TODO VERSION WHATSNEW WYSIWYG ; do
	mv "$DOC" %{buildroot}%{_docdir}/ezyang/htmlpurifier
done
# install package
mkdir -p %{buildroot}%{php_libdir}/ezyang/htmlpurifier
cp -a . %{buildroot}%{php_libdir}/ezyang/htmlpurifier

%check
# Run the tests whenever possible

%files
%doc %{_docdir}/ezyang
%license LICENSE
%dir %{php_libdir}/ezyang
%exclude %{php_libdir}/ezyang/htmlpurifier/README.md
%exclude %{php_libdir}/ezyang/htmlpurifier/LICENSE
%{php_libdir}/ezyang/htmlpurifier

%changelog

openSUSE Build Service is sponsored by