File checkinstall.spec of Package checkinstall

# spec file for package checkinstall
# Copyright (c) 2011 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

# norootforbuild

Name:           checkinstall
Summary:        "make install" Installation Tracker
Version:        1.6.2
Release:        6
License:        GPLv2+
Group:          Development/Tools/Building
Source:         checkinstall-%{version}.tar.bz2
Patch0:         checkinstall-glibc_bug.patch
Patch2:         checkinstall-destdir.patch
Patch3:         checkinstall-makefile_cleanup.patch
Patch6:         checkinstall-no_fortify_source.patch
Patch10:        installwatch-glibc_minor.patch
Patch14:        checkinstall-translations.patch.bz2
Patch15:        checkinstall-install_paths.patch
Patch19:        checkinstall-scandir.patch
Patch20:        checkinstall-ldflags.patch
Patch21:        checkinstall-set_buildroot.patch
Provides:       installwatch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Uses installwatch to keep track of all files created or modified during
the run of an installation script like "make install". The information
is used to create a rpm package that holds all files installed by the
tracked installation. This makes it possible, for example, to remove
all files later with rpm -e package or to install the package on
another system.

    Felipe Eduardo Sánchez Díaz Durân

%setup -q
%patch20 -p1
cp %{S:1} %{S:2} ./
rm -f checkinstall checkinstallrc-dist
rename -no -nb locale/*.po

# 1. Must pass -m32/-m64 to linker to choose correct output format.
# 2. ld does not accept -mXX, only gcc. (=> LD=gcc)
# 3. Because installwatch uses _init as a symbol, must use -nostdlib
make CFLAGS="%{optflags}" LD="gcc" LDFLAGS="%optflags -nostdlib"

make CFLAGS="%{optflags}" LD="gcc" LDFLAGS="%optflags -nostdlib" \
   DESTDIR=%{buildroot} PREFIX=%{_prefix} LIBDIR=%{_prefix}/%_lib install
%{find_lang} %{name}

%files -f %{name}.lang
%attr(644,root,root) %config /etc/checkinstallrc
%attr(555,root,root) /usr/sbin/checkinstall
%docdir /usr/share/doc/packages/checkinstall