Enable Centos 5 build in Fedora Copr

This commit is contained in:
Christophe Grenier 2016-04-11 18:34:27 +02:00
parent 4968f66059
commit 66acb1b105
4 changed files with 50 additions and 2 deletions

View file

@ -1,4 +1,5 @@
SUBDIRS = icons man src
docdir ?= $(datadir)/doc/$(PACKAGE)
EXTRA_DIST = AUTHORS COPYING ChangeLog INFO INSTALL NEWS README.md README_dev_photorec.txt THANKS compile.sh \
progsreiserfs-journal.patch progsreiserfs-file-read.patch \

View file

@ -5,6 +5,7 @@ AC_PREREQ([2.59])
AC_INIT([testdisk],[7.1-WIP],[grenier@cgsecurity.org])
AC_LANG(C)
sinclude(acx_pthread.m4)
sinclude(mkdir.m4)
TESTDISKDATE="April 2016"
AC_SUBST(TESTDISKDATE)
AC_DEFINE_UNQUOTED([TESTDISKDATE],"$TESTDISKDATE",[Date of release])

View file

@ -14,12 +14,14 @@ BuildRequires: desktop-file-utils
BuildRequires: e2fsprogs-devel
BuildRequires: libewf-devel
BuildRequires: libjpeg-devel
BuildRequires: libuuid-devel
BuildRequires: ncurses-devel >= 5.2
BuildRequires: ntfs-3g-devel
BuildRequires: zlib-devel
%if "%{el5}" != "1"
BuildRequires: libuuid-devel
BuildRequires: qt5-linguist
BuildRequires: qt5-qtbase-devel
BuildRequires: zlib-devel
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
@ -53,6 +55,7 @@ Linux Raid, Linux Swap, LVM, LVM2, NSS, ReiserFS, UFS, XFS.
PhotoRec is a signature based file recovery utility. It handles more than
440 file formats including JPG, MSOffice, OpenOffice documents.
%if "%{el5}" != "1"
%package -n qphotorec
Summary: Signature based file carver. Recover lost files
Group: Applications/System
@ -62,12 +65,18 @@ QPhotoRec is a Qt version of PhotoRec. It is a signature based file recovery
utility. It handles more than 440 file formats including JPG, MSOffice,
OpenOffice documents.
%endif
%prep
%setup -q
%build
autoreconf -vif -I config -W all
%if "%{el5}" == "1"
%configure
%else
%configure --docdir=%{_pkgdocdir}
%endif
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
@ -76,6 +85,7 @@ make DESTDIR="%{buildroot}" install
%clean
rm -rf %{buildroot}
%if "%{el5}" != "1"
%check
desktop-file-validate %{buildroot}/%{_datadir}/applications/qphotorec.desktop
@ -91,11 +101,22 @@ fi
%posttrans -n qphotorec
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif
%files
%defattr(644,root,root,755)
%if "%{el5}" == "1"
%doc /usr/share/doc/testdisk/AUTHORS
%doc /usr/share/doc/testdisk/ChangeLog
%doc /usr/share/doc/testdisk/NEWS
%doc /usr/share/doc/testdisk/README.md
%doc /usr/share/doc/testdisk/THANKS
%doc /usr/share/doc/testdisk/documentation.html
%else
%license COPYING
%doc AUTHORS ChangeLog NEWS README.md THANKS
%doc documentation.html
%endif
%attr(755,root,root) %{_bindir}/fidentify
%attr(755,root,root) %{_bindir}/photorec
%attr(755,root,root) %{_bindir}/testdisk
@ -106,6 +127,7 @@ fi
%{_mandir}/zh_CN/man8/photorec.8*
%{_mandir}/zh_CN/man8/testdisk.8*
%if "%{el5}" != "1"
%files -n qphotorec
%attr(755,root,root) %{_bindir}/qphotorec
%{_mandir}/man8/qphotorec.8*
@ -113,6 +135,7 @@ fi
%{_datadir}/applications/qphotorec.desktop
%{_datadir}/icons/hicolor/48x48/apps/qphotorec.png
%{_datadir}/icons/hicolor/scalable/apps/qphotorec.svg
%endif
%changelog
* Sun Jan 24 2016 Christophe Grenier <grenier@cgsecurity.org> 7.1-0

23
mkdir.m4 Normal file
View file

@ -0,0 +1,23 @@
dnl Copyright (C) 2007-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# AC_PROG_MKDIR_P
# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix
# for interoperability with automake-1.9.6 from autoconf-2.62.
# Remove this macro when we can assume autoconf >= 2.62 or
# autoconf >= 2.60 && automake >= 1.10.
# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
m4_ifndef([AC_AUTOCONF_VERSION],[
m4_ifdef([AC_PROG_MKDIR_P], [
dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed.
m4_define([AC_PROG_MKDIR_P],
m4_defn([AC_PROG_MKDIR_P])[
AC_SUBST([MKDIR_P])])], [
dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P.
AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
[AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
MKDIR_P='$(mkdir_p)'
AC_SUBST([MKDIR_P])])])
])