Blame SPECS/rh-nodejs6.spec

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