summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 1684ae6687f223e994c18a12eef0d63682b0de72 (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
UNCONDDIRS = examples gst pkgconfig testsuite
SUBDIRS = \
	$(UNCONDDIRS)
DIST_SUBDIRS = $(UNCONDDIRS)

EXTRA_DIST = \
	ltihooks.py \
	gst-python.spec.in \
	gst-python.spec \
	RELEASE

include $(top_srcdir)/common/release.mak

pygst.py: pygst.py.in Makefile
	if test -f $@; then chmod +w $@; fi
	sed -e "s|@PYGSTDIR\@|$(shell pwd)|g" \
	    -e "s|@GST_MAJORMINOR\@|$(GST_MAJORMINOR)|g" \
	    $< > $@
	chmod -w $@

all-local: pygst.py

# rewrite pygst path in installed pygst.py, install pth file.
install-data-local: Makefile
	$(mkinstalldirs) $(DESTDIR)$(pythondir)
	sed -e "s|@PYGSTDIR\@|$(PYTHONDIR)/gst-$(GST_MAJORMINOR)|g" \
	    -e "s|@GST_MAJORMINOR\@|$(GST_MAJORMINOR)|g" \
	    $(srcdir)/pygst.py.in > $(DESTDIR)$(pythondir)/pygst.py
	chmod 644 $(DESTDIR)$(pyexecdir)/pygst.py
	echo "gst-$(GST_MAJORMINOR)" > $(DESTDIR)$(pythondir)/pygst.pth

# also install pth file in pyexec.
install-exec-local:
	$(mkinstalldirs) $(DESTDIR)$(pyexecdir)
	echo "gst-$(GST_MAJORMINOR)" > $(DESTDIR)$(pyexecdir)/pygst.pth