File nodejs-grunt-cli.spec of Package nodejs-grunt-cli

#
# spec file for package nodejs-grunt-cli
#
# Copyright (c) 2015 SUSE LINUX 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 grunt-cli
Name:           nodejs-%{base_name}
Version:        1.3.2
Release:        0
Summary:        The grunt command line interface
License:        MIT
Group:          Development/Languages/Other
Url:            https://github.com/gruntjs/grunt-cli
Source:         http://registry.npmjs.org/%{base_name}/-/%{base_name}-%{version}.tgz
BuildRequires:  nodejs-packaging
BuildRequires:  zsh
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%nodejs_find_provides_and_requires

%description
Node.js grunt-cli module. The grunt command line interface.

%prep
%setup -q -n package

%build

%install
mkdir -p %{buildroot}%{nodejs_modulesdir}/%{base_name}
cp -pr package.json lib \
        %{buildroot}%{nodejs_modulesdir}/%{base_name}/

install -d -m 0755 %{buildroot}%{_sysconfdir}/bash_completion.d
install -d -m 0755 %{buildroot}%{_sysconfdir}/zsh_completion.d
install -d -m 0755 %{buildroot}%{_bindir}

install -m 0755 bin/grunt %{buildroot}%{_bindir}
install -m 0755 completion/bash %{buildroot}%{_sysconfdir}/bash_completion.d/%{base_name}
install -m 0755 completion/zsh %{buildroot}%{_sysconfdir}/zsh_completion.d/%{base_name}

%files
%defattr(-,root,root,-)
%doc README.md CHANGELOG.md
%dir %{nodejs_modulesdir}
%{nodejs_modulesdir}/%{base_name}
%{_bindir}/grunt
%{_sysconfdir}/bash_completion.d/%{base_name}
%{_sysconfdir}/zsh_completion.d/%{base_name}

%changelog
openSUSE Build Service is sponsored by