summaryrefslogtreecommitdiffstats
path: root/testdisk-copr.spec
blob: d26b660e1dab24cd4eeeaebf97f36edf4ce2ef6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
Summary:	Tool to check and undelete partition, PhotoRec recovers lost files
Summary(pl.UTF8):	Narzędzie sprawdzające i odzyskujące partycje
Summary(fr.UTF8):	Outil pour vérifier et restaurer des partitions
Summary(ru_RU.UTF8): Программа для проверки и восстановления разделов диска
Name:		testdisk
Version:	{{{ git_dir_version }}}
Release:	0%{?dist}
License:	GPLv2+
Group:		Applications/System
Source0:	{{{ git_dir_pack name=testdisk }}}
URL:		https://www.cgsecurity.org/wiki/TestDisk
VCS:		{{{ git_dir_vcs }}}
BuildRequires:	libtool autoconf automake
BuildRequires:	make
BuildRequires:	desktop-file-utils
BuildRequires:	e2fsprogs-devel
%if  0%{?rhel} < 8
BuildRequires:	libewf-devel
%endif
BuildRequires:	libjpeg-devel
BuildRequires:	ncurses-devel >= 5.2
BuildRequires:	ntfs-3g-devel
BuildRequires:	zlib-devel
%if  0%{?rhel} != 5
BuildRequires:	libuuid-devel
BuildRequires:	qt5-linguist
BuildRequires:	qt5-qtbase-devel
%endif
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}

%description
Tool to check and undelete partition. Works with FAT12, FAT16, FAT32,
NTFS, ext2, ext3, ext4, btrfs, BeFS, CramFS, HFS, JFS, 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.

%description -l pl.UTF8
Narzędzie sprawdzające i odzyskujące partycje. Pracuje z partycjami:
FAT12, FAT16, FAT32, NTFS, ext2, ext3, ext4, btrfs, BeFS, CramFS, HFS, JFS,
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.

%description -l fr.UTF8
TestDisk vérifie et récupère les partitions. Fonctionne avec
FAT12, FAT16, FAT32, NTFS, ext2, ext3, ext4, btrfs, BeFS, CramFS, HFS, JFS,
Linux Raid, Linux Swap, LVM, LVM2, NSS, ReiserFS, UFS, XFS.
PhotoRec utilise un mécanisme de signature pour récupérer des fichiers
perdus. Il reconnait plus de 440 formats de fichiers dont les JPEG, les
documents MSOffice ou OpenOffice.

%description -l ru_RU.UTF8
Программа для проверки и восстановления разделов диска.
Поддерживает следующие типы разделов:
FAT12, FAT16, FAT32, NTFS, ext2, ext3, ext4, btrfs, BeFS, CramFS, HFS, JFS,
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  0%{?rhel} != 5
%package -n qphotorec
Summary:	Signature based file carver. Recover lost files
Group:		Applications/System

%description -n qphotorec
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
{{{ git_dir_setup_macro }}}

%build
autoreconf -vif -I config -W all
%if  0%{?rhel} == 5
%configure
%else
%configure --docdir=%{_pkgdocdir}
%endif
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make DESTDIR="%{buildroot}" install

%if  0%{?rhel} != 5
%check
desktop-file-validate %{buildroot}/%{_datadir}/applications/qphotorec.desktop

%post -n qphotorec
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun -n qphotorec
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans -n qphotorec
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%endif

%files
%if  0%{?rhel} == 5
%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
%{_mandir}/man8/fidentify.8*
%{_mandir}/man8/photorec.8*
%{_mandir}/man8/testdisk.8*
%{_mandir}/zh_CN/man8/fidentify.8*
%{_mandir}/zh_CN/man8/photorec.8*
%{_mandir}/zh_CN/man8/testdisk.8*

%if  0%{?rhel} != 5
%files -n qphotorec
%attr(755,root,root) %{_bindir}/qphotorec
%{_mandir}/man8/qphotorec.8*
%{_mandir}/zh_CN/man8/qphotorec.8*
%{_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
- spec file for fedora copr integration