Skip to content

Conversation

@WeilunFong
Copy link

Current .spec file is out of date and its writing is not friendly for developers. Refer to splint.spec from fedora, I refactor the spec file and this commit mainly includes following items:

  • improve writing;
  • improve provide list and file list;
  • improve build command, add parallel compile support.

I test it well on my CentOS 7 machine (build with gcc 7.3.0 and rpmbuild 4.11.3)

$ rpmbuild -ba splint.spec > /dev/null 2>&1
$ echo $?
0
$ ls ../RPMS/x86_64/
splint-3.1.2-2.el7.centos.x86_64.rpm  splint-debuginfo-3.1.2-2.el7.centos.x86_64.rpm
$ sudo rpm -ivh ../RPMS/x86_64/splint-3.1.2-2.el7.centos.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:splint-3.1.2-2.el7.centos        ################################# [100%]
$ splint --help | head -n1
Splint 3.1.2 --- 07 Sep 2021

Source files are .c, .h and .lcl files.  If there is no suffix,
   Splint will look for <file>.c and <file>.lcl.

Use splint -help <topic or flag name> for more information

Topics:

   annotations (describes source-code annotations)
   comments (describes control comments)
   flags (describes flag categories)
   flags <category> (describes flags in category)
   flags all (short description of all flags)
   flags alpha (list all flags alphabetically)
   flags full (full description of all flags)
   mail (information on mailing lists)
   modes (show mode settings)
   parseerrors (help on handling parser errors)
   prefixcodes (character codes in namespace prefixes)
   references (sources for more information)
   vars (environment variables)
   version (information on compilation, maintainer)

$ splint --help version
Splint 3.1.2 --- 07 Sep 2021

Maintainer: splint-bug@splint.org
Compiled using x86_64-redhat-linux-gnu-gcc  -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic on Linux
localhost 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64
x86_64 x86_64 GNU/Linux by wlf

Look forward for your review, thx!

Refer to fedora project, refactor the .spec file, including following items:
 - improve writing;
 - improve provide list and file list;
 - improve build command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant