mkvtoolnix/debian-upstream/rules

105 lines
2.9 KiB
Plaintext
Raw Normal View History

2003-04-21 15:40:58 +00:00
#!/usr/bin/make -f
# Rules for mkvtoolnix based on Joey Hess's sample
2003-04-21 15:40:58 +00:00
####################################################################
# Build flags
####################################################################
2003-04-21 15:40:58 +00:00
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
CONFIG_FLAGS = --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
2003-04-21 15:40:58 +00:00
#######################################################################
# BUILD : Two versions: without and with GUI.
# This impacts mmg which only exists in -GUI
# For mkvinfo, we use an alternative
#######################################################################
2003-04-21 15:40:58 +00:00
build: build-stamp
build-stamp:
2003-04-21 15:40:58 +00:00
dh_testdir
CFLAGS="$(CFLAGS)" ./configure $(CONFIG_FLAGS) --enable-gui
$(MAKE)
mv src/mkvinfo src/mkvinfo-gui
mv src/mmg/mmg src/mmg/mmg-gui
$(MAKE) distclean
CFLAGS="$(CFLAGS)" ./configure $(CONFIG_FLAGS) --disable-gui
2003-04-21 15:40:58 +00:00
$(MAKE)
touch build-stamp
########################################################################
# Other rules
########################################################################
2003-04-21 15:40:58 +00:00
clean:
dh_testdir
dh_testroot
rm -f build-stamp
rm -f src/mkvinfo-gui
rm -f src/mmg/mmg-gui
2003-04-21 15:40:58 +00:00
-$(MAKE) clean
rm -f Makefile config.h
2003-04-21 15:40:58 +00:00
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
rm -f config.log
rm -f config.status
2003-04-21 15:40:58 +00:00
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
$(MAKE) install prefix=$(CURDIR)/debian/tmp
2003-04-21 15:40:58 +00:00
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs -a
dh_installexamples
dh_install -a
mv debian/mkvtoolnix/usr/bin/mkvinfo debian/mkvtoolnix/usr/bin/mkvinfo-text
mv debian/mkvtoolnix-gui/usr/bin/mmg-gui debian/mkvtoolnix-gui/usr/bin/mmg
dh_installmenu -pmkvtoolnix-gui
dh_installman --language=C doc/man/mkvextract.1 doc/man/mkvinfo.1 doc/man/mkvmerge.1 doc/man/mkvpropedit.1
dh_installman --language=C -pmkvtoolnix-gui doc/man/mmg.1
dh_installman --language=ja doc/man/ja/mkvextract.1 doc/man/ja/mkvinfo.1 doc/man/ja/mkvmerge.1 doc/man/ja/mkvpropedit.1
dh_installman --language=ja -pmkvtoolnix-gui doc/man/ja/mmg.1
dh_desktop -pmkvtoolnix-gui
dh_link -pmkvtoolnix usr/share/man/man1/mkvinfo.1.gz usr/share/man/man1/mkvinfo-text.1.gz
dh_link -pmkvtoolnix-gui usr/share/man/man1/mkvinfo.1.gz usr/share/man/man1/mkvinfo-gui.1.gz
2003-04-21 15:40:58 +00:00
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install