[Pkg-javascript-commits] [pdf.js] 205/207: Build and install ownCloud-specific version

David Prévot taffit at moszumanska.debian.org
Mon Jul 28 15:36:50 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 4d9b2873ce1dec17b5f2e79c9005bb8be42aaf00
Author: David Prévot <taffit at debian.org>
Date:   Sun Jul 27 16:21:35 2014 -0400

    Build and install ownCloud-specific version
---
 debian/control                                     |  3 +-
 debian/install                                     |  5 +--
 ...011-Build-ownCloud-specific-version-in-oc.patch | 23 ++++++++++++
 .../ownCloud/0012-Drop-attachment-feature.patch    | 42 ++++++++++++++++++++++
 debian/rules                                       |  8 +++++
 5 files changed, 78 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index a9aa306..8f19252 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,8 @@ Package: libjs-pdf
 Architecture: all
 Pre-Depends: ${misc:Pre-Depends}
 Depends: libjs-jquery, pdf.js-common (= ${binary:Version}), ${misc:Depends}
-Breaks: owncloud (<< 6.0.3~)
+Breaks: owncloud (<< 7.0.0+dfsg-2~)
+Replaces: owncloud (<< 7.0.0+dfsg-2~)
 Description: Portable Document Format (PDF) viewer built with HTML5
  PDF.js is a general-purpose, web standards-based platform for parsing and
  rendering PDFs.
diff --git a/debian/install b/debian/install
index 2ec6236..f3bdb2d 100644
--- a/debian/install
+++ b/debian/install
@@ -1,2 +1,3 @@
-build/generic/build	/usr/share/javascript/pdf
-build/generic/web	/usr/share/javascript/pdf
+build/generic/build		usr/share/javascript/pdf
+build/generic/web		usr/share/javascript/pdf
+oc/generic/web/viewer.js	usr/share/owncloud/apps/files_pdfviewer/3rdparty/pdfjs
diff --git a/debian/patches/ownCloud/0011-Build-ownCloud-specific-version-in-oc.patch b/debian/patches/ownCloud/0011-Build-ownCloud-specific-version-in-oc.patch
new file mode 100644
index 0000000..1e36b26
--- /dev/null
+++ b/debian/patches/ownCloud/0011-Build-ownCloud-specific-version-in-oc.patch
@@ -0,0 +1,23 @@
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit at debian.org>
+Date: Sun, 27 Jul 2014 15:49:22 -0400
+Subject: Build ownCloud-specific version in oc
+
+Forwarded: not-needed
+Gbp: Topic ownCloud
+---
+ make.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/make.js b/make.js
+index 6f616aa..fa012bd 100644
+--- a/make.js
++++ b/make.js
+@@ -34,7 +34,7 @@ var BUILD_NUMBER,
+     VERSION;
+ 
+ var ROOT_DIR = __dirname + '/', // absolute path to project's root
+-    BUILD_DIR = 'build/',
++    BUILD_DIR = 'oc/',
+     SRC_DIR = 'src/',
+     BUILD_TARGET = BUILD_DIR + 'pdf.js',
+     BUILD_WORKER_TARGET = BUILD_DIR + 'pdf.worker.js',
diff --git a/debian/patches/ownCloud/0012-Drop-attachment-feature.patch b/debian/patches/ownCloud/0012-Drop-attachment-feature.patch
new file mode 100644
index 0000000..6c030fa
--- /dev/null
+++ b/debian/patches/ownCloud/0012-Drop-attachment-feature.patch
@@ -0,0 +1,42 @@
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit at debian.org>
+Date: Sun, 27 Jul 2014 18:49:11 -0400
+Subject: Drop attachment feature
+
+ownCloud currently seems to choke on it.
+Gbp: Topic ownCloud
+---
+ web/viewer.js | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/web/viewer.js b/web/viewer.js
+index 78088ec..2d2eccc 100644
+--- a/web/viewer.js
++++ b/web/viewer.js
+@@ -1424,7 +1424,6 @@ var PDFView = {
+ 
+         thumbsButton.classList.add('toggled');
+         outlineButton.classList.remove('toggled');
+-        attachmentsButton.classList.remove('toggled');
+         thumbsView.classList.remove('hidden');
+         outlineView.classList.add('hidden');
+         attachmentsView.classList.add('hidden');
+@@ -1442,7 +1441,6 @@ var PDFView = {
+       case 'outline':
+         thumbsButton.classList.remove('toggled');
+         outlineButton.classList.add('toggled');
+-        attachmentsButton.classList.remove('toggled');
+         thumbsView.classList.add('hidden');
+         outlineView.classList.remove('hidden');
+         attachmentsView.classList.add('hidden');
+@@ -1888,11 +1886,6 @@ function webViewerInitialized() {
+       PDFView.switchSidebarView('outline');
+     });
+ 
+-  document.getElementById('viewAttachments').addEventListener('click',
+-    function() {
+-      PDFView.switchSidebarView('attachments');
+-    });
+-
+   document.getElementById('previous').addEventListener('click',
+     function() {
+       PDFView.page--;
diff --git a/debian/rules b/debian/rules
index 7bfa5a8..806d79e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,17 +6,25 @@ UPSTREAM := $(shell head -1 debian/changelog | sed 's/.*(//;s/[+-].*).*//')
 	dh $@ --with xul-ext
 
 override_dh_auto_build:
+	# Save initial Makefile
 	cp make.js make.js.bkp
+	# Normal builds
 	sed -i "s/@EXTENSION_VERSION@/$(UPSTREAM)/" make.js
 	nodejs make cmaps
 	nodejs make extension
 	nodejs make generic
+	# Build ownCloud-specific version
+	for i in debian/patches/ownCloud/*;do patch -p1 < $$i;done
+	nodejs make generic
+	for i in `ls -r $(CURDIR)/debian/patches/ownCloud/*`;do patch -Rp1 < $$i;done
+	# Restore initial Makefile
 	mv make.js.bkp make.js
 	dh_auto_build
 
 override_dh_auto_clean:
 	nodejs make clean
 	rm -rf extensions/firefox/locale
+	rm -rf oc
 	rm -rf web/locale
 	dh_auto_clean
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list