perl-Test-MockDBI-vl.spec 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. %define pkgname Test-MockDBI
  2. Name: perl-%{pkgname}
  3. Version: 0.65
  4. Release: 3%{?_dist_release}
  5. Summary: Test by mocking-up DBI
  6. License: Artistic or GPL+
  7. Group: Development/Libraries
  8. URL: http://search.cpan.org/dist/%{pkgname}
  9. Source0: http://search.cpan.org/CPAN/authors/id/A/AF/AFF/%{pkgname}-%{version}.tar.gz
  10. BuildRequires: perl
  11. BuildRequires: perl(DBI)
  12. BuildRequires: perl(Test::MockObject)
  13. Requires: perl(DBI)
  14. BuildArch: noarch
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  16. Vendor: Project Vine
  17. Distribution: Vine Linux
  18. Packager: shaolin
  19. %description
  20. Test::MockDBI provides a way to test DBI interfaces by creating rules for
  21. changing the DBI\'s behavior, then examining the standard output for
  22. matching patterns.
  23. %prep
  24. %setup -q -n %{pkgname}-%{version}
  25. find . -type f -print0 | xargs -0 chmod 644
  26. %{__cat} > DBI.cfg << EOF
  27. DSN DBI:SQLite:dbname=test
  28. USER test
  29. PASS
  30. SQL SELECT 1
  31. EOF
  32. %build
  33. %{__perl} Makefile.PL installdirs=vendor
  34. %{__make} %{?_smp_mflags}
  35. %check
  36. %{__make} test
  37. %install
  38. rm -rf %{buildroot}
  39. %{__make} install DESTDIR=%{buildroot}
  40. %{__rm} -rf %{buildroot}%{perl_archlib}
  41. find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
  42. find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
  43. %clean
  44. rm -rf %{buildroot}
  45. %files
  46. %defattr(-,root,root,755)
  47. %doc Changes HISTORY README TODO
  48. %{_mandir}/man3/*
  49. %{perl_vendorlib}/*
  50. %changelog
  51. * Sat Oct 11 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 0.65-3
  52. - rebuild with perl 5.16.3
  53. - moved to Development/Libraries Group
  54. * Thu Mar 01 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.65-2
  55. - rebuild
  56. * Mon Feb 20 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.65-1
  57. - initial build for Vine Linux
  58. * Fri Sep 30 2011 Leonardo Coelho <leonardoc@mandriva.com> 0.650.0-1mdv2012.0
  59. + Revision: 702167
  60. - first mandriva version
  61. - Created package structure for 'perl-Test-MockDBI'.