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 http://bugs.opensuse.org/
#

# norootforbuild


Name:           checkinstall
Summary:        "make install" Installation Tracker
Version:        1.6.2
Release:        6
License:        GPLv2+
Group:          Development/Tools/Building
Url:            http://asic-linux.com.mx/~izto/checkinstall/
Source:         checkinstall-%{version}.tar.bz2
Source1:        checkinstall.in
Source2:        checkinstallrc-dist.in
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

%description
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.



Authors:
--------
    Felipe Eduardo Sánchez Díaz Durân

%prep                                                                          
%setup -q
%patch0
%patch2
%patch3
%patch6
%patch14
%patch15
%patch19
%patch10
%patch20 -p1
cp %{S:1} %{S:2} ./
rm -f checkinstall checkinstallrc-dist
rename -no -nb locale/*.po

%build
# 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"

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

%files -f %{name}.lang
%defattr(-,root,root)
%attr(644,root,root) %config /etc/checkinstallrc
/etc/checkinstallrc-dist
/usr/bin/installwatch
%{_libdir}/installwatch.so
%attr(555,root,root) /usr/sbin/checkinstall
/usr/sbin/makepak
%docdir /usr/share/doc/packages/checkinstall
/usr/share/locale/es/LC_MESSAGES/checkinstall.mo
%doc 

%changelog
openSUSE Build Service is sponsored by