2003-04-21 15:40:58 +00:00
|
|
|
#!/usr/bin/make -f
|
2008-03-01 17:16:54 +00:00
|
|
|
# Rules for mkvtoolnix based on Joey Hess's sample
|
2003-04-21 15:40:58 +00:00
|
|
|
|
2008-03-01 17:16:54 +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
|
|
|
|
|
2008-03-01 17:16:54 +00:00
|
|
|
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
|
|
|
|
2008-03-01 17:16:54 +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
|
|
|
|
|
2008-03-01 17:16:54 +00:00
|
|
|
build-stamp:
|
2003-04-21 15:40:58 +00:00
|
|
|
dh_testdir
|
|
|
|
|
2008-03-01 17:16:54 +00:00
|
|
|
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
|
|
|
|
|
2008-03-01 17:16:54 +00:00
|
|
|
########################################################################
|
|
|
|
# Other rules
|
|
|
|
########################################################################
|
2003-04-21 15:40:58 +00:00
|
|
|
clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2008-03-01 17:16:54 +00:00
|
|
|
rm -f build-stamp
|
|
|
|
rm -f src/mkvinfo-gui
|
|
|
|
rm -f src/mmg/mmg-gui
|
2003-04-21 15:40:58 +00:00
|
|
|
|
2008-03-01 17:16:54 +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
|
2008-03-01 17:16:54 +00:00
|
|
|
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
|
|
|
|
|
2008-03-01 17:16:54 +00:00
|
|
|
$(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
|
2008-03-01 17:16:54 +00:00
|
|
|
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
|
2010-01-04 22:13:22 +00:00
|
|
|
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
|
2010-02-09 11:26:38 +00:00
|
|
|
dh_installman --language=zh_CN doc/man/zh_CN/mkvextract.1 doc/man/zh_CN/mkvinfo.1 doc/man/zh_CN/mkvmerge.1 doc/man/zh_CN/mkvpropedit.1
|
|
|
|
dh_installman --language=zh_CN -pmkvtoolnix-gui doc/man/zh_CN/mmg.1
|
2008-03-01 17:16:54 +00:00
|
|
|
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
|
2008-03-01 17:16:54 +00:00
|
|
|
.PHONY: build clean binary-indep binary-arch binary install
|