File rpmlint.spec of Package rpmlint

#
# spec file for package rpmlint (Version 0.90)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#

# norootforbuild

#!BuildIgnore: rpmlint-mini

Name:           rpmlint
BuildRequires:  rpm-python
Summary:        Rpm correctness checker
Version:        0.90
Release:        3
Source0:        %{name}-%{version}.tar.bz2
Source1:        config
Source1001:     config.in
Source2:        DesktopTranslationCheck.py
Source3:        DuplicatesCheck.py
Source4:        CheckBuildRoot.py
Source5:        CheckExecDocs.py
Source6:        CheckPkgConfig.py
Source7:        LibraryPolicyCheck.py
Source8:        CheckCommonFiles.py
Source9:        CheckInitScripts.py
Source10:       CheckIconSizes.py
Source11:       BrandingPolicyCheck.py
Source12:       CheckKDE4Deps.py
Source13:       KMPPolicyCheck.py
Source14:       CheckSUIDPermissions.py
Source15:       CheckPolkitPrivs.py
Source16:       CheckDBUSServices.py
Source17:       CheckFilelist.py
Source18:       CheckDBusPolicy.py
Source19:       CheckAlternativesGhostFiles.py
Source100:      syntax-validator.py
Url:            http://rpmlint.zarb.org/
License:        GPL v2 or later
Group:          System/Packages
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       rpm-python, /usr/bin/readelf, file, findutils, cpio, bash
Requires:       desktop-file-utils
BuildArch:      noarch
Patch0:         rpmlint-suse.diff
Patch2:         suse-version.diff
Patch3:         disable-menu-check.diff
Patch4:         invalid-filerequires.diff
Patch5:         suse-bzip-bigger-than-100k.diff
Patch6:         suse-filesystem.diff
Patch7:         suse-checks.diff
Patch8:         suse-debuginfo.diff
Patch9:         no-doc-for-lib.diff
Patch10:        add-scoring-support.diff
Patch12:        usr-arch.diff
Patch13:        script-interpreter-only-for-exec-scripts.diff
Patch14:        sourced-dirs.diff
Patch16:        dependency-parsing.diff
Patch17:        docdata-examples.diff
Patch18:        suse-hide-unstripped-outside-build.diff
Patch19:        yast-provides.diff
Patch20:        xdg-paths-update.diff
Patch21:        fix-buildroot-test.diff
Patch22:        better-wrong-script.diff
Patch23:        buildroot-doc.diff
# bogus, fails with aaa_base. disabled
Patch24:        sysv5-init-checks.diff
Patch26:        ignore-non-readable-in-etc.diff
Patch27:        detailed-desktop-file-check.diff
Patch29:        rpmgroup-checks.diff
Patch30:        devel-provide-is-devel-package.diff
# what's the reason behind that one?
Patch31:        only-reg-files-are-scripts.diff
Patch33:        check-buildroot-during-install.diff
Patch34:        verify-buildrequires.diff
Patch35:        fix-versioned-prereq.diff
Patch37:        buildroot-in-scripts.diff
Patch39:        libtool-wrapper-check.diff
Patch41:        perl-versioned-rpath-deps.diff
Patch42:        check-cron-dependency.diff
Patch46:        locale-support.diff
# not is also in CheckFilelist.py
Patch47:        noarch-lib64.diff
Patch49:        stricter-tags-check.diff
Patch50:        suse-no-run-ldconfig.diff
Patch51:        description-check.diff
# this is the wrong place here
Patch52:        suppress-for-perl-python.diff
Patch54:        locale-update.diff
Patch57:        suse-mono-deps-checks.diff
Patch58:        add-weak-dependencies.diff
Patch60:        selfconflicts-provide.diff
Patch62:        no-badness-return.diff
Patch65:        suse-shlib-devel-dependency.diff
Patch67:        suse-required-lsb-tags.diff
Patch68:        more-verbose-lsb-check.diff
Patch69:        useless-requires-doc.diff
Patch71:        suse-binary-info-compile-opts.diff
Patch72:        version-control-internal-file.diff
Patch73:        avoid-mismatched-libregex.diff
%py_requires

%description
Rpmlint is a tool to check common errors on rpm packages. Binary and
source packages can be checked.



Authors:
--------
    Frederic Lepied <flepied@mandriva.com>
    Gwenole Beauchesne <gbeauchesne@mandriva.com>

%prep
%setup -q -n rpmlint-%{version}
%patch0
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%patch12
%patch13
%patch14
%patch16
%patch17
%patch18
%patch19
%patch20
%patch21
%patch22
%patch23
# bogus, fails with aaa_base. disabled
#patch24
#%patch26
%patch27
%patch29
%patch30
#%patch31
# needs rediff
#%patch33
#%patch34
#%patch35
%patch37
#%patch39
#%patch41
#%patch42
#%patch46
#%patch47
#%patch49
%patch50
%patch51
#%patch52
%patch54
#%patch57
%patch58
#%patch60
%patch62
#%patch63
#%patch65
#%patch67
#%patch68
#%patch69
#%patch71
%patch72
%patch73
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .
cp -p %{SOURCE3} .
cp -p %{SOURCE4} .
cp -p %{SOURCE5} .
cp -p %{SOURCE6} .
cp -p %{SOURCE7} .
cp -p %{SOURCE8} .
cp -p %{SOURCE9} .
cp -p %{SOURCE10} .
cp -p %{SOURCE11} .
cp -p %{SOURCE12} .
cp -p %{SOURCE13} .
cp -p %{SOURCE14} .
cp -p %{SOURCE15} .
cp -p %{SOURCE16} .
cp -p %{SOURCE17} .
cp -p %{SOURCE18} .
cp -p %{SOURCE19} .

%build
make

%install
make install DESTDIR=$RPM_BUILD_ROOT
# the provided bash-completion does not work and only prints bash errors
rm -rf  $RPM_BUILD_ROOT/etc/bash_completion.d
mv $RPM_BUILD_ROOT/etc/rpmlint/config $RPM_BUILD_ROOT/usr/share/rpmlint/config
head -n 8 $RPM_BUILD_ROOT/usr/share/rpmlint/config > $RPM_BUILD_ROOT/etc/rpmlint/config
# make sure that the package is sane
python -tt %{SOURCE100} $RPM_BUILD_ROOT/usr/share/rpmlint/*.py $RPM_BUILD_ROOT/usr/share/rpmlint/config

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,0755)
%doc COPYING ChangeLog INSTALL README*
%{_prefix}/bin/*
%{_prefix}/share/rpmlint
%config(noreplace) /etc/rpmlint/config
%dir /etc/rpmlint
/usr/share/man/man1/rpmlint.1.gz

%changelog
openSUSE Build Service is sponsored by