Skip to content

Instantly share code, notes, and snippets.

@bigeasy
Created September 27, 2010 19:11
Show Gist options
  • Select an option

  • Save bigeasy/599621 to your computer and use it in GitHub Desktop.

Select an option

Save bigeasy/599621 to your computer and use it in GitHub Desktop.
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets by Bill Allombert 2001
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
export DH_VERBOSE=1
clean:
dh_testdir
rm -rf debian/coffeescript
rm -f debian/files
build:
install:
dh_testdir
dh_testroot
dh_prep
dh_installdirs
echo "root = $(CURDIR)/debian/coffeescript/usr/lib/node" > $(CURDIR)/npmrc
echo "binroot = $(CURDIR)/debian/coffeescript/usr/bin" >> $(CURDIR)/npmrc
echo "manroot = $(CURDIR)/debian/coffeescript/usr/share/man" >> $(CURDIR)/npmrc
echo "loglevel = verbose" >> $(CURDIR)/npmrc
cat $(CURDIR)/npmrc
which tar
npm_config_globalconfig=$(CURDIR)/npmrc npm install $(CURDIR)
rm -rf $(CURDIR)/debian/coffeescript/usr/.npm/.cache
rm $(CURDIR)/npmrc
binary-arch: install
binary-indep: install
rm -f debian/files
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-arch binary-indep
.PHONY: configure clean build install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment