rules 2.61 KB
Newer Older
Albert Gräf's avatar
Albert Gräf committed
1 2 3 4 5 6
#!/usr/bin/make -f
# -*- makefile -*-

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

Albert Gräf's avatar
Albert Gräf committed
7
nwjsver = 0.18.5
8 9 10 11 12 13 14 15
nwjspkg = nwjs-sdk-v$(nwjsver)-linux

ifeq ("$(shell dpkg-architecture -qDEB_HOST_ARCH)","amd64")
arch = x64
else
arch = ia32
endif

Albert Gräf's avatar
Albert Gräf committed
16 17 18 19 20 21
%:
	dh $@

override_dh_auto_configure:

override_dh_auto_build:
22 23
# Copy the nw.js sources to where purr-data wants them.
	tar -xf debian/nwjs/$(nwjspkg)-$(arch).tar.gz && rm -rf pd/nw/nw && mv $(nwjspkg)-$(arch) pd/nw/nw
24
	cd l2ork_addons && ./tar_em_up.sh -B -n
Albert Gräf's avatar
Albert Gräf committed
25 26

override_dh_auto_install:
27
	mkdir -p debian/purr-data && mv packages/linux_make/build/* debian/purr-data
28
# Remove some unneeded files.
29
	cd debian/purr-data/ && rm -f Makefile README.txt
Albert Gräf's avatar
Albert Gräf committed
30
#	cd debian/purr-data/usr/lib/pd-l2ork/bin && rm -f DejaVuSansMono.ttf
31
	cd debian/purr-data/usr/share/applications && rm -f pd-l2ork-k12*.desktop
32
	cd debian/purr-data/usr/lib/pd-l2ork/extra && rm -rf */*.pd_linux_o */*.la
33 34
# Move cyclist and pdsend/pdreceive to the pd-l2ork lib directory to prevent
# conflicts with other packages providing these files.
35
	cd debian/purr-data/usr/bin && mv pdsend pdreceive cyclist ../lib/pd-l2ork/bin
36
# Also remove the corresponding man pages.
37
	cd debian/purr-data/usr/share/man/man1 && rm -rf pdsend.* pdreceive.*
38 39
# Move the Gem include files into the pd-l2ork include directory to prevent
# conflicts with other packages providing these files.
40
	cd debian/purr-data/usr && mv include/Gem include/pd-l2ork
41
# Edit the Gem pkgconfig file accordingly and rename it.
42
	cd debian/purr-data/usr/lib/pkgconfig && sed -e 's?/include?/include/pd-l2ork?g' -e 's?/lib/pd/extra?/lib/pd-l2ork/extra?g' < Gem.pc > pd-l2ork-Gem.pc && rm -f Gem.pc
43
# Sanitize permissions.
44 45 46 47 48 49 50
	cd debian/purr-data && chmod -R go-w * && chmod -R a+r * && chmod a-x usr/lib/pd-l2ork/default.settings
	find debian/purr-data/usr/lib/pd-l2ork/bin/nw -executable -not -type d | xargs chmod a+x
	find debian/purr-data -executable -name '*.pd_linux' | xargs chmod a-x
	find debian/purr-data -executable -name '*.pd' | xargs chmod a-x
	find debian/purr-data -executable -name '*.txt' | xargs chmod a-x
	find debian/purr-data -executable -name '*.aif*' | xargs chmod a-x
	find debian/purr-data -type d | xargs chmod a+x
Albert Gräf's avatar
Albert Gräf committed
51

52 53 54 55
# NOTE: Older systems use dh_pysupport instead of dh_python2. See
# http://deb.li/dhs2p.
override_dh_python2:
	dh_python2 -n -Xxmlrpc-test.py
Albert Gräf's avatar
Albert Gräf committed
56 57 58 59

override_dh_compress:
	dh_compress -X.pd -X.wav -X.aiff -X.txt -X.md

60 61 62
override_dh_strip:
	dh_strip -Xpnacl

63 64 65 66
# Supply some options to get rid of a gazillion of warnings about shared
# library files which are really externals.
override_dh_shlibdeps:
	dh_shlibdeps --dpkg-shlibdeps-params="--ignore-missing-info --warnings=0"