LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File perl-YAML-Tiny.spec of Package perl-YAML-Tiny (Project home:snagview:perl)

# spec file for perl module RRD-Simple

#SuSe specific Part
%if %{?sles_version:1}0
%define module_dir      /usr/lib/perl5/
%define man3_dir        /usr/share/man/man3/
%if 0%{?suse_version} >= 1315
%define auto_dir 	/usr/lib/perl5/vendor_perl/5.18.2/x86_64-linux-thread-multi/auto
%define sub_dir         /5.18.2/
%define auto_dir	/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto
#suse prefers to install additional modules in a subdir (below module_dir)
%define sub_dir		/5.10.0/

#RedHat specific Part
%if %{?rhel_version:1}0
%define module_dir	/usr/share/perl5
%define man3_dir        /usr/share/man/man3
%define auto_dir	/usr/lib64/perl5/vendor_perl/auto/
#no subdir for redhat
%define sub_dir		/
BuildRequires:		perl-ExtUtils-MakeMaker

%if %{?centos_version:1}0
%define init           1
%if 0%{?centos_version} == 700
BuildRequires:  perl-ExtUtils-MakeMaker perl-Module-Install
BuildRequires:  perl-ExtUtils-MakeMaker perl-version-new perl-Module-Install
requires: perl-version-new
%define module_dir      /usr/share/perl5
%define sub_dir         /
%define man3_dir        /usr/share/man/man3
%define auto_dir        /usr/lib64/perl5/vendor_perl/auto/

#all Distros
%define	module_name	YAML-Tiny
%define module_version	1.69	
Name:           perl-%{module_name}
Version:        %{module_version}
Release:	0
License:	The Apache Software License 2.0	
Summary:	YAML::Tiny - Read/Write YAML files with as little code as possible	
Url:		https://metacpan.org/pod/YAML::Tiny
Group:		perl/modules
Source:         %{module_name}-%{module_version}.tar.gz
BuildRequires:	perl
Requires:	perl
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source1:	%name-rpmlintrc

The YAML specification is huge. Really, really huge. It contains all the functionality of XML, except with flexibility and choice, which makes it easier to read, but with a formal specification that is more complex than XML.

cd %{_builddir}
tar -xf %{_sourcedir}/%{module_name}-%{module_version}.tar.gz

cd %{_builddir}/%{module_name}-%{module_version}
perl Makefile.PL  destdir=%{buildroot} installdirs=vendor 
make %{?_smp_mflags}


cd %{_builddir}/%{module_name}-%{module_version}
make DESTDIR=%{buildroot} install
#In case the .packlist/perllocal.pod file contains the buildroot directory
find %{buildroot} -type f -name "perllocal.pod" -exec rm -f {} \;
find %{buildroot} -type f -name ".packlist" -exec rm -f {} \;
rm  -Rf %{buildroot}/usr/share/man
find %{buildroot} -type f | sed "s#%{buildroot}##g" > %{buildroot}/../%{name}-filelist
cat %{buildroot}/../%{name}-filelist
%files -f %{buildroot}/../%{name}-filelist
%if %{?sles_version:1}0
%if 0%{?suse_version} >= 1315
%dir /usr/lib/perl5/vendor_perl/5.18.2/YAML/
%dir /usr/lib/perl5/vendor_perl/5.10.0/YAML/