File php7-smarty.spec of Package php-smarty

#
# spec file for package php5-smarty
#
# 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 http://bugs.opensuse.org/
#

# norootforbuild

%define _phpdir php7       

Name:           php7-smarty
Version:        4.1.0
Release:        1
Summary:        PHP-Template engine       
License:        LGPL-3.0
Group:          Productivity/Networking/Web/Servers
Url:            http://smarty.net/
Source0:        smarty-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       php7
BuildRequires:  php7
Requires:       php-tokenizer
Provides:	php-smarty

%description
Smarty is a template engine for PHP

%prep
%setup -q -n smarty-%{version}

%build

%install
%__mkdir_p %{buildroot}%{_datadir}/%{_phpdir}/smarty
%__mkdir_p %{buildroot}%{_defaultdocdir}/%{name}
%__cp -R libs/* %{buildroot}%{_datadir}/%{_phpdir}/smarty
%__cp -R docs/* %{buildroot}%{_defaultdocdir}/%{name}/
%__cp LICENSE %{buildroot}%{_defaultdocdir}/%{name}/
%__cp *.md %{buildroot}%{_defaultdocdir}/%{name}/

%clean
%__rm -rf %{buildroot}

%files
%defattr(-, root, root)
%dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/*
%dir %{_datadir}/%{_phpdir}/smarty
%{_datadir}/%{_phpdir}/smarty/*

%changelog
openSUSE Build Service is sponsored by