[fdupes/f17] add macros.fdupes
Tom Callaway
spot at fedoraproject.org
Tue May 15 21:23:36 UTC 2012
commit 53558dd0172be963f5dfd579795b14c52b73ecbc
Author: Tom Callaway <spot at fedoraproject.org>
Date: Tue May 15 17:23:34 2012 -0400
add macros.fdupes
fdupes.spec | 16 ++++++++--------
macros.fdupes | 21 +++++++++++++++++++++
2 files changed, 29 insertions(+), 8 deletions(-)
---
diff --git a/fdupes.spec b/fdupes.spec
index 8dfcef9..6fa7ab5 100644
--- a/fdupes.spec
+++ b/fdupes.spec
@@ -1,12 +1,12 @@
Summary: Finds duplicate files in a given set of directories
Name: fdupes
Version: 1.50
-Release: 0.4.PR2%{?dist}
+Release: 0.5.PR2%{?dist}
License: MIT
Group: Applications/File
URL: http://netdial.caribe.net/~adrian2/fdupes.html
Source0: http://netdial.caribe.net/~adrian2/programs/fdupes/beta/%{name}-%{version}-PR2.tar.gz
-
+Source1: macros.fdupes
Patch0: %{name}-%{version}-destdir.patch
# http://bugs.debian.org/213385
Patch1: %{name}-%{version}-compare-file.patch
@@ -15,7 +15,6 @@ Patch2: %{name}-%{version}-lfs.patch
# http://bugs.debian.org/353789
Patch3: %{name}-%{version}-typo.patch
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description
FDUPES is a program for identifying duplicate files residing within specified
@@ -39,16 +38,14 @@ make %{?_smp_mflags} COMPILER_OPTIONS="$RPM_OPT_FLAGS"
# ... etc..
%install
-rm -rf $RPM_BUILD_ROOT
-
make install INSTALL="%{__install} -p" BIN_DIR=%{_bindir} \
MAN_BASE_DIR=%{_mandir} DESTDIR=$RPM_BUILD_ROOT
-%clean
-rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
+install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
%files
-%defattr(-,root,root,-)
+%{_sysconfdir}/rpm/macros.fdupes
%doc CHANGES
%doc CONTRIBUTORS
%doc README
@@ -57,6 +54,9 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/%{name}
%changelog
+* Tue May 15 2012 Tom Callaway <spot at fedoraproject.org> - 1.50-0.5.PR2
+- add rpm macro file
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.50-0.4.PR2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/macros.fdupes b/macros.fdupes
new file mode 100644
index 0000000..cf0cb65
--- /dev/null
+++ b/macros.fdupes
@@ -0,0 +1,21 @@
+%fdupes(s) \
+ _target=""; \
+ _symlinks=0; \
+ %{-s:_symlinks=1;} \
+ fdupes -q -n -r %1 | \
+ while read _file; do \
+ if test -z "$_target" ; then \
+ _target="$_file"; \
+ else \
+ if test -z "$_file" ; then \
+ _target=""; \
+ continue ; \
+ fi ; \
+ if test "$_symlinks" = 1; then \
+ ln -sf "${_target#%{buildroot}}" "$_file"; \
+ else \
+ ln -f "$_target" "$_file"; \
+ fi ;\
+ fi ; \
+ done \
+%{nil}
More information about the scm-commits
mailing list