File rpm-macros-extra.spec of Package rpm-macros-extra

%define mname extra
Name: rpm-macros-%mname
Version: 0.6.16
Release: 1
Summary: RPM helper macros to build packages
License: GPL-3.0+
Group: Development/Tools/Building
Source0: %mname.rpm.macros
Source1: sle.rpm.macros
Source2: opensuse.rpm.macros
Source3: rhel6.rpm.macros
Source4: rhel5.rpm.macros
Source5: fedora.rpm.macros
Source11: cmake.rpm.macros
Source21: brp-strip-unneeded.sh
BuildArch: noarch
Buildroot: %buildroot
%if %{undefined _rpmmacrosdir}
%define _rpmmacrosdir %_sysconfdir/rpm
%endif

%description
These helper macros provide possibility to build packages.


%prep


%build


%install
install -d -m 0755 %buildroot%_rpmmacrosdir
install -m 0644 %{S:0} %buildroot%_rpmmacrosdir/macros.%mname

%if 0%{?suse_version} >= 1130
install -pD -m 0755 %{S:21} %buildroot%_rpmconfigdir/brp-suse.d/brp-16-strip-unneeded
cat %{S:2} >> %buildroot%_rpmmacrosdir/macros.%mname
%else
%if 0%{?centos_version} >= 700 || 0%{?rhel_version} >= 700 || 0%{?fedora_version}
cat %{S:5} >> %buildroot%_rpmmacrosdir/macros.%mname
%else
%if 0%{?centos_version} >= 600 || 0%{?rhel_version} >= 600
cat %{S:3} >> %buildroot%_rpmmacrosdir/macros.%mname
install -p -m 0644 %{S:11} %buildroot%_rpmmacrosdir/macros.cmake
%else
%if 0%{?centos_version} >= 500 || 0%{?rhel_version} >= 500
cat %{S:4} >> %buildroot%_rpmmacrosdir/macros.%mname
echo "%%_initddir %%_initrddir" >> %buildroot%_rpmmacrosdir/macros.%mname
%else
%if 0%{?sles_version} == 11
cat %{S:1} >> %buildroot%_rpmmacrosdir/macros.%mname
%if %{undefined __xz}
echo "%%_initddir %%_initrddir" >> %buildroot%_rpmmacrosdir/macros.%mname
%endif
%endif
%endif
%endif
%endif
%endif


%files
%defattr(-,root,root)
%_rpmmacrosdir/*
%if 0%{?suse_version} >= 1130
%dir %_rpmconfigdir/brp-suse.d/
%_rpmconfigdir/brp-suse.d/brp-16-strip-unneeded
%endif


%changelog
* Mon Nov 03 2014 Led <ledest@gmail.com> 0.6.16-1
- added %%_desktopdir macro

* Thu Oct 09 2014 Led <ledest@gmail.com> 0.6.15-1
- added brp-16-strip-unneeded for SUSE

* Thu Sep 25 2014 Led <ledest@gmail.com> 0.6.14-2
- fix typo

* Wed Sep 24 2014 Led <ledest@gmail.com> 0.6.14-1
- cleaned up cmake.macros
- updated fedora.rpm.macros

* Wed Sep 24 2014 Led <ledest@gmail.com> 0.6.13-1
- added cmake.macros

* Mon Sep 01 2014 Led <ledest@gmail.com> 0.6.12-1
- added %%_pkgconfigdir macro

* Mon Sep 01 2014 Led <ledest@gmail.com> 0.6.11-1
- added %%_logrotatedir macro

* Sun Aug 31 2014 Led <ledest@gmail.com> 0.6.10-1
- added %%__nprocs macro
- redefined %%make_build macro
- adde %%add_verify_elf_skiplist and %%add_strip_skiplist dummy macros

* Fri Aug 29 2014 Led <ledest@gmail.com> 0.6.9-1
- added %%autoreconf macro

* Wed Aug 13 2014 Led <ledest@gmail.com> 0.6.8-1
- fixed build for Fedora

* Wed Aug 13 2014 Led <ledest@gmail.com> 0.6.7-1
- removed obsoleted macros
- added %%_man?dir macros
- simplified macros

* Wed Mar 27 2013 Led <led@massivesolutions.co.uk> 0.6.6-1
- updated macros for Fedora

* Wed Mar 20 2013 Led <led@massivesolutions.co.uk> 0.6.5-1
- added macros for Fedora

* Fri Feb 01 2013 Led <led@massivesolutions.co.uk> 0.6.4-1
- cosmetic fix for bootstraping

* Sun Apr 01 2012 Led <led@massivesolutions.co.uk> 0.6.3-1
- added %%_initddir macro for CentOS 5

* Wed Mar 14 2012 Led <led@massivesolutions.co.uk> 0.6.2-1
- added macros for RHEL 5 and CentOS 5

* Mon Mar 12 2012 Led <led@massivesolutions.co.uk> 0.6.1-1
- simplified macros

* Mon Mar 12 2012 Led <led@massivesolutions.co.uk> 0.6-1
- leave only one extra macros file

* Tue Mar 06 2012 Led <led@massivesolutions.co.uk> 0.5-1
- added macros for RHEL 6 and CentOS 6

* Fri Mar 02 2012 Led <led@massivesolutions.co.uk> 0.5-0
- added separate custom macros files for SLE and openSUSE

* Fri Mar 02 2012 Led <led@massivesolutions.co.uk> 0.4-0
- added %%noarch_package macro

* Mon Feb 06 2012 Led <led@massivesolutions.co.uk> 0.3-0
- added %%_initdir and %%systemd_unitdir macros

* Sun Feb 05 2012 Led <led@massivesolutions.co.uk> 0.2-0
- added %%_rpmlibdir and %%_rpmmacrosdir macros
- fixed Group

* Wed Feb 01 2012 Led <led@massivesolutions.co.uk> 0.1-0
- initial build for openSUSE