File: rules

package info (click to toggle)
camo 2.3.0+dfsg-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 180 kB
  • sloc: ruby: 227; sh: 86; makefile: 21
file content (37 lines) | stat: -rwxr-xr-x 1,117 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/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.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ 

CURVER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-(+dfsg)]+).*,\1,p')
FULLVER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')

PACKAGE_NAME=camo
TARBALL=$(PACKAGE_NAME)_$(FULLVER).orig.tar.gz
ORIG_TARBALL=v$(CURVER).tar

get-orig-source:
	wget https://github.com/atmos/camo/archive/$(ORIG_TARBALL).gz
	gunzip $(ORIG_TARBALL).gz
	tar --delete -f $(ORIG_TARBALL) camo-$(CURVER)/server.js
	gzip $(ORIG_TARBALL)
	mv $(ORIG_TARBALL).gz $(TARBALL)

override_dh_auto_build:
	rake --trace build
override_dh_auto_test:
	nodejs server.js &
	rake --trace test
	pkill -KILL -xf "nodejs server.js"

override_dh_auto_clean:
	rm -f tmp/camo.pid server.js