85 lines
2.4 KiB
RPMSpec
85 lines
2.4 KiB
RPMSpec
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; /bin/echo $d)
|
|
%global macrosname macros.%{name}
|
|
%global nameversion %{name}-%{version}
|
|
|
|
Name: fdupes
|
|
Epoch: 1
|
|
Version: 1.6.1
|
|
Release: 6
|
|
Summary: Identifying duplicate files residing within specified directories
|
|
|
|
License: MIT
|
|
URL: https://github.com/adrianlopezroche/%{name}
|
|
Source0: %{url}/archive/v%{version}.tar.gz#/%{nameversion}.tar.gz
|
|
Source1: %{macrosname}
|
|
|
|
BuildRequires: gcc
|
|
|
|
Patch0: %{nameversion}-delete_old_TODO.patch
|
|
Patch1: %{nameversion}-option_sort_by_ctime.patch
|
|
Patch2: %{nameversion}-allow_a_instead_of_all.patch
|
|
|
|
%description
|
|
FDUPES is a program for identifying duplicate files residing within specified
|
|
directories.
|
|
|
|
%package_help
|
|
|
|
|
|
%prep
|
|
%autosetup -p 1
|
|
|
|
# From README.
|
|
%{__cat} << EOF > LICENSE
|
|
FDUPES Copyright (c) 1999 Adrian Lopez
|
|
|
|
Permission is hereby granted, free of charge, to any person
|
|
obtaining a copy of this software and associated documentation files
|
|
(the "Software"), to deal in the Software without restriction,
|
|
including without limitation the rights to use, copy, modify, merge,
|
|
publish, distribute, sublicense, and/or sell copies of the Software,
|
|
and to permit persons to whom the Software is furnished to do so,
|
|
subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be
|
|
included in all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
EOF
|
|
|
|
|
|
%build
|
|
%make_build COMPILER_OPTIONS="%{?optflags}" LDFLAGS="%{?__global_ldflags}"
|
|
|
|
|
|
%install
|
|
%make_install BIN_DIR=%{_bindir} MAN_BASE_DIR=%{_mandir}
|
|
install -Dpm 0644 %{SOURCE1} %{buildroot}%{macrosdir}/%{macrosname}
|
|
|
|
|
|
%check
|
|
./%{name} testdir
|
|
./%{name} --omitfirst testdir
|
|
./%{name} --recurse testdir
|
|
./%{name} --size testdir
|
|
|
|
|
|
%files
|
|
%license CONTRIBUTORS LICENSE
|
|
%{_bindir}/%{name}
|
|
%{macrosdir}/%{macrosname}
|
|
|
|
%files help
|
|
%doc CHANGES README
|
|
%doc %{_mandir}/man1/%{name}.1*
|
|
|
|
%changelog
|
|
* Tue Dec 3 2019 mengxian <mengxian@huawei.com> - 1:1.6.1-6
|
|
- Package init
|