File nodejs-less.spec of Package nodejs-less
#
# spec file for package nodejs-less
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
%define base_name less
Name: nodejs-less
Version: 1.7.5
Release: 0
Summary: Leaner CSS
License: Apache-2.0
Group: Development/Languages/Other
Url: http://lesscss.org
Source: http://registry.npmjs.org/%{base_name}/-/%{base_name}-%{version}.tgz
Patch0: less-1.7.5-shebang.patch
BuildRequires: nodejs-packaging
Provides: nodejs-less.js = %{version}
Obsoletes: nodejs-less.js < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#ExclusiveArch: %ix86 x86_64 %{arm} noarch s390x ppc64le
%nodejs_find_provides_and_requires
%description
Less.js, the dynamic stylesheet language. http://lesscss.org.
This is the JavaScript, official, stable version of Less.
%prep
%setup -q -n package
%patch0 -p1
rm -rf lib/less/parser lib/less/tree/rule.js.orig
%build
%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{nodejs_modulesdir}/%{base_name}/lib
chmod a+x bin/lessc
cp -p package.json \
%{buildroot}%{nodejs_modulesdir}/%{base_name}/
cp -pr lib/less \
%{buildroot}%{nodejs_modulesdir}/%{base_name}/lib/
cp -pr bin %{buildroot}%{nodejs_modulesdir}/%{base_name}/
# Install /usr/bin/lessc
ln -s %{nodejs_modulesdir}/%{base_name}/bin/lessc \
%{buildroot}%{_bindir}
%files
%defattr(-,root,root,-)
%doc README.md LICENSE CHANGELOG.md CONTRIBUTING.md
%dir %{nodejs_modulesdir}
%{nodejs_modulesdir}/%{base_name}
%{_bindir}/lessc
%changelog