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

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

The keybase node-client is the command line client for

%setup -n %name

make %{?_smp_mflags}

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