rpmlint-mini/rpmlint-mini.spec

131 lines
3.9 KiB
RPMSpec

#
# spec file for package rpmlint-mini (Version 1.0)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: rpmlint-mini
BuildRequires: glib2-devel pkg-config rpm-python rpmlint
Summary: Rpm correctness checker
Version: 1.0
Release: 156
Url: http://rpmlint.zarb.org/
License: GPL v2 or later
Group: System/Packages
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: desktop-file-utils-0.15.tar.bz2
Patch10: static-desktop-file-validate.diff
Source100: rpmlint-deps.txt
Source101: rpmlint.wrapper
Patch1: package-rpmlintrc.diff
%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 desktop-file-utils-0.15
%patch10
%build
autoreconf -fi
%configure
pushd src
make desktop-file-validate
popd
%install
# test if the rpmlint works at all
. /.buildenv
set +e
/usr/bin/rpmlint /.rpm-cache/$BUILD_BASENAME/m4.rpm
test $? -gt 0 -a -lt 60 && exit 1
set -e
# okay, lets put it together
mkdir -p $RPM_BUILD_ROOT/opt/testing/share/rpmlint
install -m 755 -D src/desktop-file-validate $RPM_BUILD_ROOT/opt/testing/bin/desktop-file-validate
cp -a /usr/share/rpmlint/*.py $RPM_BUILD_ROOT/opt/testing/share/rpmlint
cd %{py_libdir}
for f in $(<%{SOURCE100}); do
find -path "*/$f" -exec install -D {} $RPM_BUILD_ROOT/opt/testing/%{_lib}/python%{py_ver}/{} \;
done
install -D /usr/bin/python $RPM_BUILD_ROOT/opt/testing/bin/python
cp -a %_libdir/libpython%{py_ver}.so.* $RPM_BUILD_ROOT/opt/testing/%{_lib}
pushd $RPM_BUILD_ROOT/opt/testing/share/rpmlint
patch -p0 --no-backup-if-mismatch -i %PATCH1
PYTHONOPTIMIZE=1 python %py_libdir/py_compile.py *.py
popd
rm -f $RPM_BUILD_ROOT/opt/testing/share/rpmlint/*.py
rm -rf $RPM_BUILD_ROOT/{usr,etc}
rm -f $RPM_BUILD_ROOT/opt/testing/bin/rpmlint
install -m 755 -D %{SOURCE101} $RPM_BUILD_ROOT/opt/testing/bin/rpmlint
install -m 644 -D /usr/share/rpmlint/config $RPM_BUILD_ROOT/opt/testing/share/rpmlint/config
# hackatlon
%define my_requires %{_builddir}/%{?buildsubdir}/%{name}-requires
cat << EOF > %my_requires
cat - > file.list
%{__find_requires} < file.list > requires.list
%{__find_provides} < file.list > provides.list
while read i; do
grep -F -v "\$i" requires.list > requires.list.new
mv requires.list.new requires.list
done < provides.list
cat requires.list
rm -f requires.list provides.list file.list
EOF
chmod +x %my_requires
%define _use_internal_dependency_generator 0
%define __find_requires %my_requires
%define __find_provides %nil
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,0755)
/opt/testing
%changelog
* Sat Jun 28 2008 dmueller@suse.de
- ignore warnings in the test package
* Mon Mar 10 2008 dmueller@suse.de
- update desktop-file-validate to 0.14
* for changelog, see desktop-file-utils package
* Wed Feb 13 2008 dmueller@suse.de
- update to (also) build rpmlint 0.82
* Thu Nov 22 2007 dmueller@suse.de
- add missing utf8 module (#343642)
* Mon Oct 29 2007 dmueller@suse.de
- update to (also) build rpmlint 0.81
- update desktop-file-validate to 0.14
* Fri Jun 22 2007 dmueller@suse.de
- refresh patches
* Thu Jun 07 2007 dmueller@suse.de
- update desktop-file-validate to 0.13
- fix build for lib64 archs
* Wed Jun 06 2007 dmueller@suse.de
- add static copy of desktop-file-validate to fix
the rpmlint check for desktop files
* Tue Jun 05 2007 dmueller@suse.de
- remove source files to reduce size
- read $RPM_SOURCE_DIR/%%{name}-%%{version}-rpmlintrc as well
* Thu May 24 2007 dmueller@suse.de
- read $RPM_SOURCE_DIR/rpmlintrc as well to allow
package specific overrides
* Tue May 15 2007 dmueller@suse.de
- Initial package