Name: sloccount Summary: Measures source lines of code (SLOC) in programs Version: 2.26 Release: 1 License: GPLv2+ Group: Development/Tools Source0: http://www.dwheeler.com/sloccount/%{name}-%{version}.tar.gz URL: http://www.dwheeler.com/sloccount BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: flex, coreutils %description SLOCCount (pronounced "sloc-count") is a suite of programs for counting physical source lines of code (SLOC) in potentially large software systems (thus, SLOCCount is a "software metrics tool" or "software measurement tool"). SLOCCount can count physical SLOC for a wide number of languages; listed alphabetically, they are: Ada, Assembly, awk, Bourne shell, C, C++, C shell, COBOL, Expect, Fortran, Java, lex/flex, LISP (including Scheme), Modula-3, Objective-C, Pascal, Perl, PHP, Python, sed, TCL, and Yacc. SLOCCount can automatically determine if a file is a source code file or not, and if so, which language it's written in. As a result, you can analyze large systems completely automatically; it's been used to examine entire GNU/Linux distributions, for example. SLOCCount also includes some report-generating tools to collect the data generated and present it in several different formats. Normally you can just run "sloccount DIRECTORY" and all the source code in the directory and its descendants will be counted. %prep %setup -q %build make CC="cc -O" %install export PATH=/opt/freeware/bin:$PATH [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 make install_programs PREFIX=${RPM_BUILD_ROOT}%{_prefix} make install_man PREFIX=${RPM_BUILD_ROOT}%{_prefix} mv ${RPM_BUILD_ROOT}%{_prefix}/share/man/man1/* ${RPM_BUILD_ROOT}%{_mandir}/man1 gunzip ${RPM_BUILD_ROOT}%{_mandir}/man1/* cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc sloccount.html README ChangeLog COPYING TODO %{_bindir}/* %{_mandir}/man1/* /usr/bin/* %changelog * Thu Oct 23 2008 Michael Perzl - 2.26-1 - first version for AIX V5.1 and higher