please don't make decisions like these on your own
[platform/upstream/gstreamer.git] / debian / rules
1 #!/usr/bin/make -f
2
3 version=0.4.1
4
5 #export DH_VERBOSE=1
6 export DH_COMPAT=3
7 export DH_OPTIONS
8
9 export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10 export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
11
12 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
13         confflags += --build $(DEB_HOST_GNU_TYPE)
14 else
15         confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
16 endif
17
18 debian/control: debian/rules debian/control.in
19         sed 's/@VERSION@/$(version)/g' debian/control.in >debian/control
20
21 debian/libgstreamer$(version).files: debian/control.in debian/libgstreamerVERSION.files
22         cp -f debian/libgstreamerVERSION.files debian/libgstreamer$(version).files
23
24 maint: debian/control debian/libgstreamer$(version).files
25
26 configure: configure-stamp
27 configure-stamp:
28         dh_testdir
29
30         # Add here commands to configure the package.
31         ./configure \
32                 $(confflags) \
33                 --prefix=/usr \
34                 --mandir=\$${prefix}/share/man \
35                 --infodir=\$${prefix}/share/info \
36                 --with-html-dir=\$${prefix}/share/doc/gstreamer-doc \
37                 --sysconfdir=/etc \
38                 --with-configdir=/etc/gstreamer \
39                 --localstatedir=/var \
40                 --with-cachedir=/var/cache/gstreamer \
41                 --disable-plugin-builddir \
42                 --disable-tests \
43                 --disable-examples \
44                 --enable-docs-build \
45                 --enable-DEBUG \
46                 --enable-debug
47
48         touch configure-stamp
49
50 build: configure-stamp build-stamp
51 build-stamp:
52         dh_testdir
53
54         $(MAKE)
55
56         touch build-stamp
57
58 clean:
59         dh_testdir
60         dh_testroot
61         rm -f build-stamp configure-stamp
62
63         # why does distclean not get the docs? who knows?
64         -(cd docs; $(MAKE) clean)
65         -$(MAKE) distclean
66
67         dh_clean
68
69 install: DH_OPTIONS=
70 install: build
71         dh_testdir
72         dh_testroot
73         dh_clean -k
74         dh_installdirs
75
76         # Add here commands to install the package into debian/gstreamer.
77         $(MAKE) prefix=$(CURDIR)/debian/gstreamer/usr install
78
79         # move around the doc dirs
80         mkdir -p debian/gstreamer/usr/share/doc/gstreamer-doc
81         -cp -r docs/fwg/gst-plugin-writers-guide \
82            docs/manual/gstreamer-manual \
83            debian/gstreamer/usr/share/doc/gstreamer-doc
84
85         # devhelp files not installed by default
86         mkdir -p debian/gstreamer/usr/share/devhelp/specs
87         -cp docs/devhelp/*.devhelp debian/gstreamer/usr/share/devhelp/specs
88
89         # -doc lintian overrides
90         mkdir -p debian/gstreamer-doc/usr/share/lintian/overrides/
91         cp -a debian/gstreamer-doc.lintian debian/gstreamer-doc/usr/share/lintian/overrides/gstreamer-doc
92
93         dh_movefiles --sourcedir=debian/gstreamer
94
95 # Build architecture-independent files here.
96 # Pass -i to all debhelper commands in this target to reduce clutter.
97 binary-indep: DH_OPTIONS=-i
98 binary-indep: build install
99 # Need this version of debhelper for DH_OPTIONS to work.
100         dh_testdir
101         dh_testroot
102         dh_installdocs -A debian/README.Debian
103         dh_installexamples
104         dh_installmenu
105         dh_installman
106         dh_installchangelogs
107         dh_strip
108         dh_link
109         dh_compress
110         dh_fixperms
111         dh_installdeb
112         dh_gencontrol
113         dh_md5sums
114         dh_builddeb
115
116 # Build architecture-dependent files here.
117 # Pass -a to all debhelper commands in this target to reduce clutter.
118 binary-arch: DH_OPTIONS=-a
119 binary-arch: build install
120 # Need this version of debhelper for DH_OPTIONS to work.
121         dh_testdir
122         dh_testroot
123         dh_installdocs -A debian/README.Debian
124         dh_installexamples
125         dh_installmenu
126         dh_installman
127         dh_installchangelogs
128         dh_strip
129         dh_compress
130         dh_fixperms
131         dh_makeshlibs
132         dh_installdeb
133         dh_shlibdeps -l`pwd`/debian/libgstreamer$(version)/usr/lib:`pwd`/debian/gstreamer-core-libs/usr/lib
134         dh_gencontrol
135         dh_md5sums
136         dh_builddeb
137
138 binary: binary-indep binary-arch
139 .PHONY: build clean binary-indep binary-arch binary install configure