2
# -*- mode: makefile; coding: utf-8 -*-
3
# Copyright © 2011 Jonas Smedegaard <dr@jones.dk>
4
# Description: Main Debian packaging script for node-expat
6
# This program is free software; you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 2, or (at your option)
11
# This program is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
# General Public License for more details.
16
# You should have received a copy of the GNU General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19
-include /usr/share/cdbs/1/rules/upstream-tarball.mk
20
include /usr/share/cdbs/1/rules/utils.mk
21
include /usr/share/cdbs/1/rules/debhelper.mk
23
libpkgname = libnode-node-expat
25
CDBS_BUILD_DEPENDS += , nodejs-dev (>= 0.2.6), libexpat-dev
27
# suppress optional build-dependencies
28
CDBS_BUILD_DEPENDS_rules_upstream-tarball =
29
CDBS_BUILD_DEPENDS_rules_utils_copyright-check =
31
DEB_UPSTREAM_URL = http://githubredir.debian.net/github/astro/node-expat/
32
DEB_UPSTREAM_TARBALL_BASENAME = v$(DEB_UPSTREAM_TARBALL_VERSION)
33
DEB_UPSTREAM_WGET_OPTS += --no-check-certificate
34
DEB_UPSTREAM_TARBALL_MD5 = c21865d1d53ddf849fb9ec7c3a7eed27
36
DEB_INSTALL_DOCS_$(libpkgname) += README.markdown
37
DEB_INSTALL_EXAMPLES_$(libpkgname) += test.js
39
configure/$(libpkgname)::
40
NODE_PATH=$(cdbs_curdestdir)/usr/lib/nodejs node-waf configure
43
NODE_PATH=$(cdbs_curdestdir)/usr/lib/nodejs node-waf build
45
install/$(libpkgname)::
46
NODE_PATH=$(cdbs_curdestdir)/usr/lib/nodejs node-waf install
48
# Node modules have an uncommon extension preventing autodetection by
49
# dh_shlibdeps, so we do it manually
50
binary-strip-IMPL/$(libpkgname)::
51
$(if $(is_debug_package)$(filter nostrip,$(DEB_BUILD_OPTIONS)),,find "$(cdbs_curdestdir)" -name "*.node" -exec strip --remove-section=.comment --remove-section=.note --strip-unneeded {} +)
52
binary-predeb-IMPL/$(libpkgname)::
53
find "$(cdbs_curdestdir)" -name "*.node" -exec dpkg-shlibdeps -Tdebian/$(cdbs_curpkg).substvars {} +