LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File clazy.spec of Package clazy (Project home:buschmann23)

# spec file for package clazy
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015-2017 Buschmann <buschmann23@opensuse.org>
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

Name:           clazy
Version:        1.4
Release:        0
License:        LGPL-2.0+
Summary:        Static Qt Code Checker Plugin for Clang
Url:            https://github.com/KDE/clazy
Group:          Development/Tools/Other
Source0:        https://download.kde.org/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz
Source1:        https://download.kde.org/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz.sig
# keyring comes from public key servers
Source2:        clazy.keyring
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc-c++
BuildRequires:  cmake >= 3.3
BuildRequires:  llvm-clang-devel >= 3.9
%if 0%{?suse_version} > 1320
BuildRequires:  clang-devel-static >= 3.9
BuildRequires:  llvm llvm-devel llvm-clang
BuildRequires:  libstdc++-devel
BuildRequires:  ncurses-devel
BuildRequires:  zlib-devel
Requires:       llvm-clang >= 3.9

Qt oriented code checker based on clang framework. Krazy's little brother.

clazy is a compiler plugin which allows clang to understand Qt semantics.
You get more than 50 Qt related compiler warnings, ranging from unneeded
memory allocations to misusage of API, including fix-its for automatic

%package -n libclazylib0
Summary:        Provides Utility Functions for Clazy
Group:          System/Libraries

%description -n libclazylib0
This library provides utility functions for Clazy, a static code
checker for Qt. This library makes it possible to reuse Clazy's
utility functions.

%package -n libclazylib-devel
Summary:        Development and Header Files for libclazylib
Group:          Development/Libraries/C and C++
Requires:       libclazylib0 = %{version}-%{release}

%description -n libclazylib-devel
Development and header files for libclazylib, a utility function
library for the Clazy static code analyzer. Use this to reuse
Clazy's utility functions.

%setup -q

export CXX=/usr/bin/g++
# using -Wl,--no-undefined fails to build, so that switch is removed
%cmake \
    -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \


%post -n libclazylib0 -p /sbin/ldconfig
%postun -n libclazylib0 -p /sbin/ldconfig

%doc /usr/share/doc/clazy
%attr(755,root,root) %{_bindir}/clazy
%attr(755,root,root) %{_bindir}/clazy-standalone

%files -n libclazylib0
%doc COPYING-LGPL2.txt

%files -n libclazylib-devel
%doc COPYING-LGPL2.txt