Blob Blame History Raw
%{?scl:%scl_package nodejs-opener}
%{!?scl:%global pkg_name %{name}}
%{?nodejs_find_provides_and_requires}

Name:           %{?scl_prefix}nodejs-opener
Version:        1.3.0
Release:        8%{?dist}
Summary:        Opens stuff, like webpages and files and executables
BuildArch:      noarch

Group:          System Environment/Libraries
License:        WTFPL
URL:            https://github.com/domenic/opener
Source0:        http://registry.npmjs.org/opener/-/opener-1.3.0.tgz
BuildRoot:      %{_tmppath}/%{pkg_name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  %{?scl_prefix}nodejs-devel

%description
Opens stuff, like webpages and files and executables, cross-platform.

%prep
%setup -q -n package

#get rid of DOS EOLs
sed -i "s|\r||g" LICENSE.txt README.md
 

%build
#nothing to do

%install
rm -rf %buildroot
mkdir -p %{buildroot}%{nodejs_sitelib}/opener
cp -pr package.json opener.js %{buildroot}%{nodejs_sitelib}/opener

chmod 0755 %{buildroot}%{nodejs_sitelib}/opener/opener.js

mkdir -p %{buildroot}%{_bindir}
ln -sf ../lib/node_modules/opener/opener.js %{buildroot}%{_bindir}/opener

%nodejs_symlink_deps

%clean
rm -rf %buildroot

%files
%defattr(-,root,root,-)
%{nodejs_sitelib}/opener
%{_bindir}/opener
%doc LICENSE.txt README.md

%changelog
* Tue Mar 04 2014 Tomas Hrcka <thrcka@redhat.com> - 1.3.0-8
- Add missing nodejs_symlink_deps macro

* Thu Oct 17 2013 Tomas Hrcka <thrcka@redhat.com> - 1.3.0-7
- replace provides and requires with macro

* Thu Apr 11 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.3.0-6
- Add support for software collections

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jan 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.0-4
- fix EOLs on README.md also

* Fri Jan 18 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.0-3
- rename from opener to nodejs-opener
- add exec permission on opener (executable and lib are same file)
- remove DOS EOLs from LICENSE.txt

* Tue Jan 08 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.0-2
- add missing build section

* Mon Dec 31 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.0-1
- initial package generated by npm2rpm