Blame SPECS/rh-nodejs4.spec

11ce9e
%global scl_name_prefix rh-
11ce9e
%global scl_name_base nodejs
11ce9e
%global scl_name_version 4
11ce9e
 
11ce9e
%global scl %{scl_name_prefix}%{scl_name_base}%{scl_name_version}
11ce9e
11ce9e
%scl_package %scl
11ce9e
%global install_scl 1
11ce9e
11ce9e
# do not produce empty debuginfo package
11ce9e
%global debug_package %{nil}
11ce9e
11ce9e
Summary: %scl Software Collection
11ce9e
Name: %scl_name
11ce9e
Version: 2.2
11ce9e
Release: 5%{?dist}
11ce9e
11ce9e
Source1: macros.nodejs
11ce9e
Source2: nodejs.attr
11ce9e
Source3: nodejs.prov
11ce9e
Source4: nodejs.req
11ce9e
Source5: nodejs-symlink-deps
11ce9e
Source6: nodejs-fixdep
11ce9e
Source7: nodejs_native.attr
11ce9e
Source8: README
11ce9e
Source9: LICENSE
11ce9e
Source10: multiver_modules
11ce9e
11ce9e
License: MIT
11ce9e
11ce9e
%if 0%{?install_scl}
11ce9e
Requires: %{scl_prefix}nodejs
11ce9e
Requires: %{scl_prefix}npm
11ce9e
Requires: %{scl_prefix}runtime
11ce9e
%endif
11ce9e
11ce9e
BuildRequires: scl-utils-build
11ce9e
BuildRequires: python-devel
11ce9e
BuildRequires: help2man
11ce9e
11ce9e
%description
11ce9e
This is the main package for %scl Software Collection.
11ce9e
11ce9e
%package runtime
11ce9e
Summary: Package that handles %scl Software Collection.
11ce9e
Requires: %{_root_bindir}/scl_source
11ce9e
11ce9e
%description runtime
11ce9e
Package shipping essential scripts to work with %scl Software Collection.
11ce9e
11ce9e
%package build
11ce9e
Summary: Package shipping basic build configuration
11ce9e
Requires: scl-utils-build
11ce9e
11ce9e
%description build
11ce9e
Package shipping essential configuration macros to build %scl Software Collection.
11ce9e
11ce9e
%package scldevel
11ce9e
Summary: Package shipping development files for %scl
11ce9e
 
11ce9e
%description scldevel
11ce9e
Package shipping development files, especially usefull for development of
11ce9e
packages depending on %scl Software Collection.
11ce9e
11ce9e
%prep
11ce9e
%setup -c -T
11ce9e
11ce9e
# This section generates README file from a template and creates man page
11ce9e
# from that file, expanding RPM macros in the template file.
11ce9e
cat >README <<'EOF'
11ce9e
%{expand:%(cat %{SOURCE8})}
11ce9e
EOF
11ce9e
11ce9e
# copy the license file so %%files section sees it
11ce9e
cp %{SOURCE9} .
11ce9e
11ce9e
%build
11ce9e
# generate a helper script that will be used by help2man
11ce9e
cat >h2m_helper <<'EOF'
11ce9e
#!/bin/bash
11ce9e
[ "$1" == "--version" ] && echo "%{scl_name} %{version} Software Collection" || cat README
11ce9e
EOF
11ce9e
11ce9e
chmod a+x h2m_helper
11ce9e
11ce9e
# generate the man page
11ce9e
help2man -N --section 7 ./h2m_helper -o %{scl_name}.7
11ce9e
11ce9e
%install
11ce9e
rm -rf %{buildroot}
11ce9e
mkdir -p %{buildroot}%{_scl_scripts}/root
11ce9e
cat >> %{buildroot}%{_scl_scripts}/enable << EOF
11ce9e
export PATH=%{_bindir}\${PATH:+:\${PATH}}
11ce9e
export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
11ce9e
export PYTHONPATH=%{_scl_root}%{python_sitelib}\${PYTHONPATH:+:\${PYTHONPATH}}
11ce9e
export MANPATH=%{_mandir}:\$MANPATH
11ce9e
#. scl_source enable v8314
11ce9e
# new nodejs bundles v8
11ce9e
EOF
11ce9e
11ce9e
# install rpm magic
11ce9e
install -Dpm0644 %{SOURCE1} %{buildroot}%{_root_sysconfdir}/rpm/macros.%{name}
11ce9e
install -Dpm0644 %{SOURCE2} %{buildroot}%{_rpmconfigdir}/fileattrs/%{name}.attr
11ce9e
install -pm0755 %{SOURCE3} %{buildroot}%{_rpmconfigdir}/%{name}.prov
11ce9e
install -pm0755 %{SOURCE4} %{buildroot}%{_rpmconfigdir}/%{name}.req
11ce9e
install -pm0755 %{SOURCE5} %{buildroot}%{_rpmconfigdir}/%{name}-symlink-deps
11ce9e
install -pm0755 %{SOURCE6} %{buildroot}%{_rpmconfigdir}/%{name}-fixdep
11ce9e
install -Dpm0644 %{SOURCE7} %{buildroot}%{_rpmconfigdir}/fileattrs/%{name}_native.attr
11ce9e
install -Dpm0644 %{SOURCE10} %{buildroot}%{_datadir}/node/multiver_modules
11ce9e
11ce9e
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF
11ce9e
%%scl_%{scl_name_base} %{scl}
11ce9e
%%scl_prefix_%{scl_name_base} %{scl_prefix}
11ce9e
EOF
11ce9e
11ce9e
# ensure Requires are added to every native module that match the Provides from
11ce9e
# the nodejs build in the buildroot
11ce9e
cat << EOF > %{buildroot}%{_rpmconfigdir}/%{name}_native.req
11ce9e
#!/bin/sh
11ce9e
echo 'nodejs4-nodejs(abi) = %nodejs_abi'
11ce9e
echo 'nodejs4-nodejs(v8-abi) = %v8_abi'
11ce9e
EOF
11ce9e
chmod 0755 %{buildroot}%{_rpmconfigdir}/%{name}_native.req
11ce9e
11ce9e
cat << EOF > %{buildroot}%{_rpmconfigdir}/%{name}-require.sh
11ce9e
#!/bin/sh
11ce9e
%{_rpmconfigdir}/%{name}.req $*
11ce9e
%{_rpmconfigdir}/find-requires $*
11ce9e
EOF
11ce9e
chmod 0755 %{buildroot}%{_rpmconfigdir}/%{name}-require.sh
11ce9e
11ce9e
cat << EOF > %{buildroot}%{_rpmconfigdir}/%{name}-provide.sh
11ce9e
#!/bin/sh
11ce9e
%{_rpmconfigdir}/%{name}.prov $*
11ce9e
%{_rpmconfigdir}/find-provides $*
11ce9e
EOF
11ce9e
chmod 0755 %{buildroot}%{_rpmconfigdir}/%{name}-provide.sh
11ce9e
11ce9e
%scl_install
11ce9e
# scl doesn't include this directory
11ce9e
mkdir -p %{buildroot}%{_scl_root}%{python_sitelib}
11ce9e
mkdir -p %{buildroot}%{_libdir}/pkgconfig
11ce9e
11ce9e
# install generated man page
11ce9e
mkdir -p %{buildroot}%{_mandir}/man7/
11ce9e
install -m 644 %{scl_name}.7 %{buildroot}%{_mandir}/man7/%{scl_name}.7
11ce9e
11ce9e
%files
11ce9e
11ce9e
%files -f filesystem runtime
11ce9e
%doc README
11ce9e
%{!?_licensedir:%global license %%doc}
11ce9e
%license LICENSE
11ce9e
%scl_files
11ce9e
%dir %{_scl_root}%{python_sitelib}
11ce9e
%dir %{_scl_root}/usr/lib/python2.7
11ce9e
%dir %{_libdir}/pkgconfig
11ce9e
%{_datadir}/node/multiver_modules
11ce9e
%{_mandir}/man7/%{scl_name}.*
11ce9e
%dir %{_datadir}/node
11ce9e
11ce9e
%files build
11ce9e
%{_root_sysconfdir}/rpm/macros.%{scl}-config
11ce9e
%{_root_sysconfdir}/rpm/macros.%{name}
11ce9e
%{_rpmconfigdir}/fileattrs/%{name}*.attr
11ce9e
%{_rpmconfigdir}/%{name}*
11ce9e
11ce9e
%files scldevel
11ce9e
%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
11ce9e
11ce9e
%changelog
11ce9e
* Thu Mar 03 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.2-5
11ce9e
- Enable installing whole scl (RBZ#1314093)
11ce9e
11ce9e
* Fri Feb 12 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.2-4
11ce9e
- Add prefixes to provides and requires
11ce9e
11ce9e
* Wed Feb 10 2016 Tomas Hrcka <thrcka@redhat.com> - 2.2-3
11ce9e
- Add missing rh- prefix
11ce9e
11ce9e
* Wed Feb 03 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.2-1
11ce9e
- RHSCL 2.2
11ce9e
- add %%license tag to %%files
11ce9e
11ce9e
* Thu Jan 14 2016 Tomas Hrcka <thrcka@redhat.com> - 2.1-5
11ce9e
- Include nodemon in collection
11ce9e
- Update packaging scripts and macros
11ce9e
11ce9e
* Fri Oct 02 2015 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.1-3
11ce9e
- Enable installing of whole collection
11ce9e
11ce9e
* Thu Jul 02 2015 Tomas Hrcka <thrcka@redhat.com> - 2.1-2
11ce9e
- RHSCL 2.1 release
11ce9e
- disable installing of whole collection this will be enabled after devel period
11ce9e
11ce9e
* Thu May 14 2015 Tomas Hrcka <thrcka@redhat.com> - 2.0-3
11ce9e
- Red Hat Software collections 2.0
11ce9e
- Own python modules directory
11ce9e
11ce9e
* Wed Oct 08 2014 Tomas Hrcka <thrcka@redhat.com> - 1.2-29
11ce9e
- Require scriptlet scl_devel from root_bindir not scl_bindir 
11ce9e
11ce9e
* Mon Oct 06 2014 Tomas Hrcka <thrcka@redhat.com> - 1.2-28
11ce9e
- bump scl version
11ce9e
11ce9e
* Mon Oct 06 2014 Tomas Hrcka <thrcka@redhat.com> - 1.2-27
11ce9e
- Require scriptlet scl_devel instead of specific scl-utils version
11ce9e
11ce9e
* Mon Sep 08 2014 Tomas Hrcka <thrcka@redhat.com> - 1.2-26
11ce9e
- Fix version of scl-utils required by this package
11ce9e
- Bump version
11ce9e
11ce9e
* Mon Mar 31 2014 Honza Horak <hhorak@redhat.com> - 1.1-25
11ce9e
- Fix path typo in README
11ce9e
  Related: #1061452
11ce9e
11ce9e
* Mon Feb 17 2014 Tomas Hrcka <thrcka@redhat.com> - 1.1-24
11ce9e
- Require version of scl-utils 
11ce9e
11ce9e
* Wed Feb 12 2014 Tomas Hrcka <thrcka@redhat.com> - 1.1-23
11ce9e
- Define scl_name_base and scl_name_version macros 
11ce9e
11ce9e
* Wed Feb 12 2014 Honza Horak <hhorak@redhat.com> - 1.1-22
11ce9e
- Some more grammar fixes in README
11ce9e
  Related: #1061452
11ce9e
11ce9e
* Tue Jan 21 2014 Tomas Hrcka <thrcka@redhat.com> - 1-21
11ce9e
- Rebuilt for rhbz#1054252
11ce9e
11ce9e
* Thu Dec 05 2013 Tomas Hrcka <thrcka@redhat.com> - 1-20
11ce9e
- install collection packages as dependencies
11ce9e
11ce9e
* Wed Nov 27 2013 Tomas Hrcka <thrcka@redhat.com> - 1-19
11ce9e
- rebuilt
11ce9e
- fiw v8314 dependency
11ce9e
11ce9e
* Wed Nov 20 2013 Tomas Hrcka <thrcka@redhat.com> - 1-18
11ce9e
- added dependency on v8314 scl
11ce9e
11ce9e
* Thu Aug 15 2013 thrcka@redhat.com - 1-17
11ce9e
- clean up after previous fix
11ce9e
11ce9e
* Fri Aug 09 2013 thrcka@redhat.com - 1-16
11ce9e
- RHBZ#993425 - nodejs010.req fails when !noarch 
11ce9e
11ce9e
* Mon Jun 03 2013 thrcka@redhat.com - 1-15
11ce9e
- Changed licence to MIT
11ce9e
11ce9e
* Thu May 23 2013 Tomas Hrcka <thrcka@redhat.com> - 1-14.1
11ce9e
- fixed typo in MANPATH
11ce9e
11ce9e
* Thu May 23 2013 Tomas Hrcka <thrcka@redhat.com> - 1-14
11ce9e
- Changed MAN_PATH so it does not ignore man pages from host system
11ce9e
11ce9e
* Thu May  9 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-13
11ce9e
- Remove colons forgotten in scriplets
11ce9e
11ce9e
* Tue May 07 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-12
11ce9e
- Add runtime dependency on scl-runtime
11ce9e
11ce9e
* Mon May 06 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-11
11ce9e
- Add pkgconfig file ownership
11ce9e
11ce9e
* Mon May 06 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-10
11ce9e
- Workaround scl-utils not generating all directory ownerships (#956213)
11ce9e
11ce9e
* Mon May 06 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-9
11ce9e
- Fix enable scriptlet evironment expansion (#956788)
11ce9e
11ce9e
* Wed Apr 17 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-8
11ce9e
- Extend MANPATH env variable
11ce9e
- Add npm to meta package requires
11ce9e
11ce9e
* Mon Apr 15 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-7
11ce9e
- Update macros and requires/provides generator to latest
11ce9e
11ce9e
* Wed Apr 10 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-6
11ce9e
- Fix rpm requires/provides generator paths
11ce9e
- Add requires to main meta package
11ce9e
11ce9e
* Mon Apr 08 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-5
11ce9e
- Make package architecture specific for libdir usage
11ce9e
11ce9e
* Mon Apr 08 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-4
11ce9e
- Add rpm macros and tooling
11ce9e
11ce9e
* Mon Apr 08 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-3
11ce9e
- Add proper scl-utils-build requires
11ce9e
11ce9e
* Fri Apr 05 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-2
11ce9e
- Add PYTHONPATH to configuration
11ce9e
11ce9e
* Tue Mar 26 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-1
11ce9e
- Initial version of the Node.js Software Collection