debian/0000755000000000000000000000000012150640722007165 5ustar debian/watch0000644000000000000000000000012412150626250010213 0ustar version=3 http://drupal.org/project/libraries .*/libraries-7.x-(\d[\d_.]+)\.tar\.gz debian/rules0000755000000000000000000000150012150640517010243 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode #export DH_VERBOSE=1 DESTDIR = $(CURDIR)/debian/drupal7-mod-libraries BUILDDIR = $(DESTDIR)//usr/share/drupal7/modules/libraries clean: dh_testdir dh_testroot dh_clean build: ; install: dh_testdir dh_testroot dh_prep dh_installdirs dh_installdocs README.txt tests cp -r libraries.install libraries.drush.inc libraries.module libraries.api.php libraries.info $(BUILDDIR) find $(BUILDDIR) -type f |xargs chmod 0644 build-arch: build build-indep: build binary-arch: ; binary-indep: install dh_testdir dh_testroot dh_installdocs dh_installman dh_installchangelogs CHANGELOG.txt dh_compress dh_fixperms dh_installdeb dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install debian/compat0000644000000000000000000000000212150626250010363 0ustar 8 debian/control0000644000000000000000000000113312150626250010566 0ustar Source: drupal7-mod-libraries Section: web Priority: extra Maintainer: Daniel Pocock Build-Depends: debhelper (>> 8.0.0) Standards-Version: 3.9.4 Homepage: http://drupal.org/project/libraries Vcs-Git: git://git.debian.org/collab-maint/drupal7-mod-libraries.git Vcs-Browser: http://git.debian.org/?p=collab-maint/drupal7-mod-libraries.git;a=summary Package: drupal7-mod-libraries Architecture: all Depends: ${misc:Depends}, drupal7 Description: libraries modules for Drupal 7 The common denominator for all Drupal modules/profiles/themes that integrate with external libraries. debian/copyright0000644000000000000000000000056712150637605011136 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: libraries Upstream-Contact: Tobias Stoeckler Source: http://drupal.org/project/libraries Files: * Copyright: 2010-2013 Tobias Stoeckler License: GPL-2+ The full text of the GPL-2 license is available in /usr/share/common-licenses/GPL-2 on your Debian system. debian/source/0000755000000000000000000000000012150626250010465 5ustar debian/source/format0000644000000000000000000000001412150626250011673 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000105412150640643011041 0ustar drupal7-mod-libraries (2.1-3) unstable; urgency=low * Lintian issues resolved -- Daniel Pocock Mon, 27 May 2013 13:20:44 +0200 drupal7-mod-libraries (2.1-2) unstable; urgency=low * Release to unstable * README.Debian now explains directory layout and symlinks for /usr/local -- Daniel Pocock Mon, 27 May 2013 11:52:00 +0200 drupal7-mod-libraries (2.1-1) experimental; urgency=low * Initial release (Closes: #704196) -- Daniel Pocock Fri, 29 Mar 2013 09:34:19 +0000 debian/README.Debian0000644000000000000000000001231612150626250011231 0ustar Aims ---- The aim of the libraries module is to allow multiple Drupal modules to share common third-party code, such as JavaScript libraries. The aim of this Debian package is to make this paradigm convenient within a Debian environment, in particular, where third-party JavaScript code is available under /usr/share/javascript Observations ------------ It isn't enough to just symlink JavaScript code from /usr/share/javascript to /usr/share/drupal7/libraries Each third party module needs a Drupal wrapper module to declare what it does. Here is an example of actual packages for DruCall, using the shared SIPml5 javascript: drupal7 - Drupal drupal7-mod-libraries - the libraries API libjs-sipml5 - the JavaScript code under /usr/share/javascript drupal7-mod-sipml5 - a wrapper that declares the SIPml5 JavaScript, and satisfies the Debian and Drupal package dependencies for sipml5 drupal7-mod-drucall - the module using the third party library A wrapper module like drupal7-mod-sipml5 is needed for each version of Drupal. However, only a single copy of the JavaScript itself, (e.g. libjs-sipml5) is shared between all Drupal installations (e.g. Drupal6, Drupal7) on the same system. One oddity of the libraries module: it expects to be able to determine the version of a JavaScript library by scanning the content of the file or directory where it is installed. If this can't be easily done (e.g. because a version string is not embedded in a particular .js file), then a quick hack is to create a file called VERSION that contains the version. See the package drupal7-mod-sipml5 for an example of how this is done. Drupal local directory issues (and solutions) on Debian ------------------------------------------------------- On a Debian system, using the drupal7 package, the `official' installation directory is /usr/share/drupal7 Many public documents refer to subdirectories of the main installation directory, for example, sites/all/modules is considered to be relative to the installation directory. Many internal Drupal functions (such as drupal_add_js()) expect their arguments to be relative to the Drupal installation directory. The Drupal function base_path() returns /usr/share/drupal7 on Debian and this value is prepended to the relative paths to construct absolute paths. The basic Drupal package (e.g. drupal7) relies on symlinks to locations outside of /usr/share so that users can modify files related to Drupal (modifying files under /usr/share is bad practice, these files are maintained by the package management system): /usr/share/drupal7/sites -> /etc/drupal/7/sites - this symlink is created automatically by the package - this allows per-site or server-wide config settings to be modified, by keeping them in the /etc tree /usr/share/drupal7/modules/local -> /usr/local/share/drupal/7/modules - this link can be created manually (recommended by drupal7/README.Debian) to allow local installation of non-packaged modules under the /usr/local tree - the name `local' doesn't have any special meaning to Drupal. Drupal simply scans /usr/share/drupal7/modules recursively looking for modules and descends into local as part of the sub-tree scan. - this same concept applies for /usr/share/drupal7/themes /usr/share/drupal7/libraries is scanned by the libraries module. Unlike the modules and themes directories, it is NOT scanned recursively and amonst other things, this means a symlink such as /usr/share/drupal7/libraries/local -> /usr/share/local/drupal/7/libraries can not be created and would not work. While it may appear trivial to patch the libraries module to do a recursive sub-tree scan, it is not so easy: the contents of the libraries tree are the third party JavaScript packages (or symlinks to their real locations under /usr/share/javascript) and each of these packages has it's own ad-hoc directory layout. A recursive scan would not know which of these directories are really top-level package directories. Nonetheless, site managers should not be putting local JavaScript (or wrappers, see below) directly into /usr/share/drupal7/libraries, so the following convention can be used: mkdir -p /usr/share/local/drupal/7/libraries mkdir /etc/drupal/7/sites/all ln -s /usr/share/local/drupal/7/libraries /etc/drupal/7/sites/all Drupal's libraries module will find that location when it searches the relative path `sites/all/libraries' Now, any locally managed JavaScript packages can be unpacked in (or symlinked to) /usr/share/local/drupal/7/libraries Non-packaged JavaScript and/or wrapper modules ---------------------------------------------- If JavaScript or other third party code is downloaded manually, it can be placed under /usr/local/share/drupal/7/libraries/SOMETHING Alternatively, JavaScript code can be downloaded to /usr/local/share/javascript/SOMETHING and then symlinked to /usr/local/share/drupal/7/libraries/SOMETHING The corresponding third-party wrapper module for Drupal then needs to be downloaded and installed to /usr/local/share/drupal/7/modules just like any other manually installed module. Consider using dh-make-drupal to package Drupal modules that you require http://gwolf.org/dh-make-drupal debian/dirs0000644000000000000000000000004512150626250010050 0ustar /usr/share/drupal7/modules/libraries