File: rules

package info (click to toggle)
libjs-swfobject 2.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 156 kB
  • ctags: 78
  • sloc: makefile: 32
file content (49 lines) | stat: -rwxr-xr-x 1,349 bytes parent folder | download
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
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/make -f

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

SRC_VERSION = $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
ORIG_VERSION = $(shell echo $(SRC_VERSION) | sed -ne 's/+dfsg//p')
ORIGTAR = libjs-swfobject_$(ORIG_VERSION).orig.tar.gz
ORIGDIR = swfobject
DEBTAR = libjs-swfobject_$(SRC_VERSION).orig.tar

%:
	dh $@

clean:
	dh_testdir
	dh_auto_clean
	dh_clean
	rm -rf build

build: build-arch build-indep

build-arch:

build-indep:
	dh_testdir
	mkdir build
	mtasc -main -header 310:130:12 -version 6 -out build/expressInstall.swf -swf build/expressInstall.swf src/expressInstall.as
	/usr/bin/yui-compressor src/swfobject.js -o build/swfobject.js
	find src -type f -print0 | xargs -0 chmod a-x
	find . -maxdepth 1 -type f -print0 | xargs -0 chmod a-x

get-orig-source:
# get source
	wget https://github.com/swfobject/swfobject/archive/2.2.zip
# unpack and rename
	mkdir -p _unpack
	unzip 2.2.zip -d _unpack
	mv _unpack/swfobject-2.2/swfobject/ _unpack/$(ORIGDIR)
# fix line endings
	sed -i 's/\r//g' _unpack/$(ORIGDIR)/src/expressInstall.as

# remove dfsg non complient files
	rm -r _unpack/swfobject-2.2/
	rm -f _unpack/$(ORIGDIR)/test.swf
	rm -f _unpack/$(ORIGDIR)/expressInstall.swf
# repack
	fakeroot tar -cf - -C _unpack $(ORIGDIR) | gzip -9 - > $(DEBTAR).gz
	rm -rf _unpack