File keybase-node-client.spec of Package keybase-node-client

#
# spec file for package keybase-node-client
#
# Copyright (c) 2014 Bernhard M. Wiedemann
#
# 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/
#


Name:           keybase-node-client
Version:        0.7.2
Release:        0
Summary:        CLI for keybase.io
License:        BSD-3-Clause
Group:          Productivity/Networking/Security
Url:            https://github.com/keybase/node-client
Source0:        %name.tar.gz
#Requires:       
BuildRequires:  nodejs, npm
Requires:       nodejs
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
The keybase node-client is the command line client for keybase.io

%prep
%setup -n %name

%build
make %{?_smp_mflags}

%install
make setup DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_bindir} $RPM_BUILD_ROOT/%{_libexecdir}/keybase/
cat >bin/keybase <<EOF
#/bin/sh
exec %{_libexecdir}/keybase/bin/main.js "\$@"
EOF
install -m 755 bin/keybase $RPM_BUILD_ROOT/%{_bindir}/keybase
cp -a bin/ lib/ node_modules/ package.json json $RPM_BUILD_ROOT/%{_libexecdir}/keybase

%files
%defattr(-,root,root)
%{_bindir}/keybase
%{_libexecdir}/keybase
%doc LICENSE README.md CHANGELOG.md

%changelog