Fedora Account System
Red Hat Associate
Red Hat Customer
Spec Name or Url: http://files.hadess.net/redhat/perso/spec/sloccount.spec SRPM Name or Url: http://files.hadess.net/redhat/perso/source/sloccount-2.26-1.src.rpm 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.
I don't know what the policies of Fedora are on data that is generated by a program, but sloccount produces the following statement at the bottom of each report: SLOCCount, Copyright (C) 2001-2004 David A. Wheeler SLOCCount is Open Source Software/Free Software, licensed under the GNU GPL. SLOCCount comes with ABSOLUTELY NO WARRANTY, and you are welcome to redistribute it under certain conditions as specified by the GNU GPL license; see the documentation for details. Please credit this data as "generated using David A. Wheeler's 'SLOCCount'." Does the "Please credit.." line cause a problem at all? Is it required when including the data in a report, etc?
Hi Bastien & Josh, I don't think the "Please credit..." line should be seen as anything more (or less!) than a polite request by the author. The lines immediately preceeding it clearly and unequivocally state that SLOCCount is GPL-ed. Moving on to a quick (incomplete!) review, I noticed the following: - the source does not match upstream according to: wget http://www.dwheeler.com/sloccount/sloccount-2.26.tar.gz cmp sloccount-2.26.tar.gz.1 sloccount-2.26.tar.gz and this is a necessary pre-requisiste for almost any review - wrong "BuildRoot:" is used -- please see: http://fedoraproject.org/wiki/PackagingGuidelines
" - the source does not match upstream according to:" I'll blame Scott on that one, I used his source RPM as a starting point. I'll fix up the rest of the .spec when I have a moment.
Hi Bastien, its been 2+ months since the last comment -- is this submission still active?
I really slacked on that. Just need to do some work on it...
Updated packages at: http://files.hadess.net/redhat/perso/spec/sloccount.spec and http://files.hadess.net/redhat/perso/source/sloccount-2.26-1.src.rpm
Hi Bastien, The above SRPM URL gave a 404 but I found the "-2" rev which I assume you meant to reference in the first place. 36397816454626ed4abc11afc66783aaec01f444 sloccount-2.26-2.src.rpm good: - source matches upstream - builds on FC4 i386 (still waiting on the mock build...) - rpmlint OK -- no warnings or errors - name OK - license is OK and correctly included - spec-file is clean and simple (although it might be nice to use "%setup -q" but thats just a suggestion!) - no shared libs - dir ownership and permissions OK very minor nit: - the description could be shortened a bit and the text better formatted -- but thats not a blocker Its taking me a while to get a mock build and I think its due to a slow network connection. As soon as I get a clean mock build, I'll approve the package.
[note: the above was an sha1sum] Builds in mock on FC4 i386. Ran OK on some simple tests. APPROVED.
Thanks for the advices Ed, it's all in CVS now.
Doesn't build with RPM optflags. A complete patch would be needed (since CFLAGS are not accepted) or a hack like this: --- sloccount.spec.orig 2006-04-04 11:21:23.000000000 +0200 +++ sloccount.spec 2006-04-04 18:54:27.000000000 +0200 @@ -19,7 +19,7 @@ %setup -q %build -make +make CC="gcc ${RPM_OPT_FLAGS}" %install rm -rf ${RPM_BUILD_ROOT}
That's actually what's recommended: # Set this to your C compiler, if it's not "gcc"; a likely alternative is "cc". # The "-Wall" option turns on warnings in gcc. gcc users might also want # to consider using "-Werror", which turns warnings into errors. CC=gcc -Wall Should be fixed in sloccount-2.26-4
Package Change Request ====================== Package Name: sloccount New Branches: el5 el6 Owners: hadess grover
Git done (by process-git-requests).