File perl-macros.spec of Package perl-macros

#
# spec file for package perl-macros
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           perl-macros
Summary:        Perl macros for rpm build
Version:        1.0
Release:        0.9.47
License:        GPL v2 or later
Group:          Development/Libraries/Perl
Source0:        macros.perl
Source1:        README
Patch0:         %{name}_rhel.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       perl_gen_filelist
%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
Requires:       perl(ExtUtils::MakeMaker)
Requires:       perl(Test::More)
%if 0%{?fedora}
Requires:       perl-devel
%endif
%endif
Requires:       perl

%description
This package provides perl rpm macros. You need it for building perl
modules

Authors: Christian Wittmer <chris@computersalat.de>



%prep
%{__cp} %{S:0} .
%{__cp} %{S:1} .
%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
%patch0 -p0
%endif

%build

%if 0%{?suse_version}
%if %suse_version < 1140

%post
# most evil hack ever - rpm does not sort the macros, so we need to rename the old one
cp %{_sysconfdir}/rpm/macros.suse-perl %{_sysconfdir}/rpm/macros.perl
%endif
%endif

%install
# make sure it overwrites macros.perl if sorted alphabetically
%{__install} -D -m644 macros.perl ${RPM_BUILD_ROOT}%{_sysconfdir}/rpm/macros.suse-perl

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc README
%{_sysconfdir}/rpm/macros.*

%changelog
* Tue Aug 16 2011 chris@computersalat.de
- added rhel patch for fixing perl_gen_filelist
  * on 64bit systems
    vendorlib -> /usr/lib/perl5/vendor_perl/5.8.8
    vendorarch -> /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
* Tue Nov 30 2010 coolo@novell.com
- require perl-devel on fedora too
* Tue Nov 30 2010 coolo@novell.com
- add a not so nice hack to make sure we overwrite perl's macros
  on older suse distributions
- sync perl macros with perl
* Mon Nov 29 2010 coolo@novell.com
- some more fixes for fedora builds
* Mon Nov 29 2010 coolo@novell.com
- sync macros from perl package
* Mon Nov 29 2010 kukuk@suse.de
- Install as macros.perl.suse on non openSUSE distributions
* Mon Nov 29 2010 kukuk@suse.de
- Add %%perl_make_install
* Fri Feb 12 2010 chris@computersalat.de
- fix for mandir
  o only add if exist :)
* Sat Jul 25 2009 chris@computersalat.de
- spec mods
  * removed ^----------
  * removed ^#---------
* Sun Jun 21 2009 chris@computersalat.de
- fix for packlist file
  o need to check if it exist
    does not exist when Build is used
* Thu Jun 18 2009 chris@computersalat.de
- spec fix for perl-macros
* Thu Jun 18 2009 chris@computersalat.de
- changes to perl_gen_filelist
  o only files -f name.files is needed
* Wed Jun 17 2009 chris@computersalat.de
- fix for perl_gen_filelist
  o missing files in {perl_vendorarch}
  o clean up code
* Tue Jun 16 2009 chris@computersalat.de
- some fixes on perl_gen_filelist
  o perl_vendorarch/auto excluded
  o added stuff for _bindir
* Mon Jun 15 2009 chris@computersalat.de
- added README
* Mon Jun 15 2009 chris@computersalat.de
- initial package 1.0
  o perl_gen_filelist