The patch does not apply since it has been already applied by %autosetup.
If you really prefer going the patch way, just reuse the debian patch - don't even change a name of it.
Marcin
On Sat, Feb 3, 2018 at 10:21 AM, Federico Bruni <fede@xxxxxxxxxxxxx> wrote:
Il giorno sab 3 feb 2018 alle 8:47, Federico Bruni <fede@xxxxxxxxxxxxx> ha scritto:
Il giorno sab 3 feb 2018 alle 8:33, Federico Bruni <fede@xxxxxxxxxxxxx> ha scritto:
Should I ask upstream to fix it and put COPYING under /usr/share/licenses?
And someone suggested that I could just delete the file after the installation.
You'd rather go with asking upstream to fix it (or provide a patch to the Makefile)?
Probably I'd better add a patch to the spec before the %build
I see that this is also what Debian packager did...
But there's something wrong with my patch file. Can you help? patch file must be generated with `diff -u`, correct? No way to use `git format-patch`?
# ERROR
$ fedpkg --release f27 local
sources file doesn't exist. Source files download skipped.
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.GzgKJM
+ umask 022
+ cd /home/fede/rpmbuild/SPECS/extractpdfmark + cd /home/fede/rpmbuild/SPECS/extractpdfmark
+ rm -rf extractpdfmark-1.0.2
+ /usr/bin/gzip -dc /home/fede/rpmbuild/SPECS/extractpdfmark/extractpdfmark-1.0. 2.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd extractpdfmark-1.0.2
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/cat /home/fede/rpmbuild/SPECS/extractpdfmark/exclude-some-docs- from-install.patch
+ /usr/bin/patch -s --fuzz=0 --no-backup-if-mismatch
+ echo 'Patch #0 (exclude-some-docs-from-install.patch):'
Patch #0 (exclude-some-docs-from-install.patch):
+ /usr/bin/patch --no-backup-if-mismatch -p0 --fuzz=0
patching file Makefile.am
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file Makefile.am.rej
error: Bad exit status from /var/tmp/rpm-tmp.GzgKJM (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.GzgKJM (%prep)
Could not execute local: rpmbuild --define '_sourcedir /home/fede/rpmbuild/SPECS/extractpdfmark' --define '_specdir /home/fede/rpmbuild/SPECS/extr # CHANGE TO THE SPEC FILEactpdfmark' --define '_builddir /home/fede/rpmbuild/SPECS/extr actpdfmark' --define '_srcrpmdir /home/fede/rpmbuild/SPECS/extr actpdfmark' --define '_rpmdir /home/fede/rpmbuild/SPECS/extr actpdfmark' --define 'dist .fc27' --define 'fedora 27' --eval '%undefine rhel' --define 'fc27 1' -ba /home/fede/rpmbuild/SPECS/extr actpdfmark/extractpdfmark.spec | tee .build-1.0.2-1.fc27.log
$ git diff
diff --git a/extractpdfmark.spec b/extractpdfmark.spec
index 576614f..8b4d4c2 100644
--- a/extractpdfmark.spec
+++ b/extractpdfmark.spec
@@ -7,6 +7,8 @@ License: GPLv3+
URL: https://github.com/trueroad/extractpdfmark/
Source0: https://github.com/trueroad/extractpdfmark/releases/download /v%{version}/%{name}-%{ version}.tar.gz
+Patch0: exclude-some-docs-from-install.patch
+
BuildRequires: automake gettext-devel poppler-devel
%description
@@ -39,6 +41,7 @@ PDF. By using this you can get the small PDF files that have preserved them.
%prep
%autosetup
+%patch0 -p0
%build
# PATCH FILE
$ cat exclude-some-docs-from-install.patch
--- Makefile.am.orig 2018-02-03 09:49:54.817154170 +0100
+++ Makefile.am 2018-02-03 09:50:21.210678718 +0100
@@ -1,6 +1,6 @@
SUBDIRS = src man test
-dist_doc_DATA = README.md README.ja.md COPYING
+dist_doc_DATA = README.md
EXTRA_DIST = autogen.sh
ACLOCAL_AMFLAGS = -I m4
_______________________________________________
packaging mailing list -- packaging@lists.fedoraproject.org
To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
_______________________________________________ packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx