1 %include /usr/lib/rpm/macros.perl
2 Summary: CLOC - Count Lines of Code
8 Source0: http://downloads.sourceforge.net/cloc/%{name}-%{version}.pl
9 # Source0-md5: 19ab5852617e89d853793a693eb5e510
10 Source1: http://downloads.sourceforge.net/cloc/release-%{version}.txt
11 # Source1-md5: cb2e63726afc46faa68e1b144273dc0b
12 URL: http://cloc.sourceforge.net/
13 BuildRequires: rpm-perlprov >= 4.1-13
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 cloc counts blank lines, comment lines, and physical lines of source
19 code in many programming languages. Given two versions of a code base,
20 cloc can also compute differences in blank, comment, and source lines.
24 cp -p %{SOURCE1} release.txt
26 # fix #!env perl -w -> #!%{__perl}:
27 %{__sed} -e '1s,^#!.*perl,#!%{__perl},' %{SOURCE0} > %{name}.pl
28 touch -r %{SOURCE0} %{name}.pl
31 rm -rf $RPM_BUILD_ROOT
32 install -d $RPM_BUILD_ROOT%{_bindir}
33 install -p %{name}.pl $RPM_BUILD_ROOT%{_bindir}/%{name}
36 rm -rf $RPM_BUILD_ROOT
39 %defattr(644,root,root,755)
41 %attr(755,root,root) %{_bindir}/cloc