File: rules

package info (click to toggle)
libjs-jstorage 0.3.1-1.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 324 kB
  • sloc: javascript: 706; makefile: 26; xml: 8
file content (33 lines) | stat: -rwxr-xr-x 870 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
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

package	:= $(shell dpkg-parsechangelog|grep ^Source|awk '{print $$2}')
version	:= $(shell dpkg-parsechangelog|grep ^Version|awk '{print $$2}' \
	|sed 's/-[[:digit:]]\+$$//')

clean::
	rm -fr build

build/stamp:
	mkdir -p build
	touch $@

build/libjs-jstorage:: build/stamp
	install -m 0644 jstorage.js build/
	yui-compressor --type js \
		--charset utf-8 \
		--nomunge \
		--disable-optimizations \
		--preserve-semi \
		build/jstorage.js -o build/jstorage.min.js
	sed 's/"jstorage.js"/"jstorage.min.js"/' test.html > build/test.min.html
	sed 's/jstorage.js"/jstorage.min.js"/' tests/testrunner.html \
				 > build/testrunner.min.html

tarball: clean
	test -d ../$(package)-$(version)
	cd .. && \
	tar --exclude=.git --exclude=debian \
		-czvf $(package)_$(version).orig.tar.gz \
		$(package)-$(version)