DOCS/xml/README: improve
[mplayer/glamo.git] / debian / rules
blob5a775b890602a62e9ea2997275a7466fcc777c28
1 #!/usr/bin/make -f
2 # Made with the aid of debmake, by Christoph Lameter,
3 # based on the sample debian/rules file for GNU hello by Ian Jackson.
4 #export DH_VERBOSE=1
6 # do not run the actual rules of this makefile in parallel. sub-makes
7 # can go in parallel
8 .NOTPARALLEL:
10 package := mplayer
11 prefix := $(shell pwd)/debian/$(package)
13 arch := $(shell dpkg --print-architecture)
15 # See http://wiki.debian.org/Teams/Dpkg/DebianRules; #465282 and
16 # https://wiki.ubuntu.com/DistCompilerFlags
17 CLEAN_ENV=env -u CFLAGS -u CPPFLAGS -u LDFLAGS -u FFLAGS -u CXXFLAGS
19 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
20 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
21 MAKEFLAGS += -j$(NUMJOBS)
22 endif
24 configure: configure-stamp
25 configure-stamp:
26 dh_testdir
27 # Add here commands to configure the package.
28 $(checkdir)
29 # If you plan to install the target .deb on a wide variety of machines,
30 # you may want to add the "--enable-runtime-cpudetection" option to
31 # the line below, but beware: the resulting binary will run slower
32 $(CLEAN_ENV) \
33 ./configure --prefix=/usr --confdir=/etc/mplayer $(DEB_BUILD_CONFIGURE)
35 touch configure-stamp
37 build: configure-stamp build-stamp
38 build-stamp:
39 dh_testdir
41 # commands to compile the package.
42 $(CLEAN_ENV) \
43 ${MAKE}
45 touch build-stamp
47 clean:
48 dh_testdir
49 dh_testroot
50 rm -f build-stamp configure-stamp
52 # commands to clean up after the build process.
53 -$(MAKE) distclean
54 dh_clean
56 # Build architecture-independent files here.
57 binary-indep: build
58 # We have nothing to do by default.
60 # Build architecture-dependent files here.
61 binary-arch: build
62 dh_testdir
63 dh_testroot
64 dh_clean -k
65 dh_installdirs
67 # commands to install the package into debian/<packagename>
68 $(MAKE) prefix=$(prefix)/usr BINDIR=$(prefix)/usr/bin CONFDIR=$(prefix)/etc/mplayer LIBDIR=$(prefix)/usr/lib DATADIR=$(prefix)/usr/share/mplayer MANDIR=$(prefix)/usr/share/man install
70 install -D -m 644 etc/example.conf $(prefix)/etc/mplayer/mplayer.conf
71 dh_installdocs -X.svn -Xmplayer.1 DOCS/*
72 dh_installexamples etc/example.conf etc/dvb-menu.conf etc/input.conf etc/menu.conf
73 dh_installmime
74 dh_installinfo
75 dh_installchangelogs
76 #ChangeLog
77 dh_link
78 dh_strip
79 dh_compress
80 dh_fixperms
81 dh_makeshlibs
82 dh_installdeb
83 dh_perl
84 dh_shlibdeps
85 dh_gencontrol
86 dh_md5sums
87 dh_builddeb
91 #binary-arch: checkroot build
92 # $(checkdir)
93 # -rm -rf debian/tmp
94 # install -d debian/tmp
95 # cd debian/tmp && install -d `cat ../dirs`
98 # Must have debmake installed for this to work. Otherwise please copy
99 # /usr/bin/debstd into the debian directory and change debstd to debian/debstd
100 # debstd
101 # dpkg-gencontrol -isp
102 # chown -R root.root debian/tmp
103 # chmod -R go=rX debian/tmp
104 # dpkg --build debian/tmp ..
106 binary: binary-indep binary-arch
108 .PHONY: binary binary-arch binary-indep clean checkroot