-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathsplint.spec
81 lines (51 loc) · 1.82 KB
/
splint.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
%define prefix /usr
%define ver 3.0.1.6
Summary: Splint - A tool for statically checking C programs
Name: splint
Version: %ver
Release: 1
Copyright: MIT
Url: http://www.splint.org
Packager: Heiko Abraham, [email protected]
Group: Development/Languages
Source: %{name}-%{ver}.src.tgz
BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root
Requires: gcc
%description
Splint is a tool for statically checking C programs for security vulnerabilities
and common programming mistakes. With minimal effort, Splint can be used as a
better lint(1).If additional effort is invested adding annotations to programs,
Splint can perform stronger checks than can be done by any standard lint. For
full documentation, please see http://www.splint.org.
Please set environment variables:
- LARCH_PATH=%{prefix}/share/splint/lib
and
- LCLIMPORTDIR=%{prefix}/share/splint/imports
.
%prep
%setup -q
%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
make
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{prefix}/bin
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/doc/%{name}-%{PACKAGE_VERSION}
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/splint/imports
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/splint/lib
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/man/man1
make DESTDIR=$RPM_BUILD_ROOT install
# now install docs, why 'make install' will not do this
cp README $RPM_BUILD_ROOT%{prefix}/share/doc/%{name}-%{PACKAGE_VERSION}
cp doc/*.html $RPM_BUILD_ROOT%{prefix}/share/doc/%{name}-%{PACKAGE_VERSION}
cp doc/*.pdf $RPM_BUILD_ROOT%{prefix}/share/doc/%{name}-%{PACKAGE_VERSION}
%post
%preun
%clean
rm -rf $RPM_BUILD_ROOT/*
rm -rf $RPM_BUILD_DIR/%{name}-%{PACKAGE_VERSION}/*
%files
%{prefix}/bin/splint
%{prefix}/share/splint/imports/*
%{prefix}/share/splint/lib/*
%{prefix}/share/doc/%{name}-%{PACKAGE_VERSION}/*