aboutsummaryrefslogtreecommitdiff
path: root/debian/rules
blob: 03cf275bf2f76febc123cbbf42273abbfd7533ff (plain)
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
#!/usr/bin/make -f

PACKAGE = $(CURDIR)/debian/pd-extended
pkglibdir = /usr/lib/pd-extended/extra

%:
	dh $@ --buildsystem=makefile


override_dh_auto_build:
	make -C packages/linux_make DESTDIR=$(PACKAGE) prefix=/usr all


override_dh_auto_install:
	make -C packages/linux_make DESTDIR=$(PACKAGE) prefix=/usr install
# free desktop files that need to be renamed, so can't go in debian/install
	install -d $(PACKAGE)/usr/share/menu
	install -m0644 $(CURDIR)/packages/linux_make/pd-extended.menu \
		$(PACKAGE)/usr/share/menu/pd-extended
# clean things up
	find $(PACKAGE)/usr/lib/pd-extended/doc/ -type f -print0 | xargs -0 chmod a-x
	find $(PACKAGE)/usr/lib/pd-extended/extra/ -type f -print0 | xargs -0 chmod a-x
# Pd-extended uses the one in /usr/lib/pd-extended
	rm -- $(PACKAGE)/usr/bin/pd-gui.tcl
# delete these since they are provided by the 'puredata' package suite
	rm -- $(PACKAGE)/usr/bin/pdsend
	rm -- $(PACKAGE)/usr/bin/pdreceive
	rm -- $(PACKAGE)/usr/share/man/man1/pdsend.1
	rm -- $(PACKAGE)/usr/share/man/man1/pdreceive.1
	rm -- $(PACKAGE)/usr/include/m_pd.h
# the 'pd' command should be handled by update-alternatives
	mv $(PACKAGE)/usr/bin/pd $(PACKAGE)/usr/bin/pd-extended
	mv $(PACKAGE)/usr/share/man/man1/pd.1 \
		$(PACKAGE)/usr/share/man/man1/pd-extended.1
	gzip -9 $(PACKAGE)/usr/share/man/man1/pd-extended.1

override_dh_shlibdeps:
	dpkg-shlibdeps \
		$(PACKAGE)/usr/bin/pdextended \
		$(PACKAGE)$(pkglibdir)/*.pd_linux \
		$(PACKAGE)$(pkglibdir)/*/*.pd_linux \
		-T$(PACKAGE).substvars