File checkinstall.spec of Package checkinstall
#
# spec file for package checkinstall
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 Asterios Dramis <asterios.dramis@gmail.com>.
#
# 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: checkinstall
Version: 1.6.2
Release: 0
Summary: "make install" Installation Tracker
License: GPL-2.0+
Group: Development/Tools/Building
Url: http://asic-linux.com.mx/~izto/checkinstall/
Source0: http://asic-linux.com.mx/~izto/checkinstall/files/source/checkinstall-1.6.2.tar.gz
Source1: checkinstall.in
Source2: checkinstallrc-dist.in
Source3: checkinstall.8.gz
Source4: installwatch.1.gz
Patch0: checkinstall-glibc_bug.patch
Patch1: checkinstall-destdir.patch
Patch2: checkinstall-makefile_cleanup.patch
Patch3: checkinstall-no_fortify_source.patch
Patch4: installwatch-glibc_minor.patch
Patch5: checkinstall-translations.patch.bz2
Patch6: checkinstall-install_paths.patch
Patch7: checkinstall-scandir.patch
Patch8: checkinstall-ldflags.patch
Patch9: checkinstall-set_buildroot.patch
# PATCH-FIX-OPENSUSE fix_locale_install.patch asterios.dramis@gmail.com -- Fix Makefile for locale files installation
Patch10: fix_locale_install.patch
Patch11: glibc-2_33.patch
Recommends: %{name}-lang
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.
%lang_package
%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8 -p1
%patch9
%patch10
%patch11
cp -a %{SOURCE1} %{SOURCE2} ./
rm -f checkinstall checkinstallrc-dist
%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="%__cc" CC="%__cc" LDFLAGS="%{optflags} -nostdlib" %{?_smp_mflags}
%install
make CFLAGS="%{optflags}" LD="%__cc" CC="%__cc" LDFLAGS="%{optflags} -nostdlib" \
DESTDIR=%{buildroot} PREFIX=%{_prefix} LIBDIR=%{_libdir} install
# Install man pages
install -Dm 0644 %{SOURCE3} %{buildroot}%{_mandir}/man8/checkinstall.8.gz
install -Dm 0644 %{SOURCE4} %{buildroot}%{_mandir}/man1/installwatch.1.gz
%find_lang %{name}
%files
%defattr(-,root,root,-)
%doc BUGS COPYING CREDITS FAQ README RELNOTES TODO
%{_bindir}/installwatch
%{_libdir}/installwatch.so
%doc %{_mandir}/man?/*
%{_sbindir}/makepak
%{_sbindir}/checkinstall
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/checkinstallrc
%config %{_sysconfdir}/checkinstallrc-dist
%files lang -f %{name}.lang
%defattr(-,root,root,-)
%changelog