More nasm removal cleanups
[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                 --disable-plugin-builddir \
40                 --disable-tests \
41                 --disable-examples \
42                 --enable-docs-build \
43                 --enable-DEBUG \
44                 --enable-debug
45
46         touch configure-stamp
47
48 build: configure-stamp build-stamp
49 build-stamp:
50         dh_testdir
51
52         $(MAKE)
53
54         touch build-stamp
55
56 clean:
57         dh_testdir
58         dh_testroot
59         rm -f build-stamp configure-stamp
60
61         # why does distclean not get the docs? who knows?
62         -(cd docs; $(MAKE) clean)
63         -$(MAKE) distclean
64
65         dh_clean
66
67 install: DH_OPTIONS=
68 install: build
69         dh_testdir
70         dh_testroot
71         dh_clean -k
72         dh_installdirs
73
74         # Add here commands to install the package into debian/gstreamer.
75         $(MAKE) prefix=$(CURDIR)/debian/gstreamer/usr install
76
77         # move around the doc dirs
78         mkdir -p debian/gstreamer/usr/share/doc/gstreamer-doc
79         -cp -r docs/fwg/gst-plugin-writers-guide \
80            docs/manual/gstreamer-manual \
81            debian/gstreamer/usr/share/doc/gstreamer-doc
82
83         # devhelp files not installed by default
84         mkdir -p debian/gstreamer/usr/share/devhelp/specs
85         -cp docs/devhelp/*.devhelp debian/gstreamer/usr/share/devhelp/specs
86
87         # -doc lintian overrides
88         mkdir -p debian/gstreamer-doc/usr/share/lintian/overrides/
89         cp -a debian/gstreamer-doc.lintian debian/gstreamer-doc/usr/share/lintian/overrides/gstreamer-doc
90
91         dh_movefiles --sourcedir=debian/gstreamer
92
93 # Build architecture-independent files here.
94 # Pass -i to all debhelper commands in this target to reduce clutter.
95 binary-indep: DH_OPTIONS=-i
96 binary-indep: build install
97 # Need this version of debhelper for DH_OPTIONS to work.
98         dh_testdir
99         dh_testroot
100         dh_installdocs -A debian/README.Debian
101         dh_installexamples
102         dh_installmenu
103         dh_installman
104         dh_installchangelogs
105         dh_strip
106         dh_link
107         dh_compress
108         dh_fixperms
109         dh_installdeb
110         dh_gencontrol
111         dh_md5sums
112         dh_builddeb
113
114 # Build architecture-dependent files here.
115 # Pass -a to all debhelper commands in this target to reduce clutter.
116 binary-arch: DH_OPTIONS=-a
117 binary-arch: build install
118 # Need this version of debhelper for DH_OPTIONS to work.
119         dh_testdir
120         dh_testroot
121         dh_installdocs -A debian/README.Debian
122         dh_installexamples
123         dh_installmenu
124         dh_installman
125         dh_installchangelogs
126         dh_strip
127         dh_compress
128         dh_fixperms
129         dh_makeshlibs
130         dh_installdeb
131         dh_shlibdeps -l`pwd`/debian/libgstreamer$(version)/usr/lib:`pwd`/debian/gstreamer-core-libs/usr/lib
132         dh_gencontrol
133         dh_md5sums
134         dh_builddeb
135
136 binary: binary-indep binary-arch
137 .PHONY: build clean binary-indep binary-arch binary install configure