|
|
9f54fa |
%{?scl:%scl_package nodejs-inherits}
|
|
|
9f54fa |
%{!?scl:%global pkg_name %{name}}
|
|
|
9f54fa |
%{?nodejs_find_provides_and_requires}
|
|
|
9f54fa |
|
|
|
9f54fa |
Name: %{?scl_prefix}nodejs-inherits
|
|
|
9f54fa |
Version: 2.0.0
|
|
|
9f54fa |
Release: 6%{?dist}
|
|
|
9f54fa |
Summary: A tiny simple way to do classic inheritance in js
|
|
|
9f54fa |
License: WTFPL
|
|
|
9f54fa |
Group: Development/Libraries
|
|
|
9f54fa |
URL: https://github.com/isaacs/inherits
|
|
|
9f54fa |
Source0: http://registry.npmjs.org/inherits/-/inherits-%{version}.tgz
|
|
|
9f54fa |
Source1: https://raw.github.com/isaacs/inherits/112807f2670160b6e3bafdf39e395c10ae7d0fac/LICENSE
|
|
|
9f54fa |
BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
9f54fa |
BuildArch: noarch
|
|
|
9f54fa |
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
9f54fa |
|
|
|
9f54fa |
BuildRequires: %{?scl_prefix}nodejs-devel
|
|
|
9f54fa |
|
|
|
9f54fa |
%description
|
|
|
9f54fa |
%{summary}.
|
|
|
9f54fa |
|
|
|
9f54fa |
%prep
|
|
|
9f54fa |
%setup -q -n package
|
|
|
9f54fa |
|
|
|
9f54fa |
#copy the license into %%{_builddir} so it works with %%doc
|
|
|
9f54fa |
cp -p %{SOURCE1} LICENSE
|
|
|
9f54fa |
|
|
|
9f54fa |
%build
|
|
|
9f54fa |
#nothing to do
|
|
|
9f54fa |
|
|
|
9f54fa |
%install
|
|
|
9f54fa |
rm -rf %{buildroot}
|
|
|
9f54fa |
|
|
|
9f54fa |
mkdir -p %{buildroot}%{nodejs_sitelib}/inherits
|
|
|
9f54fa |
cp -pr inherits.js package.json %{buildroot}%{nodejs_sitelib}/inherits
|
|
|
9f54fa |
|
|
|
9f54fa |
%nodejs_symlink_deps
|
|
|
9f54fa |
|
|
|
9f54fa |
#ln -sf inherits@2 %{buildroot}%{nodejs_sitelib}/inherits
|
|
|
9f54fa |
|
|
|
9f54fa |
%clean
|
|
|
9f54fa |
rm -rf %{buildroot}
|
|
|
9f54fa |
|
|
|
9f54fa |
# there have been reports that the symlinks are messed up when upgrading
|
|
|
9f54fa |
# from older versions, so let's make sure everything's copacetic
|
|
|
9f54fa |
#%triggerun -- nodejs-inherits < 2.0.0-4
|
|
|
9f54fa |
#ln -sf inherits@2 %{nodejs_sitelib}/inherits
|
|
|
9f54fa |
#%{__python} <
|
|
|
9f54fa |
#import json, os, sys
|
|
|
9f54fa |
|
|
|
9f54fa |
#for moddir in os.listdir('%{nodejs_sitelib}'):
|
|
|
9f54fa |
# if os.path.isdir(moddir):
|
|
|
9f54fa |
# md = json.load(open(os.path.join(moddir, 'package.json')))
|
|
|
9f54fa |
#
|
|
|
9f54fa |
# if 'dependencies' in md and 'inherits' in md['dependencies']:
|
|
|
9f54fa |
# if isinstance(md['dependencies'], dict) and '1' in md['dependencies']['inherits']:
|
|
|
9f54fa |
# src = os.path.join('%{nodejs_sitelib}', 'inherits@1')
|
|
|
9f54fa |
# else:
|
|
|
9f54fa |
# src = os.path.join('%{nodejs_sitelib}', 'inherits@2')
|
|
|
9f54fa |
#
|
|
|
9f54fa |
# dest = os.path.join('%{nodejs_sitelib}', moddir, 'node_modules/inherits')
|
|
|
9f54fa |
#
|
|
|
9f54fa |
# if not os.path.realpath(dest) == src:
|
|
|
9f54fa |
# try:
|
|
|
9f54fa |
# os.unlink(dest)
|
|
|
9f54fa |
# except OSError:
|
|
|
9f54fa |
# pass
|
|
|
9f54fa |
#
|
|
|
9f54fa |
# try:
|
|
|
9f54fa |
# os.symlink(src, dest)
|
|
|
9f54fa |
# except OSError, e:
|
|
|
9f54fa |
# sys.stderr.write(e + '\n')
|
|
|
9f54fa |
#EOF
|
|
|
9f54fa |
|
|
|
9f54fa |
# rpm blows up if you try to replace a dir with a symlink or vice-versa
|
|
|
9f54fa |
#%pretrans -p <lua>
|
|
|
9f54fa |
#if posix.stat("%{nodejs_sitelib}/inherits", "type") == "directory" then
|
|
|
9f54fa |
# os.rename('%{nodejs_sitelib}/inherits', '%{nodejs_sitelib}/inherits@2')
|
|
|
9f54fa |
#end
|
|
|
9f54fa |
|
|
|
9f54fa |
%files
|
|
|
9f54fa |
%defattr(-,root,root,-)
|
|
|
9f54fa |
#%{nodejs_sitelib}/inherits@2
|
|
|
9f54fa |
%{nodejs_sitelib}/inherits
|
|
|
9f54fa |
%doc README.md LICENSE
|
|
|
9f54fa |
|
|
|
9f54fa |
%changelog
|
|
|
9f54fa |
* Wed Mar 05 2014 Tomas Hrcka <thrcka@redhat.com> - 2.0.0-6
|
|
|
9f54fa |
- Disable multiversion inherits
|
|
|
9f54fa |
|
|
|
9f54fa |
* Thu Oct 17 2013 Tomas Hrcka <thrcka@redhat.com> - 2.0.0-5
|
|
|
9f54fa |
- replace provides and requires with macro
|
|
|
9f54fa |
|
|
|
9f54fa |
* Fri Aug 16 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.0.0-4
|
|
|
9f54fa |
- add some post-install hackery to work around potential RPM bug resulting in
|
|
|
9f54fa |
symlinks still pointing to their old locations on upgrade (RHBZ#997978)
|
|
|
9f54fa |
|
|
|
9f54fa |
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-4
|
|
|
9f54fa |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
9f54fa |
|
|
|
9f54fa |
* Sat Jul 06 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.0.0-3
|
|
|
9f54fa |
- only run the hack when we really need to
|
|
|
9f54fa |
|
|
|
9f54fa |
* Sat Jul 06 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.0.0-2
|
|
|
9f54fa |
- use lua for pretrans
|
|
|
9f54fa |
|
|
|
9f54fa |
* Sun Jun 23 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.0.0-1
|
|
|
9f54fa |
- new upstream release 2.0.0
|
|
|
9f54fa |
- include license file
|
|
|
9f54fa |
- follow the mutiple version spec
|
|
|
9f54fa |
|
|
|
9f54fa |
* Sun Jun 23 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.0-9
|
|
|
9f54fa |
- restrict to compatible arches
|
|
|
9f54fa |
|
|
|
9f54fa |
* Mon Apr 15 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.0-8
|
|
|
9f54fa |
- add macro for EPEL6 dependency generation
|
|
|
9f54fa |
|
|
|
9f54fa |
* Thu Apr 11 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.0.0-8
|
|
|
9f54fa |
- Add support for software collections
|
|
|
9f54fa |
|
|
|
9f54fa |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-7
|
|
|
9f54fa |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
9f54fa |
|
|
|
9f54fa |
* Tue Jan 08 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.0-6
|
|
|
9f54fa |
- add missing build section
|
|
|
9f54fa |
|
|
|
9f54fa |
* Thu Jan 03 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.0-5
|
|
|
9f54fa |
- correct license tag (thanks to Robin Lee)
|
|
|
9f54fa |
|
|
|
9f54fa |
* Mon Dec 31 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.0-4
|
|
|
9f54fa |
- clean up for submission
|
|
|
9f54fa |
|
|
|
9f54fa |
* Fri Apr 27 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.0-3
|
|
|
9f54fa |
- guard Requires for F17 automatic depedency generation
|
|
|
9f54fa |
|
|
|
9f54fa |
* Sat Feb 11 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.0-2
|
|
|
9f54fa |
- switch to automatically generated provides/requires
|
|
|
9f54fa |
|
|
|
9f54fa |
* Sat Jan 21 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.0-1
|
|
|
9f54fa |
- initial package
|