File perl-Convert-ASN1.spec of Package perl-Convert-ASN1

#
# spec file for package perl-Convert-ASN1 (Version 0.22)
#
# Copyright (c) 2008 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

%define real_name Convert-ASN1
%define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)
%define perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch)
%define perl_archlib %(eval "`perl -V:archlib`"; echo $archlib)
%define perl_privlib %(eval "`perl -V:privlib`"; echo $privlib)
%define maketest 0

Name:           perl-%{real_name}
Summary:        ASN.1 Encode/Decode library
Version:        0.22
Release:        1.20
Provides:       p_casn1
Obsoletes:      p_casn1
AutoReqProv:    on
Group:          Development/Libraries/Perl
License:        Artistic License
Url:            http://cpan.org/modules/by-module/Convert/
Source:         %{real_name}-%{version}.tar.bz2
Patch0:         %{real_name}-%{version}-path.diff
Patch1:         %{real_name}-%{version}-test.diff
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  perl(ExtUtils::MakeMaker)
%if 0%{?fedora_version}
BuildRequires:  perl-devel
%endif


%description
Convert::ASN1 converts between Perl data structures and ASN.1 encoded
packets.


%prep
%setup -q -n %{real_name}-%{version}
%patch0
%patch1


%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}


%build
CFLAGS="$RPM_OPT_FLAGS"
%{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
%{__make}


%check
%if %maketest
%{__make} test
%endif


%install
%if 0%{?suse_version}
%perl_make_install
%perl_process_packlist
%else
make DESTDIR=$RPM_BUILD_ROOT install_vendor
find $RPM_BUILD_ROOT/usr -type f -name perllocal.pod |xargs -i rm -f {}
find $RPM_BUILD_ROOT/usr -type d -depth -exec rmdir {} \; 2>/dev/null
%endif
find %{buildroot} -name "perllocal.pod" -o -name ".packlist" -o -name "*.bs" |xargs -i rm -f {}


%files
%defattr(-,root,root)
%doc ChangeLog OldChanges README
%doc %{_mandir}/man?/*
%{perl_vendorlib}/Convert
%if 0%{?suse_version}
/var/adm/perl-modules/%{name}
%endif


%changelog
* Thu May 31 2012 Holger Manthey <holger.manthey@bertelsmann.de>
- remove perl-version require
* Sat Jul 25 2009 Holger Manthey <holger.manthey@bertelsmann.de>
- build for centos
* Mon Oct  6 2008 anicka@suse.cz
- update to 0.22
  * Fix decoding of OIDs with large value for 2nd element
  * Support for SEQUENCE with no elements in ASN.1
  * Added ability to define what value is put in perl data
  structory when decoding NULL elements
* Wed Feb 14 2007 anicka@suse.cz
- update to 0.21
  * Fixed problem with indefinite encoding inside an indefinite
  encoding
  * Added support for type-local ANY DEFINED BY
* Wed Jul 12 2006 anicka@suse.cz
- update to 0.20
  * Fixed issues with decoding when calling script contains use encoding 'utf8'
  * Allow zero-length timestamps to be extracted
  * Fix incorrect length encoding for bitstrings
  * Support encoding bigint's as BCD
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jul 29 2005 mjancar@suse.cz
- update to 0.19
* Thu Oct 30 2003 mjancar@suse.cz
- update to 0.18
- drop obsolete patches
- no root for build
* Tue Sep  9 2003 mls@suse.de
- use chr(xx & 0xff) in _encode.pm, otherwise we get unicode
* Fri Aug 22 2003 mjancar@suse.cz
- require the perl version we build with
* Thu Aug  7 2003 mjancar@suse.cz
- fix tests that depend on certain order of entries
  in a hash (it is random in perl 5.8.1)
* Tue Jul 15 2003 mjancar@suse.cz
- adapt to perl-5.8.1
- use %%perl_process_packlist
* Thu Jun 19 2003 mjancar@suse.cz
- update to 0.17
- fix filelist
* Tue May 20 2003 mjancar@suse.cz
- remove unpackaged files
* Thu Oct 17 2002 prehak@suse.cz
- updated to version 0.16
* Tue Jul  2 2002 mls@suse.de
- remove race in .packlist generation
* Tue Jan 22 2002 rvasice@suse.cz
- update to version 0.15
* Thu Jan  3 2002 cihlar@suse.cz
- update to version 0.14
* Fri Aug  3 2001 rvasice@suse.cz
- update to version 0.12
* Tue Mar 13 2001 cihlar@suse.cz
- update to version 0.08
- fixed file list
* Fri Nov 10 2000 cihlar@suse.cz
- renamed p_casn1 -> perl-Convert-ASN1
* Tue Aug 22 2000 cihlar@suse.cz
- package created