perl-HTML-Scrubber-vl.spec 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. %define pkgname HTML-Scrubber
  2. # Basic Information
  3. Name: perl-%{pkgname}
  4. Version: 0.09
  5. Release: 1%{?_dist_release}
  6. License: Artistic or GPL
  7. Group: Development/Libraries
  8. Source0: http://search.cpan.org/CPAN/authors/id/N/NI/NIGELM/%{pkgname}-%{version}.tar.gz
  9. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  10. BuildArch: noarch
  11. Vendor: Project Vine
  12. Distribution: Vine Linux
  13. Packager: yasumichi
  14. Summary: HTML::Scrubber - Perl extension for scrubbing/sanitizing html
  15. Summary(ja): HTML::Scrubber - html の除去/サニタイジングのための Perl 拡張
  16. # Dependency
  17. Requires: perl
  18. Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
  19. BuildRequires: perl
  20. %description
  21. If you wanna "scrub" or "sanitize" html input in a reliable and flexible
  22. fashion, then this module is for you.
  23. I wasn't satisfied with HTML::Sanitizer because it is based on
  24. HTML::TreeBuilder, so I thought I'd write something similar that works
  25. directly with HTML::Parser.
  26. #%%description -l ja
  27. %prep
  28. %setup -q -n HTML-Scrubber-0.09
  29. %build
  30. %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
  31. %{__make} %{?_smp_mflags}
  32. %install
  33. %{__rm} -rf ${RPM_BUILD_ROOT}
  34. %{__make} pure_install DESTDIR=${RPM_BUILD_ROOT}
  35. # remove unnecessary files.
  36. find ${RPM_BUILD_ROOT} -type f -name perllocal.pod -exec %{__rm} -f {} ';'
  37. find ${RPM_BUILD_ROOT} -type f -name .packlist -exec %{__rm} -f {} ';'
  38. find ${RPM_BUILD_ROOT}%{_mandir} -type f -exec %{__rm} -f {} ';'
  39. find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
  40. # generate file list
  41. find $RPM_BUILD_ROOT%{_prefix} -type f -print |
  42. sed "s@^$RPM_BUILD_ROOT@@g" > %{name}.files
  43. if [ "$(cat %{name}.files)X" = "X" ] ; then
  44. echo "ERROR: EMPTY FILE LIST"
  45. exit -1
  46. fi
  47. %clean
  48. %{__rm} -rf ${RPM_BUILD_ROOT}
  49. %files -f %{name}.files
  50. %defattr(-,root,root)
  51. %doc Changes LICENSE README
  52. %changelog
  53. * Thu Oct 04 2012 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.09-1
  54. - initial build for Vine Linux